oanda / v20-python

OANDA v20 bindings for Python
MIT License
225 stars 91 forks source link

Limit Order Bad Request #32

Open kayuksel opened 5 years ago

kayuksel commented 5 years ago

I am getting Bad Request when I try using limit orders (I am able to make the same order using the market orders - without the price). Hence, I guess that the price is causing the problem. I am in fact using bid or ask prices of the asset for placing the limit order. Therefore, the price formatting should not be problem, I guess. I would welcome if somebody can help me on this.

Note: Also, when we calculate a price for the limit order, what is the best way to set precision etc of that calcualted price to make sure that we would not receive a bad request as response?

kayuksel commented 5 years ago

I have managed to fix this by rounding the price with certain precision. However, I am still getting 'Limit Order Reject' for some of the limit orders. Can please someone tell me the reason? (I couldn't find that within the documentation unfortunately.)

kurisuD commented 5 years ago

Hello kayuksel

Confirm the value provided for price is a string.