traded.gg logotraded.gg
Skip to documentation content

REST API

API Authentication

Request access, create an API key, and make your first authenticated request.

Get Access

REST data and hosted MCP access are invite-only. Request access from @traded_gg on X. While you wait, you can read the public docs, view the OpenAPI spec, and check API health. You need approval to create a key, fetch protected data, or connect a hosted MCP client.

  1. Once approved, sign in on traded.gg and go to Settings > API keys.
  2. Create a personal key. Save it when it appears. The secret is displayed once.
  3. Store it in your secret manager or set TRADED_API_KEY in your local environment.

Make Your First Request

For data requests, send Authorization: Bearer $TRADED_API_KEY or X-API-Key to https://api.traded.gg/v1. Keep the key out of query strings, screenshots, and client-side code. The JavaScript example runs in Node.js, and the Python example uses requests.

Request example · cURL
curl --get 'https://api.traded.gg/v1/prices' \
  --data-urlencode 'ids=sv3pt5-199' \
  --data-urlencode 'grade=raw:near_mint' \
  --data-urlencode 'method=median_3' \
  --header "Authorization: Bearer $TRADED_API_KEY"

A successful price request returns HTTP 200 with its results in data. Missing or invalid credentials can produce 401. A valid credential without access can produce 403. See Errors & Limits.

Credential Types

  • API key. Use a personal or machine key on routes marked API key required.
  • Personal API key. A key created in Settings belongs to your account. Use it on routes that require your account identity, such as feedback. Your keys and connected MCP apps share your account quota.
  • Traded sign-in session. The /v1/keys routes use the short-lived token from your Traded sign-in in the Bearer header. Sign in and use Developer Settings to manage keys interactively.

Rotate and Revoke Keys

Create a replacement in Developer Settings. Update your apps, verify a request with the replacement, then revoke the old key. If a key has been exposed, revoke it immediately.

To revoke all active keys through the API, call DELETE /v1/keys with your Traded sign-in token and the JSON body {"confirm":"revoke-all"}.

MCP OAuth

For supported consumer clients, connect to https://api.traded.gg/mcp and choose Traded OAuth. Clients with a custom header can send a personal API key as a Bearer token. See MCP Setup.

Follow changes to the /v1 API in the API & MCP Changelog.