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 '
{
  "isPerWallet": true,
  "tokens": [
    "<string>"
  ],
  "wallets": [
    1
  ],
  "toDate": "2025-12-31 23:59:59"
}
'
{
  "success": true,
  "data": {
    "started": true,
    "isPerWallet": true,
    "note": "<string>"
  }
}

Query Parameters

orgId
string
required

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

Example:

"1"

companyId
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
isPerWallet
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 isPerWallet is true. Ignored otherwise.

Required range: x > 0
toDate
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