Add scraped Polymarket documentation (117 files)
This commit is contained in:
@@ -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
|
||||
|
||||
````
|
||||
Reference in New Issue
Block a user