Skip to main content

Tinkoff Python SDK

This project has been quarantined.

PyPI Admins need to review this project before it can be restored. While in quarantine, the project is not installable by clients, and cannot be being modified by its maintainers.

Read more in the project in quarantine help article.

Project description

Tinkoff Invest

PyPI PyPI - Python Version GitHub PyPI - Downloads

Данный репозиторий предоставляет клиент для взаимодействия с торговой платформой Тинькофф Инвестиции на языке Python.

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

$ pip install tinkoff-investments

Возможности

  • ☑ Синхронный и асинхронный GRPC клиент
  • ☑ Возможность отменить все заявки
  • ☑ Выгрузка истории котировок "от" и "до"
  • ☑ Кеширование данных
  • ☑ Торговая стратегия

Как пользоваться

Получить список аккаунтов

from tinkoff.invest import Client

TOKEN = 'token'

with Client(TOKEN) as client:
    print(client.users.get_accounts())

Переопределить target

В Tinkoff Invest API есть два контура - "боевой", предназначенный для исполнения ордеров на бирже и "песочница", предназначенный для тестирования API и торговых гипотез, заявки с которого не выводятся на биржу, а исполняются в эмуляторе.

Переключение между контурами реализовано через target, INVEST_GRPC_API - "боевой", INVEST_GRPC_API_SANDBOX - "песочница"

from tinkoff.invest import Client
from tinkoff.invest.constants import INVEST_GRPC_API

TOKEN = 'token'

with Client(TOKEN, target=INVEST_GRPC_API) as client:
    print(client.users.get_accounts())

:warning: Не публикуйте токены в общедоступные репозитории


Остальные примеры доступны в examples.

Contribution

Для тех, кто хочет внести свои изменения в проект.

License

Лицензия The Apache License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinkoff_investments-0.2.0b92.tar.gz (182.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinkoff_investments-0.2.0b92-py3-none-any.whl (213.8 kB view details)

Uploaded Python 3

File details

Details for the file tinkoff_investments-0.2.0b92.tar.gz.

File metadata

  • Download URL: tinkoff_investments-0.2.0b92.tar.gz
  • Upload date:
  • Size: 182.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1015-azure

File hashes

Hashes for tinkoff_investments-0.2.0b92.tar.gz
Algorithm Hash digest
SHA256 9b596aac55c661030d32dff80e055a95255369b165ddd7653189112b4a1aad22
MD5 9d5f5f81c76fba998c059cc4d4d436cb
BLAKE2b-256 0f28b9c3eee6d230d977dec9a97983988ff2dfc06e42e6e2d28567f18190898c

See more details on using hashes here.

File details

Details for the file tinkoff_investments-0.2.0b92-py3-none-any.whl.

File metadata

File hashes

Hashes for tinkoff_investments-0.2.0b92-py3-none-any.whl
Algorithm Hash digest
SHA256 a33ac1f9b7a80c45e3610b76d033b82d96a70cb0b92061a00a6e0f4891073e28
MD5 be0a16737725c1dd4c11ed971a9d21eb
BLAKE2b-256 d3c7589f617c096b2dcca1844b227d0ba1a5315b61e5aa7ec9403683bd530859

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page