API Reference / Contracts
Check whether contracts still target items
Says for each contract and item whether the contract still targets the item, and if not why: the item left the contract's rules, the contract is paused, or the contract was deleted. Purchases and inventory pages read a page of items in one call. Includes deleted contracts, so an old purchase can say its contract is gone.
/ contracts. v1. Contracts/ GetIntentTargetingRequest body
application/jsonRequired
Request for whether contracts in the caller's workspace still target items, in one call.
keys?array<IntentKey>The contracts and items to answer for, at most 100.
Show attributes
contractId?stringOpaque 16-byte contract identifier.
Format"byte" base64
marketHashName?stringExact market_hash_name of the item.
Response body
application/json
Success
targetings?array<IntentTargeting>One entry per key in request order. A key whose contract is not in the caller's workspace has no entry.
Show attributes
key?IntentKeyThe contract and item this answers for.
Show attributes
contractId?stringOpaque 16-byte contract identifier.
Format"byte" base64
marketHashName?stringExact market_hash_name of the item.
maxBuyPriceCents?stringThe contract's maximum price for the item now, in US cents: the highest of its current active intents for the item. Set only while targeted.
Format"int64"
reason?stringWhy the item is not targeted. Unset while targeted, and while a contract is still being evaluated for the first time after activation.
Value in"INTENT_"INTENT_"INTENT_
targeted?booleanTrue when the contract has a current active intent for the item.
untargetedAt?stringWhen the item stopped being targeted, when that is recorded: the last evaluation that removed it, or the contract's deletion. Unset for a paused contract and when no removal was recorded.
Format"date-time"
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/contracts.v1.Contracts/GetIntentTargeting" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keys": [
{
"contractId": "EBESExQVFhcYGRobHB0eHw==",
"marketHashName": "AK-47 | Redline (Field-Tested)"
}
]
}'const res = await fetch("https://api.goldmine.to/contracts.v1.Contracts/GetIntentTargeting", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"keys": [
{
"contractId": "EBESExQVFhcYGRobHB0eHw==",
"marketHashName": "AK-47 | Redline (Field-Tested)"
}
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"keys": [
{
"contractId": "EBESExQVFhcYGRobHB0eHw==",
"marketHashName": "AK-47 | Redline (Field-Tested)"
}
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/contracts.v1.Contracts/GetIntentTargeting", 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/contracts.v1.Contracts/GetIntentTargeting",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"keys": [
{
"contractId": "EBESExQVFhcYGRobHB0eHw==",
"marketHashName": "AK-47 | Redline (Field-Tested)"
}
]
},
)
data = res.json(){
"targetings": [
{
"key": {
"contractId": "EBESExQVFhcYGRobHB0eHw==",
"marketHashName": "AK-47 | Redline (Field-Tested)"
},
"targeted": false,
"reason": "INTENT_UNTARGETED_REASON_ITEM_LEFT_CONTRACT",
"untargetedAt": "2026-11-02T10:00:00Z"
}
]
}{
"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."
}