Polymarket — Get a quote
Retrieve a quote with the Polymarket API. The request takes a from amount base unit, a from chain ID and a from token address. Use it for on-chain or crypto market research. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Polymarket — Get a quote
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
estCheckoutTimeMsintegerestFeeBreakdownobjectappFeeLabelstringappFeePercentintegerappFeeUsdintegerfillCostPercentintegerfillCostUsdintegergasUsdnumbermaxSlippageintegerminReceivednumberswapImpactnumberswapImpactUsdnumbertotalImpactnumbertotalImpactUsdnumber
estInputUsdnumberestOutputUsdnumberestToTokenBaseUnitstringquoteIdstring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
estCheckoutTimeMs?: number;
estFeeBreakdown?: {
appFeeLabel?: string;
appFeePercent?: number;
appFeeUsd?: number;
fillCostPercent?: number;
fillCostUsd?: number;
gasUsd?: number;
maxSlippage?: number;
minReceived?: number;
swapImpact?: number;
swapImpactUsd?: number;
totalImpact?: number;
totalImpactUsd?: number;
};
estInputUsd?: number;
estOutputUsd?: number;
estToTokenBaseUnit?: string;
quoteId?: string;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
PolymarketCurrent Polymarket — Get a quote · POST · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Total $0
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/polymarket/quote- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/polymarket/quote' \
-X POST \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
fromAmountBaseUnit | JSON request bodybody | string | Yes | Amount of tokens to send |
fromChainId | JSON request bodybody | string | Yes | Source Chain ID |
fromTokenAddress | JSON request bodybody | string | Yes | Source token address |
recipientAddress | JSON request bodybody | string | Yes | Address of the recipient |
toChainId | JSON request bodybody | string | Yes | Destination Chain ID |
toTokenAddress | JSON request bodybody | string | Yes | Destination token address |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.
{
"estCheckoutTimeMs": 27000,
"estFeeBreakdown": {
"appFeeLabel": "Swap fee",
"appFeePercent": 0,
"appFeeUsd": 0,
"fillCostPercent": 0,
"fillCostUsd": 0,
"gasUsd": 0.004491,
"maxSlippage": 0,
"minReceived": 9.894910999999999,
"swapImpact": 0.033805949847173104,
"swapImpactUsd": 0.0033799999999999998,
"totalImpact": 0.033805949847173104,
"totalImpactUsd": 0.00338
},
"estInputUsd": 9.99824,
"estOutputUsd": 9.99486,
"estToTokenBaseUnit": "9997559",
"quoteId": "0x1793282429d2747107a3ad309e09248c83f28f335df9c50cc8cb0b3188c2ca59"
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Polymarket — Get a quote
Retrieve a quote with the Polymarket API. The request takes a from amount base unit, a from chain ID and a from token address. Use it for on-chain or crypto market research. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.
## Available implementations
Polymarket · Polymarket — Get a quote: https://openany.si/markets/apis/capabilities/polymarket-get-a-quote?offering=70b660f4-7929-4594-8817-74364444d00c · $0 / call
## Selected API contract
Documentation: https://openany.si/apis/70b660f4-7929-4594-8817-74364444d00c
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/polymarket/quote
Price: $0 / call
Provider: Polymarket
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/polymarket/quote' \
-X POST \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "Polymarket — Get a quote",
"endpoint": "https://api.openany.si/v1/agent-apis/polymarket/quote",
"method": "POST",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "Get a quote — complete native JSON request body.",
"json_schema": {
"description": "Get a quote — complete native JSON request body.",
"examples": [
{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
],
"properties": {
"fromAmountBaseUnit": {
"description": "Amount of tokens to send",
"example": "10000000",
"type": "string"
},
"fromChainId": {
"description": "Source Chain ID",
"example": "137",
"type": "string"
},
"fromTokenAddress": {
"description": "Source token address",
"example": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"type": "string"
},
"recipientAddress": {
"description": "Address of the recipient",
"example": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"type": "string"
},
"toChainId": {
"description": "Destination Chain ID",
"example": "137",
"type": "string"
},
"toTokenAddress": {
"description": "Destination token address",
"example": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"type": "string"
}
},
"required": [
"fromAmountBaseUnit",
"fromChainId",
"fromTokenAddress",
"recipientAddress",
"toChainId",
"toTokenAddress"
],
"type": "object"
},
"location": "body",
"name": "body",
"nullable": false,
"pointer": "",
"required": true,
"type": "object"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example",
"request": {
"body": {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
},
"headers": {},
"path": {},
"query": {}
},
"response_body": {
"estCheckoutTimeMs": 27000,
"estFeeBreakdown": {
"appFeeLabel": "Swap fee",
"appFeePercent": 0,
"appFeeUsd": 0,
"fillCostPercent": 0,
"fillCostUsd": 0,
"gasUsd": 0.004491,
"maxSlippage": 0,
"minReceived": 9.894910999999999,
"swapImpact": 0.033805949847173104,
"swapImpactUsd": 0.0033799999999999998,
"totalImpact": 0.033805949847173104,
"totalImpactUsd": 0.00338
},
"estInputUsd": 9.99824,
"estOutputUsd": 9.99486,
"estToTokenBaseUnit": "9997559",
"quoteId": "0x1793282429d2747107a3ad309e09248c83f28f335df9c50cc8cb0b3188c2ca59"
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 1
Review these request fields before running. Keep the published provider and request method unchanged.
body- Get a quote — complete native JSON request body.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/polymarket/quote' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "fromAmountBaseUnit": "10000000", "fromChainId": "137", "fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", "recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575", "toChainId": "137", "toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "estCheckoutTimeMs": 27000, "estFeeBreakdown": { "appFeeLabel": "Swap fee", "appFeePercent": 0, "appFeeUsd": 0, "fillCostPercent": 0, "fillCostUsd": 0, "gasUsd": 0.004491, "maxSlippage": 0, "minReceived": 9.894910999999999, "swapImpact": 0.033805949847173104, "swapImpactUsd": 0.0033799999999999998, "totalImpact": 0.033805949847173104, "totalImpactUsd": 0.00338 }, "estInputUsd": 9.99824, "estOutputUsd": 9.99486, "estToTokenBaseUnit": "9997559", "quoteId": "0x1793282429d2747107a3ad309e09248c83f28f335df9c50cc8cb0b3188c2ca59" }