Skip to main content
POST
/
data
/
volumes
Aggregate volume per condition
curl --request POST \
  --url https://clob.kuest.com/data/volumes \
  --header 'Content-Type: application/json' \
  --data '
{
  "conditions": [
    {
      "conditionId": "<string>",
      "tokenIds": [
        "<string>"
      ]
    }
  ],
  "include_24h": false
}
'
[
  {
    "condition_id": "<string>",
    "status": 123,
    "volume": "<string>",
    "volume_24h": "<string>",
    "error": "<string>"
  }
]
Aggregate matched volume for every condition and token pair supplied in the payload. The endpoint is optimized for dashboards: you can refresh up to 100 conditions per call, and the response always uses HTTP 207 Multi-Status so you can see the outcome of each condition independently.
No authentication headers are required. Only the JSON body described below is needed.

Request body

  • include_24h — optional boolean. Defaults to false; set to true to receive a volume_24h field per successful condition.
  • conditions — required array (1–100 entries). Each item must define a condition_id plus exactly two unique token_ids that belong to that condition. Duplicate tokens or empty strings trigger per-condition errors.
When a token ID is formatted correctly but does not exist on the book, the API still returns the condition with status: 200 and reports the volume as 0.0.

Response semantics

  • The HTTP response status is always 207 Multi-Status. Each element in the array contains condition_id, status, and either the aggregated volumes or an error string.
  • status: 200 entries include volume (total matched volume for the pair) and, when include_24h was true, volume_24h. Both values are returned as decimal strings.
  • status: 400 indicates a validation issue isolated to that condition (missing tokens, duplicate token IDs, blank strings, etc.).
  • status: 500 surfaces unexpected backend issues for that condition; retrying later is recommended.

Error reference

ErrorMeaning
conditions_array_must_contain_at_least_one_entryThe request body omitted conditions or sent an empty list.
maximum_of_100_conditions_allowedMore than 100 conditions were provided.
condition_id_cannot_be_emptycondition_id was blank.
token_ids_must_have_two_entriesA condition did not include exactly two token IDs.
token_id_cannot_be_emptyOne of the provided token IDs was blank.
token_ids_must_be_uniqueThe same token ID was repeated within a condition.
internal_errorUnexpected failure while fetching volume data.
Handle the array by checking each status. Successful entries may be mixed with error entries in the same response, so you can partially update your dashboards without rerunning the entire request.

Body

application/json
conditions
object[]
required
Required array length: 1 - 100 elements
include_24h
boolean
default:false

When true, also computes rolling 24h volume.

Response

Per-condition volume summary (multi-status)

condition_id
string
required
status
integer<int32>
required

HTTP-like status for this condition (e.g., 200, 404).

volume
string

Total volume summed across the provided token IDs.

volume_24h
string

Rolling 24h volume when requested.

error
string

Present when status != 200 to provide context.