Get portfolio PnL chart (public)
curl --request GET \
--url https://api.limitless.exchange/portfolio/{account}/pnl-chartimport requests
url = "https://api.limitless.exchange/portfolio/{account}/pnl-chart"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/portfolio/{account}/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/{account}/pnl-chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/{account}/pnl-chart"
req, _ := http.NewRequest("GET", url, nil)
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/{account}/pnl-chart")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/{account}/pnl-chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
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": {}
}Public Portfolio
Get PnL Chart (Public)
deprecated
Deprecated legacy aggregate realised-PnL series and current realised snapshot. Use /portfolio/:account/realized-pnl for public profile PnL.
GET
/
portfolio
/
{account}
/
pnl-chart
Get portfolio PnL chart (public)
curl --request GET \
--url https://api.limitless.exchange/portfolio/{account}/pnl-chartimport requests
url = "https://api.limitless.exchange/portfolio/{account}/pnl-chart"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/portfolio/{account}/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/{account}/pnl-chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/{account}/pnl-chart"
req, _ := http.NewRequest("GET", url, nil)
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/{account}/pnl-chart")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/portfolio/{account}/pnl-chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
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": {}
}Deprecated. Use
GET /portfolio/{account}/realized-pnl for public-profile realized PnL. Limitless keeps this route for existing consumers and will remove it after clients migrate.Path Parameters
User Ethereum address
Example:
"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
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