Skip to main content
SteamTradeBots.com Bot API Documentation - Integrate your Steam trading bot with real-time rate and stock updates.
v1 Stable

Bot API Documentation

Integrate with SteamTradeBots.com to fetch live bot data and push updates programmatically.

Base URL

steamtradebots.com/api/v1/

Overview

This document details the API endpoints available. The Update endpoint supports secure Header Authentication and efficient Partial Updates.

Authentication Keys

  • Bot API Key - Used to update your specific bot. Found in "My Bots". New owner? Start with the step-by-step guide.
  • Supplier API Key - Used to read public bot data. Found in "Account".

Rate Limiting

  • Limit: 20 requests per bot per 5-minute window.
  • Response: 429 Too Many Requests with a Retry-After header.
POST Update Bot Data
POST https://steamtradebots.com/api/v1/bot/update.php

Authentication Methods

We support three methods to authenticate. Headers are recommended for security.

  • Bearer Token Recommended: Send header Authorization: Bearer YOUR_API_KEY
  • Custom Header: Send header X-API-Key: YOUR_API_KEY
  • Query Parameter Legacy: Append ?api_key=YOUR_KEY to the URL.

Partial Updates New

You no longer need to send the full JSON object. Send only the fields you want to change.

Example: To update only your status to busy, send {"status": "busy"}. Your rates and stock remain unchanged.

Request Body (application/json)

json
{
  "status": "online",
  "buy_sets_csgo": 25,
  "sell_sets_csgo": 27,
  "buy_sets_hydra": 15,
  "sell_sets_hydra": 16,
  "buy_sets_tod": 1,
  "sell_sets_tod": 2,
  "stock_gems": 2550000,
  "stock_keys_hydra": 10,
  "stock_tickets_tod": 25,
  "stock_badge_appids": [730, 570],
  "other_rates": {
    "supported_crypto": ["BTC", "ETH", "LTC"]
  },
  "last_update_timestamp": 1795702976
  // ... include other fields to update ...
}

Field Descriptions

Send these fields in your JSON body only if you wish to modify them.

Field Type Description
General Info
statusStringCurrent bot status (online, offline, busy).
max_levelIntegerMax craftable set level (card bots).
descriptionStringOwner-written description shown on your bot page. Max 2000 characters, longer values are truncated. HTML tags are stripped; line breaks are kept, and a blank line starts a new paragraph.
last_update_timestampIntegerUnix timestamp (seconds) of the bot's last internal data update.
Card Set Rates / Event Holidays / Foil Bots
buy_sets_csgoInteger/DecimalSets given for 1 CS:GO key.
sell_sets_csgoInteger/DecimalSets required for 1 CS:GO key.
buy_sets_tf2Integer/DecimalSets given for 1 TF2 key.
sell_sets_tf2Integer/DecimalSets required for 1 TF2 key.
buy_sets_hydraInteger/DecimalSets given for 1 Hydra key.
sell_sets_hydraInteger/DecimalSets required for 1 Hydra key.
buy_sets_todInteger/DecimalSets given for 1 Tour of Duty Ticket.
sell_sets_todInteger/DecimalSets required for 1 Tour of Duty Ticket.
buy_gems_setInteger/DecimalGems given for 1 regular set.
sell_gems_setInteger/DecimalGems required for 1 regular set.
Gem Rates
buy_gems_key_csgoInteger/DecimalGems given for 1 CS:GO key.
sell_gems_key_csgoInteger/DecimalGems required for 1 CS:GO key.
buy_gems_key_tf2Integer/DecimalGems given for 1 TF2 key.
sell_gems_key_tf2Integer/DecimalGems required for 1 TF2 key.
buy_gems_key_hydraInteger/DecimalGems given for 1 Hydra key.
sell_gems_key_hydraInteger/DecimalGems required for 1 Hydra key.
buy_gems_key_todInteger/DecimalGems given for 1 Tour of Duty Ticket.
sell_gems_key_todInteger/DecimalGems required for 1 Tour of Duty Ticket.
Crypto Rates
buy_crypto_csgoInteger/DecimalCrypto given for 1 CS:GO key.
sell_crypto_csgoInteger/DecimalCrypto required for 1 CS:GO key.
buy_crypto_tf2Integer/DecimalCrypto given for 1 TF2 key.
sell_crypto_tf2Integer/DecimalCrypto required for 1 TF2 key.
buy_crypto_hydraInteger/DecimalCrypto given for 1 Hydra key.
sell_crypto_hydraInteger/DecimalCrypto required for 1 Hydra key.
buy_crypto_todInteger/DecimalCrypto given for 1 Tour of Duty Ticket.
sell_crypto_todInteger/DecimalCrypto required for 1 Tour of Duty Ticket.
buy_crypto_gemsInteger/DecimalGems given for X Crypto.
sell_crypto_gemsInteger/DecimalGems required for X Crypto.
other_ratesObject{"supported_crypto": ["BTC", "ETH", "LTC"]}
Badge Rates
buy_gems_badgeInteger/DecimalGems given for 1 common badge.
sell_gems_badgeInteger/DecimalGems required for 1 common badge.
rates_badgesObjectSpecific badge rates (Gems per Badge). Key = Badge ID, Value = "Buy/Sell" string. E.g., {"13": "150/120"}
Stock Levels
stock_setsIntegerTotal regular/foil sets in stock. Required field.
stock_unique_setsIntegerUnique regular sets in stock (count of distinct AppIDs).
stock_gemsIntegerTotal gems in stock. Required for Gem bots.
stock_keys_csgoIntegerCS:GO keys in stock.
stock_keys_tf2IntegerTF2 keys in stock.
stock_keys_hydraIntegerHydra keys in stock.
stock_tickets_todIntegerTour of Duty Tickets in stock.
stock_badgesObjectSets in stock per game. Key = AppID, Value = quantity. E.g., {"730": 100, "440": 50}
stock_badge_appidsArrayList of AppIDs the bot has sets for. E.g., [730, 570, 440]

