We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I spent a couple of hours trying to figure out stuff, so here's my simple usage example that you can add to the 'README' and 'readthedocs' 👍
# get prices for a list of instruments pair_list = ['AUD_JPY','EUR_JPY','GBP_JPY','AUD_USD'] c.get_prices(instruments=','.join(pair_list),stream=False) #json response:: {u'prices': [{u'ask': 81.551, u'bid': 81.53, u'instrument': u'AUD_JPY', u'time': u'2016-01-26T07:39:56.525788Z'}, {u'ask': 127.975, u'bid': 127.957, u'instrument': u'EUR_JPY', u'time': u'2016-01-26T07:39:55.712253Z'}, {u'ask': 167.269, u'bid': 167.239, u'instrument': u'GBP_JPY', u'time': u'2016-01-26T07:39:58.333404Z'}, {u'ask': 0.69277, u'bid': 0.6926, u'instrument': u'AUD_USD', u'time': u'2016-01-26T07:39:50.358020Z'}]} # simplistic way of extracting data from the json response:: dataset = c.get_prices(instruments=','.join(pair_list),stream=False) aud_jpy = [d for d in dataset['prices'] if d['instrument']=='AUD_JPY'] bid = [d['bid'] for d in aud_jpy][-1] ask = [d['ask'] for d in aud_jpy][-1] time = [d['time'] for d in aud_jpy][-1]
cheers!
The text was updated successfully, but these errors were encountered:
Thanks mate, Do you mind to create a pull request? So your name will be there :)
Please add this as an example in the examples folder.
Sorry, something went wrong.
Alright, will do so
And any other sample is welcome too!!
Thanks a lot
No branches or pull requests
I spent a couple of hours trying to figure out stuff, so here's my simple usage example that you can add to the 'README' and 'readthedocs' 👍
cheers!
The text was updated successfully, but these errors were encountered: