@statsanytime/trade-bots
v1.0.0-alpha.26
Published
Simple framework for building CS trade-bots!
Downloads
13
Readme
@statsanytime/trade-bots
Main package for the trade-bots framework. This package exports the main logic for creating, starting and managing trade-bots.
Most other packages in this repository are plugins for this package.
Installation
pnpm install @statsanytime/trade-bots
Usage
This package exports the following functions:
createBot
Creates a new Bot instance.
export interface BotOptions {
name: string | undefined;
pipeline: Pipeline;
plugins: Plugin[];
storage?: Storage;
}
const bot = createBot({
name: 'my-bot',
pipeline: createPipeline(...),
plugins: [
...
],
});
createPipeline
Create a new Pipeline instance.
const pipeline = createPipeline('my-pipeline', () => {
// Pipeline logic
});
startBots
Can be used to start bots. It accepts an array of bot instances.
Alternatively, the stattb
CLI can be used to do this.
startBots([bot1, bot2, ...]);
There are quite a few available functions on top of these, but these are the stable ones for the time being. Feel free to play around with the more internal functions, but be aware that they might change in the future.