Expand description
Request and response models of the REST API, one struct per JSON shape of the broker.
The models are the Simple format of the broker: the original field names, which the client always asks
for. Almost every field of a reply is an Option or has a default, because the broker fills only what fits
the object, so check before you use a field. Numbers are read as decimals, never through f64. All dates
and times of the broker are UTC.
Quantities. The broker counts orders in lots. Its replies carry the quantity both in lots (qty,
qty_batch) and in pieces (qty_units), and the connector reads the pieces.
Structs§
- AllTrades
History - The answer of
GET /md/v2/Securities/{exchange}/{symbol}/alltrades/history: a page of trades and their total. - Bar
- A candle of
GET /md/v2/historyand of the candle subscription. - Book
Level - One level of an order book.
- Buying
Power ByCurrency - The money of a currency in the summary.
- History
Response - The answer of
GET /md/v2/history: candles and the Unix times of the neighbouring pages. - Instrument
Ref - The instrument of an order command.
- Limit
Order Request - The body of a limit order command (
POST .../orders/actions/limitand the changePUT .../limit/{orderId}). - Market
Order Request - The body of a market order command (
POST .../orders/actions/marketandPUT .../market/{orderId}). - Market
Status - An item of
GET /md/status/{exchange}/{market}: the state of the trading session of a market. - Market
Trade Record - A trade of the market: the item of
GET /md/v2/Securities/{exchange}/{symbol}/alltradesand the message of the all trades subscription. - Order
Book - An order book: the answer of
GET /md/v2/orderbooks/{exchange}/{symbol}and the message of the order book subscription. - Order
Command Response - The answer to an order command: the number of the order the broker made.
- Order
Record - An order of the portfolio: the item of
GET /md/v2/Clients/{exchange}/{portfolio}/orders, the answer of the call for one order and the message of the orders subscription. - Position
Record - An instrument or money position: the item of
GET /md/v2/Clients/{exchange}/{portfolio}/positionsand the message of the positions subscription. - Quote
Record - A quotation: the item of
GET /md/v2/Securities/{symbols}/quotesand the message of the quotes subscription. - Security
Info - An instrument: the answer of
GET /md/v2/Securities/{exchange}/{symbol}and an item of the listGET /md/v2/Securities. - Stop
Order Record - A stop order of the portfolio: the item of
GET /md/v2/Clients/{exchange}/{portfolio}/stoporders, the answer of the call for one stop order and the message of the stop orders subscription. - Stop
Order Request - The body of a stop order command:
POST .../orders/actions/stop(a market order on trigger) and.../stopLimit(a limit order on trigger, withprice), and the changesPUT .../stop/{id}and.../stopLimit/{id}. - Summary
Record - The summary of the portfolio:
GET /md/v2/Clients/{exchange}/{portfolio}/summaryand the message of the summaries subscription. - Trade
Record - A trade of the portfolio (a fill of one of its orders): the item of
GET /md/v2/Clients/{exchange}/{portfolio}/tradesand the message of the trades subscription. - UserRef
- The portfolio of an order command.