Skip to content
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

[feature] limit settings #145

Open
dawadam opened this issue Jun 19, 2023 · 2 comments
Open

[feature] limit settings #145

dawadam opened this issue Jun 19, 2023 · 2 comments

Comments

@dawadam
Copy link

dawadam commented Jun 19, 2023

Would it be possible to add a "limit" parameter in the configuration ?
Who would stop the process, once a corresponding number of candles is reached.

@Leo4815162342
Copy link
Owner

@dawadam what is your exact use case?

If we're not talking about ticks, you can always rely on start and end date for your requests. Let's say you are downloading a day worth (from: '2023-06-18', to: '2023-06-19') of minute candles m1, you should always get 1440 candles.

And, for example, if you want to download 60 candles, you can request only an hour worth of candles:

{
  timeframe: 'm1',
  dates: {
    from: '2019-01-18T00:00:00.000Z',
    to: '2019-01-18T01:00:00.000Z'
},

TLDR: you can infer the number of candles based on the dates (unless it's a tick data)

@dawadam
Copy link
Author

dawadam commented Jul 25, 2023

Of course, it is possible to make calculations upstream.
Although this poses certain limits according to the assets, open or not on weekends among other things.
It would be easier to be able to limit the number of candles returned for use.
So that you don't have to worry about preparing the query in a more complex way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants