Tinkoff/invest-python

[Bug] Несоответствие документации коду

vovabush opened this issue · 2 comments

Что случилось?

В документации указано, что у облигаций есть поле risk_level. Однако, при получении ответа данного поля не наблюдается.

Вот полный ответ на запрос элемента Bond:

Bond(figi='BBG012F0B291', ticker='SU52004RMFS7', class_code='TQOB', isin='RU000A103MX5', lot=1, currency='rub', klong=Quotation(units=0, nano=0), kshort=Quotation(units=0, nano=0), dlong=Quotation(units=0, nano=0), dshort=Quotation(units=0, nano=0), dlong_min=Quotation(units=0, nano=0), dshort_min=Quotation(units=0, nano=0), short_enabled_flag=False, name='ОФЗ 52004', exchange='MOEX_PLUS', coupon_quantity_per_year=2, maturity_date=datetime.datetime(2032, 3, 17, 0, 0, tzinfo=datetime.timezone.utc), nominal=MoneyValue(currency='rub', units=1157, nano=560000000), initial_nominal=MoneyValue(currency='rub', units=1000, nano=0), state_reg_date=datetime.datetime(2021, 9, 2, 0, 0, tzinfo=datetime.timezone.utc), placement_date=datetime.datetime(2021, 9, 8, 0, 0, tzinfo=datetime.timezone.utc), placement_price=MoneyValue(currency='rub', units=0, nano=0), aci_value=MoneyValue(currency='rub', units=10, nano=390000000), country_of_risk='RU', country_of_risk_name='Российская Федерация', sector='government', issue_kind='documentary', issue_size=209421298, issue_size_plan=250000000, trading_status=<SecurityTradingStatus.SECURITY_TRADING_STATUS_NORMAL_TRADING: 5>, otc_flag=False, buy_available_flag=True, sell_available_flag=True, floating_coupon_flag=False, perpetual_flag=False, amortization_flag=False, min_price_increment=Quotation(units=0, nano=1000000), api_trade_available_flag=True, uid='21ed89ff-852e-4344-8df7-6ca8cb4cc447', real_exchange=<RealExchange.REAL_EXCHANGE_MOEX: 1>, position_uid='1cbad19b-146c-40d7-9c9c-4ddcd2b2d174', for_iis_flag=True, for_qual_investor_flag=False, weekend_flag=False, blocked_tca_flag=False, first_1min_candle_date=datetime.datetime(2021, 10, 13, 13, 19, tzinfo=datetime.timezone.utc), first_1day_candle_date=datetime.datetime(2021, 10, 13, 7, 0, tzinfo=datetime.timezone.utc))

Воспроизведение

from tinkoff.invest import Client


TOKEN = None

with Client(TOKEN) as client:
    r = client.instruments.bonds()
    for i in r.instruments:
        print(i)
        exit(0)

Tinkoff Invest Version

0.2.0-beta47

Python Version

3.10

OS

Windows

Логи

No response

То же касается флага subordinated_flag.

в последней версии есть