Tinkoff / invest-python

Tinkoff Invest Python gRPC client
https://tinkoff.github.io/invest-python/
Apache License 2.0
313 stars 90 forks source link

docs(examples): add new example for how to get figi for ticker #187

Closed WISEPLAT closed 1 year ago

WISEPLAT commented 1 year ago

Привет всем! Хотелось бы добавить в примеры получение figi для тикера. Прошу рассмотреть и подтвердить. Спасибо!

WISEPLAT commented 1 year ago

Is there anyone alive?)))

daxartio commented 1 year ago
poetry run pylint --jobs 1 --rcfile=setup.cfg tests tinkoff examples scripts
************* Module examples.wiseplat_get_figi_for_ticker
examples/wiseplat_get_figi_for_ticker.py:40:42: W0212: Access to a protected member _name_ of a client class (protected-access)
examples/wiseplat_get_figi_for_ticker.py:40:42: C2[8](https://github.com/Tinkoff/invest-python/actions/runs/4061590335/jobs/6991760435#step:4:9)01: Unnecessarily calls dunder method __getattribute__. Access attribute directly or use getattr built-in function. (unnecessary-dunder-call)
WISEPLAT commented 1 year ago
poetry run pylint --jobs 1 --rcfile=setup.cfg tests tinkoff examples scripts
************* Module examples.wiseplat_get_figi_for_ticker
examples/wiseplat_get_figi_for_ticker.py:40:42: W0212: Access to a protected member _name_ of a client class (protected-access)
examples/wiseplat_get_figi_for_ticker.py:40:42: C2[8](https://github.com/Tinkoff/invest-python/actions/runs/4061590335/jobs/6991760435#step:4:9)01: Unnecessarily calls dunder method __getattribute__. Access attribute directly or use getattr built-in function. (unnecessary-dunder-call)

Привет! Это сделано чтобы наглядно увидеть статус в понятном тексте: trading_status вот так: SECURITY_TRADING_STATUS_NORMAL_TRADING

пример выполнения ниже:

`C:\Users\user123\PycharmProjects\test_api\venv\Scripts\python.exe C:\Users\user123\PycharmProjects\test_api\ishod\wiseplat_get_figi_for_ticker.py 2023-02-03 11:12:47,348 INFO:63dcc201e0576ef61d7ece875b73747c Shares 2023-02-03 11:12:47,881 INFO:63dcc20237d41fd4fc7b8cc55f13ea54 Bonds 2023-02-03 11:12:48,134 INFO:63dcc202b5ceea7b17640b5747348256 Etfs 2023-02-03 11:12:48,215 INFO:63dcc2022fe7b74fec66049a40c1dfd2 Currencies 2023-02-03 11:12:48,264 INFO:63dcc202cd1aa4c0bdffae6bda9e3789 Futures

Ticker VTBR have figi=BBG004730ZJ9

Additional info for this VTBR ticker: name Банк ВТБ ticker VTBR class_code TQBR figi BBG004730ZJ9 uid 8e2b0325-0292-4654-8a18-4f63ed3b0e09 type shares min_price_increment 0.00000500 scale 6 lot 10000 trading_status SECURITY_TRADING_STATUS_NORMAL_TRADING api_trade_available_flag True currency rub exchange MOEX_EVENING_WEEKEND buy_available_flag True sell_available_flag True short_enabled_flag True klong 2.00000000 kshort 2.00000000 Name: 548, dtype: object

Process finished with exit code 0`

WISEPLAT commented 1 year ago
poetry run pylint --jobs 1 --rcfile=setup.cfg tests tinkoff examples scripts
************* Module examples.wiseplat_get_figi_for_ticker
examples/wiseplat_get_figi_for_ticker.py:40:42: W0212: Access to a protected member _name_ of a client class (protected-access)
examples/wiseplat_get_figi_for_ticker.py:40:42: C2[8](https://github.com/Tinkoff/invest-python/actions/runs/4061590335/jobs/6991760435#step:4:9)01: Unnecessarily calls dunder method __getattribute__. Access attribute directly or use getattr built-in function. (unnecessary-dunder-call)

пофиксил))

WISEPLAT commented 1 year ago

Ну как? Теперь ОК?