API Reference / Trade offers
Decline several trade offers
Route a decline of up to 50 incoming trade offers in one call. Each offer is routed to its account session or refused with a typed reason, independently. Routing is not execution, and each state change arrives through the trade offer feed. The daily trade action cap applies per account.
/ steam. v1. Steam/ BulkDeclineTradeOffersRequest body
application/jsonRequired
Request to decline several incoming trade offers in one call. Each offer is routed or refused independently.
offers?array<TradeOfferKey>The offers to decline, 1 to 50.
Show attributes
accountNamestringSteam account the offer belongs to.
offerIdstringThe trade offer's Steam id.
Response body
application/json
Success
results?array<BulkTradeOfferActionResult>One result per requested offer, in request order.
Show attributes
error?stringWhy the action was not routed. Unspecified when routed.
Value in"BULK_"BULK_"BULK_"BULK_"BULK_
offer?TradeOfferKeyThe offer this result is for.
Show attributes
accountNamestringSteam account the offer belongs to.
offerIdstringThe trade offer's Steam id.
routed?booleanTrue when the action was routed to the account's session. The state change arrives through the trade offer feed.
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
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
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/BulkDeclineTradeOffers" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"offers": [
{
"accountName": "trader_bot_01",
"offerId": "6483920184"
}
]
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/BulkDeclineTradeOffers", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"offers": [
{
"accountName": "trader_bot_01",
"offerId": "6483920184"
}
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"offers": [
{
"accountName": "trader_bot_01",
"offerId": "6483920184"
}
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/BulkDeclineTradeOffers", 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/BulkDeclineTradeOffers",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"offers": [
{
"accountName": "trader_bot_01",
"offerId": "6483920184"
}
]
},
)
data = res.json(){
"results": [
{
"offer": {
"accountName": "trader_bot_01",
"offerId": "6483920184"
},
"routed": true
}
]
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"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": "internal",
"message": "An internal server error occurred."
}