Get positions for a market
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[
{
"token": "<string>",
"positions": [
{
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"name": "<string>",
"profileImage": "<string>",
"verified": true,
"asset": "<string>",
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"avgPrice": 123,
"size": 123,
"currPrice": 123,
"currentValue": 123,
"cashPnl": 123,
"totalBought": 123,
"realizedPnl": 123,
"totalPnl": 123,
"outcome": "<string>",
"outcomeIndex": 123
}
]
}
]Polymarket Data
Get positions for a market
Returns positions for a market, optionally filtered to a single user.
GET
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
v1
/
market-positions
Get positions for a market
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[
{
"token": "<string>",
"positions": [
{
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"name": "<string>",
"profileImage": "<string>",
"verified": true,
"asset": "<string>",
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"avgPrice": 123,
"size": 123,
"currPrice": 123,
"currentValue": 123,
"cashPnl": 123,
"totalBought": 123,
"realizedPnl": 123,
"totalPnl": 123,
"outcome": "<string>",
"outcomeIndex": 123
}
]
}
]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"