API Reference / Contracts
Get a contract
One contract by its id.
/ v1/ contracts/ {id}Path parameters
idstringThe id from a list answer.
Response body
application/json
The answer.
created_atstringWhen it was created.
Format"date-time"
description?stringThe contract's description.
evaluated_at?stringWhen its targets were last worked out.
Format"date-time"
idstringThe contract's id.
limitsContractLimitsThe limits it trades within. An absent limit is no limit.
Show attributes
most_owned_per_item?integerThe most copies of one item the workspace may hold at once.
Format"int32"
purchases?PurchaseLimitThe most purchases it may make in a rolling window.
Show attributes
countintegerThe most purchases in the window.
Format"int32"
window_secondsintegerThe length of the rolling window, in seconds.
Format"int64"
spend?SpendLimitThe most it may spend in a rolling window.
Show attributes
amountMoneyThe most it may spend in the window.
Show attributes
amountstringThe amount as a decimal string, exact, with at least two decimal places.
currencystringThe ISO 4217 currency code.
window_secondsintegerThe length of the rolling window, in seconds.
Format"int64"
marketsarray<string>The markets it trades on, by key, such as csfloat, dmarket and market-csgo.
matched_items?integerItems its rules matched in its latest evaluation, priced or not.
Format"int32"
namestringThe contract's name.
prices_good_until?stringWhen the prices behind its current targets stop holding.
Format"date-time"
problemsarray<string>Conditions that need a look, empty when there are none.
Value in"evaluation_"holdings_"targets_"unknown""unpriced_
statusstringoff: saved but not trading. starting: switched on, its first targets being worked out. on: trading.
Value in"off""on""starting""unknown"
typestringWhether it buys or sells.
Value in"buying""selling""unknown"
unpriced_items?integerOf the matched items, those it could not price and so cannot trade.
Format"int32"
updated_atstringWhen its settings were last changed.
Format"date-time"
versionintegerIts settings version. Every saved change adds one.
Format"int64"
application/json
An error. Its type says the class and its code the exact error.
errorErrorObjectWhat went wrong.
Show attributes
codestringThe error's code. Codes never change meaning and are never reused.
messagestringA sentence for a person. It may be reworded; branch on code, not on message.
namestringThe code's name, for reading.
param?stringThe parameter the error is about, when it is about one.
request_idstringThe id of this request. Quote it to support.
typestringThe class of the error. Each type has one HTTP status.
Value in"authentication_"permission_"not_"conflict_"validation_"rate_"api_"unavailable_
curl "https://api.goldmine.to/v1/contracts/ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f" \
-H "Authorization: Bearer $CSTRADER_API_KEY"const res = await fetch("https://api.goldmine.to/v1/contracts/ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f", {
headers: { Authorization: `Bearer ${process.env.CSTRADER_API_KEY}` },
});
const data = await res.json();req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://api.goldmine.to/v1/contracts/ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f", nil)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.get(
"https://api.goldmine.to/v1/contracts/ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
)
data = res.json(){
"created_at": "2026-11-21T09:30:00Z",
"description": "Field-Tested rifles the market sells below their price",
"evaluated_at": "2026-11-21T09:30:00Z",
"id": "ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f",
"limits": {
"most_owned_per_item": 2,
"purchases": {
"count": 20,
"window_seconds": 86400
},
"spend": {
"amount": {
"amount": "12.34",
"currency": "USD"
},
"window_seconds": 86400
}
},
"markets": [
"csfloat"
],
"matched_items": 128,
"name": "Rifles under 50",
"prices_good_until": "2026-11-21T09:30:00Z",
"problems": [],
"status": "off",
"type": "buying",
"unpriced_items": 3,
"updated_at": "2026-11-21T09:30:00Z",
"version": 4
}{
"error": {
"type": "validation_error",
"code": "E00502",
"name": "InvalidParameter",
"message": "limit must be from 1 to 100.",
"param": "limit",
"request_id": "req_01a1fe10-786e-7e9d-9dce-4f758313ad79"
}
}