I’m trying to get from the API websocket the best ask/bid for a symbol. I’m using the stream bookTicker but it seems that the values are delayed, I have a VM deployed on AWS in Tokyo so the network should not be an issues. My question is: how can I minimise the latency when I need to get the best ask/bid? which endpoint should I use to get the most updated best ask/bid?
The latency is subject to many factors and many of them can be outside of Binance’s control, because a lot can happen in the from the moment a websocket event is pushed to the moment it’s received on the client end.
The client side should try different environments, code handlings, check proxies/firewall, etc… to diagnose were the major latency might come from and improve the latency.
Yes I agree with you, but as a start I would like to know which one of the endpoint is the one that provide the most updated data faster, then after that I can optimise client, but only if I’m using the fastest endpoint, so which one of the endpoint is the faster to get the best ask/bid?
The update speed is available in the API doc for each stream.