'Forex trading algorithm implementation using Oanda issue
Hi I'm trying to implement a forex trading algorithm using the OANDA api. I created an account in OANDA and the key was generated.
What I tried was to implement the code in
http://jon.io/placing-your-first-forex-trade-with-python.html
I used the following code
import v20
api = v20.Context(
'api-fxpractice.oanda.com',
'443',
token='HERE GOES YOUR API KEY')
response = api.order.market(
'ACCOUNT ID',
instrument='EUR_USD',
units=5000)
print("Response: {} ({})".format(response.status, response.reason))
I'm getting the output as 'Response: 400 (Bad Request)'
I do not understand to create the conf file as explained in the post, given in the following github code.
Can someone kindly let me know the reason for this bad request output and the way to create the conf file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
