Can isBuyer and isMaker both be True or False?


I’m using testnet to develop my application for Binance and am running into some issues with the myTrades endpoint. I’m trying to determine whether a trade was a SELL or BUY from the user’s perspective and it looks like I should be using isBuyer and isMaker to determine that. This seems to be correct for every trade, except for one:

{'symbol': 'BTCUSDT',
 'id': 1415371,
 'orderId': 6322569,
 'orderListId': -1,
 'price': '61070.63000000',
 'qty': '0.00032700',
 'quoteQty': '19.97009601',
 'commission': '0.00000000',
 'commissionAsset': 'USDT',
 'time': 1634419442839,
 'isBuyer': False,
 'isMaker': False,
 'isBestMatch': True}

Is this just some bad data in Binance’s testnet? What am I not understanding here?

Hi. This is a possible case.
isBuyer = False and isMaker = False means that the SELL order got filled immediately. This is a taker order since it matched the BUY order already stayed in the orderbook.

1 Like

Right, so when looking at myTrades, isBuyer alone is enough to determine whether the trade was a BUY or a SELL on my part?

That’s great news!