Comments (10)
Hello @jtashiro, we will take that into consideration but those endpoints are only called "once per instance", to cache and load the markets so it shouldn't have that much impact.
from ccxt.
Hello @jtashiro, we will take that into consideration but those endpoints are only called "once per instance", to cache and load the markets so it shouldn't have that much impact.
I'm comparing 4.2.51 to 4.3.28 to identify the change that is causing me to encounter 429 Too Many Requests, when running the same python scripts. 4.2.51 works fine, no issue with 429, but 4.3.28 fails in the same spot each time on the public method I highlighted above.
4.2.51 fetch_tickers_v3() -> v3PrivateGetBrokerageProducts()
4.3.28 fetch_tickers_v3() -> v3PublicGetBrokerageMarketProducts()
Question is why was this changed to the public methods in 4.3?
I dont see a way to avoid hitting the rate limit when using the public methods and would need to refactor a lot of code to either introduce some back off throttling for no good reason.
I'll look further but the most straight forward for me was to replace the public with private methods as noted earlier.
from ccxt.
Question is why was this changed to the public methods in 4.3?
We did this because for accessing public data like markets/candles/tickers/trades it should not be needed to have an account with the exchange, most exchanges provide this information publicly and we wanted to keep the same approach here.
from ccxt.
Given the lower rate limit that is enforced on public apis, can these wrapper methods use the private methods when apiKeys present? That would make it transparent and not require an optional setting.
from ccxt.
@jtashiro I think it would be more "transparent" using the option. Which unified methods do you intend to use the private endpoints? fetchTicker/OHLCV/Trades
?
from ccxt.
Yes those and any others - basically when API keys are present, use the private methods. But sounds like you are a fan of the option technique to drive that behavior instead of hiding that logic ?
from ccxt.
@carlosmiei is right, hiding it is not a good approach, we definitely have to offer an option so user could control it.
i'll be adding this shortly.
from ccxt.
I've linked PR. after it's merged and new package published, you can use ex.options['usePrivateEndpointsIfApikeysPresent'] = true
(the keyname might be changed before merging, keep an eye on it), so thereafter all requests will use private endpoints (if api keys are present)
from ccxt.
@jtashiro Ok we just released a new version (4.3.32) with the changes, you can set exchange.options['usePrivate'] = True
or provide usePrivate: True
in params
upon calling fetchTrades/OHLCV/ticker/Orderbook.
Let us know if anything!
from ccxt.
from ccxt.
Related Issues (20)
- binance: fetch_funding_rate_history return [] value HOT 4
- Gateio futures does not work with CCXT Pro HOT 8
- Bybit bad symbol `NEIROETHUSDT` HOT 2
- crypto.com access denied HOT 5
- hyperliquid unable to use/debug "set_margin_mode" and "set_leverage" HOT 9
- GateIO Futures - Time/bid/ask is not saved in watch_tickers (also bid, ask). HOT 2
- New Exchange: Biconomy CEX - https://www.biconomy.com/en
- New Exchange: KoinBX CEX - https://koinbx.com/ HOT 1
- bitget .markets doesn't include margin markets HOT 1
- Error: self is not defined in Deno HOT 4
- Bitmart bid or ask getting stuck
- okx watchPositions extra parameters not working HOT 1
- hyperliquid create_order params are being ignored HOT 2
- binance fetch_open_interest_history params['paginate'] is overriden to False HOT 1
- kucoinfutures fetch_my_trades only returns 50 trades regardless of limit or pagination attempts HOT 1
- Bitmart - uid should be renamed to memo HOT 3
- How to place a spot marker order using base currency amount for Gate? HOT 3
- how log all ccxt calls? HOT 1
- ccxt.pro watch_ohlcv for multiple symbols from binance futures HOT 2
- CurrencyCom OHLCV fetch returning empty values HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccxt.