1

After placing a market order, I got its order_id & checked its status via this end point /v1/order/status and I got the following:

Array
(
[id] => 18141116927
[cid] => 43611135723
[cid_date] => 2018-10-17
[gid] => 
[symbol] => iotusd
[exchange] => bitfinex
[price] => 0.51251
[avg_execution_price] => 0.51234
[side] => sell
[type] => market
[timestamp] => 1539778090.0
[is_live] => 
[is_cancelled] => 
[is_hidden] => 
[oco_order] => 
[was_forced] => 
[original_amount] => 20.0
[remaining_amount] => 0.0
[executed_amount] => 20.0
[src] => api
)

In this array, I don't see exchange fees for this order. Also the above order is closing a margin position and I was expecting to see fees associated to margin like borrowing costs etc.

How do I get these information via API?

Thanks

0

Here is the endpoint where trade fees along with order_id and fee_currency are included https://api.bitfinex.com/v1/mytrades

Array
(
[0] => Array
    (
        [price] => 0.53018
        [amount] => 20.0
        [timestamp] => 1539786993.0
        [type] => Sell
        [fee_currency] => USD
        [fee_amount] => -0.0212072
        [tid] => 301116948
        [order_id] => 18151111432
    )

[1] => Array
    (
        [price] => 0.5317
        [amount] => 20.0
        [timestamp] => 1539786941.0
        [type] => Buy
        [fee_currency] => IOT
        [fee_amount] => -0.04
        [tid] => 301116560
        [order_id] => 1815111391
    )
)

This endpoint can also accept limit_trades parameter to limit the number of results returned. Then use foreach loop to get to the required order_id & retrieve the trade fee. Not sure why bitfinex has chosen to make it complicated, this information should be included with the "order status" endpoint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.