bmoscon / cryptofeed

Cryptocurrency Exchange Websocket Data Feed Handler
Other
2.21k stars 682 forks source link

Too much request #957

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug Connecting more than 400 pairs on Binance leads to a connection error that looks like: {"code":-1003,"msg":"Too much request weight used; current limit is 1200 request weight per 1 MINUTE. Please use WebSocket Streams for live updates to avoid polling the API."}

To Reproduce

from cryptofeed import FeedHandler
from cryptofeed.exchanges import Binance
from cryptofeed.defines import L2_BOOK

f = FeedHandler()

async def callback(book, t):
    print(book)

f.add_feed(Binance(symbols=Binance.symbols(), channels=[L2_BOOK], callbacks={L2_BOOK: callback}))

f.run()

Operating System:

Cryptofeed Version