No commit activity in last 3 years
No release in over 3 years
tinkoff.ru/invest OpenAPI.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 3.6.0, ~> 3.6

Runtime

~> 1.0, >= 1.0.1
 Project Readme

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

Documentation for Authorization

sso_auth

  • Type: Bearer authentication