Closed MikeHathaway closed 4 years ago
Are the conversions because the ErisX clearing API uses a different symbology than the token pairs traded over the FIX connection? I'm curious what
self.pair()
looks like.
Yeah exactly. So if you look at the response for retrieving balances from the clearing API, you will get something like this:
[{"opening_balance": "12.2", "spot_movement": "0.4", "exchange_fees": "0.0", "clearing_fees": "0.0", "other_fees": "0.0", "asset_movement": "0.0", "realized_p_and_l": "0.0", "futures_delivery": "0.0", "closing_balance": "12.6", "total_equity": "12.6", "reserved_margin": "0.0", "total_excess_deficit": "12.6", "net_liquidating_value": "12.6", "available_to_trade": "12.6", "reserved_ote": "0.0", "fd": "N", "asset_type": "TETH", "closing_price": "205.7", "closing_price_date": "2020-05-06", "usd_value": "2591.82", "change_in_balance": "0.4"}]
Meanwhile, self.pair()
returns something along the lines of: BTC/USD
as that's what our infrastructure understands, and what FIX accepts.
BTC can be denominated on ErisX markets as TBTC. This PR Simply converts that to BTC to stay in sync with our infrastructure