I am writing to bring to your attention certain inconsistencies I’ve observed in the market data received from the WebSocket streams while operating my high-frequency arbitrage bot. My bot operates by continuously receiving data from the WebSocket and executing trades using the SPOT API WebSocket. I’d like to highlight a specific instance, within a timeframe of approximately 71 milliseconds, where my bot executed 4 batches of trades.
During these trades, my bot persists in monitoring the market prices for BNBBTC, BTCUSDT, and BNBUSDT. According to the WebSocket, these prices appeared stable within the 71 ms window:
- price_BNBBTC_bid=0.006952
- price_BTCUSDT_bid=35144.17
- price_BNBUSDT_ask_1231=245.0
However, the stability suggested by the WebSocket data did not match the prices I encountered when executing MARKET orders. Notably, the bid price for BNBBTC that I received for each trade differed from the WebSocket-reported price. It seems implausible that the market price would exactly revert to its previous state after each trade execution, especially within such a short timeframe and across multiple occurrences.
This discrepancy leads me to believe that there are timing inconsistencies in the data provided by the WebSocket. The impact on high-frequency trading strategies, which rely on precision and timeliness, is substantial. To enhance accuracy and enable us to measure latency effectively, I propose that Binance considers including precise timestamps with each piece of data sent through the WebSocket. This addition would significantly aid in synchronizing our trading algorithms with the actual market movements.
I appreciate your attention to this matter and hope that it can be addressed promptly to ensure the reliability and accuracy of the data we depend on for our trading strategies.
Here is the log:
2023-11-05 11:26:47.000606 Arbitrage ID: 0156453a-6c85-4b14-98a4-0dc86a976248, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_bid=0.006952, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000606 CHECK!!!! Arbitrage ID: 0156453a-6c85-4b14-98a4-0dc86a976248, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_ask=0.006954, price_BNBBTC_bid=0.006952, price_BTCUSDT_ask=35144.18, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0, price_BNBUSDT_bid=244.8 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000607 0156453a-6c85-4b14-98a4-0dc86a976248: Arbitrage opportunity found _ precise log happened at 2023-11-05 11:26:47.606
2023-11-05 11:26:47.000616 Creating order: {'id': '0dfaf897-c760-4837-9873-df69a6331151', 'symbol': 'BNBBTC', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000617 Creating order: {'id': 'f1fc96e5-1243-4234-b837-f6dcf5401b85', 'symbol': 'BTCUSDT', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.00029}
2023-11-05 11:26:47.000617 Creating order: {'id': '26fc2767-e8d2-43ee-b5b9-44f472265ade', 'symbol': 'BNBUSDT', 'side': 'BUY', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000621 Received: {"id":"0dfaf897-c760-4837-9873-df69a6331151","status":200,"result":{"symbol":"BNBBTC","orderId":1749586468,"orderListId":-1,"clientOrderId":"4G9CvxiK3En4047nCUo1h0","transactTime":1699183607622,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"0.00029219","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607622,"fills":[{"price":"0.00695700","qty":"0.04200000","commission":"0.00003128","commissionAsset":"BNB","tradeId":228480435}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":1},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":1},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":3}]}
2023-11-05 11:26:47.000621 ---------------------------------------------------------------------
2023-11-05 11:26:47.000621 1231_1st: Status: FILLED
2023-11-05 11:26:47.000621 1231_1st: At time: 1699183607622
2023-11-05 11:26:47.000621 1231_1st: Sell Price_bid (BNBBTC): 0.00695700
2023-11-05 11:26:47.000621 1231_1st: Volume of BNB Sold: 0.04200000
2023-11-05 11:26:47.000621 1231_1st: Volume of BTC bought: 0.00029219
2023-11-05 11:26:47.000621 1231_1st: Transaction Fees: 0.00003128 BNB
2023-11-05 11:26:47.000621 ---------------------------------------------------------------------
2023-11-05 11:26:47.000623 Received: {"id":"f1fc96e5-1243-4234-b837-f6dcf5401b85","status":200,"result":{"symbol":"BTCUSDT","orderId":23098547092,"orderListId":-1,"clientOrderId":"fIUisIrCbF3Qk5TYNaMZhO","transactTime":1699183607622,"price":"0.00000000","origQty":"0.00029000","executedQty":"0.00029000","cummulativeQuoteQty":"10.19180930","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607622,"fills":[{"price":"35144.17000000","qty":"0.00029000","commission":"0.00003127","commissionAsset":"BNB","tradeId":3269132123}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":2},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":2},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":4}]}
2023-11-05 11:26:47.000623 ---------------------------------------------------------------------
2023-11-05 11:26:47.000623 1231_2nd: Status: FILLED
2023-11-05 11:26:47.000623 1231_2nd: At time: 1699183607622
2023-11-05 11:26:47.000623 1231_2nd: Sell Price_bid (BTCUSDT): 35144.17000000
2023-11-05 11:26:47.000623 1231_2nd: Volume of BTC Sold: 0.00029000
2023-11-05 11:26:47.000623 1231_2nd: Volume of USDT bought: 10.19180930
2023-11-05 11:26:47.000623 1231_2nd: Transaction Fees: 0.00003127 BNB
2023-11-05 11:26:47.000623 ---------------------------------------------------------------------
2023-11-05 11:26:47.000623 Received: {"id":"26fc2767-e8d2-43ee-b5b9-44f472265ade","status":200,"result":{"symbol":"BNBUSDT","orderId":4865491379,"orderListId":-1,"clientOrderId":"KpyOYvsVAlwbqi4GDLIBWg","transactTime":1699183607622,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"10.28160000","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"BUY","workingTime":1699183607622,"fills":[{"price":"244.80000000","qty":"0.04200000","commission":"0.00003150","commissionAsset":"BNB","tradeId":678654759}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":3},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":3},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":5}]}
2023-11-05 11:26:47.000623 Time for the socket to open: 10 milliseconds
2023-11-05 11:26:47.000623 Time taken for the trade to execute: 6 milliseconds
2023-11-05 11:26:47.000623 Total time: 16 milliseconds
2023-11-05 11:26:47.000623 ---------------------------------------------------------------------
2023-11-05 11:26:47.000623 1231_3rd: Status: FILLED
2023-11-05 11:26:47.000623 1231_3rd: At time: 1699183607622
2023-11-05 11:26:47.000623 1231_3rd: Buy Price_ask (BNBUSDT): 244.80000000
2023-11-05 11:26:47.000623 1231_3rd: Volume of USDT Sold: 10.28160000
2023-11-05 11:26:47.000624 1231_3rd: Volume of BNB bought: 0.04200000
2023-11-05 11:26:47.000624 1231_3rd: Transaction Fees: 0.00003150 BNB
2023-11-05 11:26:47.000624 ---------------------------------------------------------------------
2023-11-05 11:26:47.000624 Arbitrage taken opportunity 1231 = 0.99898 compared to 1.00052, difference = -0.00154
2023-11-05 11:26:47.000624
2023-11-05 11:26:47.000624 WebSocket connection closed. Attempting to reconnect.
2023-11-05 11:26:47.000625 Arbitrage ID: 9a9bcff7-6793-4b0b-bf1c-7a1ae1f2ed22, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_bid=0.006952, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000625 CHECK!!!! Arbitrage ID: 9a9bcff7-6793-4b0b-bf1c-7a1ae1f2ed22, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_ask=0.006954, price_BNBBTC_bid=0.006952, price_BTCUSDT_ask=35144.18, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0, price_BNBUSDT_bid=244.8 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000625 9a9bcff7-6793-4b0b-bf1c-7a1ae1f2ed22: Arbitrage opportunity found _ precise log happened at 2023-11-05 11:26:47.625
2023-11-05 11:26:47.000633 Creating order: {'id': '916156f9-211a-49a2-b878-6a78fe5d1f52', 'symbol': 'BNBBTC', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000634 Creating order: {'id': '2e58388b-cfbf-4585-b232-fc495ce4a532', 'symbol': 'BTCUSDT', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.00029}
2023-11-05 11:26:47.000634 Creating order: {'id': 'b0ec1460-0368-4fb9-8b3f-a14e54f72261', 'symbol': 'BNBUSDT', 'side': 'BUY', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000636 Received: {"id":"916156f9-211a-49a2-b878-6a78fe5d1f52","status":200,"result":{"symbol":"BNBBTC","orderId":1749586494,"orderListId":-1,"clientOrderId":"FYZ8fAe3nvCbkJgf21WgEn","transactTime":1699183607639,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"0.00029223","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607639,"fills":[{"price":"0.00695800","qty":"0.04200000","commission":"0.00003128","commissionAsset":"BNB","tradeId":228480440}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":1},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":1},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":8}]}
2023-11-05 11:26:47.000636 ---------------------------------------------------------------------
2023-11-05 11:26:47.000636 1231_1st: Status: FILLED
2023-11-05 11:26:47.000636 1231_1st: At time: 1699183607639
2023-11-05 11:26:47.000636 1231_1st: Sell Price_bid (BNBBTC): 0.00695800
2023-11-05 11:26:47.000636 1231_1st: Volume of BNB Sold: 0.04200000
2023-11-05 11:26:47.000636 1231_1st: Volume of BTC bought: 0.00029223
2023-11-05 11:26:47.000636 1231_1st: Transaction Fees: 0.00003128 BNB
2023-11-05 11:26:47.000636 ---------------------------------------------------------------------
2023-11-05 11:26:47.000640 Received: {"id":"2e58388b-cfbf-4585-b232-fc495ce4a532","status":200,"result":{"symbol":"BTCUSDT","orderId":23098547097,"orderListId":-1,"clientOrderId":"opLlbA1zLUHHcCLzKURYIt","transactTime":1699183607639,"price":"0.00000000","origQty":"0.00029000","executedQty":"0.00029000","cummulativeQuoteQty":"10.19180930","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607639,"fills":[{"price":"35144.17000000","qty":"0.00029000","commission":"0.00003127","commissionAsset":"BNB","tradeId":3269132125}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":2},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":2},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":9}]}
2023-11-05 11:26:47.000640 ---------------------------------------------------------------------
2023-11-05 11:26:47.000640 1231_2nd: Status: FILLED
2023-11-05 11:26:47.000640 1231_2nd: At time: 1699183607639
2023-11-05 11:26:47.000640 1231_2nd: Sell Price_bid (BTCUSDT): 35144.17000000
2023-11-05 11:26:47.000640 1231_2nd: Volume of BTC Sold: 0.00029000
2023-11-05 11:26:47.000640 1231_2nd: Volume of USDT bought: 10.19180930
2023-11-05 11:26:47.000640 1231_2nd: Transaction Fees: 0.00003127 BNB
2023-11-05 11:26:47.000640 ---------------------------------------------------------------------
2023-11-05 11:26:47.000641 Received: {"id":"b0ec1460-0368-4fb9-8b3f-a14e54f72261","status":200,"result":{"symbol":"BNBUSDT","orderId":4865491491,"orderListId":-1,"clientOrderId":"kpxbyVArkWUvODxZyBOaNl","transactTime":1699183607640,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"10.28160000","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"BUY","workingTime":1699183607640,"fills":[{"price":"244.80000000","qty":"0.04200000","commission":"0.00003150","commissionAsset":"BNB","tradeId":678654765}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":3},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":3},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":10}]}
2023-11-05 11:26:47.000641 Time for the socket to open: 8 milliseconds
2023-11-05 11:26:47.000641 Time taken for the trade to execute: 7 milliseconds
2023-11-05 11:26:47.000641 Total time: 15 milliseconds
2023-11-05 11:26:47.000641 ---------------------------------------------------------------------
2023-11-05 11:26:47.000641 1231_3rd: Status: FILLED
2023-11-05 11:26:47.000641 1231_3rd: At time: 1699183607640
2023-11-05 11:26:47.000641 1231_3rd: Buy Price_ask (BNBUSDT): 244.80000000
2023-11-05 11:26:47.000641 1231_3rd: Volume of USDT Sold: 10.28160000
2023-11-05 11:26:47.000641 1231_3rd: Volume of BNB bought: 0.04200000
2023-11-05 11:26:47.000641 1231_3rd: Transaction Fees: 0.00003150 BNB
2023-11-05 11:26:47.000641 ---------------------------------------------------------------------
2023-11-05 11:26:47.000641 Arbitrage taken opportunity 1231 = 0.99884 compared to 1.00052, difference = -0.00168
2023-11-05 11:26:47.000641
2023-11-05 11:26:47.000642 WebSocket connection closed. Attempting to reconnect.
2023-11-05 11:26:47.000643 Arbitrage ID: 36e96a33-5991-40a4-bebc-b04daa7eccb6, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_bid=0.006952, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000643 CHECK!!!! Arbitrage ID: 36e96a33-5991-40a4-bebc-b04daa7eccb6, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_ask=0.006954, price_BNBBTC_bid=0.006952, price_BTCUSDT_ask=35144.18, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0, price_BNBUSDT_bid=244.8 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000643 36e96a33-5991-40a4-bebc-b04daa7eccb6: Arbitrage opportunity found _ precise log happened at 2023-11-05 11:26:47.643
2023-11-05 11:26:47.000651 Creating order: {'id': '478114e0-8aab-411f-b020-6029da12cd69', 'symbol': 'BNBBTC', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000651 Creating order: {'id': '7f90493d-93ee-4851-bc44-5ff69717be72', 'symbol': 'BTCUSDT', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.00029}
2023-11-05 11:26:47.000651 Creating order: {'id': '4bd4e121-2f3d-4e62-a858-4bee8c6d0c6b', 'symbol': 'BNBUSDT', 'side': 'BUY', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000653 Received: {"id":"478114e0-8aab-411f-b020-6029da12cd69","status":200,"result":{"symbol":"BNBBTC","orderId":1749586518,"orderListId":-1,"clientOrderId":"7ofUgiVzyeey5LUUsxYj2w","transactTime":1699183607656,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"0.00029236","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607656,"fills":[{"price":"0.00696100","qty":"0.04200000","commission":"0.00003128","commissionAsset":"BNB","tradeId":228480445}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":1},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":1},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":12}]}
2023-11-05 11:26:47.000653 ---------------------------------------------------------------------
2023-11-05 11:26:47.000653 1231_1st: Status: FILLED
2023-11-05 11:26:47.000653 1231_1st: At time: 1699183607656
2023-11-05 11:26:47.000653 1231_1st: Sell Price_bid (BNBBTC): 0.00696100
2023-11-05 11:26:47.000653 1231_1st: Volume of BNB Sold: 0.04200000
2023-11-05 11:26:47.000653 1231_1st: Volume of BTC bought: 0.00029236
2023-11-05 11:26:47.000653 1231_1st: Transaction Fees: 0.00003128 BNB
2023-11-05 11:26:47.000653 ---------------------------------------------------------------------
2023-11-05 11:26:47.000658 Received: {"id":"7f90493d-93ee-4851-bc44-5ff69717be72","status":200,"result":{"symbol":"BTCUSDT","orderId":23098547100,"orderListId":-1,"clientOrderId":"YMogLfAX15iPk5quvX7xaA","transactTime":1699183607656,"price":"0.00000000","origQty":"0.00029000","executedQty":"0.00029000","cummulativeQuoteQty":"10.19180930","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607656,"fills":[{"price":"35144.17000000","qty":"0.00029000","commission":"0.00003127","commissionAsset":"BNB","tradeId":3269132127}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":2},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":2},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":13}]}
2023-11-05 11:26:47.000658 ---------------------------------------------------------------------
2023-11-05 11:26:47.000658 1231_2nd: Status: FILLED
2023-11-05 11:26:47.000658 1231_2nd: At time: 1699183607656
2023-11-05 11:26:47.000658 1231_2nd: Sell Price_bid (BTCUSDT): 35144.17000000
2023-11-05 11:26:47.000658 1231_2nd: Volume of BTC Sold: 0.00029000
2023-11-05 11:26:47.000658 1231_2nd: Volume of USDT bought: 10.19180930
2023-11-05 11:26:47.000658 1231_2nd: Transaction Fees: 0.00003127 BNB
2023-11-05 11:26:47.000658 ---------------------------------------------------------------------
2023-11-05 11:26:47.000659 Received: {"id":"4bd4e121-2f3d-4e62-a858-4bee8c6d0c6b","status":200,"result":{"symbol":"BNBUSDT","orderId":4865491585,"orderListId":-1,"clientOrderId":"ZJwivZtThr5KIXOQTaSpsT","transactTime":1699183607657,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"10.28160000","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"BUY","workingTime":1699183607657,"fills":[{"price":"244.80000000","qty":"0.04200000","commission":"0.00003150","commissionAsset":"BNB","tradeId":678654770}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":3},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":3},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":14}]}
2023-11-05 11:26:47.000659 Time for the socket to open: 8 milliseconds
2023-11-05 11:26:47.000659 Time taken for the trade to execute: 7 milliseconds
2023-11-05 11:26:47.000659 Total time: 15 milliseconds
2023-11-05 11:26:47.000659 ---------------------------------------------------------------------
2023-11-05 11:26:47.000659 1231_3rd: Status: FILLED
2023-11-05 11:26:47.000659 1231_3rd: At time: 1699183607657
2023-11-05 11:26:47.000659 1231_3rd: Buy Price_ask (BNBUSDT): 244.80000000
2023-11-05 11:26:47.000659 1231_3rd: Volume of USDT Sold: 10.28160000
2023-11-05 11:26:47.000659 1231_3rd: Volume of BNB bought: 0.04200000
2023-11-05 11:26:47.000659 1231_3rd: Transaction Fees: 0.00003150 BNB
2023-11-05 11:26:47.000659 ---------------------------------------------------------------------
2023-11-05 11:26:47.000659 Arbitrage taken opportunity 1231 = 0.99841 compared to 1.00052, difference = -0.00211
2023-11-05 11:26:47.000659
2023-11-05 11:26:47.000660 WebSocket connection closed. Attempting to reconnect.
2023-11-05 11:26:47.000661 Arbitrage ID: e6ccb177-2309-45c6-95bc-50c02b7fcb48, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_bid=0.006952, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000661 CHECK!!!! Arbitrage ID: e6ccb177-2309-45c6-95bc-50c02b7fcb48, log: Arbitrage opportunity 1->2->3->1 found with ['BNBBTC', 'BNBUSDT', 'BTCUSDT'] price_BNBBTC_ask=0.006954, price_BNBBTC_bid=0.006952, price_BTCUSDT_ask=35144.18, price_BTCUSDT_bid=35144.17, price_BNBUSDT_ask_1231=245.0, price_BNBUSDT_bid=244.8 and opportunity 1.0005193693322503
2023-11-05 11:26:47.000661 e6ccb177-2309-45c6-95bc-50c02b7fcb48: Arbitrage opportunity found _ precise log happened at 2023-11-05 11:26:47.661
2023-11-05 11:26:47.000666 The number of items in self.latest_prices is 3
2023-11-05 11:26:47.000669 Creating order: {'id': '9efb87e3-617f-4dc1-a9aa-41684bf699d6', 'symbol': 'BNBBTC', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000669 Creating order: {'id': 'a9c63f78-135a-490c-8a50-06e968d10f5d', 'symbol': 'BTCUSDT', 'side': 'SELL', 'order_type': 'MARKET', 'quantity': 0.00029}
2023-11-05 11:26:47.000670 Creating order: {'id': 'c7ebdf11-284a-4c35-bb31-80e369afc7c6', 'symbol': 'BNBUSDT', 'side': 'BUY', 'order_type': 'MARKET', 'quantity': 0.042}
2023-11-05 11:26:47.000672 Received: {"id":"9efb87e3-617f-4dc1-a9aa-41684bf699d6","status":200,"result":{"symbol":"BNBBTC","orderId":1749586532,"orderListId":-1,"clientOrderId":"zdZsPuKWMyZrDUdKT7ydiZ","transactTime":1699183607675,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"0.00029248","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607675,"fills":[{"price":"0.00696400","qty":"0.04200000","commission":"0.00003128","commissionAsset":"BNB","tradeId":228480448}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":1},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":1},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":16}]}
2023-11-05 11:26:47.000672 ---------------------------------------------------------------------
2023-11-05 11:26:47.000672 1231_1st: Status: FILLED
2023-11-05 11:26:47.000672 1231_1st: At time: 1699183607675
2023-11-05 11:26:47.000672 1231_1st: Sell Price_bid (BNBBTC): 0.00696400
2023-11-05 11:26:47.000672 1231_1st: Volume of BNB Sold: 0.04200000
2023-11-05 11:26:47.000672 1231_1st: Volume of BTC bought: 0.00029248
2023-11-05 11:26:47.000672 1231_1st: Transaction Fees: 0.00003128 BNB
2023-11-05 11:26:47.000672 ---------------------------------------------------------------------
2023-11-05 11:26:47.000676 Received: {"id":"a9c63f78-135a-490c-8a50-06e968d10f5d","status":200,"result":{"symbol":"BTCUSDT","orderId":23098547104,"orderListId":-1,"clientOrderId":"b9EhLNrXNSI2t5CnBa1lHj","transactTime":1699183607675,"price":"0.00000000","origQty":"0.00029000","executedQty":"0.00029000","cummulativeQuoteQty":"10.19180930","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"SELL","workingTime":1699183607675,"fills":[{"price":"35144.17000000","qty":"0.00029000","commission":"0.00003127","commissionAsset":"BNB","tradeId":3269132128}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":2},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":2},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":17}]}
2023-11-05 11:26:47.000676 ---------------------------------------------------------------------
2023-11-05 11:26:47.000676 1231_2nd: Status: FILLED
2023-11-05 11:26:47.000676 1231_2nd: At time: 1699183607675
2023-11-05 11:26:47.000676 1231_2nd: Sell Price_bid (BTCUSDT): 35144.17000000
2023-11-05 11:26:47.000676 1231_2nd: Volume of BTC Sold: 0.00029000
2023-11-05 11:26:47.000676 1231_2nd: Volume of USDT bought: 10.19180930
2023-11-05 11:26:47.000676 1231_2nd: Transaction Fees: 0.00003127 BNB
2023-11-05 11:26:47.000676 ---------------------------------------------------------------------
2023-11-05 11:26:47.000676 Received: {"id":"c7ebdf11-284a-4c35-bb31-80e369afc7c6","status":200,"result":{"symbol":"BNBUSDT","orderId":4865491705,"orderListId":-1,"clientOrderId":"rJOEK906Ku6p5742KXeI0M","transactTime":1699183607676,"price":"0.00000000","origQty":"0.04200000","executedQty":"0.04200000","cummulativeQuoteQty":"10.28160000","status":"FILLED","timeInForce":"GTC","type":"MARKET","side":"BUY","workingTime":1699183607676,"fills":[{"price":"244.80000000","qty":"0.04200000","commission":"0.00003150","commissionAsset":"BNB","tradeId":678654782}],"selfTradePreventionMode":"EXPIRE_MAKER"},"rateLimits":[{"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":10,"limit":50,"count":3},{"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":160000,"count":3},{"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":6000,"count":18}]}
2023-11-05 11:26:47.000677 Time for the socket to open: 8 milliseconds
2023-11-05 11:26:47.000677 Time taken for the trade to execute: 8 milliseconds
2023-11-05 11:26:47.000677 Total time: 16 milliseconds
2023-11-05 11:26:47.000677 ---------------------------------------------------------------------
2023-11-05 11:26:47.000677 1231_3rd: Status: FILLED
2023-11-05 11:26:47.000677 1231_3rd: At time: 1699183607676
2023-11-05 11:26:47.000677 1231_3rd: Buy Price_ask (BNBUSDT): 244.80000000
2023-11-05 11:26:47.000677 1231_3rd: Volume of USDT Sold: 10.28160000
2023-11-05 11:26:47.000677 1231_3rd: Volume of BNB bought: 0.04200000
2023-11-05 11:26:47.000677 1231_3rd: Transaction Fees: 0.00003150 BNB
2023-11-05 11:26:47.000677 ---------------------------------------------------------------------
2023-11-05 11:26:47.000677 Arbitrage taken opportunity 1231 = 0.99798 compared to 1.00052, difference = -0.00254