no liquidation type in futures account book
Opened this issue · 2 comments
ioogle commented
In the API Query account book the liquidation records are count as "pnl" type, is it possible to add a type named "liquidation"?
revilwang commented
We have listFuturesLiquidates API to retrieve liquidation history. Don't know if this works for you.
ioogle commented
It should work, but not so straightforward. Here is my solution:
- fetch user account book
- fetch liquidation history
- traverse the account book, if the order ID is in liquidation history and the type is "pnl", then change the type to "liquidation"
Another problem is that it's hard to get all of the liquidations since there is no paging mechanism in Retrieve liquidation history API. In the case that we don't get all liquidations, some records in the user account book won't be converted to "liquidation".