Tinkoff/invest-python

[Bug] Почему метод GetCandles (get_all_candles) начал возвращать цены начиная с 9 января 2023 года?

smarsel opened this issue · 2 comments

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

Несколько дней назад метод GetCandles начал возвращать цены для HeadHunter Group PLC ADR (HHR) начиная с 9 января 2023 года. До этого возвращал цены за любой период. Это новое ограничение или проблема в другом? По другим инструментам такой проблемы нет.

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

figi='BBG00KHGQ0H4'
with Client(TOKEN) as client:
    for candle in client.get_all_candles(figi=figi, from_=now()-timedelta(days=300), 
                                         interval=CandleInterval.CANDLE_INTERVAL_DAY):
        print(candle)

Tinkoff Invest Version

0.2.0-beta54

Python Version

3.11

OS

Windows

Логи

HistoricCandle(open=Quotation(units=18, nano=0), high=Quotation(units=18, nano=0), low=Quotation(units=15, nano=0), close=Quotation(units=15, nano=620000000), volume=63184, time=datetime.datetime(2023, 1, 9, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=550000000), high=Quotation(units=15, nano=960000000), low=Quotation(units=15, nano=110000000), close=Quotation(units=15, nano=310000000), volume=20358, time=datetime.datetime(2023, 1, 10, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=590000000), high=Quotation(units=16, nano=950000000), low=Quotation(units=15, nano=120000000), close=Quotation(units=16, nano=590000000), volume=35164, time=datetime.datetime(2023, 1, 11, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=370000000), high=Quotation(units=18, nano=300000000), low=Quotation(units=15, nano=670000000), close=Quotation(units=17, nano=720000000), volume=29465, time=datetime.datetime(2023, 1, 12, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=810000000), high=Quotation(units=18, nano=200000000), low=Quotation(units=17, nano=350000000), close=Quotation(units=17, nano=730000000), volume=32040, time=datetime.datetime(2023, 1, 13, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=890000000), high=Quotation(units=19, nano=250000000), low=Quotation(units=17, nano=560000000), close=Quotation(units=19, nano=60000000), volume=33926, time=datetime.datetime(2023, 1, 16, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=690000000), high=Quotation(units=19, nano=590000000), low=Quotation(units=17, nano=250000000), close=Quotation(units=18, nano=330000000), volume=24906, time=datetime.datetime(2023, 1, 17, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=320000000), high=Quotation(units=18, nano=910000000), low=Quotation(units=18, nano=140000000), close=Quotation(units=18, nano=820000000), volume=13545, time=datetime.datetime(2023, 1, 18, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=610000000), high=Quotation(units=18, nano=940000000), low=Quotation(units=18, nano=440000000), close=Quotation(units=18, nano=580000000), volume=8885, time=datetime.datetime(2023, 1, 19, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=620000000), high=Quotation(units=18, nano=880000000), low=Quotation(units=18, nano=500000000), close=Quotation(units=18, nano=640000000), volume=7199, time=datetime.datetime(2023, 1, 20, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=0), high=Quotation(units=21, nano=500000000), low=Quotation(units=18, nano=590000000), close=Quotation(units=19, nano=580000000), volume=67043, time=datetime.datetime(2023, 1, 23, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=20, nano=70000000), high=Quotation(units=21, nano=270000000), low=Quotation(units=19, nano=600000000), close=Quotation(units=19, nano=950000000), volume=13240, time=datetime.datetime(2023, 1, 24, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=760000000), high=Quotation(units=19, nano=990000000), low=Quotation(units=19, nano=350000000), close=Quotation(units=19, nano=490000000), volume=4654, time=datetime.datetime(2023, 1, 25, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=310000000), high=Quotation(units=19, nano=920000000), low=Quotation(units=17, nano=500000000), close=Quotation(units=19, nano=460000000), volume=11440, time=datetime.datetime(2023, 1, 26, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=700000000), high=Quotation(units=19, nano=920000000), low=Quotation(units=19, nano=350000000), close=Quotation(units=19, nano=550000000), volume=12745, time=datetime.datetime(2023, 1, 27, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=640000000), high=Quotation(units=19, nano=840000000), low=Quotation(units=19, nano=160000000), close=Quotation(units=19, nano=410000000), volume=9907, time=datetime.datetime(2023, 1, 30, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=580000000), high=Quotation(units=19, nano=810000000), low=Quotation(units=19, nano=450000000), close=Quotation(units=19, nano=590000000), volume=8363, time=datetime.datetime(2023, 1, 31, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=610000000), high=Quotation(units=19, nano=620000000), low=Quotation(units=19, nano=400000000), close=Quotation(units=19, nano=410000000), volume=4566, time=datetime.datetime(2023, 2, 1, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=400000000), high=Quotation(units=19, nano=710000000), low=Quotation(units=18, nano=900000000), close=Quotation(units=19, nano=60000000), volume=6856, time=datetime.datetime(2023, 2, 2, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=19, nano=280000000), high=Quotation(units=19, nano=320000000), low=Quotation(units=18, nano=130000000), close=Quotation(units=18, nano=540000000), volume=13199, time=datetime.datetime(2023, 2, 3, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=200000000), high=Quotation(units=19, nano=150000000), low=Quotation(units=18, nano=90000000), close=Quotation(units=18, nano=300000000), volume=5063, time=datetime.datetime(2023, 2, 6, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=640000000), high=Quotation(units=18, nano=690000000), low=Quotation(units=17, nano=630000000), close=Quotation(units=18, nano=120000000), volume=6131, time=datetime.datetime(2023, 2, 7, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=18, nano=480000000), high=Quotation(units=18, nano=480000000), low=Quotation(units=17, nano=650000000), close=Quotation(units=17, nano=650000000), volume=4856, time=datetime.datetime(2023, 2, 8, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=950000000), high=Quotation(units=18, nano=380000000), low=Quotation(units=16, nano=700000000), close=Quotation(units=16, nano=700000000), volume=6139, time=datetime.datetime(2023, 2, 9, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=10000000), high=Quotation(units=17, nano=820000000), low=Quotation(units=16, nano=760000000), close=Quotation(units=17, nano=290000000), volume=7788, time=datetime.datetime(2023, 2, 10, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=460000000), high=Quotation(units=18, nano=600000000), low=Quotation(units=17, nano=310000000), close=Quotation(units=17, nano=510000000), volume=4552, time=datetime.datetime(2023, 2, 13, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=17, nano=530000000), high=Quotation(units=17, nano=530000000), low=Quotation(units=16, nano=860000000), close=Quotation(units=17, nano=190000000), volume=3304, time=datetime.datetime(2023, 2, 14, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=810000000), high=Quotation(units=17, nano=150000000), low=Quotation(units=16, nano=550000000), close=Quotation(units=16, nano=740000000), volume=9652, time=datetime.datetime(2023, 2, 15, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=430000000), high=Quotation(units=17, nano=240000000), low=Quotation(units=16, nano=400000000), close=Quotation(units=16, nano=580000000), volume=7057, time=datetime.datetime(2023, 2, 16, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=370000000), high=Quotation(units=16, nano=500000000), low=Quotation(units=16, nano=50000000), close=Quotation(units=16, nano=60000000), volume=3443, time=datetime.datetime(2023, 2, 17, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=150000000), high=Quotation(units=17, nano=0), low=Quotation(units=15, nano=540000000), close=Quotation(units=15, nano=770000000), volume=5946, time=datetime.datetime(2023, 2, 20, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=0), high=Quotation(units=16, nano=580000000), low=Quotation(units=15, nano=540000000), close=Quotation(units=15, nano=810000000), volume=4581, time=datetime.datetime(2023, 2, 21, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=650000000), high=Quotation(units=16, nano=90000000), low=Quotation(units=15, nano=510000000), close=Quotation(units=15, nano=710000000), volume=3930, time=datetime.datetime(2023, 2, 22, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=380000000), high=Quotation(units=16, nano=150000000), low=Quotation(units=15, nano=360000000), close=Quotation(units=15, nano=490000000), volume=2737, time=datetime.datetime(2023, 2, 24, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=220000000), high=Quotation(units=15, nano=800000000), low=Quotation(units=15, nano=200000000), close=Quotation(units=15, nano=350000000), volume=343, time=datetime.datetime(2023, 2, 27, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=700000000), high=Quotation(units=16, nano=800000000), low=Quotation(units=15, nano=30000000), close=Quotation(units=15, nano=30000000), volume=58, time=datetime.datetime(2023, 2, 28, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=30000000), high=Quotation(units=15, nano=840000000), low=Quotation(units=15, nano=30000000), close=Quotation(units=15, nano=840000000), volume=58, time=datetime.datetime(2023, 3, 1, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=780000000), high=Quotation(units=16, nano=130000000), low=Quotation(units=15, nano=210000000), close=Quotation(units=15, nano=210000000), volume=104, time=datetime.datetime(2023, 3, 2, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=970000000), high=Quotation(units=16, nano=490000000), low=Quotation(units=15, nano=500000000), close=Quotation(units=15, nano=500000000), volume=400, time=datetime.datetime(2023, 3, 3, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=500000000), high=Quotation(units=15, nano=710000000), low=Quotation(units=15, nano=140000000), close=Quotation(units=15, nano=150000000), volume=82, time=datetime.datetime(2023, 3, 6, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=260000000), high=Quotation(units=15, nano=290000000), low=Quotation(units=15, nano=150000000), close=Quotation(units=15, nano=200000000), volume=64, time=datetime.datetime(2023, 3, 7, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=740000000), high=Quotation(units=16, nano=700000000), low=Quotation(units=15, nano=110000000), close=Quotation(units=15, nano=580000000), volume=169, time=datetime.datetime(2023, 3, 9, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=160000000), high=Quotation(units=15, nano=160000000), low=Quotation(units=15, nano=0), close=Quotation(units=15, nano=0), volume=53, time=datetime.datetime(2023, 3, 10, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=20000000), high=Quotation(units=15, nano=730000000), low=Quotation(units=14, nano=990000000), close=Quotation(units=14, nano=990000000), volume=26, time=datetime.datetime(2023, 3, 13, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=480000000), high=Quotation(units=15, nano=480000000), low=Quotation(units=15, nano=480000000), close=Quotation(units=15, nano=480000000), volume=1, time=datetime.datetime(2023, 3, 14, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=880000000), high=Quotation(units=15, nano=100000000), low=Quotation(units=14, nano=880000000), close=Quotation(units=15, nano=100000000), volume=54, time=datetime.datetime(2023, 3, 15, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=880000000), high=Quotation(units=14, nano=880000000), low=Quotation(units=14, nano=750000000), close=Quotation(units=14, nano=750000000), volume=62, time=datetime.datetime(2023, 3, 16, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=640000000), high=Quotation(units=14, nano=650000000), low=Quotation(units=14, nano=640000000), close=Quotation(units=14, nano=650000000), volume=25, time=datetime.datetime(2023, 3, 17, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=600000000), high=Quotation(units=14, nano=600000000), low=Quotation(units=14, nano=430000000), close=Quotation(units=14, nano=430000000), volume=130, time=datetime.datetime(2023, 3, 20, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=430000000), high=Quotation(units=14, nano=530000000), low=Quotation(units=14, nano=430000000), close=Quotation(units=14, nano=490000000), volume=119, time=datetime.datetime(2023, 3, 21, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=460000000), high=Quotation(units=14, nano=460000000), low=Quotation(units=14, nano=460000000), close=Quotation(units=14, nano=460000000), volume=6, time=datetime.datetime(2023, 3, 24, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=460000000), high=Quotation(units=14, nano=460000000), low=Quotation(units=14, nano=460000000), close=Quotation(units=14, nano=460000000), volume=109, time=datetime.datetime(2023, 3, 27, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=460000000), high=Quotation(units=14, nano=460000000), low=Quotation(units=14, nano=460000000), close=Quotation(units=14, nano=460000000), volume=77, time=datetime.datetime(2023, 3, 28, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=460000000), high=Quotation(units=15, nano=0), low=Quotation(units=14, nano=460000000), close=Quotation(units=14, nano=520000000), volume=2331, time=datetime.datetime(2023, 3, 29, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=14, nano=500000000), high=Quotation(units=15, nano=950000000), low=Quotation(units=14, nano=500000000), close=Quotation(units=15, nano=510000000), volume=3926, time=datetime.datetime(2023, 3, 30, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=850000000), high=Quotation(units=16, nano=290000000), low=Quotation(units=15, nano=110000000), close=Quotation(units=15, nano=340000000), volume=1542, time=datetime.datetime(2023, 3, 31, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=500000000), high=Quotation(units=15, nano=980000000), low=Quotation(units=15, nano=0), close=Quotation(units=15, nano=30000000), volume=2810, time=datetime.datetime(2023, 4, 3, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=440000000), high=Quotation(units=15, nano=500000000), low=Quotation(units=14, nano=720000000), close=Quotation(units=15, nano=490000000), volume=5722, time=datetime.datetime(2023, 4, 4, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=640000000), high=Quotation(units=17, nano=280000000), low=Quotation(units=15, nano=480000000), close=Quotation(units=17, nano=250000000), volume=28531, time=datetime.datetime(2023, 4, 5, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=850000000), high=Quotation(units=17, nano=270000000), low=Quotation(units=15, nano=700000000), close=Quotation(units=16, nano=20000000), volume=5333, time=datetime.datetime(2023, 4, 6, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=840000000), high=Quotation(units=16, nano=750000000), low=Quotation(units=15, nano=500000000), close=Quotation(units=15, nano=880000000), volume=2609, time=datetime.datetime(2023, 4, 7, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=100000000), high=Quotation(units=16, nano=500000000), low=Quotation(units=15, nano=600000000), close=Quotation(units=16, nano=160000000), volume=4970, time=datetime.datetime(2023, 4, 10, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=16, nano=340000000), high=Quotation(units=16, nano=500000000), low=Quotation(units=15, nano=900000000), close=Quotation(units=16, nano=60000000), volume=2151, time=datetime.datetime(2023, 4, 11, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=850000000), high=Quotation(units=16, nano=80000000), low=Quotation(units=15, nano=720000000), close=Quotation(units=15, nano=730000000), volume=874, time=datetime.datetime(2023, 4, 12, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=720000000), high=Quotation(units=16, nano=160000000), low=Quotation(units=15, nano=600000000), close=Quotation(units=15, nano=700000000), volume=1923, time=datetime.datetime(2023, 4, 13, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)
HistoricCandle(open=Quotation(units=15, nano=700000000), high=Quotation(units=15, nano=980000000), low=Quotation(units=15, nano=570000000), close=Quotation(units=15, nano=850000000), volume=2605, time=datetime.datetime(2023, 4, 14, 4, 0, tzinfo=datetime.timezone.utc), is_complete=True)

Здравствуйте! Часовые свечи для этой бумаги действительно возвращаются с 9 января 2023 года. Возможно ограничение на API.

@AlexanderVolkovTCS, подскажешь валютно ли так api отдает?

Добрый день, c 25/02/22 по 08/01/23 котировок по HHR и не было)