CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 302 forks source link

Get Announcement with latency #175

Open liwandaniel opened 2 years ago

liwandaniel commented 2 years ago

I tested the announcement API for a few weeks and I noticed that the API data is always delayed than the real releaseDate of the announcement.

46F96CA6-0C3D-4467-A41C-B3E6AB757AF5

So I tried to use proxies to pretend the request from different countries, like the USA, Canada, Singapore, Japan, and I found the latency is different for each country.

The fastest I can reach is about 15s now, and I don't know how to improve it.

And I recently found every notification of announcement is delayed than before, like telegram, binance windows client and etc

So, I guess the binance did something with the API, it was done deliberately by the binance programmers so that a narrow circle of people could react to the news faster than everyone else.

Any idea of this and how to improve it?

overload77 commented 2 years ago

Binance changed it's query parameter caching strategy to serve more requests from cache. They've reduced the parameter space. For example their API used to accept every page size from 1 to 200. But now it's valid values are 1, 2, 5, 10, 15, 20 and 50. It returns 20 articles for any other value.

They use AWS CloudFront for caching. CloudFront has cache edge locations and your requests are handled by the closest edge location. Your best bet may be utilizing many edge locations(by placing nodes in different physical locations) and hope some of them misses the cache and hits the origin server.

MilanoCuts commented 10 months ago

i know the way to bypass AWS CloudFront. And i can get the announcements within 1 second

Could you send me a PM on twitter? @MilanoCuts

XipengLin commented 6 months ago

i know the way to bypass AWS CloudFront. And i can get the announcements within 1 second

Could you send me a PM on twitter? @MilanoCuts

Could you send me a PM on twitter? @MilanoCuts @shoestar @Jrjy3

misqkrk commented 5 months ago

znam sposób na ominięcie AWS CloudFront. Ogłoszenia mogę uzyskać w ciągu 1 sekundy

Czy mógłbyś wysłać mi PW na Twitterze?@MilanoCuts

Did you manage to do it?

gapinvestor commented 1 month ago

I tested the announcement API for a few weeks and I noticed that the API data is always delayed than the real releaseDate of the announcement.

46F96CA6-0C3D-4467-A41C-B3E6AB757AF5

So I tried to use proxies to pretend the request from different countries, like the USA, Canada, Singapore, Japan, and I found the latency is different for each country.

The fastest I can reach is about 15s now, and I don't know how to improve it.

And I recently found every notification of announcement is delayed than before, like telegram, binance windows client and etc

So, I guess the binance did something with the API, it was done deliberately by the binance programmers so that a narrow circle of people could react to the news faster than everyone else.

Any idea of this and how to improve it?

Did you manage to improve it?