Code Monkey home page Code Monkey logo

Comments (5)

robertkowalski avatar robertkowalski commented on June 11, 2024

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.

robertkowalski avatar robertkowalski commented on June 11, 2024

abandoned issue -- closing

from bitfinex-api-node.

glaucoheitor avatar glaucoheitor commented on June 11, 2024

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.

ThePlenkov avatar ThePlenkov commented on June 11, 2024

@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.

ThePlenkov avatar ThePlenkov commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.