from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.accounts.get_account_balance(id="TEST-ACCOUNT-001")
assert res.account_balance_v2 is not None
# Handle response
print(res.account_balance_v2)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.accounts.getBalance({
id: "TEST-ACCOUNT-001",
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v2/accounts/{id}/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v2/accounts/{id}/balance', 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.aries.com/v2/accounts/{id}/balance",
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.aries.com/v2/accounts/{id}/balance"
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.aries.com/v2/accounts/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v2/accounts/{id}/balance")
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{
"accountId": "TEST-ACCOUNT-001",
"amountAvailableToWithdraw": "266.06",
"balance": "298.5939",
"cashBalance": "266.96",
"costOfPositions": "37.885",
"credit": "267",
"creditRemaining": "265.9",
"dayOpenPnl": "-1.0061",
"dayRealizedPnl": "0",
"dayTotalPnl": "-1.0061",
"dayTradeBuyingPower": "1063.7",
"dayTradeOvernightRegTBuyingPower": "265.9",
"freestockFrozenCash": "0",
"grossMargin": "0",
"heldBackFunds": "0",
"maintReq": "0",
"marketValue": "32.537",
"netBuyingPower": "267",
"openPnl": "-5.348",
"optionBuyingPower": "265.9",
"pdt": "0",
"pdtCreditRemaining": "0",
"pendingOrdersCount": 1,
"pendingOrdersMarginRequirements": "0",
"realizedPl": "0",
"settledFunds": "266.96",
"sma": "0",
"smaCreditRemaining": "0",
"sodFundsAvailableDate": "2026-10-29",
"sodGrossFundsAvailable": "266.06",
"sodMarginTradeBalance": "0.9",
"sodNetFundsAvailable": "266.06",
"sodPositionsMarketValue": "0",
"sodTtlEquity": "299.6",
"sodTtlEquityUpdatedAt": "2026-10-30T11:00:02.353449Z",
"startOfDayCash": "0",
"stockBuyingPower": "265.9",
"unrealizedPl": "-5.348",
"unsettledFunds": "0",
"valueBought": "0",
"valueSold": "0"
}Account Balance
Retrieve comprehensive account balance information (v2) including cash balances, buying power, margin requirements, and account equity. Monitor available funds and trading capacity in real-time.
Use Case: Display current buying power before placing a trade to ensure sufficient funds are available.
from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.accounts.get_account_balance(id="TEST-ACCOUNT-001")
assert res.account_balance_v2 is not None
# Handle response
print(res.account_balance_v2)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.accounts.getBalance({
id: "TEST-ACCOUNT-001",
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v2/accounts/{id}/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v2/accounts/{id}/balance', 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.aries.com/v2/accounts/{id}/balance",
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.aries.com/v2/accounts/{id}/balance"
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.aries.com/v2/accounts/{id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v2/accounts/{id}/balance")
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{
"accountId": "TEST-ACCOUNT-001",
"amountAvailableToWithdraw": "266.06",
"balance": "298.5939",
"cashBalance": "266.96",
"costOfPositions": "37.885",
"credit": "267",
"creditRemaining": "265.9",
"dayOpenPnl": "-1.0061",
"dayRealizedPnl": "0",
"dayTotalPnl": "-1.0061",
"dayTradeBuyingPower": "1063.7",
"dayTradeOvernightRegTBuyingPower": "265.9",
"freestockFrozenCash": "0",
"grossMargin": "0",
"heldBackFunds": "0",
"maintReq": "0",
"marketValue": "32.537",
"netBuyingPower": "267",
"openPnl": "-5.348",
"optionBuyingPower": "265.9",
"pdt": "0",
"pdtCreditRemaining": "0",
"pendingOrdersCount": 1,
"pendingOrdersMarginRequirements": "0",
"realizedPl": "0",
"settledFunds": "266.96",
"sma": "0",
"smaCreditRemaining": "0",
"sodFundsAvailableDate": "2026-10-29",
"sodGrossFundsAvailable": "266.06",
"sodMarginTradeBalance": "0.9",
"sodNetFundsAvailable": "266.06",
"sodPositionsMarketValue": "0",
"sodTtlEquity": "299.6",
"sodTtlEquityUpdatedAt": "2026-10-30T11:00:02.353449Z",
"startOfDayCash": "0",
"stockBuyingPower": "265.9",
"unrealizedPl": "-5.348",
"unsettledFunds": "0",
"valueBought": "0",
"valueSold": "0"
}Demo response
Numeric amounts are returned as decimal strings to preserve precision. The body is a flat JSON object. Two fields depend on the account type, so the two samples below differ only in those fields.- Cash account
- Margin account
{
"balance": "298.5939",
"accountId": "TEST-ACCOUNT-001",
"dayTradeBuyingPower": "1063.7",
"netBuyingPower": "267",
"optionBuyingPower": "265.9",
"stockBuyingPower": "265.9",
"realizedPl": "0",
"unrealizedPl": "-5.348",
"openPnl": "-5.348",
"dayOpenPnl": "-1.0061",
"dayRealizedPnl": "0",
"dayTotalPnl": "-1.0061",
"costOfPositions": "37.885",
"marketValue": "32.537",
"settledFunds": "266.96",
"unsettledFunds": "0",
"cashBalance": "266.96",
"amountAvailableToWithdraw": "266.06",
"startOfDayCash": "0",
"maintReq": "0",
"grossMargin": "0",
"sma": "0",
"credit": "267",
"creditRemaining": "265.9",
"pdt": "0",
"pdtCreditRemaining": "0",
"pendingOrdersCount": 1,
"pendingOrdersMarginRequirements": "0",
"valueBought": "0",
"valueSold": "0",
"dayTradeOvernightRegTBuyingPower": "265.9",
"heldBackFunds": "0",
"sodPositionsMarketValue": "0",
"sodTtlEquity": "299.6",
"sodTtlEquityUpdatedAt": "2026-10-30T11:00:02.353449Z",
"smaCreditRemaining": "0",
"sodMarginTradeBalance": "0.9",
"sodGrossFundsAvailable": "266.06",
"sodNetFundsAvailable": "266.06",
"sodFundsAvailableDate": "2026-10-29",
"freestockFrozenCash": "0"
}
{
"balance": "248874.14377781",
"accountId": "TEST-ACCOUNT-001",
"dayTradeBuyingPower": "50000",
"netBuyingPower": "125000.5",
"optionBuyingPower": "25000",
"stockBuyingPower": "125000.5",
"realizedPl": "37.5",
"unrealizedPl": "836.64377781",
"openPnl": "836.64377781",
"dayOpenPnl": "512.14",
"dayRealizedPnl": "37.5",
"dayTotalPnl": "549.64",
"costOfPositions": "180000",
"marketValue": "180836.64377781",
"settledFunds": "100000",
"unsettledFunds": "5000",
"amountAvailableToWithdraw": "100000",
"startOfDayCash": "95000",
"maintReq": "75000",
"grossMargin": "120000",
"sma": "0",
"credit": "0",
"creditRemaining": "0",
"pdt": "0",
"pdtCreditRemaining": "0",
"pendingOrdersCount": 0,
"pendingOrdersMarginRequirements": "0",
"valueBought": "45000",
"valueSold": "12000",
"dayTradeOvernightRegTBuyingPower": "48000",
"heldBackFunds": "0",
"sodPositionsMarketValue": "180000",
"sodTtlEquity": "248000",
"sodTtlEquityUpdatedAt": "2026-01-15T09:30:00Z",
"smaCreditRemaining": "0",
"sodMarginTradeBalance": "-40000",
"sodGrossFundsAvailable": "100000",
"sodNetFundsAvailable": "98500",
"sodFundsAvailableDate": "2026-01-14",
"freestockFrozenCash": "0",
"intradayMarginBalance": "7000"
}
Fields that depend on account type
cashBalance and intradayMarginBalance are never returned together. Which one you get depends on the account’s account_class, which you read from GET /v2/users/me/accounts.
account_class | cashBalance | intradayMarginBalance |
|---|---|---|
CASH | Returned | Omitted |
MARGIN | Omitted | Returned |
| Anything else, or not determinable | Omitted | Omitted |
null and not "0". A returned "0" is a real value, such as a cash account holding no cash. Check for the key before reading it, and do not display a cash or margin balance for an account that returned neither.
Withdrawable cash and margin fields
amountAvailableToWithdraw is the cash available to withdraw: cash only, with no buying power or margin included. It is the figure to show a user asking how much they can take out. When freestockFrozenCash is returned, that frozen free-stock cash has already been deducted. intradayMarginBalance is the margin loan outstanding, rolled forward through today’s buys and sells; it is returned for margin accounts only.
The three sod* funds fields are the clearing firm’s own start-of-day numbers and are served as stored: "0" until the day’s load has run. sodFundsAvailableDate is the business date of that load and is omitted when it has never run for the account, so read it before treating a zero as real. sodNetFundsAvailable is previous-close only; do not present it as today’s withdrawable amount.Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Path Parameters
Account whose balance you want to read. Enter the account ID from GET /v1/users/me/accounts.
Response
Account balance retrieved successfully
Response body for GET /v2/accounts/{id}/balance. Returned as the top-level JSON object. Numeric amounts are decimal strings.
Account these balances belong to. Match it to the account selected by the user.
Cash available to withdraw from the account, returned as a decimal string. This is cash only: it does not include buying power or margin. Show this figure to a user asking how much they can take out. Any frozen free-stock sale proceeds (freestockFrozenCash) have already been deducted.
Total account balance (net account value), returned as a decimal string. Use this as the headline portfolio value.
Current cash balance in the account, returned as a decimal string. Returned only for cash accounts (account_class CASH on GET /v2/users/me/accounts). Omitted for margin accounts and for any account whose type is not CASH or MARGIN or cannot be determined.
Aggregate cost basis of all currently open positions, returned as a decimal string.
Total margin credit line extended to the account. Decimal string.
How much of the credit line is still available to draw against. Decimal string.
Open (unrealized) profit/loss generated during the current trading day, returned as a decimal string.
Profit/loss realized from positions closed during the current trading day, returned as a decimal string.
Total profit/loss for the current trading day, combining day open and day realized P&L (dayOpenPnl + dayRealizedPnl). Decimal string.
How much the user can use for same-day round-trip trades. Typically up to 4× equity for pattern day traders. Resets at end of day. Decimal string.
Reg T overnight buying power available for day-trade-related calculations, returned as a decimal string.
Cash from free-stock sales that is currently frozen and cannot be withdrawn, returned as a decimal string. Already deducted from amountAvailableToWithdraw. Omitted when the frozen amount is not available.
Total amount currently borrowed from the broker on margin (before offsets). Use this in risk and account-health displays. Decimal string.
Funds reserved or held back by the brokerage, returned as a decimal string. Subtract this from available cash displays when explaining restricted funds.
Margin loan currently outstanding, returned as a positive decimal string and rolled forward through today's trading: the start-of-day margin trade balance (sign-inverted) plus valueSold minus valueBought. Derived at read time, not stored. Returned only for margin accounts (account_class MARGIN on GET /v2/users/me/accounts). Omitted for cash accounts and for any account whose type is not CASH or MARGIN or cannot be determined.
Maintenance requirement — the minimum equity that must be held to support current positions. Drop below this and the account may receive a margin call. Decimal string.
Current market value of all open positions, returned as a decimal string: unrealizedPl plus costOfPositions. Omitted while any open position has no price yet.
Total purchasing power available right now across all instruments — the main number to show as 'Buying Power' in a trading UI. Decimal string.
Total open (unrealized) profit/loss across all currently held positions, returned as a decimal string. Mirrors unrealizedPl.
How much the user can spend specifically on options. Usually lower than stock buying power because options require cash. Decimal string.
Pattern Day Trader flag balance — relates to FINRA Rule 4210 (four-day-trades-in-five-days rule, $25,000 minimum equity). Decimal string.
Remaining day-trade buying power for a PDT-flagged account. Decimal string.
Number of orders currently pending. Use this to explain why available buying power may be reserved.
Estimated margin requirement reserved by pending orders, returned as a decimal string.
Cumulative profit/loss from positions that have already been closed. Locked in — does not move with the market. Decimal string.
Cash that has fully settled (T+1/T+2 has passed) and is freely available with no restrictions. Decimal string.
Special Memorandum Account — a Reg T concept. Effectively a stored-up pool of 'extra' buying power that grew from past gains in a margin account. Decimal string.
Remaining SMA-based buying power still available to draw against, returned as a decimal string.
Business date (YYYY-MM-DD) of the start-of-day funds data behind sodGrossFundsAvailable and sodNetFundsAvailable. Omitted when that data has not loaded for the account, which is the only way to tell a genuine zero from an unloaded one.
Gross funds available at the previous close, as reported by the clearing firm, returned as a decimal string. "0" until the start-of-day load has run; check sodFundsAvailableDate before relying on it.
Start-of-day margin trade-date balance as reported by the clearing firm, returned as a decimal string. Negative while a margin loan is outstanding. "0" until the start-of-day load has run for the account.
Net funds available to withdraw at the previous close, as reported by the clearing firm, returned as a decimal string. Previous-close only; for the live figure use amountAvailableToWithdraw. "0" until the start-of-day load has run.
Market value of positions at the start of the day, returned as a decimal string. Use this for daily performance comparisons.
Total account equity at the start of the day, returned as a decimal string. Use this as the baseline for day-over-day equity changes.
When start-of-day total equity (sodTtlEquity) was last updated, in RFC3339 format. Omitted when not set.
Cash balance when today's trading session opened. Useful as the baseline for calculating today's cash change. Decimal string.
How much the user can spend specifically on stocks. On a margin account this is typically up to 2× cash. Decimal string.
Profit/loss on positions the user currently holds open — paper gains/losses based on current market prices. Changes with the market. Decimal string.
Cash from recent sales that hasn't settled yet. Usable for most trades, but cash accounts may restrict using it for new buys. Decimal string.
Total value bought for the reporting window, returned as a decimal string. Use this in trading activity summaries.
Total value sold for the reporting window, returned as a decimal string. Use this in trading activity summaries.
Was this page helpful?