# Connect to WOK API

WOK_API_KEY is your WOK key, not a Steam key. Keep it out of browser code, URLs, logs and agent prompts.

https://woksteamapi.com

Authorization: Bearer $WOK_API_KEY

- https://woksteamapi.com/api/openapi.json
- https://woksteamapi.com/mcp.json
- https://woksteamapi.com/api/integration-guide.md
- https://woksteamapi.com/api/specialist-plans.md

1. Inspect the project stack and implement a server-side adapter using its existing conventions.

2. Call GET /v1/key once to check access.endpoints, capabilities and quotas. This costs no units. Specialist plans exclude other workloads.

3. Use documented parameters and validate HTTP and application status. Keep unavailable, private and empty distinct. Missing data remains null or unavailable, never invented zero data.

4. Set a total deadline of 60 seconds and bound concurrency. Retry temporary 429/502/503/504 at most twice with jitter, respecting Retry-After and the deadline. Stop on exhausted quota until reset. Never loop on 400/401/403 or unsupported features.

5. Cache by source timestamps and deduplicate identical in-flight reads. Do not poll per animation frame or force-refresh automatically.

6. Keep currency, price source, statistic and observed time together. Do not compare different currencies or source snapshots as the same price.

7. Use SteamID64 strings, not JavaScript numbers. Encode item names in URL parameters, preserving spaces, ★, pipes and non-Latin characters. Follow cursor pagination. Batch units may be charged per item or player.

8. Create examples and checks with mocks first. Ask before live paid or bulk requests. This prompt does not authorize purchases, plan changes, real charges or sending emails.

9. Report changed files, setup commands, checks and unsupported capabilities. Do not claim data or rendering parity beyond the response evidence.

## History

Observed item price history and portfolio charts

Required access: History / Prices / Inventory / All-purpose

GET /v1/price-history

Render returned observations with their timestamps, source and currency. POST /v1/portfolio-history accepts a basket; consult its schema for exact item fields.

History starts when WOK observed a price. It is not a complete Steam transaction feed. Missing dates must remain gaps, never invented zero prices. days is 1..365.

Included data endpoints:

- /v1/portfolio-history
- /v1/price-history
- /v1/prices/coverage

https://woksteamapi.com/steam-item-price-history

```sh
curl --fail-with-body --max-time 60 "https://woksteamapi.com/v1/price-history?game=cs2&name=AK-47+%7C+Redline+%28Field-Tested%29&days=30" \
  -H "Authorization: Bearer $WOK_API_KEY"
```

Replace the demo SteamID or inspect placeholder with your intended input.
