1.5.12 • Published 2 years ago

debut-plugin-bridge v1.5.12

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

debut-plugin-bridge

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-bridge

Usage

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

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

    //...

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

// will return:
// [
//       {
//             time: 1662240600000,
//             o: 1552.42,
//             c: 1552.42,
//             h: 1552.42,
//             l: 1552.42,
//             v: 2456
//       },
// ]
1.5.10

2 years ago

1.5.9

2 years ago

1.5.12

2 years ago

1.5.11

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago