/cauldron/ Endpoints
Base URL: /cauldron/
Available Endpoints
/contract/count
Endpoint: GET /contract/count
Status: Stable
Description: Get number of active and ended cauldron contracts.
Response Example:
{"active":100,"ended":10}
Example URI: /contract/count
/contract/count/<token>
Endpoint: GET /contract/count/<token>
Status: Stable
Description: Get number of active and ended cauldron contracts for a given token.
- token: Token ID or symbol
Response Example:
{"active":100,"ended":10}
Example URI: /contract/count/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92
/pool/active?<token>&<pkh>
Endpoint: GET /pool/active
Status: Stable
Description: Get list of active pools for given token and/or user. Either user or token ID must be provided.
- user: 20 byte hash of a users pkh
-
token: byte token ID.
-
token: Token ID or symbol
- pkh: Public key hash
Response Example:
{
"active": [
{
"owner_p2pkh_addr": "bitcoincash:zqmvqqsd6w08e4nvy8er0hzn6wzxvxj40u7tlk8wl3",
"owner_pkh": "36c0020dd39e7cd66c21f237dc53d384661a557f",
"sats": 776661580,
"token_id": "b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92",
"tokens": 16,
"tx_pos": 0,
"txid": "94a933a0fa55093a0965eb867f1b9cac2bb07488ced4825bc31f86c9371f76aa"
}
]
}
Example URI: /pool/active
/pool/aggregated_apy?<token>&<pkh>&<start>&<end>
Endpoint: GET /pool/aggregated_apy
Status: Stable
Description: Fetch apy for a token and/or an account within a given time interval. All variables are optional. A query with no variables will return the AAPY based on all users and all tokens aggregated.
- token: The 32 byte token ID
- pkh: Public key hash for wallet account
- start: Unix timestamp for period start (default 30 days)
- end: Unix timestamp for period end (default NOW)
Response Example:
{"apy":"10.00","pools":100}
Example URI: /pool/aggregated_apy
/pool/history/<pool_id>?<start>
Endpoint: GET /pool/history/<pool_id>
Status: Unstable
/price/<token>/at/<timestamp>
Endpoint: GET /price/<token>/at/<timestamp>
Status: Unstable
Example URI: /price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/at/1716537600
/price/<token>/candlesticks?<start>&<end>&<stepsize>
Endpoint: GET /price/<token>/candlesticks
Status: Unstable
Description: Fetch candlesticks in BCH satoshis for a token.
If an interval has no trades, it will be omitted from the result.
- start: unix timestamp for period start (default 30 days)
- end: unix timestamp for period end (default NOW)
- stepsize: seconds per interval (default: 3600 seconds)
Response Example:
{
"candlesticks": [
{"close":64654136.35714286,
"high":87959043.0,
"low":58755326.0,
"open":87959043.0,
"time":1752522150,
"transaction_count":4,
"volume_sats":3170247594,
"volume_tokens":43},
]
}
Example URI: /price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/candlesticks
/price/<token>/current
Endpoint: GET /price/<token>/current
Status: Stable
Description: Get the current price of a given token in satoshis.
- token: The 32 byte token ID
Response Example:
{"price":1000.00}
Example URI: /price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/current
/price/<token>/history?<start>&<end>&<stepsize>
Endpoint: GET /price/<token>/history
Status: Unstable
Description: Fetch historical price in satoshis for a given token.
Note: If an interval has no trades, it will be omitted from the response.
Response Example:
{
"history": [
{
"avg": 33829844.78947368,
"max": 33829844.78947368,
"min": 33829844.78947368,
"time": 1709470824
},
{
"avg": 37699099,
"max": 37699099,
"min": 37699099,
"time": 1709751624
},
{
"avg": 42271799.176470585,
"max": 42271799.176470585,
"min": 42271799.176470585,
"time": 1709755224
},
{
"avg": 63517742.53043478,
"max": 101130081.9090909,
"min": 47729344.9375,
"time": 1710129624
},
]
}
Example URI: /price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/history
/token/<token>/first_pool
Endpoint: GET /token/<token>/first_pool
Status: Unstable
Example URI: /token/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/first_pool
/tokens/list_by_volume
Endpoint: GET /tokens/list_by_volume
Status: Unstable
Example URI: /tokens/list_by_volume
/tokens/list_cached?<limit>&<offset>&<by>&<order>
Endpoint: GET /tokens/list_cached
Status: Unstable
Example URI: /tokens/list_cached
/tokens/list_cached_by_ids?<ids>&<by>&<order>
Endpoint: GET /tokens/list_cached_by_ids
Status: Unstable
Example URI: /tokens/list_cached_by_ids
/tokens/search_by_volume?<search_query>
Endpoint: GET /tokens/search_by_volume
Status: Unstable
Example URI: /tokens/search_by_volume
/tokens/search_cached?<q>&<limit>&<offset>&<by>&<order>
Endpoint: GET /tokens/search_cached
Status: Unstable
Example URI: /tokens/search_cached
/tx/latest?<limit>&<offset>&<token>
Endpoint: GET /tx/latest
Status: Unstable
Example URI: /tx/latest
/user/unique_addresses
Endpoint: GET /user/unique_addresses
Status: Unstable
Example URI: /user/unique_addresses
/valuelocked?<time>
Endpoint: GET /valuelocked
Status: Stable
Description: Gives total satoshis locked for all tokens.
- time: Unix timestamp (optional)
Response Example:
{
"satoshis": 1459676788
}
Example URI: /valuelocked
/valuelocked/<token>?<time>
Endpoint: GET /valuelocked/<token>
Status: Stable
Description: Gives total value locked for a single token.
- token: Token identifier / category.
- time: Unix timestamp (optional)
Response Example:
{
"satoshis": 1459676788,
"token_amount": 19,
"token_id": "b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92"
}
Example URI: /valuelocked/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92
/volume?<start>&<end>
Endpoint: GET /volume
Status: Stable
Description: Gives total volume for all tokens in a time period.
- start: Unix timestamp for start of period (optional, defaults to 24 hours ago)
- end: Unix timestamp for end of period (optional, defaults to now)
Response Example:
{
"total_volume_sats": 1459676788,
"period_start": 1640995200,
"period_end": 1641081600
}
Example URI: /volume
/volume/<token>?<start>&<end>
Endpoint: GET /volume/<token>
Status: Stable
Description: Gives volume for a specific token in a time period.
- token: Token identifier / category.
- start: Unix timestamp for start of period (optional, defaults to 24 hours ago)
- end: Unix timestamp for end of period (optional, defaults to now)
Response Example:
{
"volume_sats": 1459676788,
"volume_tokens": 12345,
"token_id": "b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92",
"period_start": 1640995200,
"period_end": 1641081600
}
Example URI: /volume/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92