marketstringobbligatorio
The market (asset id) to query.
https://api.sandbase.ai/v1/api/polymarket/prices-historyGet prices history from Polymarket. Returns the official Polymarket API response unchanged.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns the price history of one Polymarket outcome token as a list of timestamped prices. It needs a market value, which is the asset (token) id, and accepts optional interval, fidelity, startTs and endTs parameters.
startTs and endTs.curl -X POST "https://api.sandbase.ai/v1/api/polymarket/prices-history" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market": "32338220190071351435772801779725302244575775216413325951443816017994629993401", "interval": "1w", "fidelity": 60}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
market | string | Yes | The market (asset id) to query. |
endTs | number | No | Filter by items before this unix timestamp. |
fidelity | integer | No | Accuracy of the data expressed in minutes. Default is 1 minute. |
interval | string | No | Time interval for data aggregation. |
startTs | number | No | Filter by items after this unix timestamp. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"history": [
{
"p": 0.0375,
"t": 1793088028
}
]
}
| Field | Meaning |
|---|---|
history | List of price points for the requested market, in time order. |
history[].p | Price of the outcome token at that point. The values in this response sit between 0 and 1, such as 0.0375. |
history[].t | Unix timestamp in seconds for the price point. |
market is the asset (token) id, a long numeric string. Use Polymarket Get market by slug to look up a market and find its token ids.fidelity is 60 and the points are about 3,600 seconds apart, which matches one point per hour.$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/polymarket/prices-history" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fidelity": 60,
"interval": "1w"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
marketstringobbligatorioThe market (asset id) to query.
endTsnumberFilter by items before this unix timestamp.
fidelityintegerAccuracy of the data expressed in minutes. Default is 1 minute.
intervalstringTime interval for data aggregation.
Valori possibili: max, all, 1m, 1w, 1d, 6h, 1h
startTsnumberFilter by items after this unix timestamp.
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Polymarket Get prices historyQuesta API Polymarket | $0.012 per chiamata | JSON |
Polymarket | $0.012 per chiamata | JSON |
Polymarket | $0.012 per chiamata | JSON |
Polymarket | $0.012 per chiamata | JSON |
Polymarket | $0.012 per chiamata | JSON |
Polymarket | $0.012 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/polymarket/prices-history con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.012 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: market (string). Facoltativi: endTs (number), fidelity (integer), interval (uno tra max, all, 1m, 1w, 1d, 6h, 1h) e startTs (number). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Polymarket Get prices history funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Polymarket.