Closed igkoh closed 4 years ago
"LOG": {
"console": true,
"level": "DEBUG",
"path": "/data/logs/servers/future_maker_strategy",
"name": "future_maker_strategy.log",
"clear": true,
"backup_count": 5
},
Hi, @igkoh ,You can set the log level to "DEBUG" to check whether the orderbook or position or asset is pushed.
@foonsun, I am very impressed how smartly you organized codes. Following your precise instruction, "LOG" level is set to "DEBUG". Truly, the strategy code's onevent(orderbook_update, _trade_update, ...) are properly executed giving orderbook {"platform": "huobi_swap", "symbol": "BTC-USD", "asks": [["11282.80000000", "505.00000000"], ["11283.50000000", "22.00000000"], ["11283.70000000", "1.00000000"],
trade {"platform": "huobi_swap", "symbol": "BTC-USD", "action": "SELL", "price": "11282.70000000", "quantity": "450.00000000", with 0.1 tick of swap price.
I am very grateful for fast response and I can really prepare both futures and swaps market making successfully due to your kind help.
Best regards, Ingyu
@igkoh Thank you for praise.Good luck!
After W [2020-08-05 14:10:18,646] [-] [AsyncHttpRequests], program DOES NOT executes [MyStrategy] position update, position update, asset update, orderbook update. After waiting WITHOUT executing [MyStrategy] update codes, program shows [Heart Beat] as
_(base) E:\BitCoin2\hbSwpDS14\hbdm_Python\examples\huobi_swap>python main.py config.json init logger ... I [2020-08-05 14:10:17,419] [-] [Quant] version: 1.0.13_200716_alpha I [2020-08-05 14:10:18,002] [-] [Quant] start io loop ... I [2020-08-05 14:10:18,003] [-] [HuobiSwapTrade] url: wss://api.hbdm.vn/swap-notification I [2020-08-05 14:10:18,189] [-] [HuobiSwapMarket] url: wss://api.hbdm.vn/swap-ws W [2020-08-05 14:10:18,646] [-] [AsyncHttpRequests] response data is not json format! method: POST url: https://api.hbdm.vn/swap-api/v1/swap_openorders headers: {'Accept': 'application/json', 'Content-type': 'application/json', 'User-Agent': 'AlphaQuant1.0.13_200716_alpha'} params: {'AccessKeyId': '5813b5f3-0a6ba013-ghxertfvbf-ff37b', 'SignatureMethod': 'HmacSHA256', 'SignatureVersion': '2', 'Timestamp': '2020-08-05T05:10:18', 'Signature': 'iAKY8F8NIQXYmNlySmXUfInIqii8RtT+3xYIFoCvlPY='} body: None data: {'contract_code': 'BTC-USD', 'page_index': 1, 'page_size': 50} code: 200 result: {"status":"ok","data":{"orders":[],"total_page":1,"current_page":1,"totalsize":0},"ts":1596604219056} NO EXECUTION [MyStrategy] trade update: {"platform": I [2020-08-05 14:11:03,200] [-] [HeartBeat] do server heartbeat, count: 12000 I [2020-08-05 14:11:47,928] [-] [HeartBeat] do server heartbeat, count: 24000.
I have not figured out why [MyStrategy] position update, position update, asset update, orderbook update is not updated. I would be grateful what mistakes I made not producing [MyStrategy] position update, position update, asset update, orderbook update.
Best regards, Ingyu