Broker API HubMenu

DXtrade Push Reject

messageRejectDXtrade Push APIWebSocketSession

Sent by the server when it cannot process a message. It names the rejected request and carries an error code with a description, so the client can correct the request and send it again.

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

This is a message of the DXtrade Push API, not an HTTP endpoint. It has no method and no path: it is sent as JSON or XML over an open WebSocket connection.

The specification lists two errors any request can bring: code 1, Authorization required, where the session token is missing, invalid or expired, and code 32, Incorrect request parameters, for a malformed request. It says the wording of a description can change without a new API version.

The message

Name
Reject
Direction
Event, sent by the server
Carried by
WebSocket. The specification describes two WebSocket resources, one for business events and one, ending /md, for market data. The specification writes the address with a placeholder for the host, which each broker or firm that offers DXtrade supplies. Two optional query string arguments are set when connecting: format, XML or JSON, and compression, which can only be gzip.

Fields

NameTypeDescription
typerequiredStringAlways Reject.
inReplyTorequiredStringThe requestId of the message that was rejected.
timestamprequiredTimestampWhen the message was sent, in UTC.
payloadrequirederror objectThe error, with the two fields below.
payload.errorCoderequired or not: not statedNot statedThe error code. Each distinct error has its own.
payload.descriptionrequired or not: not statedNot statedA description of the problem, in English.