Skip to content

API Reference / Snapshots

Count snapshots for a contract

Returns the total number of evaluation snapshots for a contract, so the contract detail page can render the true total without loading and counting every page.

POST/contracts.v1.Contracts/CountSnapshots

Request body

application/jsonRequired

Request for the number of snapshots a contract has.

contractIdstring

Contract to count snapshots for.

Format"byte" base64

Response body

application/json

Success

count?integer

Total number of snapshots for this contract.

Format"int32"

curl -X POST "https://api.goldmine.to/contracts.v1.Contracts/CountSnapshots" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contractId": "EBESExQVFhcYGRobHB0eHw=="
  }'
{
  "count": 118
}