Loading documentation…
Loading documentation…
Call SteamCall with Requests and an explicit timeout.
import os
import requests
response = requests.get(
"https://api.steamcall.com/v2/steam/market/price",
params={"app_id": 730, "market_hash_name": "Example", "currency": 1},
headers={"X-API-Key": os.environ["STEAMCALL_API_KEY"]},
timeout=(3, 15),
)
response.raise_for_status()
data = response.json()Add retries only for the transient conditions described in Retries & timeouts.
Before calling raise_for_status, capture response.headers.get("X-Request-ID") with status and operation in a safe diagnostic record. Parse documented error envelopes separately from transport exceptions so validation and authentication failures are not retried.
For production, reuse a configured requests.Session, cap connection-pool concurrency, and mount a reviewed retry adapter only if it respects the total workflow deadline. Never enable debug logging that prints X-API-Key.