Add scraped Polymarket documentation (117 files)

This commit is contained in:
Etherdrake
2026-02-14 12:59:26 +01:00
parent 26c6b35691
commit 9263557be6
119 changed files with 27955 additions and 0 deletions
@@ -0,0 +1,152 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Create deposit addresses
> Generate unique deposit addresses for depositing assets to your Polymarket wallet.
**How it works:**
1. Submit your Polymarket wallet address
2. Receive deposit addresses for each blockchain type (EVM, Solana, Bitcoin)
3. Send assets from any supported chain to the appropriate deposit address
4. Assets are automatically bridged and swapped to USDC.e on Polygon
5. USDC.e is credited to your Polymarket wallet for trading
**Supported Assets:**
Use `/supported-assets` to see all available chains and tokens you can deposit from.
## OpenAPI
````yaml api-reference/bridge-api-openapi.yaml post /deposit
openapi: 3.0.3
info:
title: Polymarket Bridge API
version: 1.0.0
description: >
HTTP API for Polymarket bridge and swap operations.
Polymarket uses USDC.e (Bridged USDC) on Polygon as collateral for all
trading activities. This API enables users to bridge assets from various
chains and swap them to USDC.e on Polygon for seamless trading.
servers:
- url: https://bridge.polymarket.com
description: Polymarket Bridge API
security: []
tags:
- name: Bridge
description: Bridge and swap operations for Polymarket
paths:
/deposit:
post:
tags:
- Bridge
summary: Create deposit addresses
description: >
Generate unique deposit addresses for depositing assets to your
Polymarket wallet.
**How it works:**
1. Submit your Polymarket wallet address
2. Receive deposit addresses for each blockchain type (EVM, Solana,
Bitcoin)
3. Send assets from any supported chain to the appropriate deposit
address
4. Assets are automatically bridged and swapped to USDC.e on Polygon
5. USDC.e is credited to your Polymarket wallet for trading
**Supported Assets:**
Use `/supported-assets` to see all available chains and tokens you can
deposit from.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepositRequest'
example:
address: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
responses:
'201':
description: Deposit addresses created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DepositResponse'
'400':
description: Bad Request - Invalid address or request body
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
DepositRequest:
type: object
required:
- address
properties:
address:
$ref: '#/components/schemas/Address'
description: >-
Your Polymarket wallet address where deposited funds will be
credited as USDC.e
DepositResponse:
type: object
properties:
address:
type: object
description: Deposit addresses for different blockchain networks
properties:
evm:
type: string
description: >-
EVM-compatible deposit address (Ethereum, Polygon, Arbitrum,
Base, etc.)
example: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
svm:
type: string
description: Solana Virtual Machine deposit address
example: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
btc:
type: string
description: Bitcoin deposit address
example: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
note:
type: string
description: Additional information about the deposit addresses
example: >-
Only certain chains and tokens are supported. See /supported-assets
for details.
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
Address:
type: string
description: Ethereum address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
````
@@ -0,0 +1,192 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Create withdrawal addresses
> Generate unique deposit addresses for withdrawing USDC.e from your Polymarket wallet to any supported chain and token.
<Card>
**⚠️ Important:** Do not pre-generate withdrawal addresses. Only generate them when you are ready to execute the withdrawal. Each address is configured for a specific destination.
</Card>
**How it works:**
1. Specify your Polymarket wallet address, destination chain, token, and recipient address
2. Receive deposit addresses for each blockchain type (EVM, Solana, Bitcoin)
3. Send USDC.e from your Polymarket wallet to the appropriate deposit address
4. Funds are automatically bridged and swapped to your desired token
5. Funds arrive at your destination wallet
**Supported Destinations:**
Use `/supported-assets` to see all available chains and tokens you can withdraw to.
## OpenAPI
````yaml api-reference/bridge-api-openapi.yaml post /withdraw
openapi: 3.0.3
info:
title: Polymarket Bridge API
version: 1.0.0
description: >
HTTP API for Polymarket bridge and swap operations.
Polymarket uses USDC.e (Bridged USDC) on Polygon as collateral for all
trading activities. This API enables users to bridge assets from various
chains and swap them to USDC.e on Polygon for seamless trading.
servers:
- url: https://bridge.polymarket.com
description: Polymarket Bridge API
security: []
tags:
- name: Bridge
description: Bridge and swap operations for Polymarket
paths:
/withdraw:
post:
tags:
- Bridge
summary: Create withdrawal addresses
description: >
Generate unique deposit addresses for withdrawing USDC.e from your
Polymarket wallet to any supported chain and token.
<Card>
**⚠️ Important:** Do not pre-generate withdrawal addresses. Only
generate them when you are ready to execute the withdrawal. Each address
is configured for a specific destination.
</Card>
**How it works:**
1. Specify your Polymarket wallet address, destination chain, token, and
recipient address
2. Receive deposit addresses for each blockchain type (EVM, Solana,
Bitcoin)
3. Send USDC.e from your Polymarket wallet to the appropriate deposit
address
4. Funds are automatically bridged and swapped to your desired token
5. Funds arrive at your destination wallet
**Supported Destinations:**
Use `/supported-assets` to see all available chains and tokens you can
withdraw to.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WithdrawalRequest'
example:
address: '0x9156dd10bea4c8d7e2d591b633d1694b1d764756'
toChainId: '1'
toTokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
recipientAddr: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
responses:
'201':
description: Withdrawal addresses created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DepositResponse'
example:
address:
evm: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
svm: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
btc: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
note: >-
Send funds to these addresses to bridge to your destination
chain and token.
'400':
description: Bad Request - Invalid or missing parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
WithdrawalRequest:
type: object
required:
- address
- toChainId
- toTokenAddress
- recipientAddr
properties:
address:
$ref: '#/components/schemas/Address'
description: Source Polymarket wallet address on Polygon
toChainId:
type: string
description: >-
Destination chain ID (e.g., "1" for Ethereum, "8453" for Base,
"1151111081099710" for Solana)
example: '1'
toTokenAddress:
type: string
description: Destination token contract address
example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
recipientAddr:
type: string
description: Destination wallet address where funds will be sent
example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
DepositResponse:
type: object
properties:
address:
type: object
description: Deposit addresses for different blockchain networks
properties:
evm:
type: string
description: >-
EVM-compatible deposit address (Ethereum, Polygon, Arbitrum,
Base, etc.)
example: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
svm:
type: string
description: Solana Virtual Machine deposit address
example: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
btc:
type: string
description: Bitcoin deposit address
example: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
note:
type: string
description: Additional information about the deposit addresses
example: >-
Only certain chains and tokens are supported. See /supported-assets
for details.
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
Address:
type: string
description: Ethereum address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
````
+263
View File
@@ -0,0 +1,263 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get a quote
> Get an estimated quote for a deposit or withdrawal, including output amounts, checkout time, and a detailed fee breakdown.
**Use Cases:**
- Preview fees and estimated output before executing a deposit or withdrawal
- Compare costs across different token/chain combinations
- Get the `quoteId` to reference this specific quote
**Notes:**
- Quotes are estimates and actual amounts may vary slightly due to market conditions
- See `/supported-assets` for a list of all supported chains and tokens
## OpenAPI
````yaml api-reference/bridge-api-openapi.yaml post /quote
openapi: 3.0.3
info:
title: Polymarket Bridge API
version: 1.0.0
description: >
HTTP API for Polymarket bridge and swap operations.
Polymarket uses USDC.e (Bridged USDC) on Polygon as collateral for all
trading activities. This API enables users to bridge assets from various
chains and swap them to USDC.e on Polygon for seamless trading.
servers:
- url: https://bridge.polymarket.com
description: Polymarket Bridge API
security: []
tags:
- name: Bridge
description: Bridge and swap operations for Polymarket
paths:
/quote:
post:
tags:
- Bridge
summary: Get a quote
description: >
Get an estimated quote for a deposit or withdrawal, including output
amounts, checkout time, and a detailed fee breakdown.
**Use Cases:**
- Preview fees and estimated output before executing a deposit or
withdrawal
- Compare costs across different token/chain combinations
- Get the `quoteId` to reference this specific quote
**Notes:**
- Quotes are estimates and actual amounts may vary slightly due to
market conditions
- See `/supported-assets` for a list of all supported chains and tokens
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/QuoteRequest'
example:
fromAmountBaseUnit: '10000000'
fromChainId: '137'
fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575'
toChainId: '137'
toTokenAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
responses:
'200':
description: Quote retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/QuoteResponse'
example:
estCheckoutTimeMs: 25000
estFeeBreakdown:
appFeeLabel: Fun.xyz fee
appFeePercent: 0
appFeeUsd: 0
fillCostPercent: 0
fillCostUsd: 0
gasUsd: 0.003854
maxSlippage: 0
minReceived: 14.488305
swapImpact: 0
swapImpactUsd: 0
totalImpact: 0
totalImpactUsd: 0
estInputUsd: 14.488305
estOutputUsd: 14.488305
estToTokenBaseUnit: '14491203'
quoteId: >-
0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5
'400':
description: Bad Request - Missing required field
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
missingFromAmount:
value:
error: fromAmountBaseUnit is required
missingFromChainId:
value:
error: fromChainId is required
missingFromTokenAddress:
value:
error: fromTokenAddress is required
missingRecipientAddress:
value:
error: recipientAddress is required
missingToChainId:
value:
error: toChainId is required
missingToTokenAddress:
value:
error: toTokenAddress is required
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: cannot get quote
components:
schemas:
QuoteRequest:
type: object
required:
- fromAmountBaseUnit
- fromChainId
- fromTokenAddress
- recipientAddress
- toChainId
- toTokenAddress
properties:
fromAmountBaseUnit:
type: string
description: Amount of tokens to send
example: '10000000'
fromChainId:
type: string
description: Source Chain ID
example: '137'
fromTokenAddress:
type: string
description: Source token address
example: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
recipientAddress:
type: string
description: Address of the recipient
example: '0x17eC161f126e82A8ba337f4022d574DBEaFef575'
toChainId:
type: string
description: Destination Chain ID
example: '137'
toTokenAddress:
type: string
description: Destination token address
example: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
QuoteResponse:
type: object
properties:
estCheckoutTimeMs:
type: integer
description: Estimated time to complete the checkout in milliseconds
example: 25000
estFeeBreakdown:
$ref: '#/components/schemas/FeeBreakdown'
estInputUsd:
type: number
description: Estimated token amount received in USD
example: 14.488305
estOutputUsd:
type: number
description: Estimated token amount sent in USD
example: 14.488305
estToTokenBaseUnit:
type: string
description: Estimated token amount received
example: '14491203'
quoteId:
type: string
description: Unique quote id of the request
example: '0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5'
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
FeeBreakdown:
type: object
description: Breakdown of the estimated fees
properties:
appFeeLabel:
type: string
description: Label of the app fee
example: Fun.xyz fee
appFeePercent:
type: number
description: App fees as a percentage of the total amount sent
example: 0
appFeeUsd:
type: number
description: App fees in USD
example: 0
fillCostPercent:
type: number
description: Fill cost percentage of the total amount sent
example: 0
fillCostUsd:
type: number
description: Fill cost in USD
example: 0
gasUsd:
type: number
description: Gas fee in USD
example: 0.003854
maxSlippage:
type: number
description: Maximum potential slippage as a percentage
example: 0
minReceived:
type: number
description: Amount after factoring slippage
example: 14.488305
swapImpact:
type: number
description: Swap impact as a percentage of the total amount sent
example: 0
swapImpactUsd:
type: number
description: Swap impact of the transaction in USD
example: 0
totalImpact:
type: number
description: Total impact as a percentage of the total amount sent
example: 0
totalImpactUsd:
type: number
description: Impact cost of the transaction
example: 0
````
@@ -0,0 +1,132 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get supported assets
> Retrieve all supported chains and tokens for deposits and withdrawals.
**USDC.e on Polygon:**
Polymarket uses USDC.e (Bridged USDC from Ethereum) on Polygon as the native collateral for all markets. When you deposit assets from other chains, they are automatically bridged and swapped to USDC.e on Polygon. When you withdraw, your USDC.e is bridged and swapped to your desired token on the destination chain.
**Minimum Amounts:**
Each asset has a `minCheckoutUsd` field indicating the minimum amount required in USD. Make sure your deposit or withdrawal meets this minimum to avoid transaction failures.
## OpenAPI
````yaml api-reference/bridge-api-openapi.yaml get /supported-assets
openapi: 3.0.3
info:
title: Polymarket Bridge API
version: 1.0.0
description: >
HTTP API for Polymarket bridge and swap operations.
Polymarket uses USDC.e (Bridged USDC) on Polygon as collateral for all
trading activities. This API enables users to bridge assets from various
chains and swap them to USDC.e on Polygon for seamless trading.
servers:
- url: https://bridge.polymarket.com
description: Polymarket Bridge API
security: []
tags:
- name: Bridge
description: Bridge and swap operations for Polymarket
paths:
/supported-assets:
get:
tags:
- Bridge
summary: Get supported assets
description: >
Retrieve all supported chains and tokens for deposits and withdrawals.
**USDC.e on Polygon:**
Polymarket uses USDC.e (Bridged USDC from Ethereum) on Polygon as the
native collateral for all markets. When you deposit assets from other
chains, they are automatically bridged and swapped to USDC.e on Polygon.
When you withdraw, your USDC.e is bridged and swapped to your desired
token on the destination chain.
**Minimum Amounts:**
Each asset has a `minCheckoutUsd` field indicating the minimum amount
required in USD. Make sure your deposit or withdrawal meets this minimum
to avoid transaction failures.
responses:
'200':
description: Successfully retrieved supported assets
content:
application/json:
schema:
$ref: '#/components/schemas/SupportedAssetsResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
SupportedAssetsResponse:
type: object
properties:
supportedAssets:
type: array
items:
$ref: '#/components/schemas/SupportedAsset'
description: >-
List of supported assets with minimum amounts for deposits and
withdrawals
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
SupportedAsset:
type: object
properties:
chainId:
type: string
description: Chain ID
example: '1'
chainName:
type: string
description: Human-readable chain name
example: Ethereum
token:
$ref: '#/components/schemas/Token'
minCheckoutUsd:
type: number
description: Minimum amount in USD for deposits and withdrawals
example: 45
Token:
type: object
properties:
name:
type: string
description: Full token name
example: USD Coin
symbol:
type: string
description: Token symbol
example: USDC
address:
type: string
description: Token contract address
example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
decimals:
type: integer
description: Token decimals
example: 6
````
@@ -0,0 +1,212 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get transaction status
> Get the transaction status for all deposits and withdrawals associated with a given address.
**Usage:**
- Use the deposit address returned from the `/deposit` or `/withdraw` endpoint (EVM, SVM, or BTC address)
- Poll this endpoint to track the progress of your deposits and withdrawals
**Status Values:**
- `DEPOSIT_DETECTED`: Funds detected but not yet processing
- `PROCESSING`: Transaction is being routed and swapped
- `ORIGIN_TX_CONFIRMED`: Origin transaction has been confirmed on source chain
- `SUBMITTED`: Transaction has been submitted to destination chain
- `COMPLETED`: Transaction completed successfully
- `FAILED`: Transaction encountered an error and did not complete
**Notes:**
- Transactions typically complete within a few minutes, but may take longer depending on network conditions
- An empty transactions array means no transactions have been made to this address yet
## OpenAPI
````yaml api-reference/bridge-api-openapi.yaml get /status/{address}
openapi: 3.0.3
info:
title: Polymarket Bridge API
version: 1.0.0
description: >
HTTP API for Polymarket bridge and swap operations.
Polymarket uses USDC.e (Bridged USDC) on Polygon as collateral for all
trading activities. This API enables users to bridge assets from various
chains and swap them to USDC.e on Polygon for seamless trading.
servers:
- url: https://bridge.polymarket.com
description: Polymarket Bridge API
security: []
tags:
- name: Bridge
description: Bridge and swap operations for Polymarket
paths:
/status/{address}:
get:
tags:
- Bridge
summary: Get transaction status
description: >
Get the transaction status for all deposits and withdrawals associated
with a given address.
**Usage:**
- Use the deposit address returned from the `/deposit` or `/withdraw`
endpoint (EVM, SVM, or BTC address)
- Poll this endpoint to track the progress of your deposits and
withdrawals
**Status Values:**
- `DEPOSIT_DETECTED`: Funds detected but not yet processing
- `PROCESSING`: Transaction is being routed and swapped
- `ORIGIN_TX_CONFIRMED`: Origin transaction has been confirmed on source
chain
- `SUBMITTED`: Transaction has been submitted to destination chain
- `COMPLETED`: Transaction completed successfully
- `FAILED`: Transaction encountered an error and did not complete
**Notes:**
- Transactions typically complete within a few minutes, but may take
longer depending on network conditions
- An empty transactions array means no transactions have been made to
this address yet
parameters:
- name: address
in: path
required: true
description: >-
The address to query for transaction status (EVM, SVM, or BTC
address from the `/deposit` or `/withdraw` response)
schema:
type: string
example: EXoZue2avJae1d45B3fVw2unhkrtToSYQqHtHgfZ2cbE
responses:
'200':
description: Successfully retrieved transaction status
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionStatusResponse'
example:
transactions:
- fromChainId: '1151111081099710'
fromTokenAddress: '11111111111111111111111111111111'
fromAmountBaseUnit: '13566635'
toChainId: '137'
toTokenAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
status: DEPOSIT_DETECTED
- fromChainId: '1151111081099710'
fromTokenAddress: '11111111111111111111111111111111'
fromAmountBaseUnit: '13400000'
toChainId: '137'
toTokenAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
createdTimeMs: 1757646914535
status: PROCESSING
- fromChainId: '1151111081099710'
fromTokenAddress: '11111111111111111111111111111111'
fromAmountBaseUnit: '13500152'
toChainId: '137'
toTokenAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
txHash: >-
3atr19NAiNCYt24RHM1WnzZp47RXskpTDzspJoCBBaMFwUB8fk37hFkxz35P5UEnnmWz21rb2t5wJ8pq3EE2XnxU
createdTimeMs: 1757531217339
status: COMPLETED
'400':
description: Bad Request - Missing address parameter
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: address is required
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: cannot get transaction status
components:
schemas:
TransactionStatusResponse:
type: object
properties:
transactions:
type: array
items:
$ref: '#/components/schemas/Transaction'
description: List of transactions for the given address
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
Transaction:
type: object
properties:
fromChainId:
type: string
description: Source chain ID
example: '1151111081099710'
fromTokenAddress:
type: string
description: Source token contract address
example: '11111111111111111111111111111111'
fromAmountBaseUnit:
type: string
description: Amount in base units (without decimals)
example: '13566635'
toChainId:
type: string
description: Destination chain ID
example: '137'
toTokenAddress:
type: string
description: Destination token contract address
example: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
status:
type: string
description: Current status of the transaction
enum:
- DEPOSIT_DETECTED
- PROCESSING
- ORIGIN_TX_CONFIRMED
- SUBMITTED
- COMPLETED
- FAILED
example: COMPLETED
txHash:
type: string
description: Transaction hash (only available when status is COMPLETED)
example: >-
3atr19NAiNCYt24RHM1WnzZp47RXskpTDzspJoCBBaMFwUB8fk37hFkxz35P5UEnnmWz21rb2t5wJ8pq3EE2XnxU
createdTimeMs:
type: number
description: >-
Unix timestamp in milliseconds when transaction was created (missing
when status is DEPOSIT_DETECTED)
example: 1757531217339
````
@@ -0,0 +1,121 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get aggregated builder leaderboard
> Returns aggregated builder rankings with one entry per builder showing total for the specified time period. Supports pagination.
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /v1/builders/leaderboard
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/v1/builders/leaderboard:
get:
tags:
- Builders
summary: Get aggregated builder leaderboard
description: >-
Returns aggregated builder rankings with one entry per builder showing
total for the specified time period. Supports pagination.
parameters:
- in: query
name: timePeriod
schema:
type: string
enum:
- DAY
- WEEK
- MONTH
- ALL
default: DAY
description: |
The time period to aggregate results over.
- in: query
name: limit
schema:
type: integer
default: 25
minimum: 0
maximum: 50
description: Maximum number of builders to return
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 1000
description: Starting index for pagination
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LeaderboardEntry'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
LeaderboardEntry:
type: object
properties:
rank:
type: string
description: The rank position of the builder
builder:
type: string
description: The builder name or identifier
volume:
type: number
description: Total trading volume attributed to this builder
activeUsers:
type: integer
description: Number of active users for this builder
verified:
type: boolean
description: Whether the builder is verified
builderLogo:
type: string
description: URL to the builder's logo image
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,110 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get daily builder volume time-series
> Returns daily time-series volume data with multiple entries per builder (one per day), each including a `dt` timestamp. No pagination.
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /v1/builders/volume
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/v1/builders/volume:
get:
tags:
- Builders
summary: Get daily builder volume time-series
description: >-
Returns daily time-series volume data with multiple entries per builder
(one per day), each including a `dt` timestamp. No pagination.
parameters:
- in: query
name: timePeriod
schema:
type: string
enum:
- DAY
- WEEK
- MONTH
- ALL
default: DAY
description: |
The time period to fetch daily records for.
responses:
'200':
description: Success - Returns array of daily volume records
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BuilderVolumeEntry'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
BuilderVolumeEntry:
type: object
properties:
dt:
type: string
format: date-time
description: The timestamp for this volume entry in ISO 8601 format
example: '2025-11-15T00:00:00Z'
builder:
type: string
description: The builder name or identifier
builderLogo:
type: string
description: URL to the builder's logo image
verified:
type: boolean
description: Whether the builder is verified
volume:
type: number
description: Trading volume for this builder on this date
activeUsers:
type: integer
description: Number of active users for this builder on this date
rank:
type: string
description: The rank position of the builder on this date
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,212 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get comments by comment id
## OpenAPI
````yaml api-reference/gamma-openapi.json get /comments/{id}
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/comments/{id}:
get:
tags:
- Comments
summary: Get comments by comment id
operationId: getCommentsById
parameters:
- name: id
in: path
required: true
schema:
type: integer
- name: get_positions
in: query
schema:
type: boolean
responses:
'200':
description: Comments
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Comment'
components:
schemas:
Comment:
type: object
properties:
id:
type: string
body:
type: string
nullable: true
parentEntityType:
type: string
nullable: true
parentEntityID:
type: integer
nullable: true
parentCommentID:
type: string
nullable: true
userAddress:
type: string
nullable: true
replyAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
reactions:
type: array
items:
$ref: '#/components/schemas/Reaction'
reportCount:
type: integer
nullable: true
reactionCount:
type: integer
nullable: true
CommentProfile:
type: object
properties:
name:
type: string
nullable: true
pseudonym:
type: string
nullable: true
displayUsernamePublic:
type: boolean
nullable: true
bio:
type: string
nullable: true
isMod:
type: boolean
nullable: true
isCreator:
type: boolean
nullable: true
proxyWallet:
type: string
nullable: true
baseAddress:
type: string
nullable: true
profileImage:
type: string
nullable: true
profileImageOptimized:
$ref: '#/components/schemas/ImageOptimization'
positions:
type: array
items:
$ref: '#/components/schemas/CommentPosition'
Reaction:
type: object
properties:
id:
type: string
commentID:
type: integer
nullable: true
reactionType:
type: string
nullable: true
icon:
type: string
nullable: true
userAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
ImageOptimization:
type: object
properties:
id:
type: string
imageUrlSource:
type: string
nullable: true
imageUrlOptimized:
type: string
nullable: true
imageSizeKbSource:
type: number
nullable: true
imageSizeKbOptimized:
type: number
nullable: true
imageOptimizedComplete:
type: boolean
nullable: true
imageOptimizedLastUpdated:
type: string
nullable: true
relID:
type: integer
nullable: true
field:
type: string
nullable: true
relname:
type: string
nullable: true
CommentPosition:
type: object
properties:
tokenId:
type: string
nullable: true
positionSize:
type: string
nullable: true
````
@@ -0,0 +1,237 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get comments by user address
## OpenAPI
````yaml api-reference/gamma-openapi.json get /comments/user_address/{user_address}
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/comments/user_address/{user_address}:
get:
tags:
- Comments
- Profiles
summary: Get comments by user address
operationId: getCommentsByUserAddress
parameters:
- name: user_address
in: path
required: true
schema:
type: string
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/ascending'
responses:
'200':
description: Comments
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Comment'
components:
parameters:
limit:
name: limit
in: query
schema:
type: integer
minimum: 0
offset:
name: offset
in: query
schema:
type: integer
minimum: 0
order:
name: order
in: query
schema:
type: string
description: Comma-separated list of fields to order by
ascending:
name: ascending
in: query
schema:
type: boolean
schemas:
Comment:
type: object
properties:
id:
type: string
body:
type: string
nullable: true
parentEntityType:
type: string
nullable: true
parentEntityID:
type: integer
nullable: true
parentCommentID:
type: string
nullable: true
userAddress:
type: string
nullable: true
replyAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
reactions:
type: array
items:
$ref: '#/components/schemas/Reaction'
reportCount:
type: integer
nullable: true
reactionCount:
type: integer
nullable: true
CommentProfile:
type: object
properties:
name:
type: string
nullable: true
pseudonym:
type: string
nullable: true
displayUsernamePublic:
type: boolean
nullable: true
bio:
type: string
nullable: true
isMod:
type: boolean
nullable: true
isCreator:
type: boolean
nullable: true
proxyWallet:
type: string
nullable: true
baseAddress:
type: string
nullable: true
profileImage:
type: string
nullable: true
profileImageOptimized:
$ref: '#/components/schemas/ImageOptimization'
positions:
type: array
items:
$ref: '#/components/schemas/CommentPosition'
Reaction:
type: object
properties:
id:
type: string
commentID:
type: integer
nullable: true
reactionType:
type: string
nullable: true
icon:
type: string
nullable: true
userAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
ImageOptimization:
type: object
properties:
id:
type: string
imageUrlSource:
type: string
nullable: true
imageUrlOptimized:
type: string
nullable: true
imageSizeKbSource:
type: number
nullable: true
imageSizeKbOptimized:
type: number
nullable: true
imageOptimizedComplete:
type: boolean
nullable: true
imageOptimizedLastUpdated:
type: string
nullable: true
relID:
type: integer
nullable: true
field:
type: string
nullable: true
relname:
type: string
nullable: true
CommentPosition:
type: object
properties:
tokenId:
type: string
nullable: true
positionSize:
type: string
nullable: true
````
@@ -0,0 +1,251 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# List comments
## OpenAPI
````yaml api-reference/gamma-openapi.json get /comments
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/comments:
get:
tags:
- Comments
summary: List comments
operationId: listComments
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/ascending'
- name: parent_entity_type
in: query
schema:
type: string
enum:
- Event
- Series
- market
- name: parent_entity_id
in: query
schema:
type: integer
- name: get_positions
in: query
schema:
type: boolean
- name: holders_only
in: query
schema:
type: boolean
responses:
'200':
description: List of comments
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Comment'
components:
parameters:
limit:
name: limit
in: query
schema:
type: integer
minimum: 0
offset:
name: offset
in: query
schema:
type: integer
minimum: 0
order:
name: order
in: query
schema:
type: string
description: Comma-separated list of fields to order by
ascending:
name: ascending
in: query
schema:
type: boolean
schemas:
Comment:
type: object
properties:
id:
type: string
body:
type: string
nullable: true
parentEntityType:
type: string
nullable: true
parentEntityID:
type: integer
nullable: true
parentCommentID:
type: string
nullable: true
userAddress:
type: string
nullable: true
replyAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
reactions:
type: array
items:
$ref: '#/components/schemas/Reaction'
reportCount:
type: integer
nullable: true
reactionCount:
type: integer
nullable: true
CommentProfile:
type: object
properties:
name:
type: string
nullable: true
pseudonym:
type: string
nullable: true
displayUsernamePublic:
type: boolean
nullable: true
bio:
type: string
nullable: true
isMod:
type: boolean
nullable: true
isCreator:
type: boolean
nullable: true
proxyWallet:
type: string
nullable: true
baseAddress:
type: string
nullable: true
profileImage:
type: string
nullable: true
profileImageOptimized:
$ref: '#/components/schemas/ImageOptimization'
positions:
type: array
items:
$ref: '#/components/schemas/CommentPosition'
Reaction:
type: object
properties:
id:
type: string
commentID:
type: integer
nullable: true
reactionType:
type: string
nullable: true
icon:
type: string
nullable: true
userAddress:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
profile:
$ref: '#/components/schemas/CommentProfile'
ImageOptimization:
type: object
properties:
id:
type: string
imageUrlSource:
type: string
nullable: true
imageUrlOptimized:
type: string
nullable: true
imageSizeKbSource:
type: number
nullable: true
imageSizeKbOptimized:
type: number
nullable: true
imageOptimizedComplete:
type: boolean
nullable: true
imageOptimizedLastUpdated:
type: string
nullable: true
relID:
type: integer
nullable: true
field:
type: string
nullable: true
relname:
type: string
nullable: true
CommentPosition:
type: object
properties:
tokenId:
type: string
nullable: true
positionSize:
type: string
nullable: true
````
@@ -0,0 +1,197 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get closed positions for a user
> Fetches closed positions for a user(address)
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /closed-positions
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/closed-positions:
get:
tags:
- Core
summary: Get closed positions for a user
description: Fetches closed positions for a user(address)
parameters:
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
description: The address of the user in question
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
description: >-
The conditionId of the market in question. Supports multiple csv
separated values. Cannot be used with the eventId param.
- in: query
name: title
schema:
type: string
maxLength: 100
description: Filter by market title
- in: query
name: eventId
style: form
explode: false
schema:
type: array
items:
type: integer
minimum: 1
description: >-
The event id of the event in question. Supports multiple csv
separated values. Returns positions for all markets for those event
ids. Cannot be used with the market param.
- in: query
name: limit
schema:
type: integer
default: 10
minimum: 0
maximum: 50
description: The max number of positions to return
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 100000
description: The starting index for pagination
- in: query
name: sortBy
schema:
type: string
enum:
- REALIZEDPNL
- TITLE
- PRICE
- AVGPRICE
- TIMESTAMP
default: REALIZEDPNL
description: The sort criteria
- in: query
name: sortDirection
schema:
type: string
enum:
- ASC
- DESC
default: DESC
description: The sort direction
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ClosedPosition'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
ClosedPosition:
type: object
properties:
proxyWallet:
$ref: '#/components/schemas/Address'
asset:
type: string
conditionId:
$ref: '#/components/schemas/Hash64'
avgPrice:
type: number
totalBought:
type: number
realizedPnl:
type: number
curPrice:
type: number
timestamp:
type: integer
format: int64
title:
type: string
slug:
type: string
icon:
type: string
eventSlug:
type: string
outcome:
type: string
outcomeIndex:
type: integer
oppositeOutcome:
type: string
oppositeAsset:
type: string
endDate:
type: string
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,224 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get current positions for a user
> Returns positions filtered by user and optional filters.
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /positions
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/positions:
get:
tags:
- Core
summary: Get current positions for a user
description: Returns positions filtered by user and optional filters.
parameters:
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
description: User address (required)
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
description: >-
Comma-separated list of condition IDs. Mutually exclusive with
eventId.
- in: query
name: eventId
style: form
explode: false
schema:
type: array
items:
type: integer
minimum: 1
description: Comma-separated list of event IDs. Mutually exclusive with market.
- in: query
name: sizeThreshold
schema:
type: number
default: 1
minimum: 0
- in: query
name: redeemable
schema:
type: boolean
default: false
- in: query
name: mergeable
schema:
type: boolean
default: false
- in: query
name: limit
schema:
type: integer
default: 100
minimum: 0
maximum: 500
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 10000
- in: query
name: sortBy
schema:
type: string
enum:
- CURRENT
- INITIAL
- TOKENS
- CASHPNL
- PERCENTPNL
- TITLE
- RESOLVING
- PRICE
- AVGPRICE
default: TOKENS
- in: query
name: sortDirection
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- in: query
name: title
schema:
type: string
maxLength: 100
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Position'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
Position:
type: object
properties:
proxyWallet:
$ref: '#/components/schemas/Address'
asset:
type: string
conditionId:
$ref: '#/components/schemas/Hash64'
size:
type: number
avgPrice:
type: number
initialValue:
type: number
currentValue:
type: number
cashPnl:
type: number
percentPnl:
type: number
totalBought:
type: number
realizedPnl:
type: number
percentRealizedPnl:
type: number
curPrice:
type: number
redeemable:
type: boolean
mergeable:
type: boolean
title:
type: string
slug:
type: string
icon:
type: string
eventSlug:
type: string
outcome:
type: string
outcomeIndex:
type: integer
oppositeOutcome:
type: string
oppositeAsset:
type: string
endDate:
type: string
negativeRisk:
type: boolean
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,140 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get top holders for markets
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /holders
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/holders:
get:
tags:
- Core
summary: Get top holders for markets
parameters:
- in: query
name: limit
schema:
type: integer
default: 20
minimum: 0
maximum: 20
description: Maximum number of holders to return per token. Capped at 20.
- in: query
name: market
required: true
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
description: Comma-separated list of condition IDs.
- in: query
name: minBalance
schema:
type: integer
default: 1
minimum: 0
maximum: 999999
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MetaHolder'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
MetaHolder:
type: object
properties:
token:
type: string
holders:
type: array
items:
$ref: '#/components/schemas/Holder'
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
Holder:
type: object
properties:
proxyWallet:
$ref: '#/components/schemas/Address'
bio:
type: string
asset:
type: string
pseudonym:
type: string
amount:
type: number
displayUsernamePublic:
type: boolean
outcomeIndex:
type: integer
name:
type: string
profileImage:
type: string
profileImageOptimized:
type: string
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
````
@@ -0,0 +1,97 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get total value of a user's positions
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /value
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/value:
get:
tags:
- Core
summary: Get total value of a user's positions
parameters:
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Value'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
Value:
type: object
properties:
user:
$ref: '#/components/schemas/Address'
value:
type: number
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,166 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get trader leaderboard rankings
> Returns trader leaderboard rankings filtered by category, time period, and ordering.
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /v1/leaderboard
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/v1/leaderboard:
get:
tags:
- Core
summary: Get trader leaderboard rankings
description: >-
Returns trader leaderboard rankings filtered by category, time period,
and ordering.
parameters:
- in: query
name: category
schema:
type: string
enum:
- OVERALL
- POLITICS
- SPORTS
- CRYPTO
- CULTURE
- MENTIONS
- WEATHER
- ECONOMICS
- TECH
- FINANCE
default: OVERALL
description: Market category for the leaderboard
- in: query
name: timePeriod
schema:
type: string
enum:
- DAY
- WEEK
- MONTH
- ALL
default: DAY
description: Time period for leaderboard results
- in: query
name: orderBy
schema:
type: string
enum:
- PNL
- VOL
default: PNL
description: Leaderboard ordering criteria
- in: query
name: limit
schema:
type: integer
default: 25
minimum: 1
maximum: 50
description: Max number of leaderboard traders to return
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 1000
description: Starting index for pagination
- in: query
name: user
schema:
$ref: '#/components/schemas/Address'
description: Limit leaderboard to a single user by address
- in: query
name: userName
schema:
type: string
description: Limit leaderboard to a single username
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TraderLeaderboardEntry'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
TraderLeaderboardEntry:
type: object
properties:
rank:
type: string
description: The rank position of the trader
proxyWallet:
$ref: '#/components/schemas/Address'
userName:
type: string
description: The trader's username
vol:
type: number
description: Trading volume for this trader
pnl:
type: number
description: Profit and loss for this trader
profileImage:
type: string
description: URL to the trader's profile image
xUsername:
type: string
description: The trader's X (Twitter) username
verifiedBadge:
type: boolean
description: Whether the trader has a verified badge
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,193 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get trades for a user or markets
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /trades
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/trades:
get:
tags:
- Core
summary: Get trades for a user or markets
parameters:
- in: query
name: limit
schema:
type: integer
default: 100
minimum: 0
maximum: 10000
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 10000
- in: query
name: takerOnly
schema:
type: boolean
default: true
- in: query
name: filterType
schema:
type: string
enum:
- CASH
- TOKENS
description: Must be provided together with filterAmount.
- in: query
name: filterAmount
schema:
type: number
minimum: 0
description: Must be provided together with filterType.
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
description: >-
Comma-separated list of condition IDs. Mutually exclusive with
eventId.
- in: query
name: eventId
style: form
explode: false
schema:
type: array
items:
type: integer
minimum: 1
description: Comma-separated list of event IDs. Mutually exclusive with market.
- in: query
name: user
schema:
$ref: '#/components/schemas/Address'
- in: query
name: side
schema:
type: string
enum:
- BUY
- SELL
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Trade'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Trade:
type: object
properties:
proxyWallet:
$ref: '#/components/schemas/Address'
side:
type: string
enum:
- BUY
- SELL
asset:
type: string
conditionId:
$ref: '#/components/schemas/Hash64'
size:
type: number
price:
type: number
timestamp:
type: integer
format: int64
title:
type: string
slug:
type: string
icon:
type: string
eventSlug:
type: string
outcome:
type: string
outcomeIndex:
type: integer
name:
type: string
pseudonym:
type: string
bio:
type: string
profileImage:
type: string
profileImageOptimized:
type: string
transactionHash:
type: string
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,233 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get user activity
> Returns on-chain activity for a user.
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /activity
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/activity:
get:
tags:
- Core
summary: Get user activity
description: Returns on-chain activity for a user.
parameters:
- in: query
name: limit
schema:
type: integer
default: 100
minimum: 0
maximum: 500
- in: query
name: offset
schema:
type: integer
default: 0
minimum: 0
maximum: 10000
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
description: >-
Comma-separated list of condition IDs. Mutually exclusive with
eventId.
- in: query
name: eventId
style: form
explode: false
schema:
type: array
items:
type: integer
minimum: 1
description: Comma-separated list of event IDs. Mutually exclusive with market.
- in: query
name: type
style: form
explode: false
schema:
type: array
items:
type: string
enum:
- TRADE
- SPLIT
- MERGE
- REDEEM
- REWARD
- CONVERSION
- MAKER_REBATE
- in: query
name: start
schema:
type: integer
minimum: 0
- in: query
name: end
schema:
type: integer
minimum: 0
- in: query
name: sortBy
schema:
type: string
enum:
- TIMESTAMP
- TOKENS
- CASH
default: TIMESTAMP
- in: query
name: sortDirection
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- in: query
name: side
schema:
type: string
enum:
- BUY
- SELL
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Activity'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
Activity:
type: object
properties:
proxyWallet:
$ref: '#/components/schemas/Address'
timestamp:
type: integer
format: int64
conditionId:
$ref: '#/components/schemas/Hash64'
type:
type: string
enum:
- TRADE
- SPLIT
- MERGE
- REDEEM
- REWARD
- CONVERSION
- MAKER_REBATE
size:
type: number
usdcSize:
type: number
transactionHash:
type: string
price:
type: number
asset:
type: string
side:
type: string
enum:
- BUY
- SELL
outcomeIndex:
type: integer
title:
type: string
slug:
type: string
icon:
type: string
eventSlug:
type: string
outcome:
type: string
name:
type: string
pseudonym:
type: string
bio:
type: string
profileImage:
type: string
profileImageOptimized:
type: string
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,52 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Data API Health check
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/:
get:
tags:
- Data API Status
summary: Data API Health check
operationId: getDataApiHealth
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
components:
schemas:
HealthResponse:
type: object
properties:
data:
type: string
example: OK
````
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+108
View File
@@ -0,0 +1,108 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get event tags
## OpenAPI
````yaml api-reference/gamma-openapi.json get /events/{id}/tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/events/{id}/tags:
get:
tags:
- Events
- Tags
summary: Get event tags
operationId: getEventTags
parameters:
- $ref: '#/components/parameters/pathId'
responses:
'200':
description: Tags attached to the event
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
'404':
description: Not found
components:
parameters:
pathId:
name: id
in: path
required: true
schema:
type: integer
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,56 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Gamma API Health check
## OpenAPI
````yaml api-reference/gamma-openapi.json get /status
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/status:
get:
tags:
- Gamma Status
summary: Gamma API Health check
operationId: getGammaStatus
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
example: OK
````
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,108 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get market tags by id
## OpenAPI
````yaml api-reference/gamma-openapi.json get /markets/{id}/tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/markets/{id}/tags:
get:
tags:
- Markets
- Tags
summary: Get market tags by id
operationId: getMarketTags
parameters:
- $ref: '#/components/parameters/pathId'
responses:
'200':
description: Tags attached to the market
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
'404':
description: Not found
components:
parameters:
pathId:
name: id
in: path
required: true
schema:
type: integer
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,161 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Download an accounting snapshot (ZIP of CSVs)
> Public endpoint (no auth) that returns an `application/zip` containing two CSV files generated from the same snapshot time.
**ZIP contents**
1) `positions.csv` (0+ rows)
- Columns (in order):
- `conditionId` (string): market condition id
- `asset` (string): outcome token id (uniquely identifies the position within a market)
- `size` (number): tokens, 6 decimals
- `curPrice` (number): per-token price/value in USDC, 6 decimals
- `valuationTime` (string): RFC3339 UTC timestamp
2) `equity.csv` (0 or 1 row)
- Columns (in order):
- `cashBalance` (number): onchain USDC `balanceOf(user)` using Polygon USDC `0x2791bca1f2de4661ed88a30c99a7a9449aa84174`, 6 decimals
- `positionsValue` (number): \(\sum(\text{size} \times \text{curPrice})\) across `positions.csv`, 6 decimals
- `equity` (number): `cashBalance + positionsValue`, 6 decimals
- `valuationTime` (string): RFC3339 UTC timestamp (same snapshot time as `positions.csv`)
**Example `positions.csv`**
```csv
conditionId,asset,size,curPrice,valuationTime
0xd007d71fd17b0913b9d7ff198f617caa96a9e4aab1bed7d6f9abd76bb17dd507,65396714035221124737265515219989336303267439172398528294132309725835127126381,90548.087076,0.064500,2026-01-21T18:30:00Z
0x96f6fb6567b5938fc3c2e75f9829d7287340b9581a9c4817b8bc0aff82e1c45f,10057237541929696185971116542487795282113077727880089878027691009747516185940,45666.487374,0.495000,2026-01-21T18:30:00Z
```
**Example `equity.csv`**
```csv
cashBalance,positionsValue,equity,valuationTime
125000.000000,28481009.037705,28606009.037705,2026-01-21T18:30:00Z
```
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /v1/accounting/snapshot
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/v1/accounting/snapshot:
get:
tags:
- Misc
summary: Download an accounting snapshot (ZIP of CSVs)
description: >
Public endpoint (no auth) that returns an `application/zip` containing
two CSV files generated from the same snapshot time.
**ZIP contents**
1) `positions.csv` (0+ rows)
- Columns (in order):
- `conditionId` (string): market condition id
- `asset` (string): outcome token id (uniquely identifies the position within a market)
- `size` (number): tokens, 6 decimals
- `curPrice` (number): per-token price/value in USDC, 6 decimals
- `valuationTime` (string): RFC3339 UTC timestamp
2) `equity.csv` (0 or 1 row)
- Columns (in order):
- `cashBalance` (number): onchain USDC `balanceOf(user)` using Polygon USDC `0x2791bca1f2de4661ed88a30c99a7a9449aa84174`, 6 decimals
- `positionsValue` (number): \(\sum(\text{size} \times \text{curPrice})\) across `positions.csv`, 6 decimals
- `equity` (number): `cashBalance + positionsValue`, 6 decimals
- `valuationTime` (string): RFC3339 UTC timestamp (same snapshot time as `positions.csv`)
**Example `positions.csv`**
```csv
conditionId,asset,size,curPrice,valuationTime
0xd007d71fd17b0913b9d7ff198f617caa96a9e4aab1bed7d6f9abd76bb17dd507,65396714035221124737265515219989336303267439172398528294132309725835127126381,90548.087076,0.064500,2026-01-21T18:30:00Z
0x96f6fb6567b5938fc3c2e75f9829d7287340b9581a9c4817b8bc0aff82e1c45f,10057237541929696185971116542487795282113077727880089878027691009747516185940,45666.487374,0.495000,2026-01-21T18:30:00Z
```
**Example `equity.csv`**
```csv
cashBalance,positionsValue,equity,valuationTime
125000.000000,28481009.037705,28606009.037705,2026-01-21T18:30:00Z
```
parameters:
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
description: User address (0x-prefixed)
responses:
'200':
description: ZIP file containing `positions.csv` and `equity.csv`.
content:
application/zip:
schema:
type: string
format: binary
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,94 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get live volume for an event
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /live-volume
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/live-volume:
get:
tags:
- Misc
summary: Get live volume for an event
parameters:
- in: query
name: id
required: true
schema:
type: integer
minimum: 1
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LiveVolume'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
LiveVolume:
type: object
properties:
total:
type: number
markets:
type: array
items:
$ref: '#/components/schemas/MarketVolume'
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
MarketVolume:
type: object
properties:
market:
$ref: '#/components/schemas/Hash64'
value:
type: number
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
````
@@ -0,0 +1,87 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get open interest
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /oi
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/oi:
get:
tags:
- Misc
summary: Get open interest
parameters:
- in: query
name: market
style: form
explode: false
schema:
type: array
items:
$ref: '#/components/schemas/Hash64'
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenInterest'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Hash64:
type: string
description: 0x-prefixed 64-hex string
pattern: ^0x[a-fA-F0-9]{64}$
example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
OpenInterest:
type: object
properties:
market:
$ref: '#/components/schemas/Hash64'
value:
type: number
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,88 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get total markets a user has traded
## OpenAPI
````yaml api-reference/data-api-openapi.yaml get /traded
openapi: 3.0.3
info:
title: Polymarket Data API
version: 1.0.0
description: >
HTTP API for Polymarket data. This specification documents all public
routes.
servers:
- url: https://data-api.polymarket.com
description: Relative server (same host)
security: []
tags:
- name: Data API Status
description: Data API health check
- name: Core
- name: Builders
- name: Misc
paths:
/traded:
get:
tags:
- Misc
summary: Get total markets a user has traded
parameters:
- in: query
name: user
required: true
schema:
$ref: '#/components/schemas/Address'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Traded'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Address:
type: string
description: User Profile Address (0x-prefixed, 40 hex chars)
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
Traded:
type: object
properties:
user:
$ref: '#/components/schemas/Address'
traded:
type: integer
ErrorResponse:
type: object
properties:
error:
type: string
required:
- error
````
@@ -0,0 +1,177 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get multiple order books summaries by request
> Retrieves order book summaries for specified tokens via POST request
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml post /books
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/books:
post:
tags:
- Orderbook
summary: Get multiple order books summaries by request
description: Retrieves order book summaries for specified tokens via POST request
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BookRequest'
maxItems: 500
example:
- token_id: '1234567890'
- token_id: '0987654321'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrderBookSummary'
'400':
description: Bad request - Invalid payload or exceeds limit
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalid_payload:
value:
error: Invalid payload
exceeds_limit:
value:
error: Payload exceeds the limit
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
BookRequest:
type: object
required:
- token_id
properties:
token_id:
type: string
description: The unique identifier for the token
example: '1234567890'
side:
type: string
enum:
- BUY
- SELL
description: Optional side parameter for certain operations
example: BUY
OrderBookSummary:
type: object
required:
- market
- asset_id
- timestamp
- hash
- bids
- asks
- min_order_size
- tick_size
- neg_risk
properties:
market:
type: string
description: Market identifier
example: '0x1b6f76e5b8587ee896c35847e12d11e75290a8c3934c5952e8a9d6e4c6f03cfa'
asset_id:
type: string
description: Asset identifier
example: '1234567890'
timestamp:
type: string
format: date-time
description: Timestamp of the order book snapshot
example: '2023-10-01T12:00:00Z'
hash:
type: string
description: Hash of the order book state
example: 0xabc123def456...
bids:
type: array
items:
$ref: '#/components/schemas/OrderLevel'
description: Array of bid levels
asks:
type: array
items:
$ref: '#/components/schemas/OrderLevel'
description: Array of ask levels
min_order_size:
type: string
description: Minimum order size for this market
example: '0.001'
tick_size:
type: string
description: Minimum price increment
example: '0.01'
neg_risk:
type: boolean
description: Whether negative risk is enabled
example: false
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
OrderLevel:
type: object
required:
- price
- size
properties:
price:
type: string
description: Price level (as string to maintain precision)
example: '1800.50'
size:
type: string
description: Total size at this price level
example: '10.5'
````
@@ -0,0 +1,160 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get order book summary
> Retrieves the order book summary for a specific token
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml get /book
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/book:
get:
tags:
- Orderbook
summary: Get order book summary
description: Retrieves the order book summary for a specific token
parameters:
- name: token_id
in: query
required: true
schema:
type: string
description: The unique identifier for the token
example: '1234567890'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/OrderBookSummary'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: Invalid token id
'404':
description: Order book not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: No orderbook exists for the requested token id
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: error getting the orderbook
components:
schemas:
OrderBookSummary:
type: object
required:
- market
- asset_id
- timestamp
- hash
- bids
- asks
- min_order_size
- tick_size
- neg_risk
properties:
market:
type: string
description: Market identifier
example: '0x1b6f76e5b8587ee896c35847e12d11e75290a8c3934c5952e8a9d6e4c6f03cfa'
asset_id:
type: string
description: Asset identifier
example: '1234567890'
timestamp:
type: string
format: date-time
description: Timestamp of the order book snapshot
example: '2023-10-01T12:00:00Z'
hash:
type: string
description: Hash of the order book state
example: 0xabc123def456...
bids:
type: array
items:
$ref: '#/components/schemas/OrderLevel'
description: Array of bid levels
asks:
type: array
items:
$ref: '#/components/schemas/OrderLevel'
description: Array of ask levels
min_order_size:
type: string
description: Minimum order size for this market
example: '0.001'
tick_size:
type: string
description: Minimum price increment
example: '0.01'
neg_risk:
type: boolean
description: Whether negative risk is enabled
example: false
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
OrderLevel:
type: object
required:
- price
- size
properties:
price:
type: string
description: Price level (as string to maintain precision)
example: '1800.50'
size:
type: string
description: Total size at this price level
example: '10.5'
````
@@ -0,0 +1,116 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get market price
> Retrieves the market price for a specific token and side
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml get /price
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/price:
get:
tags:
- Pricing
summary: Get market price
description: Retrieves the market price for a specific token and side
parameters:
- name: token_id
in: query
required: true
schema:
type: string
description: The unique identifier for the token
example: '1234567890'
- name: side
in: query
required: true
schema:
type: string
enum:
- BUY
- SELL
description: The side of the market (BUY or SELL)
example: BUY
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/PriceResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalid_token:
value:
error: Invalid token id
invalid_side:
value:
error: Invalid side
'404':
description: Order book not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: No orderbook exists for the requested token id
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PriceResponse:
type: object
required:
- price
properties:
price:
type: string
description: The market price (as string to maintain precision)
example: '1800.50'
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,101 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get midpoint price
> Retrieves the midpoint price for a specific token
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml get /midpoint
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/midpoint:
get:
tags:
- Pricing
summary: Get midpoint price
description: Retrieves the midpoint price for a specific token
parameters:
- name: token_id
in: query
required: true
schema:
type: string
description: The unique identifier for the token
example: '1234567890'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/MidpointResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: Invalid token id
'404':
description: Order book not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: No orderbook exists for the requested token id
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
MidpointResponse:
type: object
required:
- mid
properties:
mid:
type: string
description: The midpoint price (as string to maintain precision)
example: '1800.75'
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,137 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get multiple market prices by request
> Retrieves market prices for specified tokens and sides via POST request
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml post /prices
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/prices:
post:
tags:
- Pricing
summary: Get multiple market prices by request
description: Retrieves market prices for specified tokens and sides via POST request
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PriceRequest'
maxItems: 500
example:
- token_id: '1234567890'
side: BUY
- token_id: '0987654321'
side: SELL
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/PricesResponse'
'400':
description: Bad request - Invalid payload, exceeds limit, or invalid side
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalid_payload:
value:
error: Invalid payload
exceeds_limit:
value:
error: Payload exceeds the limit
invalid_side:
value:
error: Invalid side
'404':
description: Order book not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: No orderbook exists for the requested token id
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PriceRequest:
type: object
required:
- token_id
- side
properties:
token_id:
type: string
description: The unique identifier for the token
example: '1234567890'
side:
type: string
enum:
- BUY
- SELL
description: The side of the market (BUY or SELL)
example: BUY
PricesResponse:
type: object
additionalProperties:
type: object
additionalProperties:
type: string
description: Map of token_id to side to price
example:
'1234567890':
BUY: '1800.50'
SELL: '1801.00'
'0987654321':
BUY: '50.25'
SELL: '50.30'
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,88 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get multiple market prices
> Retrieves market prices for multiple tokens and sides
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml get /prices
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/prices:
get:
tags:
- Pricing
summary: Get multiple market prices
description: Retrieves market prices for multiple tokens and sides
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/PricesResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PricesResponse:
type: object
additionalProperties:
type: object
additionalProperties:
type: string
description: Map of token_id to side to price
example:
'1234567890':
BUY: '1800.50'
SELL: '1801.00'
'0987654321':
BUY: '50.25'
SELL: '50.30'
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,146 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get price history for a traded token
> Fetches historical price data for a specified market token
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml get /prices-history
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/prices-history:
get:
tags:
- Pricing
summary: Get price history for a traded token
description: Fetches historical price data for a specified market token
parameters:
- name: market
in: query
required: true
schema:
type: string
description: The CLOB token ID for which to fetch price history
example: '1234567890'
- name: startTs
in: query
required: false
schema:
type: number
description: The start time, a Unix timestamp in UTC
example: 1697875200
- name: endTs
in: query
required: false
schema:
type: number
description: The end time, a Unix timestamp in UTC
example: 1697961600
- name: interval
in: query
required: false
schema:
type: string
enum:
- 1m
- 1w
- 1d
- 6h
- 1h
- max
description: >-
A string representing a duration ending at the current time.
Mutually exclusive with startTs and endTs
example: 1d
- name: fidelity
in: query
required: false
schema:
type: number
description: The resolution of the data, in minutes
example: 60
responses:
'200':
description: A list of timestamp/price pairs
content:
application/json:
schema:
$ref: '#/components/schemas/PriceHistoryResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Market not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PriceHistoryResponse:
type: object
required:
- history
properties:
history:
type: array
items:
type: object
required:
- t
- p
properties:
t:
type: number
description: UTC timestamp
example: 1697875200
p:
type: number
description: Price
example: 1800.75
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,154 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get public profile by wallet address
## OpenAPI
````yaml api-reference/gamma-openapi.json get /public-profile
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/public-profile:
get:
tags:
- Profiles
summary: Get public profile by wallet address
operationId: getPublicProfile
parameters:
- name: address
in: query
required: true
description: The wallet address (proxy wallet or user address)
schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
example: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b'
responses:
'200':
description: Public profile information
content:
application/json:
schema:
$ref: '#/components/schemas/PublicProfileResponse'
'400':
description: Invalid address format
content:
application/json:
schema:
$ref: '#/components/schemas/PublicProfileError'
example:
type: validation error
error: invalid address
'404':
description: Profile not found
content:
application/json:
schema:
$ref: '#/components/schemas/PublicProfileError'
example:
type: not found error
error: profile not found
components:
schemas:
PublicProfileResponse:
type: object
properties:
createdAt:
type: string
format: date-time
description: ISO 8601 timestamp of when the profile was created
nullable: true
proxyWallet:
type: string
description: The proxy wallet address
nullable: true
profileImage:
type: string
format: uri
description: URL to the profile image
nullable: true
displayUsernamePublic:
type: boolean
description: Whether the username is displayed publicly
nullable: true
bio:
type: string
description: Profile bio
nullable: true
pseudonym:
type: string
description: Auto-generated pseudonym
nullable: true
name:
type: string
description: User-chosen display name
nullable: true
users:
type: array
description: Array of associated user objects
nullable: true
items:
$ref: '#/components/schemas/PublicProfileUser'
xUsername:
type: string
description: X (Twitter) username
nullable: true
verifiedBadge:
type: boolean
description: Whether the profile has a verified badge
nullable: true
PublicProfileError:
type: object
description: Error response for public profile endpoint
properties:
type:
type: string
description: Error type classification
error:
type: string
description: Error message
PublicProfileUser:
type: object
description: User object associated with a public profile
properties:
id:
type: string
description: User ID
creator:
type: boolean
description: Whether the user is a creator
mod:
type: boolean
description: Whether the user is a moderator
````
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,97 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get sports metadata information
> Retrieves metadata for various sports including images, resolution sources, ordering preferences, tags, and series information. This endpoint provides comprehensive sport configuration data used throughout the platform.
## OpenAPI
````yaml api-reference/gamma-openapi.json get /sports
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/sports:
get:
tags:
- Sports
summary: Get sports metadata information
description: >-
Retrieves metadata for various sports including images, resolution
sources, ordering preferences, tags, and series information. This
endpoint provides comprehensive sport configuration data used throughout
the platform.
operationId: getSportsMetadata
responses:
'200':
description: >-
List of sports metadata objects containing sport configuration
details, visual assets, and related identifiers
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SportsMetadata'
components:
schemas:
SportsMetadata:
type: object
properties:
sport:
type: string
description: The sport identifier or abbreviation
image:
type: string
format: uri
description: URL to the sport's logo or image asset
resolution:
type: string
format: uri
description: >-
URL to the official resolution source for the sport (e.g., league
website)
ordering:
type: string
description: Preferred ordering for sport display, typically "home" or "away"
tags:
type: string
description: >-
Comma-separated list of tag IDs associated with the sport for
categorization and filtering
series:
type: string
description: >-
Series identifier linking the sport to a specific tournament or
season series
````
@@ -0,0 +1,71 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get valid sports market types
> Get a list of all valid sports market types available on the platform. Use these values when filtering markets by the sportsMarketTypes parameter.
## OpenAPI
````yaml api-reference/gamma-openapi.json get /sports/market-types
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/sports/market-types:
get:
tags:
- Sports
summary: Get valid sports market types
description: >-
Get a list of all valid sports market types available on the platform.
Use these values when filtering markets by the sportsMarketTypes
parameter.
operationId: getSportsMarketTypes
responses:
'200':
description: List of valid sports market types
content:
application/json:
schema:
$ref: '#/components/schemas/SportsMarketTypesResponse'
components:
schemas:
SportsMarketTypesResponse:
type: object
properties:
marketTypes:
type: array
description: List of all valid sports market types
items:
type: string
````
+137
View File
@@ -0,0 +1,137 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# List teams
## OpenAPI
````yaml api-reference/gamma-openapi.json get /teams
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/teams:
get:
tags:
- Sports
summary: List teams
operationId: listTeams
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/ascending'
- name: league
in: query
schema:
type: array
items:
type: string
- name: name
in: query
schema:
type: array
items:
type: string
- name: abbreviation
in: query
schema:
type: array
items:
type: string
responses:
'200':
description: List of teams
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Team'
components:
parameters:
limit:
name: limit
in: query
schema:
type: integer
minimum: 0
offset:
name: offset
in: query
schema:
type: integer
minimum: 0
order:
name: order
in: query
schema:
type: string
description: Comma-separated list of fields to order by
ascending:
name: ascending
in: query
schema:
type: boolean
schemas:
Team:
type: object
properties:
id:
type: integer
name:
type: string
nullable: true
league:
type: string
nullable: true
record:
type: string
nullable: true
logo:
type: string
nullable: true
abbreviation:
type: string
nullable: true
alias:
type: string
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
````
@@ -0,0 +1,119 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get bid-ask spreads
> Retrieves bid-ask spreads for multiple tokens
## OpenAPI
````yaml api-reference/clob-subset-openapi.yaml post /spreads
openapi: 3.0.3
info:
title: CLOB (Central Limit Order Book) API
description: >-
API for interacting with the Central Limit Order Book system, providing
orderbook data, prices, midpoints, and spreads
version: 1.0.0
contact:
name: CLOB API Team
license:
name: MIT
servers:
- url: https://clob.polymarket.com/
description: Production server
security: []
tags:
- name: Orderbook
description: Order book related operations
- name: Pricing
description: Price and midpoint operations
- name: Spreads
description: Spread calculation operations
paths:
/spreads:
post:
tags:
- Spreads
summary: Get bid-ask spreads
description: Retrieves bid-ask spreads for multiple tokens
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BookRequest'
maxItems: 500
example:
- token_id: '1234567890'
- token_id: '0987654321'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/SpreadsResponse'
'400':
description: Bad request - Invalid payload or exceeds limit
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalid_payload:
value:
error: Invalid payload
exceeds_limit:
value:
error: Payload exceeds the limit
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: error getting the spread
components:
schemas:
BookRequest:
type: object
required:
- token_id
properties:
token_id:
type: string
description: The unique identifier for the token
example: '1234567890'
side:
type: string
enum:
- BUY
- SELL
description: Optional side parameter for certain operations
example: BUY
SpreadsResponse:
type: object
additionalProperties:
type: string
description: Map of token_id to spread value
example:
'1234567890': '0.50'
'0987654321': '0.05'
Error:
type: object
required:
- error
properties:
error:
type: string
description: Error message describing what went wrong
example: Invalid token id
````
@@ -0,0 +1,94 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get related tags (relationships) by tag id
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/{id}/related-tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/{id}/related-tags:
get:
tags:
- Tags
summary: Get related tags (relationships) by tag id
operationId: getRelatedTagsById
parameters:
- $ref: '#/components/parameters/pathId'
- name: omit_empty
in: query
schema:
type: boolean
- name: status
in: query
schema:
type: string
enum:
- active
- closed
- all
responses:
'200':
description: Related tag relationships
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RelatedTag'
components:
parameters:
pathId:
name: id
in: path
required: true
schema:
type: integer
schemas:
RelatedTag:
type: object
properties:
id:
type: string
tagID:
type: integer
nullable: true
relatedTagID:
type: integer
nullable: true
rank:
type: integer
nullable: true
````
@@ -0,0 +1,94 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get related tags (relationships) by tag slug
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/slug/{slug}/related-tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/slug/{slug}/related-tags:
get:
tags:
- Tags
summary: Get related tags (relationships) by tag slug
operationId: getRelatedTagsBySlug
parameters:
- $ref: '#/components/parameters/pathSlug'
- name: omit_empty
in: query
schema:
type: boolean
- name: status
in: query
schema:
type: string
enum:
- active
- closed
- all
responses:
'200':
description: Related tag relationships
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RelatedTag'
components:
parameters:
pathSlug:
name: slug
in: path
required: true
schema:
type: string
schemas:
RelatedTag:
type: object
properties:
id:
type: string
tagID:
type: integer
nullable: true
relatedTagID:
type: integer
nullable: true
rank:
type: integer
nullable: true
````
+109
View File
@@ -0,0 +1,109 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get tag by id
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/{id}
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/{id}:
get:
tags:
- Tags
summary: Get tag by id
operationId: getTag
parameters:
- $ref: '#/components/parameters/pathId'
- name: include_template
in: query
schema:
type: boolean
responses:
'200':
description: Tag
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
'404':
description: Not found
components:
parameters:
pathId:
name: id
in: path
required: true
schema:
type: integer
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
+109
View File
@@ -0,0 +1,109 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get tag by slug
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/slug/{slug}
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/slug/{slug}:
get:
tags:
- Tags
summary: Get tag by slug
operationId: getTagBySlug
parameters:
- $ref: '#/components/parameters/pathSlug'
- name: include_template
in: query
schema:
type: boolean
responses:
'200':
description: Tag
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
'404':
description: Not found
components:
parameters:
pathSlug:
name: slug
in: path
required: true
schema:
type: string
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
@@ -0,0 +1,117 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get tags related to a tag id
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/{id}/related-tags/tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/{id}/related-tags/tags:
get:
tags:
- Tags
summary: Get tags related to a tag id
operationId: getTagsRelatedToATagById
parameters:
- $ref: '#/components/parameters/pathId'
- name: omit_empty
in: query
schema:
type: boolean
- name: status
in: query
schema:
type: string
enum:
- active
- closed
- all
responses:
'200':
description: Related tags
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
components:
parameters:
pathId:
name: id
in: path
required: true
schema:
type: integer
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
@@ -0,0 +1,117 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get tags related to a tag slug
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags/slug/{slug}/related-tags/tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags/slug/{slug}/related-tags/tags:
get:
tags:
- Tags
summary: Get tags related to a tag slug
operationId: getTagsRelatedToATagBySlug
parameters:
- $ref: '#/components/parameters/pathSlug'
- name: omit_empty
in: query
schema:
type: boolean
- name: status
in: query
schema:
type: string
enum:
- active
- closed
- all
responses:
'200':
description: Related tags
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
components:
parameters:
pathSlug:
name: slug
in: path
required: true
schema:
type: string
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````
+133
View File
@@ -0,0 +1,133 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# List tags
## OpenAPI
````yaml api-reference/gamma-openapi.json get /tags
openapi: 3.0.3
info:
title: Markets API
version: 1.0.0
description: REST API specification for public endpoints used by the Markets service.
servers:
- url: https://gamma-api.polymarket.com
description: Polymarket Gamma API Production Server
security: []
tags:
- name: Gamma Status
description: Gamma API status and health check
- name: Sports
description: Sports-related endpoints including teams and game data
- name: Tags
description: Tag management and related tag operations
- name: Events
description: Event management and event-related operations
- name: Markets
description: Market data and market-related operations
- name: Comments
description: Comment system and user interactions
- name: Series
description: Series management and related operations
- name: Profiles
description: User profile management
- name: Search
description: Search functionality across different entity types
paths:
/tags:
get:
tags:
- Tags
summary: List tags
operationId: listTags
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/ascending'
- name: include_template
in: query
schema:
type: boolean
- name: is_carousel
in: query
schema:
type: boolean
responses:
'200':
description: List of tags
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
components:
parameters:
limit:
name: limit
in: query
schema:
type: integer
minimum: 0
offset:
name: offset
in: query
schema:
type: integer
minimum: 0
order:
name: order
in: query
schema:
type: string
description: Comma-separated list of fields to order by
ascending:
name: ascending
in: query
schema:
type: boolean
schemas:
Tag:
type: object
properties:
id:
type: string
label:
type: string
nullable: true
slug:
type: string
nullable: true
forceShow:
type: boolean
nullable: true
publishedAt:
type: string
nullable: true
createdBy:
type: integer
nullable: true
updatedBy:
type: integer
nullable: true
createdAt:
type: string
format: date-time
nullable: true
updatedAt:
type: string
format: date-time
nullable: true
forceHide:
type: boolean
nullable: true
isCarousel:
type: boolean
nullable: true
````