Expand description
Request and response models of the REST API, one struct per JSON shape of the broker.
Field names are in Rust style and map to the broker’s camelCase names through serde. Wherever the
broker docs say a value is one of a closed set (side, status, instrument type), these models keep
it as text when a new value must not break parsing, and use an enum when the set is stable. Almost
every field of a reply is an Option, because the broker fills only what fits the object. Check
before you use a field.
All dates and times from the broker are UTC (broker docs). Quantities of orders are in pieces.
Structs§
- Cancel
ById Request POST /api/v1/orders/canceland/orders/cancel/syncbody: the order is named in the body, not in the path (the/orders/{id}/cancelofCancelOrderRequestis the deprecated form).- Cancel
Order Request - Body of the deprecated cancel,
BcsHttpClient::cancel_order. - Candle
Bar - One candle (bar).
- Candles
Request - Parameters of
BcsHttpClient::get_candles. - Candles
Response - Historical candles of one instrument.
- Create
Order Request - Body of an order placement:
BcsHttpClient::create_orderandBcsHttpClient::create_order_sync. - Daily
Schedule Request - Parameters of
BcsHttpClient::get_daily_schedule. - Daily
Schedule Response - The trading schedule of one instrument for the day.
- Depo
Limit - A securities position in the limits.
- Edit
Order Request POST /api/v1/orders/editand/orders/edit/syncbody. The edit is a cancel of the original and a new order (docs), soclient_order_idis the id of the new one.- Futures
Limit - A limit of the derivatives market (collateral and variation margin).
- Instrument
Board - A board an instrument trades on.
- Instrument
Discount - The margin discount rates of one instrument.
- Instrument
Info - Reference data of one instrument, as the information service returns it.
- Instruments
ByIsins Request - Body of
BcsHttpClient::get_instruments_by_isins. - Instruments
ByTickers Request - Body of
BcsHttpClient::get_instruments_by_tickers. - Instruments
ByType Request - Parameters of
BcsHttpClient::get_instruments_by_type. - Last
Trade Record - One trade of the tape. The docs give
dateTime,side(1buy,2sell),price,volume(in the currency) andquantity(pieces), and NO instrument: it is the one asked for.tickerandclassCodeare read if the broker sends them (older samples have them). - Last
Trades Request POST /api/v1/last-tradesbody (schema checked 2026-10-19): the instrument, an optional period of the current session and an optional side. The API has nolimit.- Limit
Position - A position record with the fields of a portfolio position.
- Limits
Response - The account limits: positions, money and futures limits.
- Modify
Order Request - Body of the deprecated change,
BcsHttpClient::modify_order. - Money
Limit - A money balance in the limits.
- Operation
History Request POST /api/v1/operations/searchbody (schemaOperationRequest), all filters optional.- Operation
History Response - Response of
POST /api/v1/operations/search(schemaOperationListResponse). Unlike the other paginated lists, the docs give onlyrecordsandpageSize(no total). - Operation
Record - One non-trade operation (schema
Operation): deposits, withdrawals, dividends, coupons, commissions, taxes, securities in and out. - Operation
Response - A generic acknowledgement of a command: the id of the request and a status text.
- Order
Book Level - One price level of an order book: a price and the quantity at it.
- Order
Book Request - Parameters of
BcsHttpClient::get_order_book. - Order
Book Response - A snapshot of the order book.
- Order
Execution Data - One report about an order: its state, quantities and the last fill.
- Order
Extras - Optional order parameters of the current docs (
POST /api/v1/orders,/orders/edit, and their/synctwins): time in force, stop-loss and take-profit, iceberg, trailing spread and offset. Everything is optional and omitted whenNone. What a combination means for the broker is in the docs. The connector fills them for its stop orders (conditional orders). - Order
Operation Response - The acknowledgement of an asynchronous order command (place, cancel, edit).
- Order
Record - One order in the order list (
POST .../orders/search). - Order
Search Request - Body of
BcsHttpClient::search_orders. - Order
Search Response - One page of the order list, with the totals.
- Order
State List Response - Answer of the synchronous methods and of
GET /api/v1/orders: the order’s current state. Unlike the deprecated status call,datais a list. - Order
Status Response - The state of an order from the deprecated status method,
BcsHttpClient::get_order_status. - Paginated
Response - A page of a list, with the totals the broker reports.
- Portfolio
Position - One record of the portfolio: a securities position or a currency balance.
- Quantity
- An amount with its settlement mode (REST limits).
- Quote
Instrument - One instrument of a quotes request (
POST /api/v1/quotes, schemaQuotesRequest.instruments[]). - Quote
Record - Current quote of one instrument (schema
MarketDataResponse). Every field except the key may be absent: the docs mark none of them required. - Quotes
Request POST /api/v1/quotesbody. The docs allow 1 to 100 instruments.- Quotes
Response - Response of
POST /api/v1/quotes(schemaQuotesListResponse). - Schedule
Entry - One session of the day in a daily schedule.
- Token
Request - The form the client sends to the token service to trade a refresh token for an access token.
- Token
Response - The answer of the token service (OAuth style).
- Trade
Data - The nested report of an older trade record shape. See
TradeRecord. - Trade
Record - One own trade (fill) in the trades list.
- Trade
Search Request - Body of
BcsHttpClient::search_trades. - Trading
Params Snapshot - Normalized trading parameters extracted from
InstrumentInfofor domain mapping. - Trading
Status Request - Parameters of
BcsHttpClient::get_trading_status. - Trading
Status Response - The trading session status of a board.
Enums§
- Order
Type - Type of an order for placement (
orderTypeof the create and edit requests). The wire form is a digit as text.
Type Aliases§
- Instrument
Discounts Response - The answer of
BcsHttpClient::get_instruments_discounts: a list of discounts. - Last
Trades Response - The anonymous trades of the session: a list of
LastTradeRecord. SeeBcsHttpClient::get_last_trades. - Portfolio
Response - The answer of
BcsHttpClient::get_portfolio: a list of positions.