Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/v1/market-positions?market=0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/v1/market-positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/v1/market-positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/polymarket/v1/market-positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/polymarket/v1/market-positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/polymarket/v1/market-positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/polymarket/v1/market-positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/v1/market-positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"positions": [
{
"asset": "<string>",
"avgPrice": 123,
"cashPnl": 123,
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"currPrice": 123,
"currentValue": 123,
"name": "<string>",
"outcome": "<string>",
"outcomeIndex": 123,
"profileImage": "<string>",
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 123,
"size": 123,
"totalBought": 123,
"totalPnl": 123,
"verified": true
}
],
"token": "<string>"
}
]Data
Get positions for a market
Returns positions for a market, optionally filtered to a single user.
<!-- aisa-pricing:start -->
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
GET
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
v1
/
market-positions
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/v1/market-positions?market=0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/v1/market-positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/v1/market-positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/polymarket/v1/market-positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/polymarket/v1/market-positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/polymarket/v1/market-positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/polymarket/v1/market-positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/v1/market-positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"positions": [
{
"asset": "<string>",
"avgPrice": 123,
"cashPnl": 123,
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"currPrice": 123,
"currentValue": 123,
"name": "<string>",
"outcome": "<string>",
"outcomeIndex": 123,
"profileImage": "<string>",
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 123,
"size": 123,
"totalBought": 123,
"totalPnl": 123,
"verified": true
}
],
"token": "<string>"
}
]Request contract
- Method and path: GET /apis/v1/polymarket/v1/market-positions
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/polymarket/v1/market-positions - limit: query; optional
- market: query; required
- offset: query; optional
- sortBy: query; optional
- sortDirection: query; optional
- status: query; optional
- user: query; optional
- Runtime facts: e5ff56471e62e340c326a9cf8efdb405dd827483c23e3fee435eec7999b7a85a
{
"operationId": "any_polymarket_data_apis_v1_polymarket_v1_market__d8f158",
"method": "GET",
"path": "/apis/v1/polymarket/v1/market-positions",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Max number of positions to return per outcome token",
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"maximum": 500,
"minimum": 0,
"type": "integer"
}
},
{
"description": "The condition ID of the market to query positions for",
"in": "query",
"name": "market",
"required": true,
"schema": {
"description": "0x-prefixed 64-hex string",
"example": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
}
},
{
"description": "Pagination offset per outcome token",
"in": "query",
"name": "offset",
"schema": {
"default": 0,
"maximum": 10000,
"minimum": 0,
"type": "integer"
}
},
{
"description": "Sort positions by:\n- `TOKENS` — Position size (number of tokens)\n- `CASH_PNL` — Unrealized cash PnL\n- `REALIZED_PNL` — Realized PnL\n- `TOTAL_PNL` — Total PnL (cash_pnl + realized_pnl)\n",
"in": "query",
"name": "sortBy",
"schema": {
"default": "TOTAL_PNL",
"enum": [
"TOKENS",
"CASH_PNL",
"REALIZED_PNL",
"TOTAL_PNL"
],
"type": "string"
}
},
{
"in": "query",
"name": "sortDirection",
"schema": {
"default": "DESC",
"enum": [
"ASC",
"DESC"
],
"type": "string"
}
},
{
"description": "Filter positions by status.\n- `OPEN` — Only positions with size > 0.01\n- `CLOSED` — Only positions with size <= 0.01\n- `ALL` — All positions regardless of size\n",
"in": "query",
"name": "status",
"schema": {
"default": "ALL",
"enum": [
"OPEN",
"CLOSED",
"ALL"
],
"type": "string"
}
},
{
"description": "Filter to a single user by proxy wallet address",
"in": "query",
"name": "user",
"schema": {
"description": "User Profile Address (0x-prefixed, 40 hex chars)",
"example": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "fixed_success",
"customer_pricing": "fixed_success",
"default_request_estimate_usd": 0.012,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.012
- Cost contract: fixed_success
- Settlement evidence source: request_snapshot
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Max number of positions to return per outcome token
Required range:
0 <= x <= 500The condition ID of the market to query positions for 0x-prefixed 64-hex string
Pattern:
^0x[a-fA-F0-9]{64}$Example:
"0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"
Pagination offset per outcome token
Required range:
0 <= x <= 10000Sort positions by:
TOKENS— Position size (number of tokens)CASH_PNL— Unrealized cash PnLREALIZED_PNL— Realized PnLTOTAL_PNL— Total PnL (cash_pnl + realized_pnl)
Available options:
TOKENS, CASH_PNL, REALIZED_PNL, TOTAL_PNL Available options:
ASC, DESC Filter positions by status.
OPEN— Only positions with size > 0.01CLOSED— Only positions with size <= 0.01ALL— All positions regardless of size
Available options:
OPEN, CLOSED, ALL Filter to a single user by proxy wallet address User Profile Address (0x-prefixed, 40 hex chars)
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x56687bf447db6ffa42ffe2204a05edaa20f55839"