TradeΒΆ

Defined in dccd.models

class Trade(*, tid=None, timestamp, price, amount, type=None)[source]

Bases: BaseModel

Individual trade from WebSocket streams or REST history endpoints.

Parameters:
tidint or None

Trade ID. None when the exchange does not provide an integer ID (e.g. Kraken, Bybit).

timestampfloat

Unix timestamp (seconds).

pricefloat

Trade price.

amountfloat

Trade size (base asset).

typestr, optional

'buy' or 'sell'.