Get Order Book
get_order_bookRetrieve order book depth (bids/asks with prices and quantities) for a given instrument ticker. Supports file output for bulk data.
Instructions
Order book (L2 depth of market) for one instrument: bids/asks with prices and quantities, total volumes. Bond prices are quoted in % of face value, not currency. Outside the trading session the API may report 404 "no data".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | Ticker, e.g. SBER | |
| classCode | No | Board class code (resolved via find_instrument when omitted) | |
| outputPath | No | Write the full result to this file (path relative to the output root: BCS_OUTPUT_DIR or server cwd) instead of returning it inline. The response becomes a short summary {savedTo, records, bytes, sample}. Use for bulk data to keep the context clean. For get_candles this also enables full-history fetching (chunking beyond the 1000-bar API limit). | |
| outputFormat | No | File format; default json (or csv if outputPath ends with .csv). csv writes the main flat array of the response. |