Skip to content

/price

/price/<token>/current

Get current price of a token.

Query: /cauldron/price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/current/

/price/<token>/history?<start>&<end>&<stepsize>

start: unix timestamp for period start (default 30 days)

end: unix timestamp for period end (default NOW)

stepsize: seconds per interval (default: 3600 seconds)

Fetch historical price in BCH satoshis for a token.

If an interval has no trades, it will be omitted from the result.

Example result

Query: /cauldron/price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/history/

{
  "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
    },
  ]
}

/price/<token>/at/<timestamp>

Get the token price at or before the given timestamp.

Token: The 32 byte token ID.

Timestamp: Unix timestamp for finding past price.

Example result

Query: /cauldron/price/b79bfc8246b5fc4707e7c7dedcb6619ef1ab91f494a790c20b0f4c422ed95b92/at/1709470824

{
  "price":34493809.347826086,
  "timestamp":1709468902
}