πŸ“ŒWebsocket Data Push

Overview


Snapshot data

  • Subscribe channel : level2

  • Push only once, when the level2 channel is established


Data changes

  • Subscribe channel : level2

  {
   "type": "l2update",
   "productId": "UNI-USDC",
   "time": 1686645711,
   "changes": [
     [
       "sell",
       "90000000000000000000",  // price
       "100000000000"     // amount
     ]
   ]
  }

K-line data

  • Subscribe channel: candles_1m,candles_3m,candles_5m....

  • Maximum 1 push within 1s


Ticker info

  • Subscribe channel: match

  • Maximum 1 push within 3s


Matching info

  • Subscribe channel: match

  • Since the settlement of ZKEX is in Layer 2, match only means that the matching is successful, not that the transaction is successful


Trading info

  • Subscribe channel: trade

  • After the match channel is pushed, if layer2 is actually done, the trade channel will be pushed.


Order change infomation of a trading pair

  • Subscribe channel: order


The asset change information of an account

  • Subscribe channel: funds

Last updated