API Reference / Trade offers
Find trade offers by part of their id
Returns at most 3 trade offers in the workspace whose record id contains the given hex fragment, ids ending in the fragment first, then newest first, each with the account name and Steam offer id its page needs.
/ steam. v1. Steam/ GetTradeOfferReferencesByIDFragmentRequest body
application/jsonRequired
Request for the trade offers in the caller's workspace whose record id contains a hex fragment.
idFragment?string4 to 32 hexadecimal characters, case-insensitive, dashes ignored. Anything else is rejected with invalid_argument.
Response body
application/json
Success
tradeOffers?array<TradeOfferReference>Ids ending in the fragment first, then newest first.
Show attributes
accountName?stringThe workspace account the offer belongs to, the other half of the route key.
id?stringThe record's full 16-byte id, TradeOffer.id.
Format"byte" base64
itemCount?integerItems on both sides, so a label can say how many more there are.
Format"int32"
marketHashName?stringThe first item given, else the first item received, for the label. Empty for an offer with no items.
offerId?stringSteam's offer id, half of the trade page's route key.
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/GetTradeOfferReferencesByIDFragment" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"idFragment": "example"
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/GetTradeOfferReferencesByIDFragment", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"idFragment": "example"
}),
});
const data = await res.json();body := strings.NewReader(`{
"idFragment": "example"
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/GetTradeOfferReferencesByIDFragment", 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/GetTradeOfferReferencesByIDFragment",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"idFragment": "example"
},
)
data = res.json(){
"tradeOffers": [
{
"accountName": "flip_eu_02",
"id": "AY86PB0ufwCKGyw9Tl9gcQ==",
"itemCount": 3,
"marketHashName": "AK-47 | Redline (Field-Tested)",
"offerId": "6512301874"
}
]
}{
"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."
}