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

This JSON is the data structure returned by the EventLoop() function. The EventLoop() function monitors the following events: 1. Any WebSocket readable data events; 2. Completion events of concurrent tasks from exchange.Go() and HttpQuery_Go() functions; 3. Message events sent by threads created using the threading.Thread() function in JavaScript language strategies.

Attributes

NameTypeDescription

Seq

number

Event sequence number.

Event

string

Event name.

ThreadId

number

Event thread ID.

Index

number

Event index.

Nano

number

Nanosecond timestamp.

See Also

Remarks

When using the exchange.Go() function for concurrent requests, the event data structure returned by the EventLoop() function.

json
{ "Seq":1, "Event":"Exchange_GetTrades", "ThreadId":0, "Index":3, "Nano":1682068771309583400 }

When concurrent execution threads in JavaScript language strategies (created by the threading.Thread() function) use the thread object's postMessage() function to send messages, the EventLoop() function in the receiving thread will monitor the following event data structure:

json
{ "Seq":4, "Event":"thread", "ThreadId":1, "Index":0, "Nano":1727592066508674000 }