API Reference / Trade offers
Send a trade offer
Create and send a new trade offer from the account to a partner using the partner's trade URL token. A success response means the send was routed to the account's session, not that Steam has created the offer: the response's request_id correlates the TradeOfferSendOutcomeCreated event that reports Steam's answer, including its reason for a refusal, and the created offer id and whether a mobile confirmation is pending also surface via the trade-offer feed, or ListTradeOffers for reconciliation.
/ steam. v1. Steam/ SendTradeOfferRequest body
application/jsonRequired
Request to create and send a new trade offer from one of the workspace's accounts to a partner identified by their trade URL token.
accountNamestringThe sending Steam account - the seller delivering the item.
itemsToGive?array<TradeItem>Assets the sending account offers.
Show attributes
amount?stringStack size for a stackable item. 1 for a non-stackable item.
Format"int64"
appId?integerSteam app id the item belongs to.
Format"int32"
assetId?stringThe item's Steam asset id.
classId?stringSteam class id identifying the item's definition.
contextId?stringSteam inventory context id the item belongs to.
floatValue?numberThe item's wear, decoded offline from the inspect URI's encoded payload. Unset when unknown: no inspect URI, or a legacy link that carries no item data.
Format"double"
iconUrl?stringValve economy icon hash for this item instance. Empty when the observed offer has no instance image.
inspectUri?stringThe validated CS2 inspect URI for this exact asset, taken from the sending account's own inventory. Empty when the asset is not one of the workspace account's items or Steam gave no inspect action.
instanceId?stringSteam instance id, distinguishing item instances that share a class id.
marketHashName?stringThe item's market hash name.
paintSeed?integerThe item's pattern index (0 to 1000), decoded offline from the inspect URI's encoded payload. Unset when unknown.
Format"int32"
itemsToReceive?array<TradeItem>Assets the sending account requests in return. Empty for a marketplace sale delivery. Carried for a general two-sided send.
Show attributes
amount?stringStack size for a stackable item. 1 for a non-stackable item.
Format"int64"
appId?integerSteam app id the item belongs to.
Format"int32"
assetId?stringThe item's Steam asset id.
classId?stringSteam class id identifying the item's definition.
contextId?stringSteam inventory context id the item belongs to.
floatValue?numberThe item's wear, decoded offline from the inspect URI's encoded payload. Unset when unknown: no inspect URI, or a legacy link that carries no item data.
Format"double"
iconUrl?stringValve economy icon hash for this item instance. Empty when the observed offer has no instance image.
inspectUri?stringThe validated CS2 inspect URI for this exact asset, taken from the sending account's own inventory. Empty when the asset is not one of the workspace account's items or Steam gave no inspect action.
instanceId?stringSteam instance id, distinguishing item instances that share a class id.
marketHashName?stringThe item's market hash name.
paintSeed?integerThe item's pattern index (0 to 1000), decoded offline from the inspect URI's encoded payload. Unset when unknown.
Format"int32"
message?stringOptional message attached to the offer.
origin?TradeOfferOriginWhat the offer is for, recorded once Steam creates the offer so it reads as handled automatically. Absent records a manual trade.
Show attributes
contractId?stringThe buying or selling contract behind the purchase or sale, when known.
Format"byte" base64
handledAutomatically?booleanWhether the platform itself accepted or sent the offer. False for a manual trade and for an offer classified after the fact.
kind?stringWhat the offer is for. MANUAL for a trade the platform did not tie to a purchase or a sale.
Value in"TRADE_"TRADE_"TRADE_
purchaseId?stringThe purchase the offer delivers. Set only for PURCHASE_DELIVERY.
Format"byte" base64
saleId?stringThe sale the offer delivers. Set only for SALE_DELIVERY.
Format"byte" base64
setAt?stringWhen the origin was recorded. Unset for a manual trade.
Format"date-time"
partnerSteamIdstringThe recipient's 64-bit SteamID.
requestKey?stringThe caller's own id for this send, unique per workspace, such as a sale's delivery id. With a key the send is stored before it is routed and at most one offer is ever sent for it: the same key asked again answers the same send, a lost answer is settled by reading Steam and never by sending again, and steam confirms the offer itself. Asking again with the same key and different contents is refused. Empty: the send is routed once and not stored.
sendBystringWith request_key: the latest time the send may begin, such as the sale's own deadline to send. A keyed send not begun by then is ended unsent with SEND_BY_PASSED and never sent later. Required with request_key. Ignored without it.
Format"date-time"
tradeTokenstringThe recipient's trade-URL token. Required unless the recipient is a Steam friend of the sending account. When it is empty for a non-friend the call fails with TRADE_TOKEN_REQUIRED. Unrelated to Steam authentication access tokens.
Response body
application/json
Success
requestId?stringServer-generated id of the routed send. The TradeOfferSendOutcomeCreated event for this send carries the same id. For a keyed send it is the stored send's id, the same on every call with that key.
application/json
The request was malformed, such as a missing required field or an unparseable cursor. The request cannot be carried out in the current system state.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The requested resource does not exist in this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/SendTradeOffer" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountName": "trader_bot_01",
"partnerSteamId": "76561198044443322",
"tradeToken": "aBcD1234",
"itemsToGive": [
{
"assetId": "31795888228",
"classId": "310776898",
"instanceId": "302028390",
"marketHashName": "AK-47 | Redline (Field-Tested)",
"appId": 730,
"contextId": "2",
"amount": "1"
}
],
"message": "Delivery for your purchase"
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/SendTradeOffer", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"accountName": "trader_bot_01",
"partnerSteamId": "76561198044443322",
"tradeToken": "aBcD1234",
"itemsToGive": [
{
"assetId": "31795888228",
"classId": "310776898",
"instanceId": "302028390",
"marketHashName": "AK-47 | Redline (Field-Tested)",
"appId": 730,
"contextId": "2",
"amount": "1"
}
],
"message": "Delivery for your purchase"
}),
});
const data = await res.json();body := strings.NewReader(`{
"accountName": "trader_bot_01",
"partnerSteamId": "76561198044443322",
"tradeToken": "aBcD1234",
"itemsToGive": [
{
"assetId": "31795888228",
"classId": "310776898",
"instanceId": "302028390",
"marketHashName": "AK-47 | Redline (Field-Tested)",
"appId": 730,
"contextId": "2",
"amount": "1"
}
],
"message": "Delivery for your purchase"
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/SendTradeOffer", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/SendTradeOffer",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"accountName": "trader_bot_01",
"partnerSteamId": "76561198044443322",
"tradeToken": "aBcD1234",
"itemsToGive": [
{
"assetId": "31795888228",
"classId": "310776898",
"instanceId": "302028390",
"marketHashName": "AK-47 | Redline (Field-Tested)",
"appId": 730,
"contextId": "2",
"amount": "1"
}
],
"message": "Delivery for your purchase"
},
)
data = res.json(){
"requestId": "0193f1d2-6b7a-7c3e-9a10-3f5e2b8c4d21"
}{
"code": "failed_precondition",
"message": "The request cannot be carried out in the current system state."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "not_found",
"message": "The requested resource does not exist in this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}