Skip to main content

Anonymous Trades

This allows simultaneous trade subscriptions to multiple markets. Additionally, instead of sending trades one by one, trades are sent in batches.

Upon subscribing to a market, the client will first receive a snapshot of the latest 100 trades, followed by batches of trade updates.

Anonymous trades from different markets to be subscribed to are controlled by the parameters in the subscription message listed below.

/trading-api/v1/market-data/trades

Operations

SEND/trading-api/v1/market-data/trades

Subscribe

Multiple subscriptions could be opened within the same websocket.

The trades of different markets to be subscribed are controlled by the parameters in the subscription message listed below.

Operation IDsubscribe

Accepts the following message:

Subscription

Let you subscribe to a given topic

  • application/json
Message IDsubscribe
object

Examples

RECEIVE/trading-api/v1/market-data/trades

After subscribing, the server sends :

  • an acknowledgement
  • then an initial snapshot with the latest 100 trades upon subscription.
  • followed by incremental updates.
Operation IDsubscribe-ack

Sends one of the following messages:

  • #1Acknowledgment

    Confirm the topic being subscribed

    • application/json
    Message IDsubscribe-ack
    object

    Examples

  • #2Snapshot

    Initial full state of the subscribed trade data

    • application/json
    Message IDsubscribe-msg-0
    object

    Examples

  • #3Update

    Incremental update to the subscribed trade data

    • application/json
    Message IDsubscribe-msg-1
    object

    Examples

RECEIVE/trading-api/v1/market-data/trades

In case of invalid subscription message, an error rejection would be sent.

Operation IDsubscribe-nack

Sends the following message:

Rejection

Explain why the topic could not be subscribed

  • application/json
Message IDsubscribe-nack
object

Examples

SEND/trading-api/v1/market-data/trades

Keepalive

In case nothing is subscribed to, keep the websocket connection alive.

Operation IDkeepalive-ping

Accepts the following message:

Keepalive Ping
  • application/json
Message IDkeepalive-ping
object

Examples

RECEIVE/trading-api/v1/market-data/trades

Acknowledgement returned by the server in response to a keepalive-ping.

Operation IDkeepalive-pong

Sends the following message:

Keepalive Pong
  • application/json
Message IDkeepalive-pong
object

Examples

SEND/trading-api/v1/market-data/trades

Unsubscribe

Let you unsubscribe a specific topic while keeping your websocket opened.

Operation IDunsubscribe

Accepts the following message:

Unsubscription

Let you unsubscribe to a given index

  • application/json
Message IDunsubscribe
object

Examples

RECEIVE/trading-api/v1/market-data/trades

After unsubscribing, the server sends an acknowledgement.

Operation IDunsubscribe-ack

Sends the following message:

Acknowledgment

Confirm the topic being unsubscribed

  • application/json
Message IDunsubscribe-ack
object

Examples

RECEIVE/trading-api/v1/market-data/trades

In case of invalid unsubscription message, an error rejection would be sent.

Operation IDunsubscribe-nack

Sends the following message:

Rejection

Explain why the topic could not be unsubscribed

  • application/json
Message IDunsubscribe-nack
object

Examples