tinkoff_invest_client
TinkoffInvestClient - the Ruby gem for the OpenAPI
tinkoff.ru/invest OpenAPI.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build tinkoff_invest_client.gemspec
Then either install the gem locally:
gem install ./tinkoff_invest_client-1.0.0.gem
(for development, run gem install --dev ./tinkoff_invest_client-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'tinkoff_invest_client', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/ThinkAndRun/tinkoff_invest_client, then add the following in the Gemfile:
gem 'tinkoff_invest_client', :git => 'https://github.com/ThinkAndRun/tinkoff_invest_client.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'tinkoff_invest_client'
# Setup authorization
TinkoffInvestClient.configure do |config|
# Configure Bearer authorization: sso_auth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = TinkoffInvestClient::MarketApi.new
begin
#Получение списка облигаций
result = api_instance.market_bonds_get
p result
rescue TinkoffInvestClient::ApiError => e
puts "Exception when calling MarketApi->market_bonds_get: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api-invest.tinkoff.ru/openapi
Class | Method | HTTP request | Description |
---|---|---|---|
TinkoffInvestClient::MarketApi | market_bonds_get | GET /market/bonds | Получение списка облигаций |
TinkoffInvestClient::MarketApi | market_candles_get | GET /market/candles | Получение исторических свечей по FIGI |
TinkoffInvestClient::MarketApi | market_currencies_get | GET /market/currencies | Получение списка валютных пар |
TinkoffInvestClient::MarketApi | market_etfs_get | GET /market/etfs | Получение списка ETF |
TinkoffInvestClient::MarketApi | market_orderbook_get | GET /market/orderbook | Получение стакана по FIGI |
TinkoffInvestClient::MarketApi | market_search_by_figi_get | GET /market/search/by-figi | Получение инструмента по FIGI |
TinkoffInvestClient::MarketApi | market_search_by_ticker_get | GET /market/search/by-ticker | Получение инструмента по тикеру |
TinkoffInvestClient::MarketApi | market_stocks_get | GET /market/stocks | Получение списка акций |
TinkoffInvestClient::OperationsApi | operations_get | GET /operations | Получение списка операций |
TinkoffInvestClient::OrdersApi | orders_cancel_post | POST /orders/cancel | Отмена заявки |
TinkoffInvestClient::OrdersApi | orders_get | GET /orders | Получение списка активных заявок |
TinkoffInvestClient::OrdersApi | orders_limit_order_post | POST /orders/limit-order | Создание лимитной заявки |
TinkoffInvestClient::OrdersApi | orders_market_order_post | POST /orders/market-order | Создание рыночной заявки |
TinkoffInvestClient::PortfolioApi | portfolio_currencies_get | GET /portfolio/currencies | Получение валютных активов клиента |
TinkoffInvestClient::PortfolioApi | portfolio_get | GET /portfolio | Получение портфеля клиента |
TinkoffInvestClient::SandboxApi | sandbox_clear_post | POST /sandbox/clear | Удаление всех позиций |
TinkoffInvestClient::SandboxApi | sandbox_currencies_balance_post | POST /sandbox/currencies/balance | Выставление баланса по валютным позициям |
TinkoffInvestClient::SandboxApi | sandbox_positions_balance_post | POST /sandbox/positions/balance | Выставление баланса по инструментным позициям |
TinkoffInvestClient::SandboxApi | sandbox_register_post | POST /sandbox/register | Регистрация клиента в sandbox |
TinkoffInvestClient::SandboxApi | sandbox_remove_post | POST /sandbox/remove | Удаление счета |
TinkoffInvestClient::UserApi | user_accounts_get | GET /user/accounts | Получение брокерских счетов клиента |
Documentation for Models
- TinkoffInvestClient::BrokerAccountType
- TinkoffInvestClient::Candle
- TinkoffInvestClient::CandleResolution
- TinkoffInvestClient::Candles
- TinkoffInvestClient::CandlesResponse
- TinkoffInvestClient::Currencies
- TinkoffInvestClient::Currency
- TinkoffInvestClient::CurrencyPosition
- TinkoffInvestClient::Empty
- TinkoffInvestClient::Error
- TinkoffInvestClient::ErrorPayload
- TinkoffInvestClient::InstrumentType
- TinkoffInvestClient::LimitOrderRequest
- TinkoffInvestClient::LimitOrderResponse
- TinkoffInvestClient::MarketInstrument
- TinkoffInvestClient::MarketInstrumentList
- TinkoffInvestClient::MarketInstrumentListResponse
- TinkoffInvestClient::MarketInstrumentResponse
- TinkoffInvestClient::MarketOrderRequest
- TinkoffInvestClient::MarketOrderResponse
- TinkoffInvestClient::MoneyAmount
- TinkoffInvestClient::Operation
- TinkoffInvestClient::OperationStatus
- TinkoffInvestClient::OperationTrade
- TinkoffInvestClient::OperationType
- TinkoffInvestClient::OperationTypeWithCommission
- TinkoffInvestClient::Operations
- TinkoffInvestClient::OperationsResponse
- TinkoffInvestClient::Order
- TinkoffInvestClient::OrderResponse
- TinkoffInvestClient::OrderStatus
- TinkoffInvestClient::OrderType
- TinkoffInvestClient::Orderbook
- TinkoffInvestClient::OrderbookResponse
- TinkoffInvestClient::OrdersResponse
- TinkoffInvestClient::PlacedLimitOrder
- TinkoffInvestClient::PlacedMarketOrder
- TinkoffInvestClient::Portfolio
- TinkoffInvestClient::PortfolioCurrenciesResponse
- TinkoffInvestClient::PortfolioPosition
- TinkoffInvestClient::PortfolioResponse
- TinkoffInvestClient::SandboxAccount
- TinkoffInvestClient::SandboxCurrency
- TinkoffInvestClient::SandboxRegisterRequest
- TinkoffInvestClient::SandboxRegisterResponse
- TinkoffInvestClient::SandboxSetCurrencyBalanceRequest
- TinkoffInvestClient::SandboxSetPositionBalanceRequest
- TinkoffInvestClient::SearchMarketInstrument
- TinkoffInvestClient::SearchMarketInstrumentResponse
- TinkoffInvestClient::TradeStatus
- TinkoffInvestClient::UserAccount
- TinkoffInvestClient::UserAccounts
- TinkoffInvestClient::UserAccountsResponse
Documentation for Authorization
sso_auth
- Type: Bearer authentication