Example Request (curl)

Using the secure Bearer Token method:

bash
curl -X POST "https://steamtradebots.com/api/v1/bot/update.php" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BOT_API_KEY_HERE" \
-d '{
  "status": "online",
  "buy_sets_hydra": 15,
  "sell_sets_hydra": 16,
  "stock_sets": 200,
  "stock_unique_sets": 15,
  "stock_badge_appids": [730, 440, 570],
  "stock_badges": {
    "730": 100,
    "440": 50,
    "570": 50
  },
  "last_update_timestamp": 1795702976
}'

Responses

200 { "success": true, "message": "Bot data updated." }
400 { "success": false, "message": "Invalid data..." }
401 { "success": false, "message": "Authentication failed. API key missing." }
429 { "success": false, "message": "Rate limit exceeded.", "errors": {"retry_after": 60} }
GET Get Bots (Supplier)

This Supplier endpoint provides a data feed of all public bots, filtered by category.

GET https://steamtradebots.com/api/v1/bot/get.php

Authentication Methods

Requires a Supplier API Key (Dashboard > Account). Three methods supported:

  • Bearer Token Recommended: Authorization: Bearer YOUR_SUPPLIER_KEY
  • Custom Header: X-API-Key: YOUR_SUPPLIER_KEY
  • Query Parameter Legacy: ?api_key=YOUR_SUPPLIER_KEY

Query Parameters

Parameter Required Description
categoriesYesComma-separated list. Allowed: card-bots, foil-bots, gem-bots, holidays-bots, crypto-bots.
api_keyNo**Required only if not sent via Headers.

Example Request (curl)

Fetching Card and Gem bots using secure Header Auth:

bash
curl -X GET "https://steamtradebots.com/api/v1/bot/get.php?categories=card-bots,gem-bots" \
-H "Authorization: Bearer YOUR_SUPPLIER_KEY_HERE"

Response Data

The structure of the bot object depends on the category requested.

card-bots & holidays-bots

