Skip to main content
WSS
The order data stream tells you what the exchange will accept on one instrument of one account. Connect to wss://public-api.charting.com/api/v1/trading/order/data/stream with accountId, exchange, symbol, and connectorCode when the account has more than one connector. Sign the handshake like a GET (see Sign every request).

Frames

The first frame is a snapshot with:
  • instrumentInfo: price and quantity bounds and steps, quantityUnit, maker and taker fees, leverage bounds, slippage and trailing stop bounds.
  • accountSettings: your settings for the instrument, such as positionMode and leverage.
  • riskLimits: the instrument’s risk limits for your account.
  • userRebateRate: your cashback rate on this account. It’s fixed for the life of the stream.
Then: buyingPower and currencyRates can change many times a second. Pass throttlingDelay, in milliseconds up to 60000, to get at most one of each per interval, always the newest.

Before sending an order

  • Round the price to instrumentInfo.price.step.
  • Keep the quantity between instrumentInfo.quantity.min and max, in steps of quantity.step, counted in quantityUnit.
  • Send positionMode from accountSettings when the connector needs it.
The exchange rejects an order that breaks these rules, and the rejection arrives on the events stream. This stream costs credits and follows the connection rules of the events stream: see Staying connected.
X-API-KEY
type:httpApiKey

Your API key.

X-API-TIMESTAMP
type:httpApiKey

Time of the upgrade request in Unix milliseconds.

X-API-SIGNATURE
type:httpApiKey

Hex Ed25519 signature of timestamp + API key + receive window + raw query string.

method
type:string

GET

query
type:object
Order data snapshot
type:object
Buying power changed
type:object
Instrument rules changed
type:object
Account settings changed
type:object
Risk limits changed
type:object
Currency rates
type:object
Higher margin window changed
type:object

Exness: the higher-margin window of the instrument changed (a new or moved window, the one in force ended, or the account leverage changed). period absent means no window is known any more. A change that moves the leverage also sends accountSettings.

Terminal error
type:object

The stream is over; the socket is closed after this frame.