Skip to main content
GET
Reference example

Request contract

  • Method and path: GET /apis/v1/polymarket/closed-positions
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/polymarket/closed-positions
  • eventId: query; optional
  • limit: query; optional
  • market: query; optional
  • offset: query; optional
  • sortBy: query; optional
  • sortDirection: query; optional
  • title: query; optional
  • user: query; required
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Published reference price: $0.012 USD per successful request. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

eventId
integer[]

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.

Required range: x >= 1
limit
integer
default:10

The max number of positions to return

Required range: 0 <= x <= 50
market
string[]

The conditionId of the market in question. Supports multiple csv separated values. Cannot be used with the eventId param.

0x-prefixed 64-hex string

Pattern: ^0x[a-fA-F0-9]{64}$
offset
integer
default:0

The starting index for pagination

Required range: 0 <= x <= 100000
sortBy
enum<string>
default:REALIZEDPNL

The sort criteria

Available options:
REALIZEDPNL,
TITLE,
PRICE,
AVGPRICE,
TIMESTAMP
sortDirection
enum<string>
default:DESC

The sort direction

Available options:
ASC,
DESC
title
string

Filter by market title

Maximum string length: 100
user
string
required

The address of the user in question User Profile Address (0x-prefixed, 40 hex chars)

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x56687bf447db6ffa42ffe2204a05edaa20f55839"

Response

Success

asset
string
avgPrice
number
conditionId
string

0x-prefixed 64-hex string

Pattern: ^0x[a-fA-F0-9]{64}$
Example:

"0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"

curPrice
number
endDate
string
eventSlug
string
icon
string
oppositeAsset
string
oppositeOutcome
string
outcome
string
outcomeIndex
integer
proxyWallet
string

User Profile Address (0x-prefixed, 40 hex chars)

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x56687bf447db6ffa42ffe2204a05edaa20f55839"

realizedPnl
number
slug
string
timestamp
integer<int64>
title
string
totalBought
number