nightshift2k / binance-proxy

A websocket proxy written in GoLang, that caches the endpoints: klines, depth, ticker/24hr, and exchangeInfo. It resembles the Binance API behaviour. And has a primary usecase to eliminate ratelimits when querying the Binance API from a single IP.
MIT License
119 stars 32 forks source link

Replace api.binance.com to api.binance.us #5

Open pnmice opened 2 years ago

pnmice commented 2 years ago

Hi There,

I would like to use proxy for Binance US. I have replaced a hostname, but it works for USDT, but not for USD.

https://github.com/pnmice/binance-proxy/commit/f27b9382174756b08fe793f7ca601ccf45071493

proxy log level=debug msg="SPOT HBARUSD@5m kline websocket connected."

bot log freqtrade.exchange.common - WARNING - fetch_l2_order_book() returned exception: "Could not get order book due to RequestTimeout. Message: binanceus GET http://binance-proxy:8090/api/v3/depth?symbol=HBARUSD&limit=5" freqtrade.exchange.common - WARNING - retrying fetch_l2_order_book() still for 4 times

Not working with USD curl 'https://172.29.0.11:8090/api/v3/depth?symbol=HBARUSD&limit=5' it's stuck

If I use USDT, it works curl -I 'http://172.29.0.11:8090/api/v3/depth?symbol=HBARUSDT&limit=5' HTTP/1.1 200 OK Content-Type: application/json Data-Source: websocket

Good curl -I 'https://api.binance.us/api/v3/depth?symbol=HBARUSD&limit=5' HTTP/2 200

Could you give a hint? Are there some limitations in code for USD tickers? Thanks!