Tinkoff.InvestApi 0.1.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Tinkoff.InvestApi --version 0.1.0
NuGet\Install-Package Tinkoff.InvestApi -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tinkoff.InvestApi" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tinkoff.InvestApi --version 0.1.0
#r "nuget: Tinkoff.InvestApi, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Tinkoff.InvestApi as a Cake Addin
#addin nuget:?package=Tinkoff.InvestApi&version=0.1.0

// Install Tinkoff.InvestApi as a Cake Tool
#tool nuget:?package=Tinkoff.InvestApi&version=0.1.0

InvestApi .NET SDK

Build NuGet version (Tinkoff Trading OpenApi) NuGet version (Tinkoff Trading OpenApi)

Данный проект представляет собой инструментарий на языке C# для работы с grpc-интерфейсом торговой платформы Тинькофф Инвестиции.

Начало работы

Nuget

SDK доступен на nuget.org, для подключения добавьте в проект зависимость Tinkoff.InvestApi.

Сборка

Для сборки вам потребуется dotnet SDK 6.0. Перейдите в директорию проекта и выполните следующую команду:

dotnet build -c Release

Документация

Подробную документацию по InvestApi можно найти по ссылке.

Быстрый старт

Для взаимодействия с InvestApi нужно зарегистрировать InvestApiClient, который является фасадом для grpc сервисов.

public void ConfigureServices(IServiceCollection services)
{
    services.AddInvestApiClient((_, settings) => settings.AccessToken = "<token>");
}

InvestApiClient можно внедрить непосредственно в места использования.

Примеры

Проект Tinkoff.InvestApi.Sample является примером использования SDK. При запуске будут использованы методы InvestApi, результаты будут выведены в консоль. Перед запуском сохраните свой токен в user secrets:

cd Tinkoff.InvestApi.Sample
dotnet user-secrets set "AccessToken" "<token>"

Где взять токен аутентификации?

В разделе инвестиций вашего личного кабинета tinkoff

  • Перейдите в настройки
  • Проверьте, что функция “Подтверждение сделок кодом” отключена
  • Выпустите токен для торговли на бирже и режима “песочницы” (sandbox)
  • Скопируйте токен и сохраните, токен отображается только один раз, просмотреть его позже не получится, тем не менее вы можете выпускать неограниченное количество токенов

У меня есть вопрос

Основной репозиторий с документацией — в нем вы можете задать вопрос в Issues и получать информацию о релизах в Releases. Если возникают вопросы по данному SDK, нашёлся баг или есть предложения по улучшению, то можно задать его в Issues.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Tinkoff.InvestApi:

Repository Stars
AlexWan/OsEngine
Open Source algo trading platform
Version Downloads Last updated
0.6.10 418 3/27/2024
0.6.9 445 2/25/2024
0.6.8 239 2/12/2024
0.6.7 367 1/10/2024
0.6.6 394 12/4/2023
0.6.5 161 11/30/2023
0.6.4 538 10/12/2023
0.6.3 251 9/27/2023
0.6.2 418 9/4/2023
0.6.1 3,445 5/2/2023
0.6.0 132 5/2/2023
0.5.0 1,074 2/27/2023
0.4.1 3,363 12/23/2022
0.4.0 273 12/23/2022
0.3.2 560 12/2/2022
0.3.1 492 11/25/2022
0.3.0 645 10/25/2022
0.2.0 483 10/12/2022
0.1.8 1,507 8/26/2022
0.1.7 506 8/15/2022
0.1.6 1,790 4/28/2022
0.1.5 544 4/8/2022
0.1.4 510 3/23/2022
0.1.3 437 3/16/2022
0.1.2 410 3/15/2022
0.1.1 471 2/28/2022
0.1.0 533 2/10/2022