Trinity Beast – API Reference

Complete reference for the Listener Price Oracle (LPO) and Listener Report Service (LRS)

📍 Region: us-east-2 (Ohio) 🌐 Base URL: https://api.cpmp-site.org 📅 Updated: April 2026

1. Authentication

All API requests require a Bearer token in the Authorization header.

Authorization Header Required on all requests
Authorization: Bearer YOUR_API_KEY

Your API key is provided after subscribing. Keep it secret — it identifies your account for billing and rate limiting.

âš ī¸ Security: Never expose your API key in client-side JavaScript or public repositories. Use environment variables or a backend proxy.

2. LPO – Listener Price Oracle

The LPO delivers real-time cryptocurrency prices with sub-10ms cached responses and 30–50ms uncached responses. Prices are sourced from Coinbase → Kraken → Gemini with automatic failover.

2.1 GET /price

GET /price GET

Returns the current price for a cryptocurrency asset.

Query Parameters

ParameterTypeRequiredDescription
assetstringRequiredAsset symbol (e.g. btc, eth, sol). Case-insensitive.

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.cpmp-site.org/price?asset=btc"

2.2 LPO Response Examples

Success Response (200 OK) — Cached Hit

{
  "asset": "BTC",
  "price": 83421.57,
  "timestamp": "2026-04-12T14:23:01Z",
  "source": "coinbase",
  "cached": true,
  "cache_age_seconds": 4.2,
  "latency_ms": 7,
  "duration_ms": 7
}

Success Response (200 OK) — Live Fetch

{
  "asset": "ETH",
  "price": 3187.44,
  "timestamp": "2026-04-12T14:23:15Z",
  "source": "kraken",
  "cached": false,
  "cache_age_seconds": 0,
  "latency_ms": 38,
  "duration_ms": 38
}

Response Fields

FieldTypeDescription
assetstringUppercase asset symbol
pricefloat64Current price in USD
timestampstring (RFC3339)Time the price was fetched or cached
sourcestringExchange that provided the price: coinbase, kraken, or gemini
cachedboolWhether the response was served from MemoryDB cache
cache_age_secondsfloat64Age of cached value in seconds (0 if live fetch)
latency_msint64Time to first byte in milliseconds
duration_msint64Total request duration in milliseconds

3. LRS – Listener Report Service

The LRS provides access to your API usage history and aggregated statistics. Included with every subscription tier.

3.1 GET /reports/usage

GET /reports/usage GET

Returns paginated usage log entries for your API key.

Query Parameters

ParameterTypeRequiredDefaultDescription
api_key_idstringOptional—Filter by API key ID
assetstringOptional—Filter by asset symbol (e.g. BTC)
start_datestringOptional93 days agoStart date in YYYY-MM-DD format
end_datestringOptionalTodayEnd date in YYYY-MM-DD format
cachedboolOptional—Filter by cache status: true or false
pageintOptional1Page number
page_sizeintOptional100Records per page (max 1000)
formatstringOptionaljsonOutput format: json, csv, tsv, text

Example Requests

# JSON (default)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://lrs.cpmp-site.org/reports/usage?asset=BTC&page=1&page_size=50"

# CSV download
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://lrs.cpmp-site.org/reports/usage?format=csv" -o usage.csv

# Tab-delimited
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://lrs.cpmp-site.org/reports/usage?format=tsv" -o usage.tsv

# Plain text
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://lrs.cpmp-site.org/reports/usage?format=text"

3.2 GET /reports/summary

GET /reports/summary GET

Returns aggregated statistics for a date range.

Query Parameters

ParameterTypeRequiredDefaultDescription
api_key_idstringOptional—Filter by API key ID
start_datestringOptional30 days agoStart date in YYYY-MM-DD format
end_datestringOptionalTodayEnd date in YYYY-MM-DD format
formatstringOptionaljsonOutput format: json, csv, tsv, text

3.3 Output Formats

