Virtual Asset Postings

Create posting

POSThttps://api.firstleeward.com/v0/postings

Atomically applies a posting against the target account's virtual asset balances. See the type field for variant semantics. For SETTLEMENT, the value applied to the outstanding card debt is returned as settledAmount, with the per-entry rate used reflected in entries[].rateSnapshot.

Authorizations

Authorizationstring · headerrequired

API key as Bearer token, e.g. Bearer YOUR_API_KEY

Headers

Leeward-Versionenum<string>required

API version (YYYY-MM-DD). Available option: 2026-09-18

Idempotency-Keystringrequired

Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).

Body

application/json

accountIdstring<uuid>required

Account to post against

typestringrequired
  • DEPOSIT: Credit the submitted virtual asset amounts to the account balance.
  • WITHDRAWAL: Debit the submitted virtual asset amounts from the account balance. Rejected if any entry would take the balance below zero.
  • SETTLEMENT: Debit the submitted virtual asset amounts from the account balance AND apply their value to the account’s outstanding card debt. Same non-negative guard as WITHDRAWAL.
Available options:DEPOSITWITHDRAWALSETTLEMENT
entriesobject[]required

At least one entry. Each virtualAssetId may appear only once.

Show child attributes
virtualAssetIdstring<uuid>required

Virtual asset to apply this entry to

amountstringrequired

Amount in the virtual asset denomination, never in the billing currency. String for arbitrary precision. For SETTLEMENT, the value cleared from card debt is this amount priced at the asset's current rate.

Response

200Client-driven posting against an account.
idstring<uuid>required

Posting ID

accountIdstring<uuid>required

Account ID

typestringrequired
  • DEPOSIT: Credit the submitted virtual asset amounts to the account balance.
  • WITHDRAWAL: Debit the submitted virtual asset amounts from the account balance. Rejected if any entry would take the balance below zero.
  • SETTLEMENT: Debit the submitted virtual asset amounts from the account balance AND apply their value to the account’s outstanding card debt. Same non-negative guard as WITHDRAWAL.
Available options:DEPOSITWITHDRAWALSETTLEMENT
entriesobject[]required
Show child attributes
virtualAssetIdstring<uuid>required

Virtual asset ID

amountstringrequired

Entry amount in the virtual asset denomination

rateSnapshotnumber | nullrequired

Billing-currency-per-unit rate applied to this entry, read when the posting was made. The entry contributed amount × rateSnapshot to settledAmount. Populated for SETTLEMENT postings, null otherwise.

settledAmountnumber | nullrequired

Value applied to outstanding card debt, in the billing currency of the card program. Each entry is valued at amount × rateSnapshot and rounded to the billing currency's precision, then the entries are summed. Populated for SETTLEMENT postings, null otherwise.

createdAtstringrequired

ISO 8601 creation timestamp

400Response for status 400
Option 1 · PostingAccountIneligibleError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · InvalidPostingRequestError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
404Response for status 404
Option 1 · PostingAccountNotFoundError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · PostingVirtualAssetNotFoundError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
409Response for status 409
Option 1 · PostingVirtualAssetDisabledError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · InsufficientVirtualBalanceError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired