Comments (5)
hi @glaucoheitor, thanks for reporting!
429 is a "too many requests" error. You raise a good point which is an issue. The current entry point usually opens a new websocket. You can workaround the issue right now with passing autoOpen: false
as option:
Example:
const bfx = new BFX('dummy', 'dummy', { version: 2, autoOpen: false })
Please note that this is not officially documented and may get removed in later versions.
In fact there is a more elegant solution planned, which would be a breaking change. As user of our API client your feedback would be really valuable: #41
from bitfinex-api-node.
abandoned issue -- closing
from bitfinex-api-node.
This should be addressed so we dont get that much 429 errors.
Even using autoOpen: false it didnt resolved 100%.
I am using a time counter to not send more than one request every 2s.
from bitfinex-api-node.
@robertkowalski Don't you know by some chance what is exactly the server logic?
First I faced errors when I called several requests instantly.. Now I made 2sec delay but still have an issue with the last request:
node --inspect-brk=42861 simulator.js
Debugger listening on ws://127.0.0.1:42861/d746e658-d7eb-4a69-a040-e133f9ce51b7
tBTCUSD simulation started
API call: /candles/trade:3h:tBTCUSD/hist
API call: /candles/trade:1h:tBTCUSD/hist?start=1516665600000&sort=1&size=1000
API call: /candles/trade:30m:tBTCUSD/hist?start=1516665600000&sort=1&size=1000
API call: /candles/trade:15m:tBTCUSD/hist?start=1516665600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516665600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516708800000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516752000000&sort=1&size=1000
API call: /candles/trade:15m:tBTCUSD/hist?start=1516773600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516795200000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516838400000&sort=1&size=1000
API call: /candles/trade:30m:tBTCUSD/hist?start=1516881600000&sort=1&size=1000
API call: /candles/trade:15m:tBTCUSD/hist?start=1516881600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516881600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516924800000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1516968000000&sort=1&size=1000
API call: /candles/trade:15m:tBTCUSD/hist?start=1516989600000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1517011200000&sort=1&size=1000
API call: /candles/trade:5m:tBTCUSD/hist?start=1517054400000&sort=1&size=1000
It is always 10th request. How many seconds(minutes) should I wait to avoid this?
Thank you!
from bitfinex-api-node.
I noticed that I made a typo. limit is a correct parameter name. However the problem is still actual. What if I decide to simulate all BTC timeline in 1m frame? Sounds crazy but there must be a way how to solve this.
from bitfinex-api-node.
Related Issues (20)
- Example Request: Placing an order on the futures market with custom leverage
- Bug: public funding trades mapping is wrong. HOT 9
- Why such cryptic examples?
- action: disabled HOT 2
- Order book snapshot
- No example name provided for ./examples/ws2_manager.js
- onTrades for funding trades does not call the handler
- No Candle Stick Interval information?
- WS2Manager swallows socket.open/auth errors
- fix nonce mechanism HOT 1
- 429 error exception thrown break everything HOT 2
- Trouble Submiting Order
- Outdated dependencies - request and request-promise
- INVALID API KEYS 10100
- Failing to close a websocket connection when autoReconnect is set to true
- How to get full book?
- Update JavaScript example on https://docs.bitfinex.com/reference/ws-public-ticker
- Can't transfer funds between wallets
- Custom headers or interceptors
- apikey: invalid
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 bitfinex-api-node.