Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Chart-options
Chart-return
KLineChart-options
KLineChart-return
SetData-data
EventLoop-return
exchange.Go-return
DBExec-return
Dial-return
Thread.join-return
Built-in Variables and Constants
Conventions
Exchanges

Data structure for market trade records.

Attributes

NameTypeDescription

Id

string

Unique identifier for the market trade record. If the exchange API does not provide an Id, the platform generates one (either a timestamp or a synthetic string starting with syn:), which is only guaranteed to be unique within a single result.

Time

number

Timestamp in milliseconds.

Price

number

Execution price.

Amount

number

Execution quantity.

Type

number

Order type, refer to ORDER_TYPE_BUY, ORDER_TYPE_SELL. It is 2 when the exchange does not report the trade direction and it cannot be determined, so do not treat "not a sell" as "a buy".

See Also

Remarks

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