# DXtrade FIX reject reason: PBASED_ORDER_WRONG_CLOSING_DIRECTION

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/errors/dxtrade/fix-wrong-closing-direction, written from the same records as that page.

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.

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](https://openbrokerapi.com/platforms/dxtrade)
- Status: verified. Source: [demo.dx.trade](https://demo.dx.trade/developers/#/DXtrade-FIX-Trading-API), checked 2026-10-09.

## 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.

## How do I fix PBASED_ORDER_WRONG_CLOSING_DIRECTION?

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

## More on the DXtrade API

- [All DXtrade API error codes](https://openbrokerapi.com/errors/dxtrade)
- [DXtrade API error codes](https://openbrokerapi.com/errors/dxtrade): 79 decoded, each with what it means, and the fix where the source gives one.
- [DXtrade API endpoints](https://openbrokerapi.com/platforms/dxtrade/endpoints): 21 documented, each with its method, path, parameters and source.
- [DXtrade messages](https://openbrokerapi.com/platforms/dxtrade/messages): 8 documented, each with its fields and source.
- [DXtrade API page](https://openbrokerapi.com/platforms/dxtrade): The full record: access, authentication, limits and the source for each.

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: DXtrade FIX reject reason: PBASED_ORDER_WRONG_CLOSING_DIRECTION. Broker API Hub, https://openbrokerapi.com/errors/dxtrade/fix-wrong-closing-direction, newest check 2026-10-09.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
