UNPKG

taapi-cache

Version:

TAAPI.IO Cache Package. A convenient way to fetch candles, store them and reuse them.

120 lines (112 loc) 4.55 kB
const environment = { /** * Setup this API's own authentication. Generate your own username & password */ auth: { secret: "myTopSecretToken", }, /** * Setup this API's server details */ server: { host: "localhost", port: 6043, debugMode: true, }, /** * Configure MongoDB. */ database: { name: "taapi_cache", host: "localhost", user: "", pass: "", port: 27017, }, /** * Configure data providers. CCXT requires an object containing * keys with id's of exchanges, where each exchange must contain * schedulers. AlphaVantage and FinnHub does not require any * source, but only the API secret as well as the required schedulers. * * Schedules are defined the same way regular cron jobs are. 6 stars in total where star: * 1: second (0 - 59, OPTIONAL) * 2: minute (0 - 59) * 3: hour (0 - 23) * 4: day of month (1 - 31) * 5: month (1 - 12) * 6: day of week (0 - 7) (0 or 7 is Sun) */ dataProviders: { /** * CCXT is used to fetch digital currency or crypto assets. */ ccxt: { binance: { secret: null, schedulers: { "1m": { "cron": "05 * * * * *", enabled: false }, "3m": { "cron": "05 */3 * * * *", enabled: false }, "5m": { "cron": "05 */5 * * * *", enabled: false }, "15m": { "cron": "05 */15 * * * *", enabled: false }, "30m": { "cron": "05 */30 * * * *", enabled: false }, "1h": { "cron": "05 0 * * * *", enabled: false }, "2h": { "cron": "05 0 */2 * * *", enabled: false }, "3h": { "cron": "05 0 */3 * * *", enabled: false }, "4h": { "cron": "05 0 */4 * * *", enabled: false }, "6h": { "cron": "05 0 */6 * * *", enabled: false }, "12h": { "cron": "05 0 */12 * * *", enabled: false }, "1d": { "cron": "05 0 0 * * *", enabled: false }, "1w": { "cron": "05 0 0 * * 1", enabled: false }, "1M": { "cron": "05 0 0 1 * *", enabled: false }, }, rateLimit: 1200 / 60 * 1000, // Waiting time: 1200 calls / minute (in milliseconds) }, kraken: { secret: null, schedulers: { "1m": { "cron": "05 * * * * *", enabled: false }, "1h": { "cron": "05 0 * * * *", enabled: false }, }, rateLimit: 1 * 1000, // Waiting time: 1 call / second (in milliseconds) }, }, /** * Configure Alpha Vantage with secret and schedulers. * More info at: https://www.alphavantage.co/ */ alphaVantage: { secret: "", schedulers: { "1m": { "cron": "05 * * * * *", enabled: false }, "5m": { "cron": "05 */5 * * * *", enabled: false }, "15m": { "cron": "05 */15 * * * *", enabled: false }, "30m": { "cron": "05 */30 * * * *", enabled: false }, "1h": { "cron": "05 0 * * * *", enabled: false }, "1d": { "cron": "05 0 0 * * *", enabled: false }, "1w": { "cron": "05 0 0 * * 1", enabled: false }, "1M": { "cron": "05 0 0 1 * *", enabled: false }, }, rateLimit: 60 / 5 * 1000, // Waiting time: 5 calls / minute (in milliseconds) }, /** * Configure Finn Hub with secret and schedulers. * More info at: https://finnhub.io/ */ finnHub: { secret: "", schedulers: { "1m": { "cron": "05 * * * * *", enabled: false }, "5m": { "cron": "05 */5 * * * *", enabled: false }, "15m": { "cron": "05 */15 * * * *", enabled: false }, "30m": { "cron": "05 */30 * * * *", enabled: false }, "1h": { "cron": "05 0 * * * *", enabled: false }, "1d": { "cron": "05 0 0 * * *", enabled: false }, "1w": { "cron": "05 0 0 * * 1", enabled: false }, "1M": { "cron": "05 0 0 1 * *", enabled: false }, }, rateLimit: 1 * 1000, // Waiting time: 1 call / second (in milliseconds) } }, } module.exports = environment;