Skip to content
All library documents

OKCoin Burst Trading with Inventory Rebalancing

Article Strategy library · Author: 去者伯仁

Summary

This Python port describes a BTC trading bot that watches recent trades and a weighted order-book price to detect short-term price bursts. It smooths observed trade volume, compares the latest price with recent highs and lows, and submits buys or sells when a threshold is crossed. Order size is scaled by observed volume and reduced during the early polling ticks. The implementation also estimates the portfolio’s BTC share and places small orders to move holdings toward a target range.

The bot cancels unfilled orders after waiting and adjusts its quote after a canceled burst order. Published settings show a one-hour BTC/USDT backtest window on Binance, but no performance results or broader validation are provided. The code and comments have apparent inconsistencies, including parameter and variable references that may not match the described behavior. Its short sample, fee assumptions, execution model, and lack of risk analysis limit what can be concluded about live performance.

Key ideas

  • The strategy treats moves beyond recent price extremes as burst signals for buying or selling.
  • It smooths recent trade volume and uses that estimate to scale burst order size.
  • It estimates the BTC fraction of account value and trades toward a target allocation band.
  • Unfilled orders are canceled after a wait, with later quotes adjusted after cancellation.
  • The published backtest configuration contains no performance evidence or robustness analysis.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.