Call it
curl https://api.peume.com/v1/call/exchange-long-short-ratio-history \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"pair": "your pair",
"interval": "1h",
"limit": 50,
"exchange": "binance"
}
}'const res = await fetch("https://api.peume.com/v1/call/exchange-long-short-ratio-history", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"pair": "your pair",
"interval": "1h",
"limit": 50,
"exchange": "binance"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/exchange-long-short-ratio-history",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"pair": "your pair",
"interval": "1h",
"limit": 50,
"exchange": "binance"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: exchange-long-short-ratio-history.
Parameters
pairRequiredstringTrading pair (e.g. BTC/USDT). Example: BTC/USDT.
intervalstringBucket size for each point in the series: 1h, 4h, or 1d. This endpoint uses interval only; it does NOT accept time_range. Use from + limit to control the window. Example: 1h. Defaults to "1h".
1h · 4h · 1d
Example: 1h
fromstringStart of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Binance only retains the last 30 days of data; other exchanges may have different limits. Example: 2026-03-01.
limitintegerMax number of records. For longer history, paginate using the last returned timestamp as the next from value. Example: 50. Defaults to 50.
Example: 50
exchangestringExchange identifier. Example: binance. Defaults to "binance".
binance · okx · bybit · bitget
Example: binance
