An Asynchronous Event-driven High-frequency Trading System for MarketMakers、Liquidity providers and other HFT users.
Realtime Orderbook、kline、market trade details are subscribed by websocket for strategies callback.HBDM Swap has been integrated.
APIs of HBDM Swap has been integrated such as trade api、batch trade api、cancel api,etc.
Assets are subscribed by websocket for strategies callback.HBDM Swap has been integrated.
Positions are subscribed by websocket for strategies callback.HBDM Swap has been integrated.
Orders are subscribed by websocket for strategies callback.HBDM Swap has been integrated.
Logs can log to files corresponding to different levels such as "DEBUG","INFO","WARN", "ERROR".
Common trade interface and cancel interface,etc.
websocket automatic reconnection mechanism, heartbeat mechanism,etc.
DingDing message Alarm,etc.
...
python:python 3.5.3 above
git clone https://github.com/hbdmapi/hbdm_Python.git
pip install -r requirements.txt
- edit "config.json"
-
"access_key": "api access_key"
-
"secret_key": "api secret_key"
-
you may also have to change the host and wss address.
-
save and quit.
-
- bash scripts/run.sh
- Happy Trading
Demo strategy only implements a simple sell short and close short strategy.
NOTE: The demo strategy needs to be modified to run in production。
ProjectName
|----- docs
| |----- README.md
|----- alpha
|----- scripts
| |----- run.sh
|----- config.json
|----- main.py
|----- strategy
| |----- strategy1.py
| |----- strategy2.py
| |----- ...
|----- .gitignore
|----- README.md
Strategy config file config.json:
- ACCOUNTS
list
your hdbm account name; - strategy
string
your strategy name; - symbol
string
the trade code,such as BTC-USD - MARKETS
list
the market config.
Config Tutorials: config tutorials
python main.py config.json
Pls post your suggestions and bugs in issues
TheNextQuant