Limit Orders are filled immediately regardless of price

Hi,

I’m having some issues with limit orders. I submit the orders and check each order every 30 seconds to determine whether it has been filled or not. Unfortunately all the limit orders that are submitted are immediately filled regardless of the order price (I’ve checked this with the trading pair and it’s shouldn’t have triggered the limit orders). I’ve tried numerous trading pairs but it’s still returning ‘FILLED’ status. I’m using XRP/BUSD on spot for testing purposes.

  • Is this the recommended way of implementing order checking for limit orders?

  • If so, can you tell me what’s wrong with this approach please?

Thanks

Please provide data so we can have a concrete example to consult: full request url that was send to create the order, market price at the time of placing order and response with the FILLED order status.

Websocket is usually the advised method to be updated of changes in the created order.

The price was between 0.869 and 8789 at this time. The trading pair was XRP/USDT

I’m using a CCXT instance to access the API.

The response:

{‘info’: {‘symbol’: ‘XRPUSDT’, ‘orderId’: ‘10900’, ‘orderListId’: ‘-1’, ‘clientOrderId’: ‘x-R4BD3S828ec8f7a0cc97d3dc5be6df’, ‘price’: ‘0.96000000’, ‘origQty’: ‘17.00000000’, ‘executedQty’: ‘0.00000000’, ‘cummulativeQuoteQty’: ‘0.00000000’, ‘status’: ‘NEW’, ‘timeInForce’: ‘GTC’, ‘type’: ‘LIMIT’, ‘side’: ‘BUY’, ‘stopPrice’: ‘0.00000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: ‘1621861538370’, ‘updateTime’: ‘1621861538370’, ‘isWorking’: True, ‘origQuoteOrderQty’: ‘0.00000000’}, ‘id’: ‘10900’, ‘clientOrderId’: ‘x-R4BD3S828ec8f7a0cc97d3dc5be6df’, ‘timestamp’: 1621861538370, ‘datetime’: ‘2021-05-24T13:05:38.370Z’, ‘lastTradeTimestamp’: None, ‘symbol’: ‘XRP/USDT’, ‘type’: ‘limit’, ‘timeInForce’: ‘GTC’, ‘postOnly’: False, ‘side’: ‘buy’, ‘price’: 0.96, ‘stopPrice’: 0.0, ‘amount’: 17.0, ‘cost’: 0.0, ‘average’: None, ‘filled’: 0.0, ‘remaining’: 17.0, ‘status’: ‘open’, ‘fee’: None, ‘trades’: , ‘fees’: }
{‘info’: {‘symbol’: ‘XRPUSDT’, ‘orderId’: ‘10902’, ‘orderListId’: ‘-1’, ‘clientOrderId’: ‘x-R4BD3S82eca5627baebded43f9a512’, ‘price’: ‘0.98000000’, ‘origQty’: ‘17.00000000’, ‘executedQty’: ‘17.00000000’, ‘cummulativeQuoteQty’: ‘16.48320000’, ‘status’: ‘FILLED’, ‘timeInForce’: ‘GTC’, ‘type’: ‘LIMIT’, ‘side’: ‘BUY’, ‘stopPrice’: ‘0.00000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: ‘1621861541752’, ‘updateTime’: ‘1621861541752’, ‘isWorking’: True, ‘origQuoteOrderQty’: ‘0.00000000’}, ‘id’: ‘10902’, ‘clientOrderId’: ‘x-R4BD3S82eca5627baebded43f9a512’, ‘timestamp’: 1621861541752, ‘datetime’: ‘2021-05-24T13:05:41.752Z’, ‘lastTradeTimestamp’: None, ‘symbol’: ‘XRP/USDT’, ‘type’: ‘limit’, ‘timeInForce’: ‘GTC’, ‘postOnly’: False, ‘side’: ‘buy’, ‘price’: 0.98, ‘stopPrice’: 0.0, ‘amount’: 17.0, ‘cost’: 16.4832, ‘average’: 0.9696, ‘filled’: 17.0, ‘remaining’: 0.0, ‘status’: ‘closed’, ‘fee’: None, ‘trades’: , ‘fees’: }
{‘info’: {‘symbol’: ‘XRPUSDT’, ‘orderId’: ‘10903’, ‘orderListId’: ‘-1’, ‘clientOrderId’: ‘x-R4BD3S82327adad2bcc753f6b09fb5’, ‘price’: ‘1.00000000’, ‘origQty’: ‘17.00000000’, ‘executedQty’: ‘17.00000000’, ‘cummulativeQuoteQty’: ‘16.66000000’, ‘status’: ‘FILLED’, ‘timeInForce’: ‘GTC’, ‘type’: ‘LIMIT’, ‘side’: ‘BUY’, ‘stopPrice’: ‘0.00000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: ‘1621861543561’, ‘updateTime’: ‘1621861543561’, ‘isWorking’: True, ‘origQuoteOrderQty’: ‘0.00000000’}, ‘id’: ‘10903’, ‘clientOrderId’: ‘x-R4BD3S82327adad2bcc753f6b09fb5’, ‘timestamp’: 1621861543561, ‘datetime’: ‘2021-05-24T13:05:43.561Z’, ‘lastTradeTimestamp’: None, ‘symbol’: ‘XRP/USDT’, ‘type’: ‘limit’, ‘timeInForce’: ‘GTC’, ‘postOnly’: False, ‘side’: ‘buy’, ‘price’: 1.0, ‘stopPrice’: 0.0, ‘amount’: 17.0, ‘cost’: 16.66, ‘average’: 0.98, ‘filled’: 17.0, ‘remaining’: 0.0, ‘status’: ‘closed’, ‘fee’: None, ‘trades’: , ‘fees’: }
{‘info’: {‘symbol’: ‘XRPUSDT’, ‘orderId’: ‘10904’, ‘orderListId’: ‘-1’, ‘clientOrderId’: ‘x-R4BD3S82e229425cea95d0fb07bfb8’, ‘price’: ‘1.02000000’, ‘origQty’: ‘17.00000000’, ‘executedQty’: ‘17.00000000’, ‘cummulativeQuoteQty’: ‘16.66000000’, ‘status’: ‘FILLED’, ‘timeInForce’: ‘GTC’, ‘type’: ‘LIMIT’, ‘side’: ‘BUY’, ‘stopPrice’: ‘0.00000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: ‘1621861545158’, ‘updateTime’: ‘1621861545158’, ‘isWorking’: True, ‘origQuoteOrderQty’: ‘0.00000000’}, ‘id’: ‘10904’, ‘clientOrderId’: ‘x-R4BD3S82e229425cea95d0fb07bfb8’, ‘timestamp’: 1621861545158, ‘datetime’: ‘2021-05-24T13:05:45.158Z’, ‘lastTradeTimestamp’: None, ‘symbol’: ‘XRP/USDT’, ‘type’: ‘limit’, ‘timeInForce’: ‘GTC’, ‘postOnly’: False, ‘side’: ‘buy’, ‘price’: 1.02, ‘stopPrice’: 0.0, ‘amount’: 17.0, ‘cost’: 16.66, ‘average’: 0.98, ‘filled’: 17.0, ‘remaining’: 0.0, ‘status’: ‘closed’, ‘fee’: None, ‘trades’: , ‘fees’: }

managed to solve?