
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@debut/plugin-session
Advanced tools
The Debut plugin, for limiting the trading session time. Allows you to configure the working hours for the strategy, as well as to detect the change of the day. The plugin automatically performs the correction of time zones, at the transition of USA to summer and winter time, so there are no failures on time shifts during testing. It is recommended to use to block work on pre or post market exchanges.
npm install @debut/plugin-session --save
The plugin has a number of parameters available for customization during initialization.
| Name | Type | Description |
|---|---|---|
| from | string | string in format HH:MM, for example 10:00 (GMT+3) time of opening of the main session of exchange MOEX |
| to | string | string in the format HH:MM, for example 19:00 (GMT+3) time of the end of the main session of the MOEX |
| onDayChanged | Function | Optionally, you can pass a function to be called on day change |
| noTimeSwitching | boolean | Default is false, use this parameter for non DST zones |
The time is set locally. The plugin automatically adjusts for the current time zone.
Be aware with
import { SessionPluginOptions, sessionPlugin } from '@debut/plugin-session';
export interface MyStrategyOpts extends DebutOptions, SessionPluginOptions;
// ...
constructor(transport: BaseTransport, opts: MyStrategyOpts) {
super(transport, opts);
this.registerPlugins([
// ...
this.opts.from && this.opts.to && sessionPlugin(this.opts),
// ...
]);
The plugin automatically removes candles, which are not within a range specified in the time settings. This will increase the speed of the strategy optimization.
To enable the candlestick filtration, add the appropriate filter in the meta file (meta.ts)
import { createSessionValidator } from '@debut/plugin-session';
// ...
ticksFilter(cfg: MyStrategyOpts) {
if (!cfg.from && !cfg.to) {
return () => true;
}
const tickValidator = createSessionValidator(cfg.from, cfg.to, cfg.noTimeSwitching);
return (tick) => {
return tickValidator(tick.time).inSession;
};
},
// ...
FAQs
Trade session time, plugin debut
We found that @debut/plugin-session 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.