API Documentation

Complete documentation for the Pi Network Price Oracle and data endpoints. Access real-time Pi prices, blockchain data, and more.

Base URL

https://oracle-three-xi.vercel.app

Multiple Data Sources

CoinGecko, Bitget, OKX exchanges

Cost Effective

Free API tiers with intelligent caching

Real-time Updates

30-second cache with efficient polling

Fault Tolerant

Continues operating if sources fail

Pi Network Integration

Complete piscan.io API compatibility

Horizon Proxy

Direct Pi Network blockchain access

GET/api/v1/price

Get the current aggregated Pi Network price from multiple sources

Example Request:

curl https://oracle-three-xi.vercel.app/api/v1/price

Response:

{
  "symbol": "PI",
  "price_usd": 1.23,
  "timestamp": "2025-01-14T12:00:00.000Z",
  "sources_used": 3,
  "total_sources": 3,
  "aggregation_method": "weighted_average",
  "source_prices": {
    "coingecko": { "price": 1.22, "weight": 1.5, "timestamp": "2025-01-14T12:00:00.000Z" },
    "bitget": { "price": 1.23, "weight": 2.0, "timestamp": "2025-01-14T12:00:00.000Z" },
    "okx": { "price": 1.24, "weight": 1.5, "timestamp": "2025-01-14T12:00:00.000Z" }
  },
  "confidence_score": 0.95,
  "cache_hit": false
}
GET/api/v1/health

Check the health status of the oracle service

Example Request:

curl https://oracle-three-xi.vercel.app/api/v1/health

Response:

{
  "status": "healthy",
  "uptime": 3600,
  "timestamp": "2025-01-14T12:00:00.000Z"
}
GET/api/v1/sources

Get the status and reliability metrics of all data sources

Example Request:

curl https://oracle-three-xi.vercel.app/api/v1/sources

Response:

{
  "sources": [
    {
      "name": "coingecko",
      "status": "active",
      "last_success": "2025-01-14T12:00:00.000Z",
      "last_error": null,
      "success_rate": 0.99,
      "avg_response_time_ms": 250
    }
  ]
}

Cost Analysis

SourceFree Tier LimitCost After FreeAuth Required
CoinGecko50 calls/min$0No
BitgetRate limited$0No
OKXRate limited$0No
Horizon APIRate limited$0No

Total Monthly Cost with 30-second caching: $0

With caching, you get ~86,400 requests/month within all free tiers

Last updated: October 2025