Leo4815162342 / dukascopy-node

✨ Download historical price tick data for Crypto, Stocks, ETFs, CFDs, Forex via CLI and Node.js ✨
https://dukascopy-node.app
MIT License
365 stars 68 forks source link

Error in data stream #7

Closed Leo4815162342 closed 3 years ago

Leo4815162342 commented 4 years ago
const config = { instrument: 'audcad',   dates: { from: '2010-01-01 00:00', to: '2020-04-13 22:26' },   timeframe: 'h1'}
lezwright commented 4 years ago

Would it help if we have an account with Dukascopy? Because we have an account with them and we get our live data from them.

Leo4815162342 commented 4 years ago

@lezwright sorry for the late reply. I don't think the real account will solve the issue.

Can you tell me how you use the dukascopy-node package? Do you often search for historical data for the same instrument? How many calls you make?

We can optimize the way we call dukascopy servers with some additional layer of caching.

lezwright commented 4 years ago

Hi Leo,

Thanks for your email. Please see the answer to your questions below:

"Can you tell me how you use the dukascopy-node package?" We use it to feed the data into our customised Tradingview charts. As I mentioned in my previous email we have the live data account with Dukascopy, that is we can get live tick data (FIX API). They also told us it is possible to get the historical data from them through JFOREX API https://www.dukascopy.com/wiki/en/development/strategy-api/historical-data That is why I inquired about having an account and log in id might remove the limitation on downloading the data.

"Do you often search for historical data for the same instrument? How many calls you make?" I need to have access to all 61 FX currency pairs (including gold and silver) from the Forex list you provided on the library home page: https://github.com/Leo4815162342/dukascopy-tools for the entire historical data that is available. I call the data in R for the entire historical data that is available for each currency pair. On one currency pair I might need to make several calls during a day (150+ requests each time).

Is it possible to remove any limitation on the number of requests made?

Many thanks

On Thu, Apr 23, 2020 at 2:41 PM Leonid Pyrlia notifications@github.com wrote:

@lezwright https://github.com/lezwright sorry for the late reply. I don't think the real account will solve the issue.

Can you tell me how you use the dukascopy-node package? Do you often search for historical data for the same instrument? How many calls you make?

We can optimize the way we call dukascopy servers with some additional layer of caching.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Leo4815162342/dukascopy-tools/issues/7#issuecomment-618398753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOT3DUUGZNWVQWLMUUPEDO3ROBAQDANCNFSM4MHHDXCQ .

lezwright commented 4 years ago

My currency pairs have stopped working one by one, starting GBPJPY then AUDCAD?

Leo4815162342 commented 4 years ago

Can you specify exactly what is not working? I've just made few test calls, and it looks fine

lezwright commented 4 years ago

I couldn't get the data for GBPJPY and AUDCAD but it is fine now, Leo. Any luck with ability to have more calls?

Leo4815162342 commented 4 years ago

@lezwright The dukascopy-node package does not have any limitations on the number of calls it can make.

The only limitation is the dukascopy server rate limits - which we cannot control. But we can control how we make our calls.

I've released an update (dukascopy-node@1.2.0: https://www.npmjs.com/package/dukascopy-node) that exposes more controls in terms of how we call dukascopy servers:

You can play around with those, for example decrease batchsize and increase pauseBetweenBatchesMs - with that you can have higher chances of all requests coming through

For example:

getHistoricRates({
  instrument: 'audcad',
  dates: {
    from: '2010-01-01',
    to: '2020-01-01'
  },
  timeframe: 'h1',
  batchSize: 5,
  pauseBetweenBatchesMs: 2500
})
lezwright commented 4 years ago

Thank you very much Leo! I will give it a go and update you.