✅ New: LRS endpoints now support four output formats to make it easy to import data into spreadsheets, databases, or other systems.
FormatContent-TypeUse Case
jsonapplication/jsonDefault. Best for programmatic consumption and APIs.
csvtext/csvComma-separated. Import into Excel, Google Sheets, or any CSV-compatible tool.
tsvtext/tab-separated-valuesTab-delimited. Ideal for databases, ETL pipelines, and tools that handle commas in data.
texttext/plainHuman-readable plain text. Good for quick terminal review or log files.

3.4 LRS Response Examples

Usage Report — JSON

{
  "logs": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "api_key_id": "key_abc123",
      "asset": "BTC",
      "price": 83421.57,
      "source": "coinbase",
      "cached": true,
      "latency_ms": 7,
      "duration_ms": 7,
      "ip_address": "203.0.113.42",
      "timestamp": 1744466581,
      "readable_timestamp": "2026-04-12T14:23:01Z",
      "cache_age_seconds": 4.2
    }
  ],
  "total_count": 1482,
  "page": 1,
  "page_size": 100,
  "filters": {
    "asset": "BTC"
  }
}

Usage Report — CSV

id,api_key_id,asset,price,source,cached,latency_ms,duration_ms,ip_address,timestamp,readable_timestamp,cache_age_seconds
a1b2c3d4-e5f6-7890-abcd-ef1234567890,key_abc123,BTC,83421.57000000,coinbase,true,7,7,203.0.113.42,1744466581,2026-04-12T14:23:01Z,4.200

Usage Report — Text

LRS Usage Report — Page 1 | Page Size 100 | Total Records 1482
================================================================================
[2026-04-12T14:23:01Z] a1b2c3d4... | Asset: BTC | Price: 83421.57000000 | Source: coinbase | Cached: true | Latency: 7ms | IP: 203.0.113.42

Summary Report — JSON

{
  "total_requests": 14820,
  "cache_hit_rate": 91.4,
  "avg_latency_ms": 9.3,
  "by_asset": {
    "BTC": 6210,
    "ETH": 4105,
    "SOL": 2380,
    "DOGE": 1240,
    "XRP": 885
  },
  "by_source": {
    "coinbase": 13540,
    "kraken": 1180,
    "gemini": 100
  },
  "date_range": {
    "start": "2026-03-13",
    "end": "2026-04-12"
  }
}

Summary Report — Text

LRS Summary Report — 2026-03-13 to 2026-04-12
============================================================
Total Requests  : 14820
Cache Hit Rate  : 91.40%
Avg Latency     : 9.30ms

By Asset:
  BTC        6210
  ETH        4105
  SOL        2380

By Source:
  coinbase     13540
  kraken       1180
  gemini       100

4. Supported Assets

SymbolNameNotes
BTCBitcoinHighest cache hit rate
ETHEthereum
SOLSolana
DOGEDogecoin
XRPXRP
AAVEAave
LINKChainlink
DOTPolkadot
AVAXAvalanche
UNIUniswap
AAVEAave
LTCLitecoin

Asset symbols are case-insensitive in requests. Responses always return uppercase.

5. Error Codes

HTTP StatusMeaningCommon Cause
400Bad RequestMissing or invalid asset parameter
401UnauthorizedMissing or invalid API key
429Too Many RequestsRate limit exceeded for your tier
500Internal Server ErrorUpstream exchange unavailable or MemoryDB issue
503Service UnavailableAll price sources (Coinbase, Kraken, Gemini) failed

Error Response Body

{
  "error": "asset parameter is required",
  "code": 400
}

6. Rate Limits by Tier

TierRequests/MonthLRS IncludedPrice
Starter10,000✅$9/mo
Basic50,000✅$29/mo
Pro250,000✅$79/mo
EnterpriseUnlimited✅ Unlimited LRS$199/mo
â„šī¸ LRS Add-on: Existing subscribers can add unlimited LRS access for $20/month.