Skip to content
New issue

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

Floats and integers are returned as strings #26

Open
FutureSharks opened this issue Aug 20, 2017 · 0 comments
Open

Floats and integers are returned as strings #26

FutureSharks opened this issue Aug 20, 2017 · 0 comments

Comments

@FutureSharks
Copy link

I think it's a bit silly that numbers like floats and integers are returned as strings:

>>> import v20
>>> api = v20.Context(hostname='api-fxpractice.oanda.com', token='xxx', datetime_format='UNIX')
>>> api.pricing.get(accountID='101-xxxx', instruments='GBP_USD').get('prices')[0].dict()['bids'][0]['price']
'1.28662'
>>> api.pricing.get(accountID='101-xxxx', instruments='GBP_USD').get('prices')[0].dict()['time']
'1503089998.464826588'
>>>

Is there a reason for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant