Virtual Asset Postings
Create posting
https://api.firstleeward.com/v0/postingsAtomically 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 · headerrequiredAPI key as Bearer token, e.g. Bearer YOUR_API_KEY
Headers
Leeward-Versionenum<string>requiredAPI version (YYYY-MM-DD). Available option: 2026-09-18
Idempotency-KeystringrequiredUnique 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>requiredAccount to post against
typestringrequiredDEPOSIT: 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 asWITHDRAWAL.
DEPOSITWITHDRAWALSETTLEMENTentriesobject[]requiredAt least one entry. Each virtualAssetId may appear only once.
Show child attributes
virtualAssetIdstring<uuid>requiredVirtual asset to apply this entry to
amountstringrequiredAmount 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>requiredPosting ID
accountIdstring<uuid>requiredAccount ID
typestringrequiredDEPOSIT: 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 asWITHDRAWAL.
DEPOSITWITHDRAWALSETTLEMENTentriesobject[]requiredShow child attributes
virtualAssetIdstring<uuid>requiredVirtual asset ID
amountstringrequiredEntry amount in the virtual asset denomination
rateSnapshotnumber | nullrequiredBilling-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 | nullrequiredValue 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.
createdAtstringrequiredISO 8601 creation timestamp
400Response for status 400
Option 1 · PostingAccountIneligibleError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredOption 2 · InvalidPostingRequestError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired404Response for status 404
Option 1 · PostingAccountNotFoundError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredOption 2 · PostingVirtualAssetNotFoundError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired409Response for status 409
Option 1 · PostingVirtualAssetDisabledError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredOption 2 · InsufficientVirtualBalanceError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired