Get portfolio PnL chart
curl --request GET \
--url https://api.limitless.exchange/portfolio/pnl-chart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.limitless.exchange/portfolio/pnl-chart"
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/pnl-chart', 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/pnl-chart",
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/pnl-chart"
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/pnl-chart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/pnl-chart")
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{
"timeframe": "7d",
"data": [
{
"timestamp": 1700000000000,
"value": 123.45
}
],
"currentValue": -7.04,
"previousValue": -6.5,
"percentChange": 8.24,
"current": {}
}Portfolio
Get PnL Chart
Realised PnL series and current realised snapshot
GET
/
portfolio
/
pnl-chart
Get portfolio PnL chart
curl --request GET \
--url https://api.limitless.exchange/portfolio/pnl-chart \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.limitless.exchange/portfolio/pnl-chart"
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/pnl-chart', 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/pnl-chart",
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/pnl-chart"
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/pnl-chart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/pnl-chart")
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{
"timeframe": "7d",
"data": [
{
"timestamp": 1700000000000,
"value": 123.45
}
],
"currentValue": -7.04,
"previousValue": -6.5,
"percentChange": 8.24,
"current": {}
}Authorizations
JWT token for API access (alternative to cookie auth)
Query Parameters
Timeframe window for percent change and chart series
Example:
"7d"
Response
PnL chart data
Timeframe window used for previous/current comparison
Example:
"7d"
Realised PnL series (USD) for the selected timeframe
Show child attributes
Show child attributes
Current realised PnL (USD)
Example:
-7.04
Previous realised PnL (USD) at timeframe start
Example:
-6.5
Percent change between previousValue and currentValue (realised PnL)
Example:
8.24
Current realised PnL snapshot