Treasury API
Manage automated treasury operations, balance thresholds, and funding sources.
Managed Balances
Create Managed Balance
POST /api/v1/managed-balance
Create a new managed balance with optional eligible funding sources.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Balance name |
assetPoolId | UUID | Yes | Target asset pool |
asset | string | Yes | Asset to manage |
targetBalance | number | Yes | Target balance to maintain |
minThreshold | number | Yes | Trigger top-up when below |
maxThreshold | number | No | Maximum balance cap |
Get Managed Balance
GET /api/v1/managed-balance/{id}
Get Managed Balance Revisions
GET /api/v1/managed-balance/{id}/revisions
View the change history of a managed balance configuration.
Update Managed Balance
PUT /api/v1/managed-balance/{id}
Full update of a managed balance configuration.
Delete Managed Balance
DELETE /api/v1/managed-balance/{id}
Add Funding Source
PUT /api/v1/managed-balance/{id}/funding-source
Add an eligible funding source for automated top-ups.
| Field | Type | Required | Description |
|---|---|---|---|
sourceType | string | Yes | Source type (e.g., ASSET_POOL, VENUE) |
sourceId | UUID | Yes | Source identifier |
priority | number | No | Funding priority order |
Remove Funding Source
DELETE /api/v1/managed-balance/{id}/funding-source/{sourceId}
Update Managed Balance Property
PATCH /api/v1/managed-balance/{id}/property
Update a specific property of a managed balance.
Update Thresholds
PATCH /api/v1/managed-balance/{id}/thresholds
Update the min/max thresholds for a managed balance.
Get Eligible Sources
GET /api/v1/managed-balance/{id}/eligible-sources
List all eligible funding sources for a managed balance.
Get Linked Managed Balances
GET /api/v1/managed-balance/linked
Get managed balances that are linked to each other.
Get Templates
GET /api/v1/managed-balance/templates
Retrieve templates for creating common managed balance configurations.
Balance Adjustments
Trigger Manual Top-Up
POST /api/v1/balance-adjustment
Manually trigger a top-up for a managed balance, bypassing the automatic threshold check.
| Field | Type | Required | Description |
|---|---|---|---|
managedBalanceId | UUID | Yes | Target managed balance |
amount | number | No | Specific amount (uses target if omitted) |
Treasury Operations
Get Treasury Operations
GET /api/v1/treasury-operation
List all automated treasury operations (top-ups, rebalances).
| Query | Type | Description |
|---|---|---|
managedBalanceId | UUID | Filter by managed balance |
status | string | Operation status |
fromDate | ISO 8601 | Start date |
toDate | ISO 8601 | End date |
Activity Logs
Get Activity Logs
GET /api/v1/managed-balance/{id}/activity-log
Get the activity log for a specific managed balance, including all automated and manual operations.