Wallet perp PnL aggregate
curl --request GET \
--url 'https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey='import requests
url = "https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=', 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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=",
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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey="
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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=")
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{
"address": "<string>",
"data": [
{
"market_id": "<string>",
"venue": "<string>",
"long_size": 123,
"short_size": 123,
"volume_usd_e6": 123,
"fees_paid_e6": 123,
"gross_pnl_e6": 123,
"net_pnl_e6": 123,
"first_fill_ts": 123,
"last_fill_ts": 123
}
],
"count": 123,
"note": "<string>"
}Perpetuals
Wallet perp PnL aggregate
Per-(venue, market_id) aggregate for the wallet. Jupiter rows are derived from the ClickHouse position materialization; Phoenix rows (when present) are appended. Reports gross + net PnL as separate fields — the API never silently switches between the two.
GET
/
api
/
sol
/
perp
/
wallets
/
{address}
/
perp-pnl
Wallet perp PnL aggregate
curl --request GET \
--url 'https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey='import requests
url = "https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=', 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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=",
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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey="
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.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raze.bot/api/sol/perp/wallets/{address}/perp-pnl?apiKey=")
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{
"address": "<string>",
"data": [
{
"market_id": "<string>",
"venue": "<string>",
"long_size": 123,
"short_size": 123,
"volume_usd_e6": 123,
"fees_paid_e6": 123,
"gross_pnl_e6": 123,
"net_pnl_e6": 123,
"first_fill_ts": 123,
"last_fill_ts": 123
}
],
"count": 123,
"note": "<string>"
}⌘I
