I have a question about a websocket for a real disk called okx v3.

Author: pcoin004, Created: 2019-08-27 12:56:28, Updated:

param1 = {op: subscribe, args: [futures/ticker:ETH-USD-190927]} client1 = Dial ((wss://real.okex.com:8443/ws/v3 compress=gzip_raw&mode=recv&reconnect=true&payload= + json.dumps(param1)) while 1: tick = json.loads ((client1.read)) Log (tick) Sleep ((100) Why is it that the actual data received is at least 4s slower than with GetTicker?


More

The Little DreamGetTicker is packaged with the rest interface, which is actively requested, and the WS interface, which is pushed by the exchange.

The Little DreamThe WS protocol is pushed, try passing the read function parameters. Try, you can see the API documentation.

pcoin004However, it obviously feels a lot slower to refresh than the OKEX web page, which is not normal, right?