Get Positions
curl --request GET \
--url https://api.limitless.exchange/portfolio/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/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{
"rewards": {
"todaysRewards": "50250000",
"totalUnpaidRewards": "200750000",
"totalUserRewardsLastEpoch": "150500000",
"rewardsByEpoch": [
{
"epochId": 1,
"timestamp": "2024-01-01T00:00:00.000Z",
"totalRewards": "1500000",
"userRewards": "150000",
"earnedPercent": 0.1
}
],
"rewardsChartData": [
{
"timestamp": 1672531200000,
"userRewards": "25000000",
"totalRewards": "60000000"
}
]
},
"points": 123,
"accumulativePoints": 456,
"amm": [
{
"market": {},
"outcomeIndex": 0,
"collateralAmount": "100500000",
"latestTrade": {},
"outcomeTokenAmount": "50250000",
"account": "0x1234567890123456789012345678901234567890"
}
],
"clob": [
{
"market": {
"address": {},
"title": "<string>",
"proxyTitle": null,
"description": "<string>",
"question_id": {},
"condition_id": {},
"position_ids": [
"<array>"
],
"outcome_slot_count": 2,
"winning_index": 0.5,
"payout_numerators": [
"<string>"
],
"status": {},
"og_url": "<string>",
"image_url": "<string>",
"deadline": "<string>",
"startAt": "2023-11-07T05:31:56Z",
"hidden": false,
"txHash": null,
"resolutionTxHash": null,
"priority_index": null
},
"positions": {
"yes": {
"cost": "75000000",
"fillPrice": "750000",
"realisedPnl": "0",
"unrealizedPnl": "25000000",
"marketValue": "100000000"
},
"no": {
"cost": "25000000",
"fillPrice": "250000",
"realisedPnl": "0",
"unrealizedPnl": "-5000000",
"marketValue": "20000000"
}
},
"tokensBalance": {},
"orders": {},
"latestTrade": {},
"rewards": {}
}
],
"group": [
{}
]
}Portfolio
Get Positions
Retrieve all active positions with P&L calculations and market values. Partner API tokens with delegated_signing scope may read a sub-account by sending the x-on-behalf-of: <profileId> header.
GET
/
portfolio
/
positions
Get Positions
curl --request GET \
--url https://api.limitless.exchange/portfolio/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/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.limitless.exchange/portfolio/positions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/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{
"rewards": {
"todaysRewards": "50250000",
"totalUnpaidRewards": "200750000",
"totalUserRewardsLastEpoch": "150500000",
"rewardsByEpoch": [
{
"epochId": 1,
"timestamp": "2024-01-01T00:00:00.000Z",
"totalRewards": "1500000",
"userRewards": "150000",
"earnedPercent": 0.1
}
],
"rewardsChartData": [
{
"timestamp": 1672531200000,
"userRewards": "25000000",
"totalRewards": "60000000"
}
]
},
"points": 123,
"accumulativePoints": 456,
"amm": [
{
"market": {},
"outcomeIndex": 0,
"collateralAmount": "100500000",
"latestTrade": {},
"outcomeTokenAmount": "50250000",
"account": "0x1234567890123456789012345678901234567890"
}
],
"clob": [
{
"market": {
"address": {},
"title": "<string>",
"proxyTitle": null,
"description": "<string>",
"question_id": {},
"condition_id": {},
"position_ids": [
"<array>"
],
"outcome_slot_count": 2,
"winning_index": 0.5,
"payout_numerators": [
"<string>"
],
"status": {},
"og_url": "<string>",
"image_url": "<string>",
"deadline": "<string>",
"startAt": "2023-11-07T05:31:56Z",
"hidden": false,
"txHash": null,
"resolutionTxHash": null,
"priority_index": null
},
"positions": {
"yes": {
"cost": "75000000",
"fillPrice": "750000",
"realisedPnl": "0",
"unrealizedPnl": "25000000",
"marketValue": "100000000"
},
"no": {
"cost": "25000000",
"fillPrice": "250000",
"realisedPnl": "0",
"unrealizedPnl": "-5000000",
"marketValue": "20000000"
}
},
"tokensBalance": {},
"orders": {},
"latestTrade": {},
"rewards": {}
}
],
"group": [
{}
]
}For real-time position updates, use the WebSocket API — subscribe to
subscribe_positions.status: RESOLVED and winningOutcomeIndex indicate that the winning outcome is known in the API response. They do not guarantee that the underlying conditional token payout has already been settled on-chain or that the position is immediately redeemable. See Programmatic API - Lifecycle after a trade.Split-resolved positions. A resolved position with
winningOutcomeIndex: null and a non-null payoutNumerators array on its market is a payout split (for example [50, 50] for 50/50). Both YES and NO holdings on that market are redeemable at the ratio through POST /portfolio/redeem in a single transaction.Authorizations
JWT token for API access (alternative to cookie auth)
Response
Complete portfolio positions with summary
Rewards information for the portfolio
Show child attributes
Show child attributes
User points
Example:
123
User accumulative points
Example:
456
List of AMM positions
Show child attributes
Show child attributes
List of CLOB positions
Show child attributes
Show child attributes
Grouped CLOB positions (if enabled)