Skip to content

Debut plugin that provides additional candles of specified tickers to strategy.

License

Notifications You must be signed in to change notification settings

xiva-wgt/debut-plugin-candles

 
 

Repository files navigation

debut-plugin-candles

CI npm

A plugin for Debut platform that provides additional candles of specified tickers to strategy.

Install

@debut/community-core should be installed. If you are using Strategies repository just type:

npm install debut-plugin-candles

Usage

  1. Extend strategy options with CandlesPluginOptions:
// bot.ts
export interface CCIDynamicBotOptions
    extends CandlesPluginOptions {
    //...
}

// cfgs.ts
export const ETHUSDT: CCIDynamicBotOptions = {
    candles: ['BTCUSDT'],
    //...
  1. Declare CandlesPluginAPI:
// bot.ts
export class CCIDynamic extends Debut {
    declare opts: CandlesPluginAPI;

    //...

}
  1. Register candlesPlugin() plugin
// bot.ts
this.registerPlugins([candlesPlugin(this.opts, env?)]);
  1. Get candles:
// bot.ts
this.plugins.candles.get();

// will return ([0] last, [1] prev):
// {
//     BTCUSDT: {
//             time: 1662240600000,
//             o: 1552.42,
//             c: 1552.42,
//             h: 1552.42,
//             l: 1552.42,
//             v: 2456
//         },
// }

About

Debut plugin that provides additional candles of specified tickers to strategy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Shell 1.0%