Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

Polymarket Get midpoint price

Documentación de la API
https://api.sandbase.ai/v1/api/polymarket/midpoint

Retrieves the midpoint price for a specific token ID. The midpoint is calculated as the average of the best bid and best ask prices.

Precio
$0.012USD / llamada
Método
POST
Respuesta
JSON
Parámetros
1 obligatorios · 0 opcionales

Entorno de pruebas

Entrada
Token ID (asset ID)
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la API

Polymarket Get midpoint price API

Returns the midpoint price for one Polymarket outcome token. The midpoint is the average of the best bid and best ask. You send a token_id.

Use cases

  • Show the midpoint price of a Polymarket outcome token on a dashboard.
  • Store mid on a schedule to build a price series for one token.
  • Value an open position in an outcome token without reading the full order book.

Request

curl -X POST "https://api.sandbase.ai/v1/api/polymarket/midpoint" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token_id": "32338220190071351435772801779725302244575775216413325951443816017994629993401"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
token_idstringYesToken ID (asset ID)

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "mid": "0.0205"
}

Response fields

FieldMeaning
midMidpoint price of the token, calculated as the average of the best bid and best ask.
midComes back as a string, for example "0.0205". Parse it to a number before you do math.
midThe only key in the response. It has no timestamp, so record your own request time when you store values.

Notes

Pricing

$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorar más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
Polymarket$0.012 por llamadaJSON
Polymarket$0.012 por llamadaJSON
Polymarket$0.012 por llamadaJSON
Polymarket$0.012 por llamadaJSON
Polymarket$0.012 por llamadaJSON
Polymarket$0.012 por llamadaJSON

Preguntas

FAQ

¿Cómo uso la API de Polymarket Get midpoint price?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/polymarket/midpoint con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.

¿Cuánto cuesta la API de Polymarket Get midpoint price?

$0.012 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de Polymarket Get midpoint price?

Requeridos: token_id (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de Polymarket Get midpoint price?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de Polymarket?

No. Polymarket Get midpoint price funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Polymarket por separado.