json
{
  "steam_id": "76561198000000001",
  "name": "Card Trading Bot",
  "category_name": "Card Bots",
  "category_slug": "card-bots",
  "rate_buy_sets_csgo": "12.0",
  "rate_sell_sets_csgo": "14.0",
  "stock_gems": 500000,
  "stock_keys_csgo": 10,
  "stock_badges": {}
}

foil-bots

json
{
  "steam_id": "76561198000000002",
  "name": "Foil Card Bot",
  "rate_buy_sets_csgo": "1.0",
  "rate_sell_sets_csgo": "2.0",
  "stock_gems": 100000
}

gem-bots

json
{
  "steam_id": "76561198000000003",
  "name": "Gem Trader Bot",
  "stock_gems": 10000000,
  "stock_keys_csgo": 50,
  "stock_keys_tf2": 20
}

crypto-bots

json
{
  "steam_id": "76561198000000004",
  "name": "Crypto Trader Bot",
  "rate_buy_crypto_tf2": "1.6100",
  "rate_sell_crypto_tf2": "1.6300",
  "stock_keys_tf2": 1016,
  "other_rates": {
    "supported_crypto": ["BTC", "ETH"]
  }
}

Responses

200 Returns the data array with bot listings.
400 Missing categories or invalid parameters.
401 Missing API key.
403 Invalid key or expired subscription.
Code Examples

These examples use the secure Header Authentication method. The legacy URL parameter method is shown as comments.

PHP (cURL)

php
<?php
$botApiKey = 'YOUR_BOT_API_KEY_HERE';

// Option 1: Secure Header (Recommended)
$apiUrl = 'https://steamtradebots.com/api/v1/bot/update.php';
$headers = [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $botApiKey
];

// Option 2: Legacy URL Parameter
// $apiUrl = 'https://steamtradebots.com/api/v1/bot/update.php?api_key=' . $botApiKey;
// $headers = ['Content-Type: application/json'];

$data = [
    'status' => 'online',
    'stock_keys_csgo' => 15,
    'last_update_timestamp' => time()
];

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo "Status: $httpCode\n";
echo "Response: $response\n";
?>

Python (requests)

python
import requests
import time

bot_api_key = 'YOUR_BOT_API_KEY_HERE'

# Option 1: Secure Header (Recommended)
api_url = 'https://steamtradebots.com/api/v1/bot/update.php'
headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {bot_api_key}'
}

# Option 2: Legacy URL Parameter
# api_url = f'https://steamtradebots.com/api/v1/bot/update.php?api_key={bot_api_key}'
# headers = {'Content-Type': 'application/json'}

data = {
    'status': 'online',
    'stock_keys_csgo': 15,
    'last_update_timestamp': int(time.time())
}

try:
    response = requests.post(api_url, headers=headers, json=data, timeout=10)
    response.raise_for_status()
    print(f"Update Successful: {response.json()}")
except Exception as e:
    print(f"Error: {e}")

Website Directory API

For services listed in the website directory rather than as Steam bots. Push your stock, rates or listing counts so your entry shows live numbers instead of a fixed description.

Before you start

  1. 1 Add your site in Dashboard → My Websites. New to this? Read the step-by-step guide first.
  2. 2 Verify your domain with a file, a meta tag or a DNS TXT record. API keys are only issued after this.
  3. 3 Generate a Website API Key and push data with the endpoint below.

Verifying and pushing data are free. Being shown publicly costs 1 token per 30 days, with cheaper 6-month and 1-year terms. The API keeps accepting your data while a listing is unpaid or expired, and the response tells you with "public": false, so nothing breaks and renewing republishes instantly.

Which fields you may send depends on the category your listing is in. Rate limit: 20 requests per listing per 5 minutes.

POST Update Website Data
POST https://www.steamtradebots.com/api/v1/website/update.php

Authentication

Same three options as the bot endpoint. Header is recommended.

X-API-Key: stbw_your_key_here
Authorization: Bearer stbw_your_key_here
?api_key=stbw_your_key_here   # legacy

