Limit orders filled not according to market price in SPOT testnet

Hi, I am using SPOT API to open a few BTCUSDT buy limit orders in Binance SPOT Testnet, but the order got executed not according to market price. May I know is this normal in the test net?

Below is 1 of my buy limit orders json:

{
    "symbol": "BTCUSDT",
    "orderId": 4048521,
    "orderListId": -1,
    "clientOrderId": "MfdxpDpRTri5dYI1iRTgsP",
    "price": "28741.61000000",
    "origQty": "0.00100000",
    "executedQty": "0.00100000",
    "cummulativeQuoteQty": "28.74161000",
    "status": "FILLED",
    "timeInForce": "GTC",
    "type": "LIMIT",
    "side": "BUY",
    "stopPrice": "0.00000000",
    "icebergQty": "0.00000000",
    "time": 1681319044198,
    "updateTime": 1681327857808,
    "isWorking": true,
    "workingTime": 1681319044198,
    "origQuoteOrderQty": "0.00000000",
    "selfTradePreventionMode": "NONE"
}

As you can see, the buy limit price is at 28741.61 (UTC time: Wed Apr 12 2023 19:30:57) but the market price at that moment is 29876.45.

Thanks in advance

Hi,

When you say the market price at that moment, on which market were you looking at prices? The price on the live markets or the price on testnet? It’s important to note that the prices on the Binance Testnet aren’t always 1:1 with the live market prices.

Hi @jonte ,

I am getting the market price from testnet. This is the link or API that i am using https://testnet.binance.vision/api/v3/ticker/price?symbol=BTCUSDT

Another example:
This is happened 30 mins ago, Here is the json.

{
    "symbol": "BTCUSDT",
    "orderId": 5131410,
    "orderListId": -1,
    "clientOrderId": "cblIJIqgO9Bc8KOgL6qHwo",
    "price": "30576.39000000",
    "origQty": "0.00100000",
    "executedQty": "0.00100000",
    "cummulativeQuoteQty": "30.57639000",
    "status": "FILLED",
    "timeInForce": "GTC",
    "type": "LIMIT",
    "side": "BUY",
    "stopPrice": "0.00000000",
    "icebergQty": "0.00000000",
    "time": 1681457643655,
    "updateTime": 1681459389275,
    "isWorking": true,
    "workingTime": 1681457643655,
    "origQuoteOrderQty": "0.00000000",
    "selfTradePreventionMode": "NONE"
}

it got executed at UTC time: Fri Apr 14 2023 08:03:09.
At that moment, the market price from finance testnet API is 30767.86

This is the json data i got it from Account Trade List API.

{
        "symbol": "BTCUSDT",
        "id": 1736643,
        "orderId": 5131410,
        "orderListId": -1,
        "price": "30576.39000000",
        "qty": "0.00100000",
        "quoteQty": "30.57639000",
        "commission": "0.00000000",
        "commissionAsset": "BTC",
        "time": 1681459389275,
        "isBuyer": true,
        "isMaker": true,
        "isBestMatch": true
    }

Hi,

Looking at the 2 JSON responses you pasted in this response, the price is the exact same ("30576.39000000") in them both. If you’re saying that this price was different to what was returned from the live Spot API at the same time, then this is normal because as I mentioned the Testnet and live market prices are not always equal. There is usually some discrepancy between Testnet and live market.

Thanks,

Thanks @jonte

@peh1696 @jonte , hi!

Im having the same problem here while using the spot testnet, where STOP_LOSS_LIMIT orders are being filled in a price that the market didn’t come to.

This order for example, was filled a few minutes ago, where market price were between 37738 and 37502. (11-30-2023, ± 14:30 UTC)

{
“symbol”: “BTCUSDT”,
“orderId”: 9712057,
“orderListId”: -1,
“clientOrderId”: “R5esh6kVGYlw4kKo3fgNaA”,
“price”: “37193.09000000”,
“origQty”: “0.02650000”,
“executedQty”: “0.02650000”,
“cummulativeQuoteQty”: “985.61688500”,
“status”: “FILLED”,
“timeInForce”: “GTC”,
“type”: “STOP_LOSS_LIMIT”,
“side”: “SELL”,
“stopPrice”: “37379.99000000”,
“icebergQty”: “0.00000000”,
“time”: 1701354631316,
“updateTime”: 1701354709799,
“isWorking”: true,
“workingTime”: 1701354708939,
“origQuoteOrderQty”: “0.00000000”,
“strategyId”: 1,
“selfTradePreventionMode”: “NONE”
}

@peh1696 , did you find any conclusion about this? This is reakky normal in the testnet? Or am i doing something wrong? This problem is killing our productivity.

Thanks guys.