sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.96k stars 2.19k forks source link

How to get all tickers just for spot ? #1249

Closed Adeel-Intizar closed 1 year ago

Adeel-Intizar commented 1 year ago

Hi, how can i get all the tickers for just spot trading ? Thank you

sirfrank commented 1 year ago

from binance import Client

client = Client()

exchange_info = client.get_exchange_info()

spot_markets = [] for market in exchange_info['symbols']: if 'SPOT'in market['permissions']: spot_markets.append(market['symbol']) print(spot_markets)

Adeel @.***> ezt írta (időpont: 2022. szept. 19., H, 19:18):

Hi, how can i get all the tickers for just spot trading ? Thank you

— Reply to this email directly, view it on GitHub https://github.com/sammchardy/python-binance/issues/1249, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVKGMYTEJGGNQ5X7BZT4OTV7COABANCNFSM6AAAAAAQQJV3SI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Adeel-Intizar commented 1 year ago

Thank you for your help

Adeel-Intizar commented 1 year ago

I got this same response earlier but there are some tickers in response which are not available in binance spot trading but are shown in response from this library

Adeel-Intizar commented 1 year ago

e.g. BCHABCBUSD ETHBULLBUSD ETHBEARBUSD EOSBULLBUSD EOSBEARBUSD

and there are many more

Adeel-Intizar commented 1 year ago

these are not even in any trading (spot, futures, margin) on binance

Adeel-Intizar commented 1 year ago

@sirfrank is this is a bug or something in this library ?

sirfrank commented 1 year ago

from binance import Client

client = Client()

exchange_info = client.get_exchange_info()

spot_markets = [] for market in exchange_info['symbols']: if 'SPOT'in market['permissions'] and market['status'] == 'TRADING': spot_markets.append(market['symbol'])

print(spot_markets) print(len(spot_markets))

see the added : and market['status'] == 'TRADING'

Adeel @.***> ezt írta (időpont: 2022. szept. 19., H, 19:41):

@sirfrank https://github.com/sirfrank is this is a bug or something in this library ?

— Reply to this email directly, view it on GitHub https://github.com/sammchardy/python-binance/issues/1249#issuecomment-1251338011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVKGM5IGNYCYKKR3EZBJUTV7CQT7ANCNFSM6AAAAAAQQJV3SI . You are receiving this because you were mentioned.Message ID: @.***>

Adeel-Intizar commented 1 year ago

It is working just fine, Thank you for your help, really appreciated @sirfrank

sirfrank commented 1 year ago

No problem ! I am playing around with Binance API for a while, i just restarted working with it (hobby level, thou ...). If you wish to cooperate .. ferenc.bedo74@biggestemailproviderByGoogle_trying_to_avoid_spam_by_this_silly_way.com .