Broker API HubMenu

DXtrade FIX reject reason

DXtrade FIX reject reason: PBASED_ORDER_WRONG_CLOSING_DIRECTION

The error, as text you can copy

PBASED_ORDER_WRONG_CLOSING_DIRECTION
Kind
FIX reject reason
Where you meet it
In a reject message on the FIX session, not in an HTTP reply
API
DXtrade APIs

What does PBASED_ORDER_WRONG_CLOSING_DIRECTION mean on the DXtrade API?

In the DXtrade FIX Trading API, PBASED_ORDER_WRONG_CLOSING_DIRECTION is an error code carried at the start of the Text (58) field of a business reject, in the form Error_Code:Descriptive_Text. An attempt was made to close a position with an order in the incorrect direction.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialdemo.dx.tradechecked

How do I fix PBASED_ORDER_WRONG_CLOSING_DIRECTION?

Send the closing order in the direction opposite to the position.