Public API — v2
Free, unauthenticated REST API for market prices, candles, trades, protocol stats. No API key required. CORS enabled for browser access. pokeliquid v2 is a custodial perps engine: prices come from our TCGPlayer oracle (5-minute cycles, EWMA-smoothed with a circuit breaker) and every response below is live from the engine.
Markets
128 active markets across Pokemon TCG cards and set indices (129 defined; one currently inactive). Query parameters accept the market ID from /prices/all — e.g. ?market=CHARIZARD-151, ?market=MODERN-INDEX. Unknown markets return 400 {"error":"Unknown market: ..."}.
For the full list of market IDs, call /prices/all.
Endpoints
Liveness probe. Returns server status and timestamp.
curl https://www.pokeliquid.xyz/api/keeper/ping
{
"ok": true,
"timestamp": "2026-12-01T07:30:00.101Z"
}Comprehensive system health: oracle freshness (degraded >10 min stale, critical >30 min), liquidation watcher, funding, protocol reserves, engine mode.
curl https://www.pokeliquid.xyz/api/keeper/health
{
"status": "healthy",
"timestamp": "2026-12-01T07:30:00.082Z",
"oracle": { "last_update": "2026-12-01T07:29:31.000Z", "seconds_since_update": 29 },
"liquidation": { "accounts_monitored": 1, "last_check": "2026-12-01T07:30:00.082Z" },
"funding": { "settlements_24h": 0 },
"protocol": { "open_positions": 1, "lp_pool": 10.88, "insurance_fund": 1.21 },
"keeper": { "mode": "usdc-v2", "uptime_minutes": 15 }
}All market prices at once, keyed by market ID. IMPORTANT: price and ewma here are micro-USD integers (multiply by 1e-6 to get dollars: 121210000 = $121.21). lastUpdateTime is a unix timestamp.
curl https://www.pokeliquid.xyz/api/keeper/prices/all
{
"GRENINJA": { "price": 121210000, "ewma": 121210000, "lastUpdateTime": 1796110722 },
"GENGAR": { "price": 527340000, "ewma": 527340000, "lastUpdateTime": 1796110722 },
... // 128 markets
}Historical oracle price data for one market: raw scraped price, EWMA-smoothed price, and deviation, oldest-first. These values are plain USD (unlike /prices/all).
| Param | Type | Default | Description |
|---|---|---|---|
| market | string | required | Market ID (e.g. CHARIZARD-151, MODERN-INDEX). See /prices/all for the full list. |
| limit | number | 50 | Number of data points (max 500) |
| from | number | — | Unix timestamp range start (with to) |
| to | number | — | Unix timestamp range end (with from) |
curl "https://www.pokeliquid.xyz/api/keeper/prices?market=CHARIZARD-151&limit=2"
[
{ "timestamp": 1796110053, "raw_price": 290.73, "ewma": 290.73, "deviation": 0 },
{ "timestamp": 1796110725, "raw_price": 290.73, "ewma": 290.73, "deviation": 0 }
]OHLC candlesticks built from accepted oracle prices (plain USD, no volume). resolution=1d gives daily candles (30 days); any other value gives hourly candles (7 days).
| Param | Type | Default | Description |
|---|---|---|---|
| market | string | required | Market ID (e.g. CHARIZARD-151, MODERN-INDEX). See /prices/all for the full list. |
| resolution | string | 1h | Candle bucket: "1d" (daily) or anything else (hourly) |
curl "https://www.pokeliquid.xyz/api/keeper/candles?market=CHARIZARD-151&resolution=1h"
[
{ "timestamp": 1796065200, "open": 291.64, "high": 291.64, "low": 291.64, "close": 291.64 },
{ "timestamp": 1796068800, "open": 291.75, "high": 292.11, "low": 291.71, "close": 291.71 },
...
]Trade history for one wallet, newest-first, with a total count. Rows carry the keeper shape: action (open/close), direction, entry/exit price, pnl, funding_paid, fee_paid, close_reason (close, liquidation, stop_loss, take_profit).
| Param | Type | Default | Description |
|---|---|---|---|
| wallet | string | required | Solana wallet address |
| limit | number | 20 | Number of trades (max 100) |
curl "https://www.pokeliquid.xyz/api/keeper/trades?wallet=WALLET&limit=2"
{
"trades": [
{
"id": 12, "timestamp": 1796092271, "user_pubkey": "indexsmoke",
"position_index": 7, "action": "close", "direction": "long",
"collateral": 100, "notional": 500, "leverage": 5,
"entry_price": 36621.31, "exit_price": 36621.31,
"pnl": 0, "funding_paid": 0, "fee_paid": 5,
"tx_signature": "", "close_reason": "close"
},
...
],
"total": 2
}Most recent trades across all users (opens, closes, liquidations). Same row shape as /trades.
| Param | Type | Default | Description |
|---|---|---|---|
| limit | number | 50 | Number of trades (max 200) |
curl "https://www.pokeliquid.xyz/api/keeper/trades/recent?limit=2"
{
"trades": [
{
"id": 13, "timestamp": 1796100648, "user_pubkey": "uidesign",
"position_index": 8, "action": "open", "direction": "long",
"collateral": 100, "notional": 200, "leverage": 2,
"entry_price": 20846.209600000006, "exit_price": null,
"pnl": null, "funding_paid": null, "fee_paid": 1,
"tx_signature": "", "close_reason": null
},
...
]
}Recent engine events (position closes including liquidations). The data field is a JSON string.
| Param | Type | Default | Description |
|---|---|---|---|
| limit | number | 10 | Number of events (max 50) |
curl "https://www.pokeliquid.xyz/api/keeper/events/recent?limit=2"
{
"events": [
{
"id": 5, "timestamp": 1796092271, "market_id": "MODERN-INDEX",
"kind": "close",
"data": "{\"pos\":7,\"user\":\"indexsmoke\",\"mark\":36621.31,\"pnl\":0}"
}
]
}Protocol-wide statistics for the last 24 hours and 7 days. All values are USD.
curl https://www.pokeliquid.xyz/api/keeper/stats
{
"total_volume_24h": 1200,
"total_volume_7d": 1200,
"total_trades_24h": 3,
"total_liquidations_24h": 0,
"total_fees_24h": 7,
"unique_traders_24h": 2
}Top 50 traders ranked by lifetime realized PnL (closed positions only).
curl https://www.pokeliquid.xyz/api/keeper/leaderboard
{
"leaderboard": [
{ "user": "indexsmoke", "pnl": 0, "trades": 1 },
...
]
}Protocol reserves (lp_pool, insurance, platform_fees — plain USD) plus engine constants. fee_bps, base_funding_rate_per_hour and skew_factor are basis points; maintenance_ratio is the liquidation threshold (margin ratio < 2%); total_long_exposure, total_short_exposure and total_oi are micro-USD (x1e6, divide by 1e6 for dollars).
curl https://www.pokeliquid.xyz/api/keeper/protocol
{
"lp_pool": 11.16,
"insurance": 1.24,
"platform_fees": 17.5,
"fee_bps": 100,
"min_position_size": 1000000,
"max_leverage": 5,
"profit_cap_bps": 30000,
"base_funding_rate_per_hour": 0,
"skew_factor": 0,
"maintenance_ratio": 0.02,
"total_long_exposure": 200000000,
"total_short_exposure": 0,
"total_oi": 200000000
}Open interest for one market, micro-USD (x1e6). max_long_oi / max_short_oi are that market's per-side caps (0 = uncapped). Unknown markets return zeros.
| Param | Type | Default | Description |
|---|---|---|---|
| market | string | required | Market ID (e.g. CHARIZARD-151, MODERN-INDEX) |
curl "https://www.pokeliquid.xyz/api/keeper/oi?market=CHARIZARD-151"
{
"long_oi": 0,
"short_oi": 0,
"max_long_oi": 19708000000,
"max_short_oi": 19708000000
}Code Examples
const BASE = "https://www.pokeliquid.xyz/api/keeper";
// Latest Charizard 151 price (/prices/all is micro-USD — divide by 1e6)
const all = await fetch(BASE + "/prices/all").then(r => r.json());
console.log("CHARIZARD-151: $" + (all["CHARIZARD-151"].price / 1e6).toFixed(2));
// Get hourly candles (plain USD)
const candles = await fetch(BASE + "/candles?market=CHARIZARD-151&resolution=1h").then(r => r.json());
console.log(candles.length + " candles, latest close: $" + candles.at(-1).close);
// Get protocol stats (USD floats)
const stats = await fetch(BASE + "/stats").then(r => r.json());
console.log("24h volume: $" + stats.total_volume_24h + ", traders: " + stats.unique_traders_24h);import requests
BASE = "https://www.pokeliquid.xyz/api/keeper"
# Latest prices for all markets (micro-USD -> divide by 1e6)
all = requests.get(f"{BASE}/prices/all").json()
for market in ["CHARIZARD-151", "GRENINJA", "PIKACHU"]:
if market in all:
print(market + ": $" + format(all[market]["price"] / 1e6, ".2f"))
# Get recent trades
trades = requests.get(f"{BASE}/trades/recent", params={"limit": 50}).json()
for t in trades["trades"]:
print(t["action"], t["direction"], t["close_reason"])Trading model
Trading uses real USDC, with wallet-signed orders that fill at the next oracle price. Maximum leverage is 5x, the fee is 1% of collateral, there is no funding, profit is capped at 3x collateral, and a position is liquidated below a 2% margin ratio. Positions are backed by the LP pool, or by the house when the pool cannot cover them; house winnings may be owed with no deadline.