Ledger balances
Create new balance
Create a new ledger balance with the Go SDK.
POST
Create new balance
Use
client.LedgerBalance.Create to create a balance on an existing ledger.
Call the method
client.LedgerBalance.Create
| Field | Type | Description |
|---|---|---|
LedgerID | string | Ledger the balance belongs to. |
Currency | string | Currency or asset class for the balance. |
IdentityID | string | Identity to link to the balance. Required when TrackFundLineage is true. |
TrackFundLineage | bool | Enable fund lineage tracking on this balance. |
AllocationStrategy | AllocationStrategy | How tagged provider funds are allocated on spend: FIFO, LIFO, or PROPORTIONAL. |
MetaData | map[string]interface{} | Optional metadata for extra context. |
Save the balance ID
Use
balance.BalanceID as the Source or Destination on transactions, or when creating balance monitors.Response
201 Created
| Field | Type | Description |
|---|---|---|
balance_id | string | Unique ID for the balance. Use as source or destination on transactions. |
ledger_id | string | Ledger ID you passed in the request. |
currency | string | Currency you passed in the request. |
balance | number | Current net amount in the balance. |
created_at | string | Date and time the balance was created. |
Related docs
View balance docs
Balance concepts and setup.
Create new balance
HTTP request and response schema.