
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@debut/plugin-grid
Advanced tools
The Debut plugin allows you to organize the operation of strategies on a grid system (DCA). It is a system of additional purchases with an increase in volumes at each additional purchase by martingale. To open trades, grid levels with a fixed distance between them are used. It is also possible to use the Fibonacci distance between the levels.
npm install @debut/plugin-grid --save
| Name | Type | Description |
|---|---|---|
| step | number | Grid step, percentage. The step is always the same if the fibo option is not activated |
| fibo | number | Calculation of Fibonacci levels. Each next level of the grid is equal to previous x fibo, value range from 1 to 2, default is disabled |
| martingale | number | Martingale coefficient. Determines the number of lots for a trade. In the classic martingale system it is equal to 2, which means that we always double the lot of the previous deal, if 1 - the lot will be fixed |
| levelsCount | number | The number of grid levels, the more the more funds you need |
| takeProfit | number | Take profit as a percentage. Calculated as the total profit from open positions in relation to the initial capital |
| stopLoss | number | Stop loss in percentage. (May be Infinity assigned, this is correct number type ) It is calculated by the sum of all open positions, as well as takeProfit* |
| reduceEquity | boolean | Each next grid start lot will reduced |
| trailing | boolean | default - false, true mean trailing profit apllied to last or first order after grid take reached |
| collapse | boolean | default - false, true mean orders closing will be collapsed in to single request |
* Stop/Take does not work on the basis of price, but on the basis of a percentage of funds.
import { gridPlugin, GridPluginOptions } from '@debut/plugin-grid';
// ...
export interface MyStrategyOptinos extends DebutOptions, GridPluginOptions;
export class MyStrategy extends Debut {
declare plugins: GridPluginAPI;
constructor(transport: BaseTransport, opts: CCISolderGOptions) {
super(transport, opts);
this.registerPlugins([
// ...
gridPlugin(this.opts),
// ...
]);
}
onCandle(candle) {
// Grid can created manually withoun order
// if (!this.ordersCount) {
// this.plugins.grid.createGrid(candle.c;
// }
// By default, the grid is created automatically, instead of closing the first order at a loss
}

Trading against the trend on a grid of transactions
FAQs
Martingale or linear grid based trades
We found that @debut/plugin-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.