Skip to main content
GET
/
v1
/
execution-price
Execution Price (Slippage)
curl --request GET \
  --url https://api.polydata.live/v1/execution-price
{
  "data.requested_amount": 123,
  "data.filled_amount": 123,
  "data.average_price": 123,
  "data.best_price": 123,
  "data.slippage": 123,
  "data.slippage_bps": 123,
  "data.fully_filled": true,
  "data.fills": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.polydata.live/llms.txt

Use this file to discover all available pages before exploring further.

Returns the volume-weighted average price (VWAP) for a hypothetical order at a historical moment. Walks the full orderbook, level by level, until the order is filled.

Query Parameters

asset_id
string
required
Outcome token ID
side
string
required
BUY (eats asks) or SELL (eats bids)
amount
number
required
Order size to simulate
timestamp
number
required
Simulate at this time (Unix ms)

Response

data.requested_amount
number
Original order size
data.filled_amount
number
Actually filled (may be less if liquidity ran out)
data.average_price
number
VWAP across all fills
data.best_price
number
Best price (top of book)
data.slippage
number
average_price - best_price
data.slippage_bps
number
Slippage in basis points
data.fully_filled
boolean
Whether the entire order was filled
data.fills
array
First 10 levels: {price, size}

Example

curl "https://api.polydata.live/v1/execution-price?asset_id=xxx&side=BUY&amount=1000&timestamp=1776241000000" \
  -H "Authorization: Bearer pd_live_xxxxx"
{
  "success": true,
  "data": {
    "side": "BUY",
    "requested_amount": 1000,
    "filled_amount": 1000,
    "average_price": 0.5034,
    "best_price": 0.5000,
    "slippage": 0.0034,
    "slippage_bps": 68.0,
    "fully_filled": true,
    "fills": [
      { "price": 0.500, "size": 200 },
      { "price": 0.502, "size": 350 },
      { "price": 0.505, "size": 450 }
    ]
  }
}
See the Slippage Simulation Guide for practical use cases.