-
Notifications
You must be signed in to change notification settings - Fork 89
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
Instrument Accept-Datetime-Format Bug #22
Comments
seems to vary between the environments, on practice I get: curl -H 'Content-Type: application/json' -H 'Authorization: Bearer TOK' -H 'Accept-Datetime-Format: RFC3339' -X GET 'https://api-fxpractice.oanda.com/v3/instruments/DE30_EUR/candles?count=1&granularity=M5' {"granularity":"M5",
"instrument":"DE30_EUR",
"candles":[{"complete":false,"time":"2017-04-03T03:50:00.000000000Z","volume":109,"mid":{"o":"12358.2","h":"12365.0","l":"12358.2","c":"12363.5"}}]} Setting it to UNIX delivers the unix-time format. So the practice-environment seems to work OK. While on fxtrade I get: |
This is a know bug that is in the pipeline to be fixed. It appears that the fix has already landed in FXTrade Practice and will go to FXTrade with its next release. |
No matter which date time format I choose I get back UNIX datetime. This doesn't seem to be an issue with this module but an underlying problem with the v20 api. I didn't know where else to report it. See examples using curl below:
curl -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -H "Accept-Datetime-Format: UNIX" "https://api-fxtrade.oanda.com/v3/instruments/USD_JPY/candles?count=1"
{"granularity":"S5","instrument":"USD_JPY","candles":[{"complete":false,"time":"1491201560.000000000","volume":8,"mid":{"o":"111.467","h":"111.469","l":"111.467","c":"111.469"}}]}
curl -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -H "Accept-Datetime-Format: RFC3339" "https://api-fxtrade.oanda.com/v3/instruments/USD_JPY/candles?count=1"
{"granularity":"S5","instrument":"USD_JPY","candles":[{"complete":false,"time":"1491201650.000000000","volume":1,"mid":{"o":"111.460","h":"111.460","l":"111.460","c":"111.460"}}]}
The text was updated successfully, but these errors were encountered: