Python Forum
Oanda Api for price streaming
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Oanda Api for price streaming
#1
Hello everyone I am not sure if this is the right place to ask questions if not please refer me to the right place and I will move my question there . I am trying to make GUI application and implement Oanda API in it so I can stream forex pairs prices in my own GUI using matplotlib. I have everything set but the problem is I don't know how to retrieve the data using their API and most of the documentations on the net is all about algo trading , but what I am interested about at this point is to get instruments prices and stream them in my own GUI can anyone help me please on this? I m doing it to learn python
Reply
#2
I use quandl to get the eur/usd quote:

#!/usr/bin/python3
import requests
import json

rsp = requests.get("https://www.quandl.com/api/v3/datasets/ECB/EURUSD.json?rows=1")
if rsp.status_code == 200:
    data = rsp.text.strip()
    jj = json.loads(data)
    print(jj["dataset"]["data"][0])
else:
    print("error:", rsp.status_code)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is CTkDesigner worth the price? Edward_ 5 431 Apr-17-2024, 05:09 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020