basana.external.ccxt.trades

class basana.external.ccxt.trades.TradeEvent(when, trade)

Bases: Event

An event for new trades.

Parameters:
  • when (datetime) – The datetime when the event occurred. It must have timezone information set.

  • trade (Trade) – The trade.

trade: Trade

The trade.

class basana.external.ccxt.trades.Trade(pair, raw)
Parameters:
  • pair (Pair)

  • raw (dict)

property amount: Decimal

The amount.

property buy_order_id: str | None

The buyer order id.

property datetime: datetime

The trade datetime.

property id: str

The trade id.

pair: Pair

The trading pair.

property price: Decimal

The price.

raw: dict

The raw value returned by CCXT.

property sell_order_id: str | None

The seller order id.