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
350 stars 66 forks source link

What is `process.env.START_DATES_URL` #176

Closed jafarijason closed 3 months ago

jafarijason commented 4 months ago

Hi, Thanks for the amazing job you did. I am trying to run yarn gen:meta I received this error

$ tsx src/utils/instrument-meta-data/generate-data.ts
(node:95572) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///./dukascopy-node/node_modules/tsx/dist/loader.js", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:95572) ExperimentalWarning: `globalPreload` is planned for removal in favor of `initialize`. `globalPreload` is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

/./dukascopy-node/node_modules/node-fetch/lib/index.js:1327
                throw new TypeError('Only absolute URLs are supported');
        ^
TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/./dukascopy-node/node_modules/node-fetch/lib/index.js:1327:9)
    at /./dukascopy-node/node_modules/node-fetch/lib/index.js:1440:19
    at new Promise (<anonymous>)
    at fetch (/./dukascopy-node/node_modules/node-fetch/lib/index.js:1437:9)
    at getActualStartDates (/./dukascopy-node/src/utils/instrument-meta-data/generate-data.ts:46:29)

and it seems this url process.env.START_DATES_URL is missed. Please let me know that is the value of this. Thanks

Leo4815162342 commented 4 months ago

@jafarijason it's a "secret sauce" of getting a proper decoded starting dates for the trading instruments. I can give you data structure of what it returns - https://gist.github.com/Leo4815162342/1bcc2d04e2c7860f633c440e56c17d7b

jafarijason commented 3 months ago

@Leo4815162342 thank you so much