API Documentation

Integrate Maya Tracker data into your own applications. Access real-time and historical data for CACAO liquidity pools and Maya Protocol analytics.

Base URL

All endpoints are relative to this URL

https://api.cacaotracker.xyz
Get an API Key
Contact me to request an API key for your project.

Twitter / X

DM for a key

@toed_i

Discord

Message directly

@toedi_
Authentication
Include your API key in the header of every request.
Header Namex-api-key
Example Request
curl -H "x-api-key: YOUR_API_KEY" https://api.cacaotracker.xyz/history/maya...

Endpoints

v1
GET/history/:address
Returns historical position data

Path Parameters

NameTypeDescription
addressstringThe Maya Protocol address (starts with maya...)

Response Schema

200 OK
{
"history":[
{
"time": 1715000000000,
"value": 5234.5,
"units": 12500000000,
"price": 0.85
}
],
"current":{
"time": 1715000000000,
"value": 5234.5,
"units": 12500000000,
"price": 0.85
}
}
GET/apy/:address
Calculates APY & Performance Metrics

Path Parameters

NameTypeDescription
addressstringThe Maya Protocol address

Response Schema

200 OK
{
"apy_cacao": 12.5,
"apy_usd": 15.2,
"details":{
"net_pnl_cacao": 450.5,
"current_value_cacao": 5000,
"current_value_usd": 4250,
"price_used": 0.85,
"roi_absolute_usd": 8.5
}
}
GET/cacao/stats
Global Pool Statistics & Leaderboard

Retrieves aggregate statistics for the entire CACAO liquidity pool, including total value locked, global APY, and a list of all active positions.

Response Schema

200 OK
{
"global":{5 keys},
"positions":[2 items]
}
GET/maya/price
Historical Price Data

Query Parameters

NameTypeDefaultDescription
intervalstringallTimeframe for the data. Options: 24h, 7d, 30d, all.

Response Schema

200 OK
{
"history":[
{
"time": 1715000000000,
"priceInCacao": 42.5,
"priceInUsd": 5.2
}
],
"current":{
"time": 1715000000000,
"priceInCacao": 42.5,
"priceInUsd": 5.2
}
}