https://github.com/oanda/py-api-streaming
A demo app in Python for streaming rates using OANDA open api
https://github.com/oanda/py-api-streaming
Last synced: 3 months ago
JSON representation
A demo app in Python for streaming rates using OANDA open api
- Host: GitHub
- URL: https://github.com/oanda/py-api-streaming
- Owner: oanda
- License: mit
- Fork: true (RayCui/py-api-streaming)
- Created: 2014-03-26T14:29:49.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-19T18:48:47.000Z (about 8 years ago)
- Last Synced: 2024-03-26T15:14:05.283Z (about 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 53
- Watchers: 69
- Forks: 43
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-public-real-time-datasets - OANDA - HTTP based FOREX rates stream through the OANDA API. (Free / Finance/Crypto)
README
py-api-streaming
================A sample Python application that connects to OANDA's HTTP based rates stream.
### Setup
Clone this repo to the location of your choice
Update the following values in the connect_to_stream method in streaming.py
* domain
* account_id
* access_token (Authorization)
* instruments### Usage
~~~
python streaming.py [options]
~~~#### Options
**-b**, **--displayHeartBeat**
: _Optional_ Toggles the displaying of the stream's heartbeats. No heartbeats are displayed by default.### Sample Output
{"tick":{"instrument":"EUR_USD","time":"2014-03-07T20:58:07.461445Z","bid":1.38701,"ask":1.38712}}
{"tick":{"instrument":"EUR_USD","time":"2014-03-07T20:58:09.345955Z","bid":1.38698,"ask":1.38709}}
{"tick":{"instrument":"USD_CAD","time":"2014-03-07T20:58:12.320218Z","bid":1.10906,"ask":1.10922}}
{"tick":{"instrument":"USD_CAD","time":"2014-03-07T20:58:12.360615Z","bid":1.10904,"ask":1.10925}}### More Information
[http://developer.oanda.com/](http://developer.oanda.com/docs/v1/stream/#rates-streaming)