Behaviour

  • Partial by default. Send only what changed, everything else is kept.
  • null clears a field. Send "stock_gems": null to stop reporting it.
  • "replace": true makes the payload authoritative: anything absent is cleared.
  • Empty body is a ping. It records that your integration is alive and returns the fields your category accepts.
  • Unknown fields are rejected with a 422 listing what is accepted, rather than silently ignored.
  • Not reported is not zero. Omitting a field, or sending null, means "no answer" and renders nothing. Sending 0 or false is a real answer and is published.

Field types

  • int whole number, 0 or more. Where a field counts hours, 0 means instant.
  • decimal number, kept to 4 decimal places.
  • percent number between 0 and 100. Send 5 for 5%, not 0.05.
  • bool true or false. Strings work too: "yes", "no", "1", "0", "on", "off". Anything else is a 422. Omit it if the answer is "it depends".
  • list a JSON array, or one comma separated string. Up to 20 entries, 24 characters each.
  • map a JSON object of the keys listed with the field. Sent whole, not merged, and one unknown key rejects the request.
  • text plain text, trimmed to 60 characters, tags stripped.
  • Data older than 30 minutes is labelled as dated on your listing. Push at least every 20 minutes to keep the live badge.
  • A key belongs to one category. The fields it may push come from that category's profile, so moving your listing elsewhere revokes the key and returns 403 naming both categories. Generate a new key and check the field list before pushing again.

Fields: Level-Up Service level_up

FieldTypeDescription
price_per_level decimal ($) Price per level. Your cheapest per-level price, in USD.
max_level int Max level. Highest level you can take a fresh account to right now, from your current stock.
stock_levels int Levels in stock. How many levels you could deliver today across all customers.
stock_sets int Sets in stock. Total card sets you hold. Same meaning as a card bot stock number.
min_order int (levels) Minimum order. Smallest order you accept.
delivery_time text Typical delivery. Free text, e.g. "under 1 hour" or "2 to 6 hours".

Fields: Crypto Storefront crypto_store

FieldTypeDescription
payout_percent percent (%) Payout. What share of market value you pay out, 0 to 100.
rate_buy_tf2 decimal ($) Buy TF2 key. What you pay a seller for one TF2 key, in USD.
rate_sell_tf2 decimal ($) Sell TF2 key. What a buyer pays you for one TF2 key, in USD.
stock_keys_tf2 int TF2 keys in stock
stock_keys_csgo int CS keys in stock
stock_gems int Gems in stock
supported_crypto list Coins accepted. Comma separated, e.g. BTC, ETH, LTC, USDT.
min_order int (keys) Minimum order
payout_time text Payout time. Free text, e.g. "within 15 minutes".

Fields: Steam Directory directory

FieldTypeDescription
listings_total int Bots listed. Total bots or services in your directory. Left blank, it is summed from the breakdown below.
listings_by_category map Breakdown by bot category. How many of each type you list. Leave a row blank if you do not cover it. Keys: card-bots, foil-bots, gem-bots, crypto-bots, swap-bots, card-buying-bots, supplier-bots, holidays-bots, other-bots
active_since text Listing data since. Free text, e.g. "2021".

Fields: Skin Marketplaces skin_market

FieldTypeDescription
fee_sell_percent percent Seller fee. Commission you take when someone sells. The headline number buyers compare on.
payout_hours int (hours) Payout time. Typical hours from sale to money leaving your site. Enter 0 for instant.
items_listed int Items listed. Items for sale right now, not everything ever listed.
fee_buy_percent percent Buyer fee. Charged on top of the item price, if any. Leave blank if buyers pay no fee.
min_withdrawal decimal ($) Minimum withdrawal. Smallest balance a user can cash out.
payout_methods list Payout methods. How money actually leaves. e.g. PayPal, Bank transfer, BTC, Site balance.
games list Games supported. e.g. CS2, Dota 2, TF2, Rust.
trade_modes list How trading works. e.g. Instant sell, P2P listing, Auction. These are very different products.
kyc_required bool ID verification required. Yes if users must pass KYC to withdraw. Leave blank if it depends.

Fields: Steam Tools steam_tools

