ztrade
I hope ztrade is "The last trade app you need" !
中文
Features
- Develop/write strategy with only go language,no other script need
- Event base framework,easy to extend
- Support binance,okx,ctp
- usegoplusas script engine
- can build strategy to go golang plugin,best performance
build
make
simple run
cd dist
./ztrade --help
Use
replace your key and secret
replace your key and secret in dist/configs/ztrade.yaml
download history Kline
# run first
./ztrade download --binSize 1m --start "2020-01-01 08:00:00" --end "2021-01-01 08:00:00" --exchange binance --symbol BTCUSDT
# auto download kline
./ztrade download --symbol BTCUSDT -a --exchange binance
backtest
./ztrade backtest --script debug.go --start "2020-01-01 08:00:00" --end "2021-01-01 08:00:00" --symbol BTCUSDT --exchange binance
real trade
./ztrade trade --symbol BTCUSDT --exchange binance --script debug.go
strategy
show examples:
strategy
strategy tutorial
build strategy with private deps
./ztrade build --script /path/to/demo.go --output demo.so --moduleRoot /path/to/deps-module
By default, ztrade build searches upward from the strategy source directory for the nearest go.mod. Use --ignoreSourceModuleRoot if you want to disable that automatic discovery.
Thanks
goplus
vnpy