import os, requests, json
from dotenv import load_dotenv

load_dotenv("tok.env")
TOKEN = os.getenv("TINKOFF_TOKEN")
URL = "https://sandbox-invest-public-api.tinkoff.ru/rest/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxAccounts"

headers = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
r = requests.post(URL, json={}, headers=headers)

print(json.dumps(r.json(), indent=4))