FieldTypeDescription
requires_login bool Steam sign-in. Yes if the tool needs a Steam login or API key to work. The first thing a cautious visitor checks.
free_to_use bool Free to use. Yes if the main features work without paying. Say so below if there is also a paid tier.
tool_types list What it does. e.g. Inventory value, Profile stats, Price history, Trade calculator, Badge planner.
games list Games covered. e.g. CS2, Dota 2, TF2, Rust. Leave blank if it covers all of Steam.
api_available bool Public API. Yes if other developers can query your data.
data_refresh text Data refreshed. Free text, e.g. "every 15 minutes" or "on request".

Fields: Steam Artwork steam_artwork

FieldTypeDescription
price_from decimal ($) From. Your cheapest finished piece, in USD. Not an average, or the column stops comparing like with like.
delivery_time text Delivery. Typical turnaround, e.g. "2-3 days" or "same day".
artwork_types list Makes. e.g. Artwork showcase, Avatar, Avatar frame, Profile background, Banner, Workshop item.
animated bool Animated art. Yes if you make animated avatars, frames or backgrounds. Priced well above static work, so buyers filter on it.
custom_commissions bool Custom commissions. Yes if you take bespoke briefs. No means you sell pre-made designs only.
revisions int Free revisions. How many rounds of changes are included in the price. 0 is a fine answer.
payment_methods list Payment. e.g. PayPal, Steam items, CS2 keys, Crypto.

Fields: Steam API Services steam_api

FieldTypeDescription
price_from decimal ($) From. Cheapest PAID plan per month, in USD. If you are free-only, leave this blank and tick Free tier below.
rate_limit text Rate limit. On the cheapest paid plan, e.g. "100 req/min" or "50k calls/month". Say which, a per-minute and a per-month cap are not comparable.
data_types list Data offered. e.g. Inventories, Item prices, Market history, Profiles, Trade offers, Float values.
free_tier bool Free tier. Yes if a developer can make real calls without paying. A trial that expires is not a free tier.
games list Games covered. e.g. CS2, Dota 2, TF2, Rust. Leave blank if it covers all of Steam.
auth_method text Authentication. How a developer authenticates, e.g. "API key" or "OAuth". Say if a Steam account is required.
response_formats list Formats. e.g. JSON, CSV, XML, WebSocket.

Example: level-up service

bash
curl -X POST https://www.steamtradebots.com/api/v1/website/update.php \
  -H "X-API-Key: stbw_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "max_level": 720,
        "stock_sets": 14300,
        "stock_levels": 4100,
        "price_per_level": 0.38,
        "min_order": 5,
        "delivery_time": "under 1 hour"
      }'

Level-up services: send stock, not a level

You can report max_level yourself, or send your raw badge stock and let us calculate it the same way the bot API does. A calculated level is worth more to a buyer than a claimed one.

It matters because the craft limit depends on the card type, and every craft is 100 XP:

FieldCard typeCrafts per badge
stock_badgesNormal trading cards5
stock_badges_foilFoil cards1
stock_badges_eventEvent / holiday / sale cardsUnlimited

Ten copies of one normal set are worth 5 crafts, ten copies of a foil set are worth 1, ten copies of an event set are worth 10. Report foil stock in the normal field and your max level comes out five times too high.

{
  "stock_badges":       { "570": 12, "440": 7, "730": 40 },
  "stock_badges_foil":  { "570": 3 },
  "stock_badges_event": { "1085660": 25 },
  "price_per_level": 0.42
}

// Keys are appids, values are how many complete sets you hold.
// max_level and stock_sets are calculated and overwrite anything you sent
// for them. The response returns the working under "computed_from_badges".

Example: directory counts

json
{
  "listings_by_category": {
    "card-bots": 42,
    "foil-bots": 12,
    "gem-bots": 9
  }
}

// listings_total is summed for you when you leave it out.

Response

{
  "success": true,
  "message": "Data updated.",
  "data": {
    "website": "LvlUp Bot",
    "profile": "level_up",
    "stored":    { "max_level": 720, "stock_sets": 14300 },
    "displayed": { "max_level": "720", "stock_sets": "14,300" },
    "public": true
  }
}

// "public": false means the listing is verified but not yet approved,
// so your data is stored but nobody can see it yet.