Skip to content

Commit

Permalink
Merge pull request #479 from globophobe/ftx-order-id
Browse files Browse the repository at this point in the history
Add FTX order_id for TRADES and LIQUIDATIONS
  • Loading branch information
bmoscon authored Apr 24, 2021
2 parents e21fb51 + 09ce4cc commit e788814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cryptofeed/exchange/ftx.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ async def _trade(self, msg: dict, timestamp: float):
side=BUY if trade['side'] == 'buy' else SELL,
amount=Decimal(trade['size']),
price=Decimal(trade['price']),
order_id=None,
order_id=trade['id'],
timestamp=float(timestamp_normalize(self.id, trade['time'])),
receipt_timestamp=timestamp)
if bool(trade['liquidation']):
Expand All @@ -196,7 +196,7 @@ async def _trade(self, msg: dict, timestamp: float):
side=BUY if trade['side'] == 'buy' else SELL,
leaves_qty=Decimal(trade['size']),
price=Decimal(trade['price']),
order_id=None,
order_id=trade['id'],
timestamp=float(timestamp_normalize(self.id, trade['time'])),
receipt_timestamp=timestamp
)
Expand Down

0 comments on commit e788814

Please sign in to comment.