Right the Bitfinex position parse method uses the field trade_amount that is inside the meta prop. Turns out that this prop is not always present in the API response.
interface IBitfinexPositionMeta {
reason: 'TRADE' | 'FUNDING_ACCR'
order_id: number
liq_stage: null | number
order_cid: null | number
order_gid: null | number
trade_price?: string
trade_amount?: string
order_id_oppo: number
}
Right the Bitfinex position
parse
method uses the fieldtrade_amount
that is inside themeta
prop. Turns out that this prop is not always present in the API response.