אביחי עזיזה
אביחי עזיזה

Reputation: 11

sell order in binance python API

I am trying to make a sell order in binance python API but each time I get an order status {EXPIRED}. I manage to do a buy order but not a sell.

this is my code:

>>order=client.create_order(
        symbol='ETHUSDT',
        side='SELL',
        type=Client.ORDER_TYPE_MARKET,
        quantity=1)

>>order['status']
u'EXPIRED'

Why there is a different?

TNX

Upvotes: 1

Views: 3468

Answers (1)

gmorissette
gmorissette

Reputation: 291

Have a look at this post, it has to do with asset liquidity issues

https://dev.binance.vision/t/i-cant-do-market-order-always-status-expired/828

The TestNet doesn't reflect actual liquidity and latest quotes on the real Binance exchange.

Just compare these two endpoints (market depth) to get an idea, should be quite obvious.

https://testnet.binance.vision/api/v3/depth?symbol=ETHUSDT&limit=50 https://api2.binance.com/api/v3/depth?symbol=ETHUSDT&limit=50

Upvotes: 2

Related Questions