{"openapi":"3.1.0","info":{"title":"TradeRust Business API","description":"Liquidity, payments and user records for Rust skin sites. Money is integer mills (1 USD = 1000). Human docs: https://traderust.com/docs/business","version":"2026-11"},"servers":[{"url":"https://traderust.com"}],"paths":{"/api/biz/account":{"get":{"summary":"Balance, limit and what's left today","operationId":"get_api_biz_account","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"business":{"id":52,"public_id":"b_3f9a1c2d7e4b","name":"RustDrop","website":"https://rustdrop.gg","status":"active","webhook_url":"https://rustdrop.gg/hooks/traderust","ip_allowlist":["203.0.113.7/32"],"domains":["rustdrop.gg"],"daily_limit_mills":5000000,"raise":null,"created_at":"2026-11-09T14:03:11.204Z"},"balance":{"available_mills":1250000,"locked_mills":0,"withdrawable_mills":1250000},"outflow_24h_mills":84120,"outflow_left_mills":4915880}}}}},"description":"outflow_24h_mills is the value that left through the API in the last 24 hours (skins bought for delivery + crypto paid out); outflow_left_mills is what your daily limit still allows. raise shows a pending limit increase.","tags":["Account"],"security":[{"businessKey":[]}]}},"/api/biz/market":{"get":{"summary":"Every skin's best bid and ask","description":"bid_mills is what one sells for instantly (the best buy order whose owner can pay), ask_mills what one costs (the best sell order); the qty fields say how many are behind each. Cached 10 seconds - quote a basket for exact totals.","operationId":"get_api_biz_market","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"updated_at":"2026-11-09T14:03:11.204Z","unit":"mills","items":[{"item_id":2457,"market_hash_name":"Hellforged Vest","name":"Hellforged Vest","icon":"https://…","category":"clothing","bid_mills":891,"bid_qty":19,"ask_mills":941,"ask_qty":23}]}}}}},"tags":["Prices & inventories"],"security":[{"businessKey":[]}]}},"/api/biz/inventory/{steamid}":{"get":{"summary":"A Steam user's skins, with instant-sell prices","operationId":"get_api_biz_inventory_steamid","parameters":[{"name":"steamid","in":"path","required":true,"schema":{"type":"string","title":"Steamid"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"steamid":"76561198000000042","items":[{"id":2457,"name":"Hellforged Vest","icon":"https://…","category":"clothing","fair":905,"weekly_sales":79,"ask":941,"ask_qty":23,"bid":891,"bid_qty":19,"buy_shown":941,"sell_shown":891,"market_hash_name":"Hellforged Vest","qty":2,"instant_sell_mills":891,"instant_sell_depth":19}],"untracked":3,"total_instant_sell_mills":1782,"fetched_at":1762697000,"refreshed":false,"retry_in":0}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"The tradable Rust skins in any public Steam inventory, as TradeRust items: qty, instant_sell_mills (one, right now) and instant_sell_depth (how many the book would buy at that price). untracked counts skins we don't trade. 60/minute and 20,000/day per business. A private inventory is 502 inventory_unavailable.","tags":["Prices & inventories"],"security":[{"businessKey":[]}]}},"/api/biz/users/{user_ref}/inventory":{"get":{"summary":"The same, for a user in your directory","operationId":"get_api_biz_users_user_ref_inventory","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"user_ref":"u_381","steamid":"76561198000000042","items":[{"id":2457,"name":"Hellforged Vest","icon":"https://…","category":"clothing","fair":905,"weekly_sales":79,"ask":941,"ask_qty":23,"bid":891,"bid_qty":19,"buy_shown":941,"sell_shown":891,"market_hash_name":"Hellforged Vest","qty":2,"instant_sell_mills":891,"instant_sell_depth":19}],"untracked":3,"total_instant_sell_mills":1782,"fetched_at":1762697000,"refreshed":false,"retry_in":0}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Prices & inventories"],"security":[{"businessKey":[]}]}},"/api/biz/quote":{"post":{"summary":"Exact total for a basket, right now","operationId":"post_api_biz_quote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"side":"sell","lines":[{"item_id":2457,"name":"Hellforged Vest","qty":2,"fillable":2,"total_mills":1782,"unit_mills":891,"best_mills":891,"worst_mills":891}],"total_mills":1782,"fillable":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"side sell: what your user's skins would sell for into the bids. side buy: what buying them from the asks costs. fillable false means the book can't take/give all of it. Read-only - send the total you show your user as min_net_mills / max_cost_mills.","tags":["Prices & inventories"],"security":[{"businessKey":[]}]}},"/api/biz/sell":{"post":{"summary":"Buy skins from your user","operationId":"post_api_biz_sell","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"sale-1042","id":17,"side":"sell","status":"offer_sent","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":null,"fills":null,"trade_offer":{"id":311,"status":"sent","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null},"created":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Your user sells skins from their Steam inventory. We send THEM a Steam trade offer for the skins; when they accept, the skins sell into the book at min_net_mills or better and the money is added to your balance (sell.completed). If the book can't pay min_net_mills right now the order isn't created (409 price_changed, with a fresh quote). If prices fall while the offer is open: on_fail \"return\" (default) sends the skins back, \"hold\" keeps them in your vault. Identify the user by user_ref (from your directory) or steamid + trade_url (saved to the directory if you also send user_ref). 201 = created; 200 with created false = this ref already existed (safe retry).","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/buy":{"post":{"summary":"Sell skins to your user","operationId":"post_api_biz_buy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"order-5521","id":18,"side":"buy","status":"offer_sent","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":1}],"max_cost_mills":1000,"paid_mills":941,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"buy","qty":1,"total":941,"avg_shown":941}],"trade_offer":{"id":312,"status":"sent","steam_offer_id":"7712345701","url":"https://steamcommunity.com/tradeoffer/7712345701/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z"},"created":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Buys from the cheapest sell orders - fill-or-kill, paid from your balance, never more than max_cost_mills (else 409 price_changed) - and sends them to your user in a Steam trade offer. Counts toward your daily limit. If they decline or let it expire (buy.delivery_failed) the skins are back in your vault: retry, sell them, or leave them.","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/orders":{"get":{"summary":"Your orders","operationId":"get_api_biz_orders","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"side","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Side"}},{"name":"user_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Ref"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"orders":[{"ref":"sale-1042","id":17,"side":"sell","status":"completed","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":1782,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"sell","qty":2,"total":1782,"avg_shown":891}],"trade_offer":{"id":311,"status":"completed","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null}],"next":null}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/orders/{ref}":{"get":{"summary":"One order","operationId":"get_api_biz_orders_ref","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"sale-1042","id":17,"side":"sell","status":"completed","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":1782,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"sell","qty":2,"total":1782,"avg_shown":891}],"trade_offer":{"id":311,"status":"completed","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/orders/{ref}/cancel":{"post":{"summary":"Cancel the open Steam offer","operationId":"post_api_biz_orders_ref_cancel","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"sale-1042","id":17,"side":"sell","status":"cancelled","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":null,"fills":null,"trade_offer":{"id":311,"status":"sent","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Asks Steam to cancel. The outcome arrives as an event: a user who accepted a moment before still completes (Steam's word is final). 409 not_cancellable once the offer has finished.","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/orders/{ref}/retry":{"post":{"summary":"Deliver a failed buy again","operationId":"post_api_biz_orders_ref_retry","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TradeUrlOpt"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"order-5521","id":18,"side":"buy","status":"offer_sent","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":1}],"max_cost_mills":1000,"paid_mills":941,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"buy","qty":1,"total":941,"avg_shown":941}],"trade_offer":{"id":312,"status":"sent","steam_offer_id":"7712345701","url":"https://steamcommunity.com/tradeoffer/7712345701/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"For a buy in delivery_failed. Optionally send a new trade_url for the same Steam account.","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/orders/{ref}/return":{"post":{"summary":"Send held skins back to your user","operationId":"post_api_biz_orders_ref_return","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TradeUrlOpt"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"order":{"ref":"sale-1042","id":17,"side":"sell","status":"returning","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":null,"fills":null,"trade_offer":{"id":311,"status":"sent","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"For a sell in held (on_fail hold, or a return that failed).","tags":["Skins orders"],"security":[{"businessKey":[]}]}},"/api/biz/users/{user_ref}":{"put":{"summary":"Add or update a user","operationId":"put_api_biz_users_user_ref","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"user":{"user_ref":"u_381","steamid":"76561198000000042","trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=39734314&token=AbCd1234","name":"rustlord","avatar":"https://avatars.steamstatic.com/…_medium.jpg","profile":{"persona":"rustlord","profile_url":"https://steamcommunity.com/profiles/76561198000000042","custom_url":null,"avatar":"https://avatars.steamstatic.com/…_medium.jpg","avatar_full":"https://avatars.steamstatic.com/…_full.jpg","avatar_small":"https://avatars.steamstatic.com/….jpg","visibility":"public","limited_account":false,"vac_banned":false,"trade_ban":"None","member_since":"March 3, 2015","location":null,"online_state":"offline"},"profile_fetched_at":"2026-11-09T14:03:11.204Z","metadata":{"tier":"gold"},"connected_at":"2026-11-09T14:03:11.204Z","created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","last_seen_at":"2026-11-09T14:03:11.204Z"},"created":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"user_ref is your own id for them (1-64 of A-Z a-z 0-9 _ . : @ -). The trade URL must belong to the steamid. A new steamid clears the old trade URL and profile. metadata is yours (JSON object, up to 4096 bytes). We fetch their public Steam profile in the background and refresh it weekly.","tags":["Your users"],"security":[{"businessKey":[]}]},"get":{"summary":"One user","operationId":"get_api_biz_users_user_ref","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"user":{"user_ref":"u_381","steamid":"76561198000000042","trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=39734314&token=AbCd1234","name":"rustlord","avatar":"https://avatars.steamstatic.com/…_medium.jpg","profile":{"persona":"rustlord","profile_url":"https://steamcommunity.com/profiles/76561198000000042","custom_url":null,"avatar":"https://avatars.steamstatic.com/…_medium.jpg","avatar_full":"https://avatars.steamstatic.com/…_full.jpg","avatar_small":"https://avatars.steamstatic.com/….jpg","visibility":"public","limited_account":false,"vac_banned":false,"trade_ban":"None","member_since":"March 3, 2015","location":null,"online_state":"offline"},"profile_fetched_at":"2026-11-09T14:03:11.204Z","metadata":{"tier":"gold"},"connected_at":"2026-11-09T14:03:11.204Z","created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","last_seen_at":"2026-11-09T14:03:11.204Z"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Your users"],"security":[{"businessKey":[]}]},"delete":{"summary":"Erase a user","operationId":"delete_api_biz_users_user_ref","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"ok":true,"erased":"u_381"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Wipes their steamid, trade URL, profile and metadata (e.g. a GDPR request). Their orders and payments stay, under user_ref only - you need them for your books.","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/users":{"get":{"summary":"Your users","operationId":"get_api_biz_users","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"users":[{"user_ref":"u_381","steamid":"76561198000000042","trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=39734314&token=AbCd1234","name":"rustlord","avatar":"https://avatars.steamstatic.com/…_medium.jpg","profile":{"persona":"rustlord","profile_url":"https://steamcommunity.com/profiles/76561198000000042","custom_url":null,"avatar":"https://avatars.steamstatic.com/…_medium.jpg","avatar_full":"https://avatars.steamstatic.com/…_full.jpg","avatar_small":"https://avatars.steamstatic.com/….jpg","visibility":"public","limited_account":false,"vac_banned":false,"trade_ban":"None","member_since":"March 3, 2015","location":null,"online_state":"offline"},"profile_fetched_at":"2026-11-09T14:03:11.204Z","metadata":{"tier":"gold"},"connected_at":"2026-11-09T14:03:11.204Z","created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","last_seen_at":"2026-11-09T14:03:11.204Z"}],"total":1,"next":null}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/users/export":{"get":{"summary":"Export the directory","operationId":"get_api_biz_users_export","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"users":[{"user_ref":"u_381","steamid":"76561198000000042","trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=39734314&token=AbCd1234","name":"rustlord","avatar":"https://avatars.steamstatic.com/…_medium.jpg","profile":{"persona":"rustlord","profile_url":"https://steamcommunity.com/profiles/76561198000000042","custom_url":null,"avatar":"https://avatars.steamstatic.com/…_medium.jpg","avatar_full":"https://avatars.steamstatic.com/…_full.jpg","avatar_small":"https://avatars.steamstatic.com/….jpg","visibility":"public","limited_account":false,"vac_banned":false,"trade_ban":"None","member_since":"March 3, 2015","location":null,"online_state":"offline"},"profile_fetched_at":"2026-11-09T14:03:11.204Z","metadata":{"tier":"gold"},"connected_at":"2026-11-09T14:03:11.204Z","created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","last_seen_at":"2026-11-09T14:03:11.204Z"}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/users/{user_ref}/refresh":{"post":{"summary":"Re-read their Steam profile now","operationId":"post_api_biz_users_user_ref_refresh","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"user":{"user_ref":"u_381","steamid":"76561198000000042","trade_url":"https://steamcommunity.com/tradeoffer/new/?partner=39734314&token=AbCd1234","name":"rustlord","avatar":"https://avatars.steamstatic.com/…_medium.jpg","profile":{"persona":"rustlord","profile_url":"https://steamcommunity.com/profiles/76561198000000042","custom_url":null,"avatar":"https://avatars.steamstatic.com/…_medium.jpg","avatar_full":"https://avatars.steamstatic.com/…_full.jpg","avatar_small":"https://avatars.steamstatic.com/….jpg","visibility":"public","limited_account":false,"vac_banned":false,"trade_ban":"None","member_since":"March 3, 2015","location":null,"online_state":"offline"},"profile_fetched_at":"2026-11-09T14:03:11.204Z","metadata":{"tier":"gold"},"connected_at":"2026-11-09T14:03:11.204Z","created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","last_seen_at":"2026-11-09T14:03:11.204Z"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"At most once per 10 minutes per user (otherwise you get the stored one back).","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/users/{user_ref}/history":{"get":{"summary":"Everything a user did","operationId":"get_api_biz_users_user_ref_history","parameters":[{"name":"user_ref","in":"path","required":true,"schema":{"type":"string","title":"User Ref"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"user_ref":"u_381","totals":{"sold_mills":1782,"bought_mills":941,"deposited_mills":25000,"withdrawn_mills":0,"net_mills":25841},"orders":[{"ref":"sale-1042","id":17,"side":"sell","status":"completed","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":1782,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"sell","qty":2,"total":1782,"avg_shown":891}],"trade_offer":{"id":311,"status":"completed","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null}],"crypto":[{"id":904,"direction":"deposit","user_ref":"u_381","coin":"usdtsol","status":"finished","address":"7Xf3…q9Z","extra_id":null,"amount_crypto":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","credited_mills":25000,"paid_crypto":"25.01"}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Their orders and crypto, newest first, with totals: net_mills = sold + deposited - bought - withdrawn.","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/connect-link":{"post":{"summary":"A Hosted Connect link for a user","operationId":"post_api_biz_connect-link","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"url":"https://traderust.com/connect?b=b_3f9a1c2d7e4b&user_ref=u_381&return=https%3A%2F%2Frustdrop.gg%2F…&ts=1762697000&sig=9c1e…","expires_at":"2026-11-09T14:33:20Z"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Send your user to url (valid 30 minutes). They sign in with Steam and give their trade URL on TradeRust, then come back to return_url - which must be https on one of your domains - with tr_user_ref, tr_steamid, tr_ts and tr_sig. You can also build links yourself (see Hosted Connect).","tags":["Your users"],"security":[{"businessKey":[]}]}},"/api/biz/crypto/coins":{"get":{"summary":"Coins, fees and minimums","operationId":"get_api_biz_crypto_coins","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"coins":[{"coin":"usdtsol","name":"USDT on Solana","network_fee_mills":260,"min_deposit_usd":5.0}],"withdraw_fee_percent":2.0,"min_withdraw_mills":5000}}}}},"description":"network_fee_mills is what sending that coin costs (passed on at cost, refreshed hourly). min_deposit_usd is the smallest deposit our payment provider accepts for the coin right now - smaller ones aren't credited.","tags":["Crypto"],"security":[{"businessKey":[]}]}},"/api/biz/crypto/address":{"post":{"summary":"A deposit address for a user","operationId":"post_api_biz_crypto_address","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"address":{"user_ref":"u_381","coin":"usdtsol","address":"7Xf3…q9Z","extra_id":null,"min_deposit_usd":5.0,"created_at":"2026-11-09T14:03:11.204Z"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Permanent: the same user_ref + coin always gets the same address, and every deposit to it - any amount over the minimum, any number of times - is credited to your balance and reported as crypto.deposit with the user_ref.","tags":["Crypto"],"security":[{"businessKey":[]}]}},"/api/biz/crypto/withdraw":{"post":{"summary":"Pay a user out in crypto","operationId":"post_api_biz_crypto_withdraw","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"withdrawal":{"id":905,"direction":"withdraw","user_ref":"u_381","coin":"usdtsol","status":"queued","address":"9Qm1…Lk2","extra_id":null,"amount_crypto":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","ref":"payout-77","debited_mills":50000,"fee_mills":1260,"payout_mills":48740,"tx_hash":null},"created":true}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Debits usd_mills from your balance now and sends it within seconds - no cancel window. The fee (2% + the coin's network fee) comes out of it: payout_mills is what arrives. Idempotent by ref. Counts toward your daily limit. Events: crypto.withdraw_sent, then crypto.withdraw_finished (with tx_hash) or crypto.withdraw_failed (refunded in full).","tags":["Crypto"],"security":[{"businessKey":[]}]}},"/api/biz/crypto/withdrawals/{ref}":{"get":{"summary":"One payout","operationId":"get_api_biz_crypto_withdrawals_ref","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"withdrawal":{"id":905,"direction":"withdraw","user_ref":"u_381","coin":"usdtsol","status":"finished","address":"9Qm1…Lk2","extra_id":null,"amount_crypto":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","ref":"payout-77","debited_mills":50000,"fee_mills":1260,"payout_mills":48740,"tx_hash":"4Nc2…"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Crypto"],"security":[{"businessKey":[]}]}},"/api/biz/crypto/transfers":{"get":{"summary":"Deposits and payouts","operationId":"get_api_biz_crypto_transfers","parameters":[{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"user_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Ref"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"transfers":[{"id":904,"direction":"deposit","user_ref":"u_381","coin":"usdtsol","status":"finished","address":"7Xf3…q9Z","extra_id":null,"amount_crypto":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","credited_mills":25000,"paid_crypto":"25.01"},{"id":905,"direction":"withdraw","user_ref":"u_381","coin":"usdtsol","status":"queued","address":"9Qm1…Lk2","extra_id":null,"amount_crypto":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","ref":"payout-77","debited_mills":50000,"fee_mills":1260,"payout_mills":48740,"tx_hash":null}],"next":null}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"","tags":["Crypto"],"security":[{"businessKey":[]}]}},"/api/biz/events":{"get":{"summary":"The event feed","operationId":"get_api_biz_events","parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"events":[{"id":1201,"type":"sell.completed","created_at":"2026-11-09T14:03:11.204Z","data":{"ref":"sale-1042","id":17,"side":"sell","status":"completed","user_ref":"u_381","steamid":"76561198000000042","items":[{"item_id":2457,"name":"Hellforged Vest","market_hash_name":"Hellforged Vest","icon":"https://files.facepunch.com/rust/icons/inventory/rust/70010_small.png","qty":2}],"min_net_mills":1760,"received_mills":1782,"fills":[{"item_id":2457,"name":"Hellforged Vest","side":"sell","qty":2,"total":1782,"avg_shown":891}],"trade_offer":{"id":311,"status":"completed","steam_offer_id":"7712345678","url":"https://steamcommunity.com/tradeoffer/7712345678/","expires_at":"2026-11-09T14:13:11.204Z","reason":null},"reason":null,"created_at":"2026-11-09T14:03:11.204Z","updated_at":"2026-11-09T14:03:11.204Z","on_fail":"return","return_offer":null},"delivery":{"delivered_at":"2026-11-09T14:03:11.204Z","attempts":1,"last_error":null,"next_attempt_at":null}}],"next":null}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"description":"Every event we've sent (or tried to send) you, with its delivery state. Poll after=<last id you processed> if you can't receive webhooks, or to catch up after downtime.","tags":["Events & webhooks"],"security":[{"businessKey":[]}]}},"/api/biz/webhook/test":{"post":{"summary":"Send a test event now","operationId":"post_api_biz_webhook_test","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"event_id":1202,"ok":true,"status":200,"error":null,"ms":143}}}}},"description":"Queues a test.ping and delivers it immediately; the result is what your server answered.","tags":["Events & webhooks"],"security":[{"businessKey":[]}]}}},"components":{"schemas":{"AddressIn":{"properties":{"user_ref":{"type":"string","maxLength":64,"title":"User Ref"},"coin":{"type":"string","maxLength":16,"title":"Coin"}},"type":"object","required":["user_ref","coin"],"title":"AddressIn"},"BuyIn":{"properties":{"ref":{"type":"string","maxLength":64,"title":"Ref"},"user_ref":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"User Ref"},"steamid":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Steamid"},"trade_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trade Url"},"items":{"items":{},"type":"array","title":"Items"},"max_cost_mills":{"type":"integer","exclusiveMinimum":0.0,"title":"Max Cost Mills"}},"type":"object","required":["ref","items","max_cost_mills"],"title":"BuyIn"},"ConnectLinkIn":{"properties":{"user_ref":{"type":"string","maxLength":64,"title":"User Ref"},"return_url":{"type":"string","maxLength":500,"title":"Return Url"}},"type":"object","required":["user_ref","return_url"],"title":"ConnectLinkIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"QuoteIn":{"properties":{"side":{"type":"string","pattern":"^(sell|buy)$","title":"Side"},"items":{"items":{},"type":"array","title":"Items"}},"type":"object","required":["side","items"],"title":"QuoteIn"},"SellIn":{"properties":{"ref":{"type":"string","maxLength":64,"title":"Ref"},"user_ref":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"User Ref"},"steamid":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Steamid"},"trade_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trade Url"},"items":{"items":{},"type":"array","title":"Items"},"min_net_mills":{"type":"integer","minimum":0.0,"title":"Min Net Mills"},"on_fail":{"type":"string","title":"On Fail","default":"return"}},"type":"object","required":["ref","items","min_net_mills"],"title":"SellIn"},"TradeUrlOpt":{"properties":{"trade_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trade Url"}},"type":"object","title":"TradeUrlOpt"},"UserIn":{"properties":{"steamid":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Steamid"},"trade_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trade Url"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"UserIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WithdrawIn":{"properties":{"ref":{"type":"string","maxLength":64,"title":"Ref"},"user_ref":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"User Ref"},"coin":{"type":"string","maxLength":16,"title":"Coin"},"address":{"type":"string","maxLength":128,"title":"Address"},"extra_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Extra Id"},"usd_mills":{"type":"integer","exclusiveMinimum":0.0,"title":"Usd Mills"}},"type":"object","required":["ref","coin","address","usd_mills"],"title":"WithdrawIn"}},"securitySchemes":{"businessKey":{"type":"http","scheme":"bearer","bearerFormat":"trk_…","description":"A business account's key with the business scope (Business dashboard → Settings)."}}}}