-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ccxt.async_support #24207
Comments
Hi @DaniilSkyRable at first glance it looks like the marginMode is set incorrectly, the Another thing is you don't need to set the |
Hi @Dan-krm ,why do I need to set marginmode if it is spot trading, I want to get only spot pairs, but I noticed that it gives tokens not only in spot pairs, but also from exchangers, can you tell me how I can get only spot pairs and only, if you do not mind? |
In that case you don't need to set marginMode and can leave it blank, that could be why you're getting more than just spot tickers. Also the signature for fetchTickers is I would change this code snippet:
To this:
or this:
If there is any exchanges returning more than just the spot pairs still, you can let me know which exchange and I can take a closer look and see if I can adjust it |
MEX,Binance,XT, dont work , |
Those are swap/future endpoints for xt and binance, and the mexc endpoint you shared isn't for fetchTickers. If you have the |
This my config, check this
|
@DaniilSkyRable I would remove the |
I've tried it without them, and it comes up exactly the same. |
@DaniilSkyRable Could you share your verbose response for calling fetchTickers on mexc, xt, and binance by setting: Here's some more info on sharing the verbose response: |
I'm mostly interested in this info from the verbose response and if you're receiving any errors outside of the scope of ccxt:
|
My code now
this logs for MEXC,Binance |
In one of your output logs it looks like mexc succeeded: In your other output log mexc times out when calling fetchMarkets: On binance it looks like something might be timing out for you when loading the markets with fetchMarkets: For Binance only, by default ccxt is loading the spot, linear and inverse markets. You can try loading only the spot markets by setting this in options:
Or set it in the config:
|
With mexc is not clear situation, then it works, then does not work, I do not understand why ..., one of 20-30 runs can work, I do not understand why |
Yeah it's not clear to me why that is happening with mexc for you at the moment, the ratelimits look correct This is all there is in the documentation for async support: You can also check some of the async examples here: |
Maybe there are some parameters for MEXC that we can try?
|
I run the same code several times, sometimes xt works, and sometimes it writes that it cannot access futures, although the parameters are set to spot. |
I put 2 exchanges in the config, then it gives data on them and everything works (MEXC, XT), when I put all exchanges in the config (I have 14 in total), then those 2 do not work (MEXC, XT). I'll add this - when I put MEXC or XT first in the queue, then one of them will work, but dont work other exchange |
@DaniilSkyRable I've opened a pull request that will enable you to load only the spot markets for mexc and xt similar to how that can be controlled on binance. Besides that I'm not sure if there is anything else that can be done on the CCXT side I might start adding this functionality to other exchanges as well, so you can watch out for more exchanges with this supported feature in the changelog: https://docs.ccxt.com/#/CHANGELOG |
Operating System
Windows 11
Programming Languages
Python
CCXT Version
4.4.27
Description
i have some problem,idk why code dont work.
Log -
Fetched data from bingx: 1039 tickers received
Fetched data from okx: 605 tickers received
Fetched data from phemex: 377 tickers received
Fetched data from bybit: 629 tickers received
Fetched data from bitget: 885 tickers received
Fetched data from gateio: 3796 tickers received
Error fetching data from mexc: mexc GET https://contract.mexc.com/api/v1/contract/detail
Fetched data from huobi: 778 tickers received
Fetched data from kucoin: 1200 tickers received
Fetched data from bitrue: 1644 tickers received
Fetched data from bitmart: 1153 tickers received
Error fetching data from binance: binance GET https://fapi.binance.com/fapi/v1/exchangeInfo
Error fetching data from xt: xt GET https://dapi.xt.com/future/market/v1/public/symbol/list
Fetched data from bitfinex: 447 tickers received
binance: 0 тикеров получено.
xt: 0 тикеров получено.
gateio: 3796 тикеров получено.
bitget: 885 тикеров получено.
bingx: 1039 тикеров получено.
bitmart: 1153 тикеров получено.
bitrue: 1644 тикеров получено.
huobi: 778 тикеров получено.
kucoin: 1200 тикеров получено.
bitfinex: 447 тикеров получено.
phemex: 377 тикеров получено.
bybit: 629 тикеров получено.
okx: 605 тикеров получено.
mexc: 0 тикеров получено.
Code
The text was updated successfully, but these errors were encountered: