Call it
curl https://api.peume.com/v1/call/polymarket-orderbook-history \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"token_id": "your token id",
"limit": 100
}
}'const res = await fetch("https://api.peume.com/v1/call/polymarket-orderbook-history", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"token_id": "your token id",
"limit": 100
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/polymarket-orderbook-history",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"token_id": "your token id",
"limit": 100
}
},
)
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: polymarket-orderbook-history.
Parameters
token_idRequiredstringToken identifier. Example: 73662070458561467734997715458900555626841827840002814944742182699282770895284.
start_timeintegerStart time in Unix milliseconds. 0 means 7 days ago.
end_timeintegerEnd time in Unix milliseconds. 0 means current time.
limitintegerMaximum number of snapshots to return. Defaults to 100.
Example: 100
pagination_keystringBase64 cursor for pagination.
