The bot operates as follows:
- Every
order_pairs_interval_seconds:- Fetch the current price for the O2 market from Bitget.
- Calculate the buy price:
buy_price = bitget_price * (1 + price_adjustment_factor). - Calculate the sell price:
sell_price = bitget_price * (1 - price_adjustment_factor). - Place a buy order at the calculated buy price.
- Wait for
order_interval_seconds. - Place a sell order at the calculated sell price.
Add a config.yaml file to the root directory. Use config.example.yaml as a template for your configuration.
-
Install all dependencies for the project:
pnpm install
-
Build the project:
pnpm run build
-
Start the bot:
pnpm start
Ensure you have Docker and Docker Compose installed on your system. Then, build and run the Docker container:
-
Start the bot using Docker Compose:
docker compose up --build -d
-
To stop the bot:
docker compose down