API Reference / Purchases
Get the price paid against maximum price distribution of purchases
Returns the purchases in the workspace bucketed by the share of their contract's maximum price they paid, from 90 to over 100 percent, with the count below 90 percent and the mean share, over the same rows ListPurchases returns for the filter and statuses.
/ contracts. v1. Contracts/ GetPurchasePriceDistributionRequest body
application/jsonRequired
Request for the price paid against maximum price distribution of the purchases in the caller's workspace, using the same filter and status set as ListPurchases.
filter?PurchaseFilterThe same filter as ListPurchases, so the distribution describes the same rows as the list.
Show attributes
accountName?stringExact Steam account name that executed the buy. Absent includes every account.
contractIds?array<string>Only purchases attributed to one of these contracts. Empty includes every contract.
coveringSellingContractIds?array<string>Only purchases whose bought item is held (arriving, in the inventory or listed) and covered now by one of these selling contracts, resolved as GetCoveringSellingContract resolves it, OR within the field. Empty includes every purchase. At most 200 ids.
createdBefore?stringOnly purchases attributed before this time. Absent sets no upper bound.
Format"date-time"
createdFrom?stringOnly purchases attributed at or after this time. The attribution time is used because purchased_at is unset while a purchase is pending. Absent sets no lower bound.
Format"date-time"
deliveryStatuses?array<string>Customer-facing delivery states, OR within the field. Empty includes every state.
Value in"PURCHASE_"PURCHASE_"PURCHASE_
failureReasons?array<string>Only failed or rolled back purchases with one of these failure reasons, OR within the field, the same values as the FAILURE_REASON facet. Empty includes every purchase.
Value in"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_
flags?array<string>Review flags, OR within the field: a purchase matches when it carries any of the named flags. Empty does not restrict.
Value in"PURCHASE_"PURCHASE_"PURCHASE_
hasCoveringSellingContract?booleanTrue selects only purchases whose bought item is held and covered by a selling contract now. False selects only purchases whose bought item is held and covered by none. A purchase with no held item never matches either value. Omitted includes every purchase.
marketHashNames?array<string>Exact market_hash_name set, OR within the field, for an item's own purchases. Empty includes every item.
marketplaces?array<string>Marketplace slugs the purchase was bought on (for example csfloat, market-csgo, dmarket), OR within the field, the same values as the MARKETPLACE facet. Empty includes every marketplace. At most 20 values.
maxPriceNowKind?stringOnly purchases whose bought item is still held (arriving, in the inventory or listed) and whose contract targets the item now, compared by the contract's current maximum price for the item against the price paid. A purchase whose contract no longer targets the item never matches. Omitted includes every purchase.
Value in"PURCHASE_"PURCHASE_
needsReview?booleanTrue selects only purchases carrying any flag (over max price, wrong float or not delivered), the same set as every PurchaseFlag together. False selects only purchases with none of those flags. Omitted includes both.
paintSeeds?array<integer>Exact paint seeds (pattern indexes, 0 to 1000), OR within the field. A purchase with no known seed never matches. Empty includes every purchase. At most 200 seeds.
query?stringCase-insensitive literal substring of the item's market_hash_name, not a regular expression or wildcard pattern. Absent or empty matches every purchase.
strategies?array<string>Buying mechanisms, OR within the field. Empty includes every strategy.
Value in"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_
statuses?array<string>Optional lifecycle status set, as on ListPurchases. Empty includes every status.
Value in"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_"PURCHASE_
Response body
application/json
Success
averageSharePercent?numberMean share of the maximum price paid, in percent, over the purchases with a maximum price. Zero when none has one.
Format"double"
belowCount?integerNumber of purchases that paid under 90 percent of their maximum price.
Format"int32"
buckets?array<PurchasePriceShareBucket>One bucket per whole share percent from 90 to 100, then one bucket at 101 for purchases that paid over 100 percent, always all twelve in ascending order, including empty ones.
Show attributes
purchaseCount?integerNumber of purchases in this bucket.
Format"int32"
sharePercent?integerThe share of the maximum price paid, floored to a whole percent, from 90 to 100. 101 stands for over 100 percent.
Format"int32"
purchaseCount?integerNumber of purchases matching the filter and statuses, including those with no maximum price, which are counted here and nowhere else.
Format"int32"
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
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/contracts.v1.Contracts/GetPurchasePriceDistribution" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"accountName": "flip_eu_02",
"contractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"coveringSellingContractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"createdBefore": "2026-11-03T16:10:00Z",
"createdFrom": "2026-11-03T16:10:00Z",
"deliveryStatuses": [
"PURCHASE_DELIVERY_STATUS_PENDING"
],
"failureReasons": [
"PURCHASE_FAILURE_REASON_LISTING_UNAVAILABLE"
],
"flags": [
"PURCHASE_FLAG_OVER_MAX_PRICE"
],
"hasCoveringSellingContract": false,
"marketHashNames": [
"AK-47 | Redline (Field-Tested)"
],
"marketplaces": [
"example"
],
"maxPriceNowKind": "PURCHASE_MAX_PRICE_NOW_BELOW_PAID",
"needsReview": false,
"paintSeeds": [
3
],
"query": "example",
"strategies": [
"PURCHASE_STRATEGY_LISTING"
]
},
"statuses": [
"PURCHASE_STATUS_PENDING"
]
}'const res = await fetch("https://api.goldmine.to/contracts.v1.Contracts/GetPurchasePriceDistribution", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filter": {
"accountName": "flip_eu_02",
"contractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"coveringSellingContractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"createdBefore": "2026-11-03T16:10:00Z",
"createdFrom": "2026-11-03T16:10:00Z",
"deliveryStatuses": [
"PURCHASE_DELIVERY_STATUS_PENDING"
],
"failureReasons": [
"PURCHASE_FAILURE_REASON_LISTING_UNAVAILABLE"
],
"flags": [
"PURCHASE_FLAG_OVER_MAX_PRICE"
],
"hasCoveringSellingContract": false,
"marketHashNames": [
"AK-47 | Redline (Field-Tested)"
],
"marketplaces": [
"example"
],
"maxPriceNowKind": "PURCHASE_MAX_PRICE_NOW_BELOW_PAID",
"needsReview": false,
"paintSeeds": [
3
],
"query": "example",
"strategies": [
"PURCHASE_STRATEGY_LISTING"
]
},
"statuses": [
"PURCHASE_STATUS_PENDING"
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"filter": {
"accountName": "flip_eu_02",
"contractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"coveringSellingContractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"createdBefore": "2026-11-03T16:10:00Z",
"createdFrom": "2026-11-03T16:10:00Z",
"deliveryStatuses": [
"PURCHASE_DELIVERY_STATUS_PENDING"
],
"failureReasons": [
"PURCHASE_FAILURE_REASON_LISTING_UNAVAILABLE"
],
"flags": [
"PURCHASE_FLAG_OVER_MAX_PRICE"
],
"hasCoveringSellingContract": false,
"marketHashNames": [
"AK-47 | Redline (Field-Tested)"
],
"marketplaces": [
"example"
],
"maxPriceNowKind": "PURCHASE_MAX_PRICE_NOW_BELOW_PAID",
"needsReview": false,
"paintSeeds": [
3
],
"query": "example",
"strategies": [
"PURCHASE_STRATEGY_LISTING"
]
},
"statuses": [
"PURCHASE_STATUS_PENDING"
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/contracts.v1.Contracts/GetPurchasePriceDistribution", 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/GetPurchasePriceDistribution",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"filter": {
"accountName": "flip_eu_02",
"contractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"coveringSellingContractIds": [
"AY86PB0ufwCKGyw9Tl9gcQ=="
],
"createdBefore": "2026-11-03T16:10:00Z",
"createdFrom": "2026-11-03T16:10:00Z",
"deliveryStatuses": [
"PURCHASE_DELIVERY_STATUS_PENDING"
],
"failureReasons": [
"PURCHASE_FAILURE_REASON_LISTING_UNAVAILABLE"
],
"flags": [
"PURCHASE_FLAG_OVER_MAX_PRICE"
],
"hasCoveringSellingContract": false,
"marketHashNames": [
"AK-47 | Redline (Field-Tested)"
],
"marketplaces": [
"example"
],
"maxPriceNowKind": "PURCHASE_MAX_PRICE_NOW_BELOW_PAID",
"needsReview": false,
"paintSeeds": [
3
],
"query": "example",
"strategies": [
"PURCHASE_STRATEGY_LISTING"
]
},
"statuses": [
"PURCHASE_STATUS_PENDING"
]
},
)
data = res.json(){
"averageSharePercent": 3,
"belowCount": 3,
"buckets": [
{
"purchaseCount": 3,
"sharePercent": 3
}
],
"purchaseCount": 3
}{
"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": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}