Open xtile opened 3 years ago
+1
Does this work for websockets too?
+1 and what is difference v1 and v3?
its not a version, they are different sites
I know that is different sites. I mean api version. when I check the official binance docs, I see api v1, v2, v3
+1 and what is difference v1 and v3?
your question does not relate to this topic.
Though, as far as I remember, v3 is for spot trading (api moved on v3 two years ago from v1). So so its just a matter of version number.
If you want to improve your ping, use local instances and run your execution there. I did extensive testing and here are the results. It looks like they have local servers in Tokyo and New Jersey. So you can get as low as 10ms including already the calculation from the server. It's not just ping. 100ms for just a ping is definitely too high.
time for price request Using this server provider: https://www.vultr.com/?ref=8815565-6G. You get 100$ credits with them. Much simplier to use than AWS.
Hi!
Have you considered to support alternative binance api urls?
Like API_URL = 'https://apiX.binance.{}/api'
where X belongs to ["", "1", "2", "3"]
Here is the example on how it works for me:
cmach@cmach1:~$ ping api.binance.com PING d3h36i1mno13q3.cloudfront.net (52.84.150.34) 56(84) bytes of data. 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=1 ttl=237 time=99.9 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=2 ttl=237 time=100.0 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=3 ttl=237 time=100 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=4 ttl=237 time=100.0 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=5 ttl=237 time=100 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=6 ttl=237 time=100.0 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=7 ttl=237 time=99.9 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=8 ttl=237 time=99.9 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=9 ttl=237 time=100.0 ms 64 bytes from 52.84.150.34 (52.84.150.34): icmp_seq=10 ttl=237 time=100 ms ^C --- d3h36i1mno13q3.cloudfront.net ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9010ms rtt min/avg/max/mdev = 99.911/99.965/100.016/0.034 ms
cmach@cmach1:~$ ping api3.binance.com PING d1rtiksidvgi3p.cloudfront.net (52.84.226.14) 56(84) bytes of data. 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=1 ttl=247 time=0.894 ms 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=2 ttl=247 time=0.473 ms 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=3 ttl=247 time=0.380 ms 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=4 ttl=247 time=0.362 ms 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=5 ttl=247 time=0.491 ms 64 bytes from server-52-84-226-14.sin2.r.cloudfront.net (52.84.226.14): icmp_seq=6 ttl=247 time=0.385 ms ^C --- d1rtiksidvgi3p.cloudfront.net ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5085ms rtt min/avg/max/mdev = 0.362/0.497/0.894/0.183 ms
I have tried from several locations, including Singapore, Tokyo and Amsterdam) and every time alternative urls work much faster.