RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
23
invest-python-master/examples/get_candles_with_limit.py
Normal file
23
invest-python-master/examples/get_candles_with_limit.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
|
||||
from t_tech.invest import CandleInterval, Client
|
||||
from t_tech.invest.utils import now
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
def main():
|
||||
with Client(TOKEN) as client:
|
||||
for candle in client.market_data.get_candles(
|
||||
instrument_id="BBG004730N88",
|
||||
to=now(),
|
||||
limit=24,
|
||||
interval=CandleInterval.CANDLE_INTERVAL_HOUR,
|
||||
).candles:
|
||||
print(candle)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user