1.5.1 • Published 3 years ago

debut-plugin-candles v1.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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
//         },
// }
1.5.1

3 years ago

1.5.0

3 years ago

1.3.3-beta.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.1-beta.0

3 years ago

1.3.0-beta.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago