Update Polymarket documentation (2026-02-19)
- Added new documentation URLs from llms.txt index - Updated TARGET.md with 244 total documentation pages - Scraped new pages for trading, concepts, and API reference sections - Updated changelog and new index pages
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
> ## 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 fee rate by path parameter
|
||||
|
||||
> Retrieves the base fee rate for a specific token ID using the token ID as a path parameter.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /fee-rate/{token_id}
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/fee-rate/{token_id}:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get fee rate by path parameter
|
||||
description: >
|
||||
Retrieves the base fee rate for a specific token ID using the token ID
|
||||
as a path parameter.
|
||||
operationId: getFeeRateByPath
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: path
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved fee rate
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FeeRate'
|
||||
example:
|
||||
base_fee: 30
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - Fee rate not found for market
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: fee rate not found for market
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
FeeRate:
|
||||
type: object
|
||||
required:
|
||||
- base_fee
|
||||
properties:
|
||||
base_fee:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Base fee in basis points
|
||||
example: 30
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -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 fee rate
|
||||
|
||||
> Retrieves the base fee rate for a specific token ID.
|
||||
The fee rate can be provided either as a query parameter or as a path parameter.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /fee-rate
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/fee-rate:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get fee rate
|
||||
description: >
|
||||
Retrieves the base fee rate for a specific token ID.
|
||||
|
||||
The fee rate can be provided either as a query parameter or as a path
|
||||
parameter.
|
||||
operationId: getFeeRate
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved fee rate
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FeeRate'
|
||||
example:
|
||||
base_fee: 30
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - Fee rate not found for market
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: fee rate not found for market
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
FeeRate:
|
||||
type: object
|
||||
required:
|
||||
- base_fee
|
||||
properties:
|
||||
base_fee:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Base fee in basis points
|
||||
example: 30
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,112 @@
|
||||
> ## 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 last trade price
|
||||
|
||||
> Retrieves the last trade price and side for a specific token ID.
|
||||
Returns default values of "0.5" for price and empty string for side if no trades found.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /last-trade-price
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/last-trade-price:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get last trade price
|
||||
description: >
|
||||
Retrieves the last trade price and side for a specific token ID.
|
||||
|
||||
Returns default values of "0.5" for price and empty string for side if
|
||||
no trades found.
|
||||
operationId: getLastTradePrice
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved last trade price
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
- side
|
||||
properties:
|
||||
price:
|
||||
type: string
|
||||
description: Last trade price
|
||||
example: '0.45'
|
||||
side:
|
||||
type: string
|
||||
description: Last trade side (BUY or SELL)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
- ''
|
||||
example: BUY
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -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 last trade prices (query parameters)
|
||||
|
||||
> Retrieves last trade prices for multiple token IDs using query parameters.
|
||||
Maximum 500 token IDs can be requested per call.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /last-trades-prices
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/last-trades-prices:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get last trade prices (query parameters)
|
||||
description: >
|
||||
Retrieves last trade prices for multiple token IDs using query
|
||||
parameters.
|
||||
|
||||
Maximum 500 token IDs can be requested per call.
|
||||
operationId: getLastTradesPricesGet
|
||||
parameters:
|
||||
- name: token_ids
|
||||
in: query
|
||||
description: Comma-separated list of token IDs (max 500)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123...,0xdef456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved last trade prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
- price
|
||||
- side
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
price:
|
||||
type: string
|
||||
description: Last trade price
|
||||
example: '0.45'
|
||||
side:
|
||||
type: string
|
||||
description: Last trade side (BUY or SELL)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
price: '0.45'
|
||||
side: BUY
|
||||
- token_id: 0xdef456abc123...
|
||||
price: '0.52'
|
||||
side: SELL
|
||||
'400':
|
||||
description: Bad request - Invalid payload or exceeds limit
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
invalid_payload:
|
||||
summary: Invalid payload
|
||||
value:
|
||||
error: Invalid payload
|
||||
exceeds_limit:
|
||||
summary: Payload exceeds limit
|
||||
value:
|
||||
error: Payload exceeds the limit
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,149 @@
|
||||
> ## 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 last trade prices (request body)
|
||||
|
||||
> Retrieves last trade prices for multiple token IDs using a request body.
|
||||
Maximum 500 token IDs can be requested per call.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml post /last-trades-prices
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/last-trades-prices:
|
||||
post:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get last trade prices (request body)
|
||||
description: |
|
||||
Retrieves last trade prices for multiple token IDs using a request body.
|
||||
Maximum 500 token IDs can be requested per call.
|
||||
operationId: getLastTradesPricesPost
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BookRequest'
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
- token_id: 0xdef456abc123...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved last trade prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
- price
|
||||
- side
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
price:
|
||||
type: string
|
||||
description: Last trade price
|
||||
example: '0.45'
|
||||
side:
|
||||
type: string
|
||||
description: Last trade side (BUY or SELL)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
price: '0.45'
|
||||
side: BUY
|
||||
- token_id: 0xdef456abc123...
|
||||
price: '0.52'
|
||||
side: SELL
|
||||
'400':
|
||||
description: Bad request - Invalid payload or exceeds limit
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
invalid_payload:
|
||||
summary: Invalid payload
|
||||
value:
|
||||
error: Invalid payload
|
||||
exceeds_limit:
|
||||
summary: Payload exceeds limit
|
||||
value:
|
||||
error: Payload exceeds the limit
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
BookRequest:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
side:
|
||||
type: string
|
||||
description: Order side (optional, not used for midpoint calculation)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,131 @@
|
||||
> ## 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 best market price for a specific token ID and side (bid or ask).
|
||||
Returns the best bid price for BUY side or best ask price for SELL side.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /price
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/price:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get market price
|
||||
description: >
|
||||
Retrieves the best market price for a specific token ID and side (bid or
|
||||
ask).
|
||||
|
||||
Returns the best bid price for BUY side or best ask price for SELL side.
|
||||
operationId: getPrice
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
- name: side
|
||||
in: query
|
||||
description: Order side
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved market price
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
properties:
|
||||
price:
|
||||
type: number
|
||||
format: double
|
||||
description: Market price as a decimal number
|
||||
example: 0.45
|
||||
example:
|
||||
price: 0.45
|
||||
'400':
|
||||
description: Bad request - Invalid token id or side
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
invalid_token_id:
|
||||
summary: Invalid token id
|
||||
value:
|
||||
error: Invalid token id
|
||||
invalid_side:
|
||||
summary: Invalid side
|
||||
value:
|
||||
error: Invalid side
|
||||
'404':
|
||||
description: Not found - No orderbook exists for the requested token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: No orderbook exists for the requested token id
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,128 @@
|
||||
> ## 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 prices (query parameters)
|
||||
|
||||
> Retrieves market prices for multiple token IDs and sides using query parameters.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /prices
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/prices:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get market prices (query parameters)
|
||||
description: >
|
||||
Retrieves market prices for multiple token IDs and sides using query
|
||||
parameters.
|
||||
operationId: getPricesGet
|
||||
parameters:
|
||||
- name: token_ids
|
||||
in: query
|
||||
description: Comma-separated list of token IDs
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123...,0xdef456...
|
||||
- name: sides
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated list of sides (BUY or SELL) corresponding to token
|
||||
IDs
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: BUY,SELL
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved market prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: number
|
||||
format: double
|
||||
description: Map of token ID to map of side to price
|
||||
example:
|
||||
0xabc123def456...:
|
||||
BUY: 0.45
|
||||
0xdef456abc123...:
|
||||
SELL: 0.52
|
||||
'400':
|
||||
description: Bad request - Invalid payload or side
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
invalid_payload:
|
||||
summary: Invalid payload
|
||||
value:
|
||||
error: Invalid payload
|
||||
invalid_side:
|
||||
summary: Invalid side
|
||||
value:
|
||||
error: Invalid side
|
||||
'404':
|
||||
description: Not found - No orderbook exists for the requested token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: No orderbook exists for the requested token id
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,143 @@
|
||||
> ## 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 prices (request body)
|
||||
|
||||
> Retrieves market prices for multiple token IDs and sides using a request body.
|
||||
Each request must include both token_id and side.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml post /prices
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/prices:
|
||||
post:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get market prices (request body)
|
||||
description: >
|
||||
Retrieves market prices for multiple token IDs and sides using a request
|
||||
body.
|
||||
|
||||
Each request must include both token_id and side.
|
||||
operationId: getPricesPost
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BookRequest'
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
side: BUY
|
||||
- token_id: 0xdef456abc123...
|
||||
side: SELL
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved market prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: number
|
||||
format: double
|
||||
description: Map of token ID to map of side to price
|
||||
example:
|
||||
0xabc123def456...:
|
||||
BUY: 0.45
|
||||
0xdef456abc123...:
|
||||
SELL: 0.52
|
||||
'400':
|
||||
description: Bad request - Invalid payload or side
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
examples:
|
||||
invalid_payload:
|
||||
summary: Invalid payload
|
||||
value:
|
||||
error: Invalid payload
|
||||
invalid_side:
|
||||
summary: Invalid side
|
||||
value:
|
||||
error: Invalid side
|
||||
'404':
|
||||
description: Not found - No orderbook exists for the requested token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: No orderbook exists for the requested token id
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
BookRequest:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
side:
|
||||
type: string
|
||||
description: Order side (optional, not used for midpoint calculation)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1 @@
|
||||
null
|
||||
@@ -0,0 +1,102 @@
|
||||
> ## 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 prices (query parameters)
|
||||
|
||||
> Retrieves midpoint prices for multiple token IDs using query parameters.
|
||||
The midpoint is calculated as the average of the best bid and best ask prices.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /midpoints
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/midpoints:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get midpoint prices (query parameters)
|
||||
description: >
|
||||
Retrieves midpoint prices for multiple token IDs using query parameters.
|
||||
|
||||
The midpoint is calculated as the average of the best bid and best ask
|
||||
prices.
|
||||
operationId: getMidpointsGet
|
||||
parameters:
|
||||
- name: token_ids
|
||||
in: query
|
||||
description: Comma-separated list of token IDs
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123...,0xdef456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved midpoint prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Map of token ID to midpoint price
|
||||
example:
|
||||
0xabc123def456...: '0.45'
|
||||
0xdef456abc123...: '0.52'
|
||||
'400':
|
||||
description: Bad request - Invalid payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid payload
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: error getting the mid price
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -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 midpoint prices (request body)
|
||||
|
||||
> Retrieves midpoint prices for multiple token IDs using a request body.
|
||||
The midpoint is calculated as the average of the best bid and best ask prices.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml post /midpoints
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/midpoints:
|
||||
post:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get midpoint prices (request body)
|
||||
description: >
|
||||
Retrieves midpoint prices for multiple token IDs using a request body.
|
||||
|
||||
The midpoint is calculated as the average of the best bid and best ask
|
||||
prices.
|
||||
operationId: getMidpointsPost
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BookRequest'
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
- token_id: 0xdef456abc123...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved midpoint prices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Map of token ID to midpoint price
|
||||
example:
|
||||
0xabc123def456...: '0.45'
|
||||
0xdef456abc123...: '0.52'
|
||||
'400':
|
||||
description: Bad request - Invalid payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid payload
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: error getting the mid price
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
BookRequest:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
side:
|
||||
type: string
|
||||
description: Order side (optional, not used for midpoint calculation)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,191 @@
|
||||
> ## 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
|
||||
|
||||
> Retrieves the order book summary for a specific token ID.
|
||||
Includes bids, asks, market details, and last trade price.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /book
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/book:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get order book
|
||||
description: |
|
||||
Retrieves the order book summary for a specific token ID.
|
||||
Includes bids, asks, market details, and last trade price.
|
||||
operationId: getBook
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved order book
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OrderBookSummary'
|
||||
example:
|
||||
market: '0x1234567890123456789012345678901234567890'
|
||||
asset_id: 0xabc123def456...
|
||||
timestamp: '1234567890'
|
||||
hash: a1b2c3d4e5f6...
|
||||
bids:
|
||||
- price: '0.45'
|
||||
size: '100'
|
||||
- price: '0.44'
|
||||
size: '200'
|
||||
asks:
|
||||
- price: '0.46'
|
||||
size: '150'
|
||||
- price: '0.47'
|
||||
size: '250'
|
||||
min_order_size: '1'
|
||||
tick_size: '0.01'
|
||||
neg_risk: false
|
||||
last_trade_price: '0.45'
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - No orderbook exists for the requested token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: No orderbook exists for the requested token id
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: error getting the orderbook
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
OrderBookSummary:
|
||||
type: object
|
||||
required:
|
||||
- market
|
||||
- asset_id
|
||||
- timestamp
|
||||
- hash
|
||||
- bids
|
||||
- asks
|
||||
- min_order_size
|
||||
- tick_size
|
||||
- neg_risk
|
||||
- last_trade_price
|
||||
properties:
|
||||
market:
|
||||
type: string
|
||||
description: Market condition ID
|
||||
example: '0x1234567890123456789012345678901234567890'
|
||||
asset_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
timestamp:
|
||||
type: string
|
||||
description: Timestamp of the order book snapshot
|
||||
example: '1234567890'
|
||||
hash:
|
||||
type: string
|
||||
description: Hash of the order book summary
|
||||
example: a1b2c3d4e5f6...
|
||||
bids:
|
||||
type: array
|
||||
description: List of bid orders (sorted by price descending)
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderSummary'
|
||||
asks:
|
||||
type: array
|
||||
description: List of ask orders (sorted by price ascending)
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderSummary'
|
||||
min_order_size:
|
||||
type: string
|
||||
description: Minimum order size
|
||||
example: '1'
|
||||
tick_size:
|
||||
type: string
|
||||
description: Minimum price increment (tick size)
|
||||
example: '0.01'
|
||||
neg_risk:
|
||||
type: boolean
|
||||
description: Whether negative risk is enabled for this market
|
||||
example: false
|
||||
last_trade_price:
|
||||
type: string
|
||||
description: Last trade price
|
||||
example: '0.45'
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
OrderSummary:
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
- size
|
||||
properties:
|
||||
price:
|
||||
type: string
|
||||
description: Order price
|
||||
example: '0.45'
|
||||
size:
|
||||
type: string
|
||||
description: Order size
|
||||
example: '100'
|
||||
|
||||
````
|
||||
@@ -0,0 +1,191 @@
|
||||
> ## 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 books (request body)
|
||||
|
||||
> Retrieves order book summaries for multiple token IDs using a request body.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml post /books
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/books:
|
||||
post:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get order books (request body)
|
||||
description: >
|
||||
Retrieves order book summaries for multiple token IDs using a request
|
||||
body.
|
||||
operationId: getBooksPost
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BookRequest'
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
- token_id: 0xdef456abc123...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved order books
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderBookSummary'
|
||||
example:
|
||||
- market: '0x1234567890123456789012345678901234567890'
|
||||
asset_id: 0xabc123def456...
|
||||
timestamp: '1234567890'
|
||||
hash: a1b2c3d4e5f6...
|
||||
bids:
|
||||
- price: '0.45'
|
||||
size: '100'
|
||||
asks:
|
||||
- price: '0.46'
|
||||
size: '150'
|
||||
min_order_size: '1'
|
||||
tick_size: '0.01'
|
||||
neg_risk: false
|
||||
last_trade_price: '0.45'
|
||||
'400':
|
||||
description: Bad request - Invalid payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid payload
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
BookRequest:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
side:
|
||||
type: string
|
||||
description: Order side (optional, not used for midpoint calculation)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
OrderBookSummary:
|
||||
type: object
|
||||
required:
|
||||
- market
|
||||
- asset_id
|
||||
- timestamp
|
||||
- hash
|
||||
- bids
|
||||
- asks
|
||||
- min_order_size
|
||||
- tick_size
|
||||
- neg_risk
|
||||
- last_trade_price
|
||||
properties:
|
||||
market:
|
||||
type: string
|
||||
description: Market condition ID
|
||||
example: '0x1234567890123456789012345678901234567890'
|
||||
asset_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
timestamp:
|
||||
type: string
|
||||
description: Timestamp of the order book snapshot
|
||||
example: '1234567890'
|
||||
hash:
|
||||
type: string
|
||||
description: Hash of the order book summary
|
||||
example: a1b2c3d4e5f6...
|
||||
bids:
|
||||
type: array
|
||||
description: List of bid orders (sorted by price descending)
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderSummary'
|
||||
asks:
|
||||
type: array
|
||||
description: List of ask orders (sorted by price ascending)
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderSummary'
|
||||
min_order_size:
|
||||
type: string
|
||||
description: Minimum order size
|
||||
example: '1'
|
||||
tick_size:
|
||||
type: string
|
||||
description: Minimum price increment (tick size)
|
||||
example: '0.01'
|
||||
neg_risk:
|
||||
type: boolean
|
||||
description: Whether negative risk is enabled for this market
|
||||
example: false
|
||||
last_trade_price:
|
||||
type: string
|
||||
description: Last trade price
|
||||
example: '0.45'
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
OrderSummary:
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
- size
|
||||
properties:
|
||||
price:
|
||||
type: string
|
||||
description: Order price
|
||||
example: '0.45'
|
||||
size:
|
||||
type: string
|
||||
description: Order size
|
||||
example: '100'
|
||||
|
||||
````
|
||||
@@ -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 spread
|
||||
|
||||
> Retrieves the spread for a specific token ID.
|
||||
The spread is the difference between the best ask and best bid prices.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /spread
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/spread:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get spread
|
||||
description: |
|
||||
Retrieves the spread for a specific token ID.
|
||||
The spread is the difference between the best ask and best bid prices.
|
||||
operationId: getSpread
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved spread
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- spread
|
||||
properties:
|
||||
spread:
|
||||
type: string
|
||||
description: Spread as a string
|
||||
example: '0.02'
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - No orderbook exists for the requested token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: No orderbook exists for the requested token id
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -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 spreads
|
||||
|
||||
> Retrieves spreads for multiple token IDs.
|
||||
The spread is the difference between the best ask and best bid prices.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml post /spreads
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/spreads:
|
||||
post:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get spreads
|
||||
description: |
|
||||
Retrieves spreads for multiple token IDs.
|
||||
The spread is the difference between the best ask and best bid prices.
|
||||
operationId: getSpreads
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BookRequest'
|
||||
example:
|
||||
- token_id: 0xabc123def456...
|
||||
- token_id: 0xdef456abc123...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved spreads
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Map of token ID to spread
|
||||
example:
|
||||
0xabc123def456...: '0.02'
|
||||
0xdef456abc123...: '0.015'
|
||||
'400':
|
||||
description: Bad request - Invalid payload
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid payload
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: error getting the spread
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
BookRequest:
|
||||
type: object
|
||||
required:
|
||||
- token_id
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
description: Token ID (asset ID)
|
||||
example: 0xabc123def456...
|
||||
side:
|
||||
type: string
|
||||
description: Order side (optional, not used for midpoint calculation)
|
||||
enum:
|
||||
- BUY
|
||||
- SELL
|
||||
example: BUY
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -0,0 +1,113 @@
|
||||
> ## 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 tick size by path parameter
|
||||
|
||||
> Retrieves the minimum tick size (price increment) for a specific token ID using the token ID as a path parameter.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /tick-size/{token_id}
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/tick-size/{token_id}:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get tick size by path parameter
|
||||
description: >
|
||||
Retrieves the minimum tick size (price increment) for a specific token
|
||||
ID using the token ID as a path parameter.
|
||||
operationId: getTickSizeByPath
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: path
|
||||
description: Token ID (asset ID)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved tick size
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/TickSize'
|
||||
example:
|
||||
minimum_tick_size: 0.01
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - Market not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: market not found
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
TickSize:
|
||||
type: object
|
||||
required:
|
||||
- minimum_tick_size
|
||||
properties:
|
||||
minimum_tick_size:
|
||||
type: number
|
||||
format: double
|
||||
description: Minimum tick size (price increment)
|
||||
example: 0.01
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
@@ -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 tick size
|
||||
|
||||
> Retrieves the minimum tick size (price increment) for a specific token ID.
|
||||
The tick size can be provided either as a query parameter or as a path parameter.
|
||||
|
||||
|
||||
|
||||
|
||||
## OpenAPI
|
||||
|
||||
````yaml api-spec/clob-openapi.yaml get /tick-size
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Polymarket CLOB API
|
||||
description: Polymarket CLOB API Reference
|
||||
license:
|
||||
name: MIT
|
||||
identifier: MIT
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://clob.polymarket.com
|
||||
description: Production CLOB API
|
||||
- url: https://clob-staging.polymarket.com
|
||||
description: Staging CLOB API
|
||||
security: []
|
||||
tags:
|
||||
- name: Trade
|
||||
description: Trade endpoints
|
||||
- name: Markets
|
||||
description: Market data endpoints
|
||||
- name: Account
|
||||
description: Account and authentication endpoints
|
||||
- name: Notifications
|
||||
description: User notification endpoints
|
||||
- name: Rewards
|
||||
description: Rewards and earnings endpoints
|
||||
paths:
|
||||
/tick-size:
|
||||
get:
|
||||
tags:
|
||||
- Market Data
|
||||
summary: Get tick size
|
||||
description: >
|
||||
Retrieves the minimum tick size (price increment) for a specific token
|
||||
ID.
|
||||
|
||||
The tick size can be provided either as a query parameter or as a path
|
||||
parameter.
|
||||
operationId: getTickSize
|
||||
parameters:
|
||||
- name: token_id
|
||||
in: query
|
||||
description: Token ID (asset ID)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 0xabc123def456...
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved tick size
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/TickSize'
|
||||
example:
|
||||
minimum_tick_size: 0.01
|
||||
'400':
|
||||
description: Bad request - Invalid token id
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Invalid token id
|
||||
'404':
|
||||
description: Not found - Market not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: market not found
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
error: Internal server error
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
TickSize:
|
||||
type: object
|
||||
required:
|
||||
- minimum_tick_size
|
||||
properties:
|
||||
minimum_tick_size:
|
||||
type: number
|
||||
format: double
|
||||
description: Minimum tick size (price increment)
|
||||
example: 0.01
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- error
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
````
|
||||
Reference in New Issue
Block a user