const res = await fetch('https://app.trdrs.co/api/account/summary', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/summary' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/account/summary",
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://app.trdrs.co/api/account/summary"
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://app.trdrs.co/api/account/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/summary")
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{
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"balance": 50245.5,
"realizedPnl": 245.5,
"unrealizedPnl": 75,
"netLiquidating": 50320.5,
"availableBuyingPower": 47120.5,
"usedBuyingPower": 3200,
"marginBalance": null,
"currency": "USD",
"asOf": 1787581920
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Get the account summary
Returns the account’s money in one read: balance, profit and loss, net liquidation value and buying power. A value is null when the provider hasn’t reported it or the account has no such figure, never 0 in its place.
Required key: Trading API key. A Connect app’s backend can also send it with the app’s API key, and a venue’s backend with its Venue key, which carries trader:read or trader:trade, each naming one of its own traders in x-trdrs-trader: it then runs on that trader’s own accounts.
const res = await fetch('https://app.trdrs.co/api/account/summary', {
headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
})
const data = await res.json()curl 'https://app.trdrs.co/api/account/summary' \
-H "Authorization: Bearer $TRDRS_API_KEY"import requests
url = "https://app.trdrs.co/api/account/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/account/summary",
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://app.trdrs.co/api/account/summary"
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://app.trdrs.co/api/account/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/account/summary")
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{
"provider": "rithmic",
"accountNumber": "PA-4821-07",
"balance": 50245.5,
"realizedPnl": 245.5,
"unrealizedPnl": 75,
"netLiquidating": 50320.5,
"availableBuyingPower": 47120.5,
"usedBuyingPower": 3200,
"marginBalance": null,
"currency": "USD",
"asOf": 1787581920
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.
Query Parameters
The provider the account is at, such as rithmic or paper. Omit it to use your default provider. An unknown value is refused with 400, never replaced with another provider.
The account number at that provider. It must be one of your own accounts, or the call is refused with 400.
Response
The account summary. Buying power is the provider's own figure, so it is null on the paper book, including a Demo, which reports none here. The paper book still refuses an order whose margin doesn't fit the account's free collateral, and the margin preview tells you beforehand. A Demo's balance is in USD: a registered perpetual's realized profit and loss (a Hyperliquid core perpetual settles in USDC, a Binance or Bybit USDT perpetual in USDT) is added to it in USD at a fixed 1:1 rate, never held as a stablecoin. An issued account's balance is in USD as well, and a perpetual's profit and loss in a stablecoin is added to it one for one only where the account's risk policy states that parity; currency names the account currency. When the paper book can't value a position honestly (it has no current price, the feed is delayed outside the sandbox, or a futures position's contract is no longer the one priced), unrealizedPnl and netLiquidating are null.
The account's balance, profit and loss, and buying power. A value is null until known.
The provider the account is at.
The account number.
The currency the account is held in.
The balance.
Realized profit and loss.
Unrealized profit and loss on open positions.
What the account would be worth if every position closed now.
Buying power for new positions, as the provider reports and enforces it. It is the real basis of margin and leverage (leverage is netLiquidating divided by marginRequired). On a paper book account, including a Demo, it is the free collateral the account's risk decisions last valued its pool at: marginBalance less usedBuyingPower. It is negative when no new exposure fits. It isn't an order's verdict: the paper book judges each order at its own prices, and POST /api/trading/margin-preview tells you beforehand whether it fits. A new account holding nothing shows its whole balance. It is null while the account's latest change is still being valued, or while a price it needs is missing or stale.
Buying power in use by open positions and working orders. On a paper book account it is the initial margin the account's risk decisions last valued its open positions at, plus what working orders and charges of unknown amount hold back, so usedBuyingPower and availableBuyingPower add up to marginBalance. It is null when availableBuyingPower is.
The provider's margin balance: the equity it counts toward margin. On a paper book account it is the equity the account's risk decisions last valued its pool at, and null when availableBuyingPower is.
When these values were read, in epoch seconds, or null until the provider's first reading.