T-Bank Invest (read-only)
v1.0.0Read-only T-Bank (Tinkoff) Invest API: portfolio, operations, instruments, market data.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_accounts
Get list of all user investment accounts with their types and statuses. Returns account IDs needed for other operations (portfolio, positions, operations). Account types: TINKOFF (broker), TINKOFF_IIS (individual investment account), INVEST_BOX, INVEST_FUND, DFA (digital financial assets). closedDate of 1970-01-01 means the account is open.
get_user_info
Get user information: tariff, qualified investor status, premium status, risk level.
get_margin_attributes
Get margin trading attributes for an account: liquid portfolio value, starting/minimal margin, funds sufficiency. Args: account_id: Account ID (get from get_accounts)
| Parameter | Type | Description |
|---|---|---|
account_id * | string |
get_portfolio
Get full portfolio for an account: total values by asset type, all positions with prices, yields, and quantities. Each position has ticker, classCode, figi, instrumentUid, positionUid, instrumentType, quantity, averagePositionPrice, currentPrice, expectedYield, dailyYield, currentNkd (bonds) and its `currency`. Amounts are plain numbers; a field that is zero or false is left out, and so are the two fields the API has deprecated. expectedYield and dailyYield of a position are amounts of money in the position's currency, not percentages; the portfolio's own expectedYield, at the top level, is…
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
currency | string |
get_positions
Get all positions in an account: securities, futures, options, and cash balances. Unlike get_portfolio, this returns raw position balances without price calculations. A field that is zero or false (blocked, exchangeBlocked) is left out. balance is a string holding an integer — for a fund held in fractions of a unit it is cut down to whole units, and the exact quantity is in get_portfolio; positionUid is the key of the position, the same one the portfolio and the operations carry. Args: account_id: Account ID (get from get_accounts)
| Parameter | Type | Description |
|---|---|---|
account_id * | string |
get_withdraw_limits
Get available withdrawal limits for an account: free cash, blocked amounts, futures guarantees. Args: account_id: Account ID (get from get_accounts)
| Parameter | Type | Description |
|---|---|---|
account_id * | string |
get_operations
Get list of operations (transactions) for an account within a date range. Returns: buys, sells, dividends, coupons, taxes, commissions, deposits, withdrawals, etc. Each operation has: id, operationType (the code, e.g. OPERATION_TYPE_BUY), type (the same in Russian words), date, state, payment, price, quantity, quantityRest, figi, instrumentUid, positionUid, trades. A field that is zero or empty is left out; assetUid is left out too. Canceled orders are operations as well, and carry the quantity and the payment they asked for: pass state="EXECUTED" before adding up money or quantities. quanti…
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
figi | string | |
from_date | string | |
state | string | |
to_date | string |
get_operations_by_cursor
Get operations with cursor-based pagination. Better for large histories. Returns hasNext and nextCursor for pagination: pass nextCursor as cursor to get the next page. Each operation item includes detailed info: id, type (the code, e.g. OPERATION_TYPE_BUY), name and description, state, date, payment, price, commission, yield, accruedInt, quantity, quantityDone, quantityRest, ticker, classCode, figi, instrumentType, instrumentUid, positionUid, tradesInfo.trades (the trades of the order) and childOperations (its commissions and taxes). A field that is zero or empty is left out, and so are field…
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
cursor | string | |
from_date | string | |
instrument_id | string | |
limit | integer | |
operation_types | string | |
state | string | |
to_date | string | |
without_commissions | boolean | |
without_trades | boolean |
find_instrument
Search for instruments by text query (ticker, name, ISIN, FIGI). Returns {"instruments": [...], "total": N}. Each instrument has ticker, classCode, name, instrumentType, uid, figi, isin and lot; forQualInvestorFlag appears when it is true and apiTradeAvailableFlag when it is false. An instrument whose ticker, ISIN or FIGI equals the query comes first, then shares, funds, bonds and the rest. "total" counts every match; "note" says when the list was cut to limit or when nothing tradable matched and non-tradable listings are shown instead. A paper has many listings (one per board, most of them…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
instrument_kind | string | |
limit | integer | |
tradable_only | boolean |
get_instrument_by
Get detailed instrument info by its identifier. Returns: name, ticker, figi, uid, lot size, currency, country, sector, trading status, etc. Args: id: Instrument ticker, FIGI, ISIN or UID — which one it is gets recognised automatically id_type: Only needed with class_code: INSTRUMENT_ID_TYPE_TICKER. Otherwise leave the default. class_code: Board of a ticker (e.g. "TQBR"), to pick one listing out of several
| Parameter | Type | Description |
|---|---|---|
id * | string | |
class_code | string | |
id_type | string |
get_bond_by
Get detailed bond info: maturity date, coupon rate, nominal, ACI, issue size, risk level. Args: id: Bond ticker, FIGI, ISIN or UID — which one it is gets recognised automatically id_type: Only needed with class_code: INSTRUMENT_ID_TYPE_TICKER. Otherwise leave the default. class_code: Board of a ticker (e.g. "TQBR"), to pick one listing out of several
| Parameter | Type | Description |
|---|---|---|
id * | string | |
class_code | string | |
id_type | string |
get_bond_coupons
Get bond coupon payment schedule: dates, amounts, coupon periods. Args: figi: Deprecated, kept for existing callers — pass the FIGI as instrument_id instead instrument_id: Bond ticker, FIGI, ISIN or UID (required) from_date: Start date (YYYY-MM-DD), default: now to_date: End date (YYYY-MM-DD, inclusive), default: 1 year from now
| Parameter | Type | Description |
|---|---|---|
figi | string | |
from_date | string | |
instrument_id | string | |
to_date | string |
get_bond_events
Get bond events: coupon payments, offers (calls), maturity, conversions. Without dates the API returns only a window of a few years around today, so a bond's maturity or a distant offer needs an explicit from_date/to_date range to show up. A field of an event that is zero or empty is left out. A coupon event carries couponInterestRate, the coupon's rate in percent a year — the bond itself (get_bond_by) does not have it. Partial repayments (amortization) come as MTY events with operationType "OA" and `value` in percent of the nominal; the final repayment is the MTY event with operationType…
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
from_date | string | |
to_date | string | |
type | string |
get_etf_by
Get detailed ETF/fund info: management fee, tracking index, rebalance frequency. Args: id: ETF ticker, FIGI, ISIN or UID — which one it is gets recognised automatically id_type: Only needed with class_code: INSTRUMENT_ID_TYPE_TICKER. Otherwise leave the default. class_code: Board of a ticker (e.g. "TQBR"), to pick one listing out of several
| Parameter | Type | Description |
|---|---|---|
id * | string | |
class_code | string | |
id_type | string |
get_currency_by
Get detailed currency instrument info. Args: id: Currency ticker, FIGI, ISIN or UID — which one it is gets recognised automatically id_type: Only needed with class_code: INSTRUMENT_ID_TYPE_TICKER. Otherwise leave the default. class_code: Board of a ticker (e.g. "TQBR"), to pick one listing out of several
| Parameter | Type | Description |
|---|---|---|
id * | string | |
class_code | string | |
id_type | string |
get_future_by
Get detailed futures contract info: expiration, basic asset, margin requirements. Args: id: Future ticker, FIGI, ISIN or UID — which one it is gets recognised automatically id_type: Only needed with class_code: INSTRUMENT_ID_TYPE_TICKER. Otherwise leave the default. class_code: Board of a ticker (e.g. "TQBR"), to pick one listing out of several
| Parameter | Type | Description |
|---|---|---|
id * | string | |
class_code | string | |
id_type | string |
get_dividends
Get dividend payment history and upcoming dividends for an instrument. Returns: record date, payment date, dividend per share, yield, currency. Args: instrument_id: Instrument ticker, FIGI, ISIN or UID from_date: Start date (YYYY-MM-DD), default: 2 years ago to_date: End date (YYYY-MM-DD, inclusive), default: 1 year ahead
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
from_date | string | |
to_date | string |
get_accrued_interests
Get accrued coupon interest (NKD) history for a bond. Args: instrument_id: Bond ticker, FIGI, ISIN or UID from_date: Start date (YYYY-MM-DD), default: 30 days ago to_date: End date (YYYY-MM-DD, inclusive), default: now
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
from_date | string | |
to_date | string |
get_asset_fundamentals
Get fundamental financial data for assets: P/E, P/BV, EPS, ROE, revenue, market cap, etc. The API keys fundamentals by asset UID, which is not the instrument UID; whatever is passed here is converted. Each item of the result carries its assetUid, and the items come in the order of the request. A value of 0 means the API has no figure (P/E of a company at a loss, EBITDA of a bank), not zero. Bonds and funds have no fundamentals. Args: assets: Comma-separated list of tickers, FIGIs, ISINs, instrument UIDs or asset UIDs
| Parameter | Type | Description |
|---|---|---|
assets * | string |
get_consensus_forecasts
Get the analyst consensus forecast for one instrument: target price, recommendation, number of analysts. GetConsensusForecasts has no server-side instrument filter — it only returns pages of forecasts for the whole instrument universe, keyed by asset UID. This resolves instrument_id to its asset UID, scans pages internally and returns just the matching item, or {"error": ...} if there is none. Args: instrument_id: Ticker, FIGI, ISIN, instrument UID or asset UID page_limit: Page size used while scanning (default: 100; a non-positive value means 100) max_pages: Safety cap on how…
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
max_pages | integer | |
page_limit | integer | |
page_number | integer |
get_stock_snapshot
Get a one-call overview of a share: fundamentals, recent price change, and analyst consensus. Convenience wrapper around FindInstrument + GetInstrumentBy + GetAssetFundamentals + GetCandles + GetConsensusForecasts, so a caller doesn't need separate round trips (and the manual ticker → UID → asset UID resolution) to get a compact picture of one share. Returns ticker, class_code, uid, asset_uid and name of the share it resolved to — check them when the query is ambiguous — plus price, fundamentals and consensus. Returns {"error": ...} if no share matches. price holds last_close and la…
| Parameter | Type | Description |
|---|---|---|
ticker * | string | |
candle_days | integer | |
class_code | string |
get_forecast_by
Get investment house price forecasts for an instrument. Returns: analyst name, target price, recommendation (buy/hold/sell), date. Args: instrument_id: Instrument ticker, FIGI, ISIN or UID
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string |
get_asset_reports
Get upcoming and past earnings report dates for an instrument's issuer. Args: instrument_id: Instrument ticker, FIGI, ISIN or UID from_date: Start date (YYYY-MM-DD), default: now to_date: End date (YYYY-MM-DD, inclusive), default: 1 year ahead
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
from_date | string | |
to_date | string |
get_favorites
Get list of user's favorite instruments.
get_trading_schedules
Get trading schedules for exchanges: trading hours, auction times, clearing times. Args: exchange: Exchange name (e.g. "MOEX", "SPB"). Empty = all exchanges. from_date: Start date (YYYY-MM-DD), default: today to_date: End date (YYYY-MM-DD, inclusive), default: 7 days ahead
| Parameter | Type | Description |
|---|---|---|
exchange | string | |
from_date | string | |
to_date | string |
get_candles
Get historical candles (OHLCV) for an instrument. Returns {"columns": ["time", "open", "high", "low", "close", "volume", "volumeBuy", "volumeSell"], "candles": [...]}: one row per candle, oldest first, in the order of "columns". Volumes are in lots; the two columns splitting volume into buys and sells are there when the API has them. For day, week and month candles "time" is a date. "last_candle_complete": false appears when the last candle's period is still running — its close is the current price, not a close. A bond's prices are in percent of its nominal, not in money. Candles from befor…
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
from_date | string | |
interval | string | |
to_date | string |
get_last_prices
Get last trade prices for one or more instruments. One record per requested identifier, in the order of the request, each with its ticker and classCode. An identifier no instrument matches gives {"requested": ..., "error": ...} in its place. A bond's price is in percent of its nominal, not in money. Args: instrument_ids: Comma-separated list of tickers, FIGIs, ISINs or UIDs
| Parameter | Type | Description |
|---|---|---|
instrument_ids * | string |
get_order_book
Get order book (market depth) for an instrument: bids, asks, last price, spread. A bond's prices are in percent of its nominal, not in money. Args: instrument_id: Instrument ticker, FIGI, ISIN or UID depth: Order book depth 1-50 (default: 20)
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string | |
depth | integer |
get_close_prices
Get previous trading session close prices for instruments. One record per requested identifier, in the order of the request. An identifier no instrument matches gives {"requested": ..., "error": ...} in its place. A bond's price is in percent of its nominal, not in money. Args: instrument_ids: Comma-separated list of tickers, FIGIs, ISINs or UIDs
| Parameter | Type | Description |
|---|---|---|
instrument_ids * | string |
get_trading_status
Get current trading status for an instrument: is it tradeable, auction phase, etc. Args: instrument_id: Instrument ticker, FIGI, ISIN or UID
| Parameter | Type | Description |
|---|---|---|
instrument_id * | string |
get_tech_analysis
Get technical analysis indicators (SMA, EMA, RSI, MACD, BB) for an instrument. Returns technicalIndicators: one item per interval with a timestamp and the indicator's values — signal (SMA, EMA, RSI), macd and signal (MACD), or middleBand, upperBand and lowerBand (BB). Args: instrument_id: Instrument ticker, FIGI, ISIN or UID indicator_type: INDICATOR_TYPE_SMA, INDICATOR_TYPE_EMA, INDICATOR_TYPE_RSI, INDICATOR_TYPE_MACD, INDICATOR_TYPE_BB from_date: Start date (YYYY-MM-DD), default: 90 days ago to_date: End date (YYYY-MM-DD, inclusive), default: now in…
| Parameter | Type | Description |
|---|---|---|
indicator_type * | string | |
instrument_id * | string | |
deviation | number | |
fast_length | integer | |
from_date | string | |
interval | string | |
length | integer | |
signal_smoothing | integer | |
slow_length | integer | |
to_date | string | |
type_of_price | string |
get_orders
Get list of active (pending) orders for an account. Returns: order_id, direction, type, status, price, quantity, instrument info. Args: account_id: Account ID
| Parameter | Type | Description |
|---|---|---|
account_id * | string |
get_order_state
Get detailed status of a specific order: execution status, filled quantity, average price. Args: account_id: Account ID order_id: Order ID
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
order_id * | string |
list_bonds
Get the full reference list of bonds: every field of every bond. A dump for scripts, not something to read: about 1,600 bonds and 2.4 MB of JSON with INSTRUMENT_STATUS_BASE — far more than fits in a model's context; a client saves such a result to a file or refuses it. INSTRUMENT_STATUS_ALL is 38 MB, and the API drops the connection before sending it all. To find particular bonds use find_instrument with instrument_kind="bond", and get_bond_by for the details of one. Args: instrument_status: INSTRUMENT_STATUS_BASE (tradeable) or INSTRUMENT_STATUS_ALL
| Parameter | Type | Description |
|---|---|---|
instrument_status | string |
list_etfs
Get the full reference list of ETFs and funds: every field of every fund. A dump for scripts, not something to read: about 280 funds and 300 KB of JSON with INSTRUMENT_STATUS_BASE, 2.3 MB with INSTRUMENT_STATUS_ALL — more than fits in a model's context; a client saves such a result to a file or refuses it. To find particular funds use find_instrument with instrument_kind="etf", and get_etf_by for one. Args: instrument_status: INSTRUMENT_STATUS_BASE (tradeable) or INSTRUMENT_STATUS_ALL
| Parameter | Type | Description |
|---|---|---|
instrument_status | string |
list_currencies
Get list of all available currency instruments. Small enough to read: about 15 instruments and 13 KB with INSTRUMENT_STATUS_BASE, twice that with INSTRUMENT_STATUS_ALL. Args: instrument_status: INSTRUMENT_STATUS_BASE (tradeable) or INSTRUMENT_STATUS_ALL
| Parameter | Type | Description |
|---|---|---|
instrument_status | string |
list_futures
Get the full reference list of futures contracts: every field of every contract. A dump for scripts, not something to read: about 530 contracts and 700 KB of JSON with INSTRUMENT_STATUS_BASE, 3.5 MB with INSTRUMENT_STATUS_ALL — far more than fits in a model's context; a client saves such a result to a file or refuses it. To find particular contracts use find_instrument with instrument_kind="futures", and get_future_by for one. Args: instrument_status: INSTRUMENT_STATUS_BASE (tradeable) or INSTRUMENT_STATUS_ALL
| Parameter | Type | Description |
|---|---|---|
instrument_status | string |