根据coinbase文档
行情自动收录器通道在每次比赛进行时提供实时价格更新。它会在级联匹配的情况下批量更新,从而大大降低了带宽需求。
但是事实并非如此。我同时订阅了股票报价和比赛的Websocket提要,看到的结果表明股票报价消息没有批量进行比赛。如果我收到多条匹配消息,然后紧接着收到一条股票消息,则只会用我收到的最新匹配消息的信息来更新股票代码(即使一系列匹配消息在同一时间戳上发生)。代码行情的数量和大小属性的更新基本上仅反映最新消息,前提是消息行之前有一系列匹配消息。
这是一个例子:
{"type":"ticker","sequence":3506740631,"product_id":"LTC-USD","price":"116.63000000","open_24h":"117.91000000","volume_24h":"244803.84474488","low_24h":"114.00000000","high_24h":"120.00000000","volume_30d":"12176933.96101542","best_bid":"116.61","best_ask":"116.66","side":"sell","time":"2019-06-09T04:42:08.448000Z","trade_id":39300328,"last_size":"0.55000000"}
3506740631
{"type":"match","trade_id":39300329,"maker_order_id":"cea43308-3271-4d05-9eb0-1d07f3f56d39","taker_order_id":"21c63933-8eab-46d1-913b-9a85712da5b4","side":"buy","size":"30.00000000","price":"116.61000000","product_id":"LTC-USD","sequence":3506740633,"time":"2019-06-09T04:42:08.448000Z"}
3506740633
{"type":"match","trade_id":39300330,"maker_order_id":"6691c5f9-fc98-486e-9de1-ec44d8857331","taker_order_id":"21c63933-8eab-46d1-913b-9a85712da5b4","side":"buy","size":"7.29490167","price":"116.58000000","product_id":"LTC-USD","sequence":3506740635,"time":"2019-06-09T04:42:08.448000Z"}
3506740635
{"type":"match","trade_id":39300331,"maker_order_id":"2ea6c544-3942-4afe-8854-376337e68f83","taker_order_id":"21c63933-8eab-46d1-913b-9a85712da5b4","side":"buy","size":"0.10000000","price":"116.56000000","product_id":"LTC-USD","sequence":3506740637,"time":"2019-06-09T04:42:08.448000Z"}
3506740637
{"type":"ticker","sequence":3506740637,"product_id":"LTC-USD","price":"116.56000000","open_24h":"117.91000000","volume_24h":"244803.94474488","low_24h":"114.00000000","high_24h":"120.00000000","volume_30d":"12176934.06101542","best_bid":"116.56","best_ask":"116.66","side":"sell","time":"2019-06-09T04:42:08.448000Z","trade_id":39300331,"last_size":"0.10000000"}
3506740637
我想念什么吗?为什么会这样呢?