Closed Willstar44 closed 6 years ago
I'm getting the same issue. Is there any solution ?
I was getting this error, updated my API keys and tried with a fresh copy of the code and now get a different error.
2017-11-16 19:55:55,913 - INFO - market_maker - Shutting down. All open orders will be cancelled. 2017-11-16 19:55:55,913 - INFO - market_maker - Resetting current position. Canceling all existing orders. 2017-11-16 19:55:55,914 - INFO - bitmex - sending req to https://testnet.bitmex.com/api/v1/order: {"filter": "{\"ordStatus.isTerminated\": false, \"symbol\": \"XBTUSD\"}", "count": 500} 2017-11-16 19:55:57,099 - INFO - ws_thread - Websocket Closed
Could you post the whole error? That's always emitted when the program shuts down.
2017-11-17 06:19:09,532 - INFO - market_maker - BitMEX Market Maker Version: v1.1
2017-11-17 06:19:09,533 - INFO - ws_thread - Connecting to wss://testnet.bitmex.com/realtime?subscribe=quote:XBTUSD,trade:XBTUSD,instrument,order:XBTUSD,execution:XBTUSD,margin,position
2017-11-17 06:19:09,533 - INFO - ws_thread - Authenticating with API Key.
2017-11-17 06:19:09,534 - INFO - ws_thread - Started thread
2017-11-17 06:19:12,538 - INFO - ws_thread - Connected to WS. Waiting for data images, this may take a moment...
2017-11-17 06:19:15,851 - INFO - ws_thread - Got all market data. Starting.
2017-11-17 06:19:15,851 - INFO - market_maker - Using symbol XBTUSD.
2017-11-17 06:19:15,852 - INFO - market_maker - Order Manager initializing, connecting to BitMEX. Live run: executing real trades.
2017-11-17 06:19:15,852 - INFO - market_maker - Resetting current position. Cancelling all existing orders.
2017-11-17 06:19:17,742 - INFO - market_maker - XBTUSD Ticker: Buy: 7884.50, Sell: 7890.00
2017-11-17 06:19:17,743 - INFO - market_maker - Start Positions: Buy: 7845.57, Sell: 7928.95, Mid: 7887.20
2017-11-17 06:19:17,743 - INFO - market_maker - Current XBT Balance: 1.365841
2017-11-17 06:19:17,743 - INFO - market_maker - Current Contract Position: 0
2017-11-17 06:19:17,743 - INFO - market_maker - Position limits: -1000/1000
2017-11-17 06:19:17,743 - INFO - market_maker - Contracts Traded This Run: 0
2017-11-17 06:19:17,743 - INFO - market_maker - Total Contract Delta: 0.0000 XBT
2017-11-17 06:19:17,743 - INFO - market_maker - Creating 16 orders:
2017-11-17 06:19:17,743 - INFO - market_maker - Sell 200 @ 7928.9
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 210 @ 7968.6
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 220 @ 8008.4
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 230 @ 8048.5
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 240 @ 8088.7
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 250 @ 8129.2
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 260 @ 8169.8
2017-11-17 06:19:17,744 - INFO - market_maker - Sell 270 @ 8210.7
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 200 @ 7845.6
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 210 @ 7806.5
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 220 @ 7767.7
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 230 @ 7729.1
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 240 @ 7690.6
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 250 @ 7652.3
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 260 @ 7614.3
2017-11-17 06:19:17,744 - INFO - market_maker - Buy 270 @ 7576.4
2017-11-17 06:19:17,989 - ERROR - bitmex - Error: 400 Client Error: Bad Request for url: https://testnet.bitmex.com/api/v1/order/bulk: {"error":{"message":"Invalid price tickSize","name":"HTTPError"}}
2017-11-17 06:19:17,990 - ERROR - bitmex - Endpoint was: POST order/bulk: {"orders": [{"clOrdID": "mm_bitmex_awUS+On2TPu+zLIcGVj76g", "symbol": "XBTUSD", "orderQty": 270, "side": "Buy", "price": 7576.4}, {"clOrdID": "mm_bitmex_PVB8geH0R6OuIZsI/Um2gw", "symbol": "XBTUSD", "orderQty": 260, "side": "Buy", "price": 7614.3}, {"clOrdID": "mm_bitmex_27W0k8hBRrmg6hlylkLKpg", "symbol": "XBTUSD", "orderQty": 250, "side": "Buy", "price": 7652.3}, {"clOrdID": "mm_bitmex_Czs2eIuQSf677isVHpdvPQ", "symbol": "XBTUSD", "orderQty": 240, "side": "Buy", "price": 7690.6}, {"clOrdID": "mm_bitmex_xNLvUfWCQBKfImB3vMvadQ", "symbol": "XBTUSD", "orderQty": 230, "side": "Buy", "price": 7729.1}, {"clOrdID": "mm_bitmex_T/Cc7ZD3T1yCYCaid2NoXg", "symbol": "XBTUSD", "orderQty": 220, "side": "Buy", "price": 7767.7}, {"clOrdID": "mm_bitmex_MStpnZZgS/u0V4fGyxgKkg", "symbol": "XBTUSD", "orderQty": 210, "side": "Buy", "price": 7806.5}, {"clOrdID": "mm_bitmex_OtHs7JvUQjSbTl5kXhvi+Q", "symbol": "XBTUSD", "orderQty": 200, "side": "Buy", "price": 7845.6}, {"clOrdID": "mm_bitmex_iZbwm1JkQSKlF6i/tPaWeQ", "symbol": "XBTUSD", "orderQty": 270, "side": "Sell", "price": 8210.7}, {"clOrdID": "mm_bitmex_2/cWbYDHTeqwcDYuwiRdoA", "symbol": "XBTUSD", "orderQty": 260, "side": "Sell", "price": 8169.8}, {"clOrdID": "mm_bitmex_sd3FZmIQRaqn2johMVXKzg", "symbol": "XBTUSD", "orderQty": 250, "side": "Sell", "price": 8129.2}, {"clOrdID": "mm_bitmex_IYRrpeI7TWWweO47hmYzDA", "symbol": "XBTUSD", "orderQty": 240, "side": "Sell", "price": 8088.7}, {"clOrdID": "mm_bitmex_zwe+BS1/Q0aQIgMz0QH1JQ", "symbol": "XBTUSD", "orderQty": 230, "side": "Sell", "price": 8048.5}, {"clOrdID": "mm_bitmex_5Noj/w8oQn+kMry3I/7/Fw", "symbol": "XBTUSD", "orderQty": 220, "side": "Sell", "price": 8008.4}, {"clOrdID": "mm_bitmex_Qo9hY4aBQOaJ42ewdXN0sA", "symbol": "XBTUSD", "orderQty": 210, "side": "Sell", "price": 7968.6}, {"clOrdID": "mm_bitmex_FnZdZN6SRzao4A3lDTwMww", "symbol": "XBTUSD", "orderQty": 200, "side": "Sell", "price": 7928.9}]}
Traceback (most recent call last):
File "./marketmaker", line 4, in
Your error is:
{"error":{"message":"Invalid price tickSize","name":"HTTPError"}}
Please update the project to the latest version, where this is fixed.
Im getting this error now
HTTPError: 400 Client Error: Bad Request for url: https://www.bitmex.com/api/v1/order/bulk