Skip to main content

T-Invest 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

T-Invest

PyPI PyPI - Python Version Opensource PyPI - Downloads

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

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

$ pip install t-tech-investments

Возможности

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

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

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

from t_tech.invest import Client

TOKEN = 'token'

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

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

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

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

from t_tech.invest import Client
from t_tech.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


Download files

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

Source Distribution

t_tech_investments-0.3.2.tar.gz (227.2 kB view details)

Uploaded Source

Built Distribution

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

t_tech_investments-0.3.2-py3-none-any.whl (260.3 kB view details)

Uploaded Python 3

File details

Details for the file t_tech_investments-0.3.2.tar.gz.

File metadata

  • Download URL: t_tech_investments-0.3.2.tar.gz
  • Upload date:
  • Size: 227.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for t_tech_investments-0.3.2.tar.gz
Algorithm Hash digest
SHA256 547ee46449cabad5f6e4af5ea2b40445688b2167d174b73e1088cede4ba9f2d6
MD5 0587efa8d64f36c6360c3de81ceb8f76
BLAKE2b-256 e83f7c88480e463df54fd582b9283dcd0b3a735c10ae84c5fdf97259f69f7452

See more details on using hashes here.

File details

Details for the file t_tech_investments-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: t_tech_investments-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 260.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for t_tech_investments-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5fa8ef49c80c342b961e0986434ceddd5fafc66a57cbae831833501b116965b3
MD5 75bf4fb6732e669404fd179d371e6bd3
BLAKE2b-256 af2bfcfb4cebbe27b8adeceb2291a3b76ac7c330ca80093a4251bc2e6ad0301d

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