Skip to main content
POST
/
ngl
/
calculate
Recompute net gain/loss
curl --request POST \
  --url https://api.breezing.io/v1/ngl/calculate \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "average",
  "is_per_wallet": true,
  "tokens": [
    "<string>"
  ],
  "wallets": [
    1
  ],
  "to_date": "2025-12-31 23:59:59"
}
'
{
  "success": true,
  "data": {
    "started": true,
    "method": "average",
    "isPerWallet": true,
    "note": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://learn.breezing.io/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

org_id
string
required

Organization ID. Use GET /v1/companies to discover available org/company pairs.

Example:

"1"

company_id
string
required

Company ID. Use GET /v1/companies to discover available companies and their access levels.

Example:

"1"

Body

application/json
method
enum<string>

Cost-basis method. If omitted, uses the company's configured default (companies.accountingMethod). Changing this overrides the default for this run only.

Available options:
average,
fifo,
lifo
is_per_wallet
boolean

When true, NGL is computed separately per wallet rather than pooled across all wallets per token. If omitted, uses the company's configured default (companies.accountingIsPerWallet). Setting true requires wallets to be a non-empty array.

tokens
string[]

Optional list of token symbols to include. Omit (or pass an empty array) to include ALL tokens. Note this is heavier and may take significantly longer.

wallets
integer[]

Wallet IDs to include. Required when is_per_wallet is true. Ignored otherwise.

Required range: x > 0
to_date
string

Optional cutoff datetime in format "YYYY-MM-DD HH:mm:ss" (e.g. "2025-12-31 23:59:59"). When provided, NGL is calculated as of this datetime, useful for period-end closes. Omit to use the current time.

Pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
Example:

"2025-12-31 23:59:59"

Response

Recompute queued

success
enum<boolean>
required
Available options:
true
data
object
required
Last modified on May 3, 2026