Smart Executor
When performing portfolio strategy in long term, Python is a very convenient tool to generate signal and then let Apifiny Algo to handle the execution part, which will mainly using VWap as a reference and have multiple safety check to protect you from quoting at a wrong price you don't want. Below is an example:
"strategies": [
["BTCUSDT.BINANCEUS", [
"CCEventMakerStrategy", {
"symbol": "BTCUSDT",
"trade_market": "BINANCEUS",
"account": 10001,
"dep_pm": "BTCUSDT.HUOBI_midpx",
"model": "Zero_m",
"VWap": "BTCUSDT.HUOBI_Vwap",
"max_spread_bps": 5,
"max_quote_frombbo_bps": 1,
"update_quote_bps": 2,
"quote_bps": 3,
"allowed_bps": 5,
"order_notional": 500,
"max_notional": 2500,
"max_risk": 2500,
"cooloff": 100,
"use_separate_logs": true,
"close_mode": "none"
}]]
]
Stategy Parameters Overview:
Field | Description | Default |
---|---|---|
max_spread_bps | Safety check in case that order book is super wide and not safe to quote. | 5bps |
max_quote_frombbo_bps | Cap VWAP desired price at this level, in case it is too far away from BBO. | 3bps |
quote_bps | Control aggresiveness to quote above best bid or below best ask. | 1bps |
update_quote_bps | Cancel and replace new order, if target price is away from current top order. | 1bps |
allowed_bps | Go to IOC mode, if mid_px is away from the last desired VWap. | 5bps |
cooloff | Prevent frequently placing new orders. | 100ms |