Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/positions?user=0x56687bf447db6ffa42ffe2204a05edaa20f55839' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/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/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/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/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/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/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[
{
"asset": "<string>",
"avgPrice": 123,
"cashPnl": 123,
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"curPrice": 123,
"currentValue": 123,
"endDate": "<string>",
"entryFeesUsdc": 123,
"eventSlug": "<string>",
"grossInitialValue": 123,
"icon": "<string>",
"initialValue": 123,
"mergeable": true,
"negativeRisk": true,
"oppositeAsset": "<string>",
"oppositeOutcome": "<string>",
"outcome": "<string>",
"outcomeIndex": 123,
"percentPnl": 123,
"percentRealizedPnl": 123,
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 123,
"redeemable": true,
"size": 123,
"slug": "<string>",
"title": "<string>",
"totalBought": 123
}
]Data
Get current positions for a user
Data API v2: this route has a v2 counterpart, GET /v2/positions. See Migrating to Data API v2.
Returns current positions for a user.
GET
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
positions
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/polymarket/positions?user=0x56687bf447db6ffa42ffe2204a05edaa20f55839' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/polymarket/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/polymarket/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/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/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/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/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/polymarket/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[
{
"asset": "<string>",
"avgPrice": 123,
"cashPnl": 123,
"conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"curPrice": 123,
"currentValue": 123,
"endDate": "<string>",
"entryFeesUsdc": 123,
"eventSlug": "<string>",
"grossInitialValue": 123,
"icon": "<string>",
"initialValue": 123,
"mergeable": true,
"negativeRisk": true,
"oppositeAsset": "<string>",
"oppositeOutcome": "<string>",
"outcome": "<string>",
"outcomeIndex": 123,
"percentPnl": 123,
"percentRealizedPnl": 123,
"proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"realizedPnl": 123,
"redeemable": true,
"size": 123,
"slug": "<string>",
"title": "<string>",
"totalBought": 123
}
]请求规范
- 方法与路径: GET /apis/v1/polymarket/positions
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/polymarket/positions - eventId: query; 可选
- includeArchived: query; 可选
- limit: query; 可选
- market: query; 可选
- mergeable: query; 可选
- offset: query; 可选
- redeemable: query; 可选
- sizeThreshold: query; 可选
- sortBy: query; 可选
- sortDirection: query; 可选
- title: query; 可选
- user: query; 必填
{
"operationId": "any_polymarket_data_apis_v1_polymarket_positions",
"method": "GET",
"path": "/apis/v1/polymarket/positions",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Comma-separated list of event IDs. Mutually exclusive with market.",
"explode": false,
"in": "query",
"name": "eventId",
"schema": {
"items": {
"minimum": 1,
"type": "integer"
},
"type": "array"
},
"style": "form"
},
{
"description": "Include positions in archived markets that are still active. Archived positions are excluded by default.",
"in": "query",
"name": "includeArchived",
"schema": {
"default": false,
"type": "boolean"
}
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 100,
"maximum": 500,
"minimum": 0,
"type": "integer"
}
},
{
"description": "Comma-separated list of condition IDs. Mutually exclusive with eventId.",
"explode": false,
"in": "query",
"name": "market",
"schema": {
"items": {
"description": "0x-prefixed 64-hex string",
"example": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
},
"type": "array"
},
"style": "form"
},
{
"in": "query",
"name": "mergeable",
"schema": {
"default": false,
"type": "boolean"
}
},
{
"in": "query",
"name": "offset",
"schema": {
"default": 0,
"maximum": 10000,
"minimum": 0,
"type": "integer"
}
},
{
"in": "query",
"name": "redeemable",
"schema": {
"default": false,
"type": "boolean"
}
},
{
"in": "query",
"name": "sizeThreshold",
"schema": {
"default": 1.0,
"minimum": 0,
"type": "number"
}
},
{
"in": "query",
"name": "sortBy",
"schema": {
"default": "TOKENS",
"enum": [
"CURRENT",
"INITIAL",
"TOKENS",
"CASHPNL",
"PERCENTPNL",
"TITLE",
"RESOLVING",
"PRICE",
"AVGPRICE"
],
"type": "string"
}
},
{
"in": "query",
"name": "sortDirection",
"schema": {
"default": "DESC",
"enum": [
"ASC",
"DESC"
],
"type": "string"
}
},
{
"in": "query",
"name": "title",
"schema": {
"maxLength": 100,
"type": "string"
}
},
{
"description": "User address (required)",
"in": "query",
"name": "user",
"required": true,
"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",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.012 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
响应
Success
Remaining entry basis including attributed BUY fees, at six-decimal source precision. initialValue and avgPrice keep their fee-exclusive semantics, so the fee-exclusive basis is grossInitialValue - entryFeesUsdc. Optional: treat an omitted field as unavailable rather than as zero.