Matching Buy & Sell Orders

I am working with the orders API trying to match up Buy and Sell orders to work out profit and loss.

I am trying to match the original order amount from the Buy order to the total calculated amount via the transactions of the Sell order inc the fees, but the figures are slightly out and thus are not matched.

Does anyone know of another method on how to much up buy/sell orders?

Thanks

Alan

The most likely cause of this is the change in commission currency, I.e. when the order is a BUY the fee is in the long token while when it is a SELL it is in the short asset. E.g. Buy BNBUSDT and pay BNB in and USDT out. Running a transform to go fee*price on all buys might help.

if you have concern on your order/trades, please feel free to contact customer support for a review.

Thanks. I have spoken to a few people at customer support and they cant seem to help or suggest how to match up the orders.

When you open your order, give a custom clientOrderId, this way you will know in your tool when the websockets events come the full details of your orders. Then you can make link between your orders.

1 Like

Hi. I am not placing orders via the API, I am doing them manually. Thanks.