Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
Built-in Variables and Constants
Conventions
Exchanges

Market trade records returned by exchange.GetTrades(), including the trade Id, time, price, amount and side.

Attributes

NameTypeDescription

Id

string

Market trade record Id. When the exchange API does not provide an Id, the platform generates an identifier (which may be a timestamp or a synthetic string beginning with syn:); it is only guaranteed to be unique within a single returned result.

Time

number

Trade time, as a millisecond timestamp.

Price

number

Trade price.

Amount

number

Trade amount.

Type

number

Trade side (order type); see ORDER_TYPE_BUY and ORDER_TYPE_SELL. When the exchange does not provide the trade side and it cannot be determined, the value is ORDER_TYPE_NONE (value 2). Therefore, do not determine the side by assuming that any trade that is not a sell is a buy.

See Also

Remarks

The exchange.GetTrades() function returns an array of Trade structures; it returns an empty array when there is no data, and a null value when the call fails (null in JavaScript, None in Python).