WebSocket API Update

On 2016/01/25 we will be making an update to the public WebSocket API to add the txid to the WebSocket stream (Please note that this change has been in effect for authenticated channels for about two months).

Currently the message we send for public trades are sent as soon as they match in th trading engine. At this time they do not have a tradeId included, since we want to broadcast the trade in less then 2ms.

We are splitting the public trade messages into two: a “te” message which mimics the current behavior, and a “tu” message which will be delayed by 1-2 seconds and include the tradeId. If the tradeId is important to you, use the “tu” message. If speed is important to you, listen to the “te” message. Or of course use both if you’d like.

Current:

Public Trades Snapshot

[  
  CHANNEL_ID,
  [  
    [  
      SEQ,
      TIMESTAMP,
      PRICE,
      AMOUNT
    ],
    [  
      "..."
    ]
  ]
]

Public Trades Updates

[
  CHANNEL_ID,
  SEQ,
  TIMESTAMP,
  PRICE,
  AMOUNT
]

New:

Public Trades Snapshot

[  
  CHANNEL_ID,
  [  
    [  
      SEQ or ID,
      TIMESTAMP,
      PRICE,
      AMOUNT
    ],
    [  
      "..."
    ]
  ]
]

Public Trades Updates

[
  CHANNEL_ID,
  "te",
  SEQ,
  TIMESTAMP,
  PRICE,
  AMOUNT
]

[
  CHANNEL_ID,
  "tu",
  SEQ,
  ID,
  TIMESTAMP,
  PRICE,
  AMOUNT
]
Tags:
No Comments

Post A Comment