API reference
Accounts
/accounts — Omni Accounts and their holdings, balances, statements and freezes.
Scope accounts.
https://api.pathglobal.finance/accountsAn Omni Account holds value in holdings: a wallet, a virtual_account or an
external_wallet. Every balance of a holding is an account of the
ledger. A caller reaches its own accounts and holdings only; another
client's answers 404 pathglobal.core.not_found.
Omni Accounts
POST /omni
Opens an Omni Account, with its holdings. Takes Idempotency-Key.
{
"holder": { "name": "Acme Treasury" },
"reference": "acme-main",
"holdings": [
{ "kind": "virtual_account", "currency": "USD", "label": "Operating USD" },
{ "kind": "wallet", "backing": "stablecoin", "backing_asset": "USDC" }
]
}| Field | Required | Notes |
|---|---|---|
holder | yes | { path_id?, name? }, with at least one of the two. path_id is a subject of the caller (sub_…) |
subject | no | A subject of Addresses |
reference | no | Your own id, unique per client: 1 to 64 of letters, digits and : . _ - |
holdings | no | Each { kind, currency?, backing?, backing_asset?, label?, reference? }, kind wallet or virtual_account |
A virtual_account takes a currency; a stablecoin-backed one takes a token in backing_asset.
201 with the account, each holding with its balances and endpoints. A holder.path_id that
is not a subject of the caller answers 422 pathglobal.accounts.holder_unknown, with
details.field: "holder.path_id".
GET / · GET /:id
{ "accounts": [ … ] }, the caller's accounts; ?reference= gives the one with that reference. One
account answers with its holdings, their balances and endpoints.
| Field | Notes |
|---|---|
id, kind | kind is omni |
holder, subject, reference | As opened |
status | active or closed |
Holdings
POST /holdings
Opens a holding. Takes Idempotency-Key.
{ "kind": "virtual_account", "currency": "EUR", "account": "oa_…", "label": "Payables EUR" }| Field | Required | Notes |
|---|---|---|
kind | yes | wallet, virtual_account or external_wallet |
account | no | The Omni Account it belongs to |
currency | no | Three letters, for a virtual_account |
backing, backing_asset | no | fiat or stablecoin, and the token of a stablecoin backing |
external | no | { network, address }, for an external_wallet |
label, reference | no | Up to 64 characters; reference is unique per client |
201 with the holding.
GET /holdings · GET /holdings/:id
{ "holdings": [ … ] }, or one holding with balances (one per asset) and endpoints. An
external_wallet has no balance on the ledger.
GET /holdings/:id/entries
{ "entries": [ … ] }: the statement of the holding, one line per ledger line on its accounts. See
A statement line.
POST /holdings/:id/freeze · POST /holdings/:id/unfreeze
{ "scope": "debits", "reason": "account under review" }scope is debits (default), which stops what leaves, or all, which also holds its deposits for
review. reason is 3 to 280 characters. The holding carries freeze: { scope, reason, at } until
it is unfrozen.
POST /holdings/:id/fund
Test mode. { "amount", "reference" }: credits the holding from the sandbox bank. 201 with the
statement line.
Errors
| Code | Status | When |
|---|---|---|
pathglobal.core.reference_taken | 409 | The reference names another account or holding of the client |
pathglobal.accounts.holder_unknown | 422 | holder.path_id is not a subject of the caller |
pathglobal.accounts.frozen | 409 | The holding is frozen |
pathglobal.accounts.insufficient_funds | 422 | The holding does not hold the amount |
pathglobal.accounts.asset_not_held | 422 | The holding does not hold that asset |
pathglobal.core.not_found | 404 | The account or holding is not the caller's |
A route from an Omni Account draws on its holding; see Router.
Connect
/connect — accounts linked to a client, the connections that grant their use, and delegations of one operation.
Addresses
/addresses — the PATH membership addresses are issued under, subjects with their identifiers and aliases, and PATH addresses with their rails, their terms and their pledges.