RAPTOR v18.4: Исправлена отчетность, активированы выходные

This commit is contained in:
root
2026-04-18 23:26:45 +03:00
commit ef0958239e
312 changed files with 54247 additions and 0 deletions

19
test_api.py Normal file
View File

@@ -0,0 +1,19 @@
import os, requests
from dotenv import load_dotenv
load_dotenv("tok.env")
TOKEN = os.getenv("TINKOFF_TOKEN")
UID = "a78b8349-a1dc-447d-9277-1d75826d089a"
# ВНИМАНИЕ: исправлен URL (добавлен / перед tinkoff)
URL = "https://invest-public-api.tinkoff.ru/rest/tinkoff.public.invest.api.marketdata.v1.MarketDataService/GetLastPrices"
headers = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
# ВАЖНО: убедитесь, что в json передается именно "instrumentId": [UID]
r = requests.post(URL, json={"instrumentId": [UID]}, headers=headers)
print(f"Статус: {r.status_code}")
if r.status_code == 200:
print("✅ Успех! Цена получена.")
print(f"Данные: {r.json()}")
else:
print(f"❌ Ошибка: {r.text}")