zLeki / DxTrade-Api-Go

API for dxtrade that can be used with all golang applications to open, close, and manage positions with your dxtrade account. It works with all prop firms or companies that use dxtrade
MIT License
29 stars 5 forks source link

issue with ExecuteOrder #2

Closed Mubo-412 closed 9 months ago

Mubo-412 commented 9 months ago

Hi @zLeki, Congratulations on this first version of DXTrade API. I have converted the code to python, at this point, I can login et get opened positions.

When I want to Execute an order I face this type of errors from server: {"id":"63A8D4B3","message":"Unknown error","error":"SERVICE_ERROR","fieldValidationErrors":[]} Here is an example of the json payload: {'DirectExchange': False, 'Legs': [{'InstrumentId': 3425, 'PositionEffect': 'OPENING', 'RatioQuantity': 1, 'Symbol': 'BTCUSD'}], 'OrderType': 'MARKET', 'Quantity': 0.1, 'TimeInForce': 'GTC', 'RequestId': 'gwt-uid-000-0000-0000-0000-0000-000000000', 'LimitPrice': 0, 'OrderSide': 'BUY'}

Is the issue related to wrong input payload or does FTMO have an issue from their server?

potatoesforliferi commented 9 months ago

i was getting similar issues, and so was going to go back and run it on golang and do a more careful conversion for the payload systems too.

not sure either how i was getting my issues too. So back to the drawing board for me and my version XD

Mubo-412 commented 9 months ago

Oh my bad, that's true. I mistyped json payload entries. Thanks.