HTTP API
The calls behind the operator console and the metrics scrape.
| Operation | Request | Scope |
|---|---|---|
getTreasury | GET /api/v1/admin/treasury | admin:chains |
countTreasury | POST /api/v1/treasury/counts | admin:chains |
creditDepositGap | POST /api/v1/admin/deposit-gaps/{id}/credit | admin:chains |
reviewPaymentArrivals | GET /api/v1/admin/transactions/{id}/unrequested-arrivals | admin:chains |
resolvePaymentArrivals | POST /api/v1/admin/transactions/{id}/unrequested-arrivals | admin:chains |
listTreasuryBindings | GET /api/v1/admin/treasury-bindings | admin:chains |
rebindTreasury | POST /api/v1/admin/treasury-bindings/{id}/rebind | admin:chains |
failPayout | POST /api/v1/admin/payouts/{id}/fail | admin:chains |
failConsumedNoncePayout | POST /api/v1/admin/payouts/{id}/fail-consumed-nonce | admin:chains |
sweepNow | POST /api/v1/sweeps/sessions | admin:sweep |
listSweeps | GET /api/v1/sweeps | admin:sweep |
listSweepAssets | GET /api/v1/sweeps/assets | admin:sweep |
setSweepPolicy | POST /api/v1/sweeps/assets/{chain_asset_id} | admin:sweep |
setAutoSweep | POST /api/v1/sweeps/networks/{network_id} | admin:sweep |
listKnownEVMChains | GET /api/v1/blockchains/evm/available | admin:chains |
addEVMNetwork | POST /api/v1/blockchains | admin:chains |
setConfirmationPolicy | POST /api/v1/blockchains/{id}/confirmation-policy | admin:chains |
setFeePolicy | POST /api/v1/blockchains/{id}/fee-policy | admin:chains |
describeToken | GET /api/v1/blockchains/{blockchain_id}/tokens/describe | admin:chains |
admitToken | POST /api/v1/blockchains/{blockchain_id}/assets | admin:chains |
enableToken | POST /api/v1/blockchains/{blockchain_id}/assets/{chain_asset_id}/enable | admin:chains |
listCoins | GET /api/v1/coins | ledger:read |
createCoin | POST /api/v1/coins | admin:chains |
getBitcoinFlow | GET /api/v1/transactions/{id}/bitcoin-flow | admin:chains |
setRateSourceState | POST /api/v1/rates/sources | admin:chains |
getMetrics | GET /api/v1/metrics | admin:metrics |
getWebhookPrivateAddresses | GET /api/v1/admin/webhooks/private-addresses | admin:chains |
setWebhookPrivateAddresses | POST /api/v1/admin/webhooks/private-addresses | admin:chains |
Treasury
Custody against the ledger, the Count, deposit gaps and a payment's unrequested arrivals.
Get treasury custody
getTreasury · GET /api/v1/admin/treasury · scope admin:chains
For the operator console. Every network's treasury, per asset: what is on chain at the install's addresses (custody), what the ledger counts for the treasury at the same position (counted), and the difference (gap) a Count can credit.
custody is the latest reading of the treasury at one block, plus what the install's other addresses hold by their recorded movements at that block; it is null until something has read the treasury. An XRPL issued currency is read from the treasury's own trust line, so one the treasury issues itself stays null. counted and gap are null until the reading's block is settled: covered by the scanner, with nothing of the install's at or below it still unconfirmed, unsettled, unlinked or unposted. gap_state says what the Count can do: countable for a positive gap, negative when the ledger counts more than the chain holds, which is an alarm, none, not_settled with not_settled_reason, or not_read.
payable is the most a new payout of the asset can take now: never more than the ledger's balance net of every hold and of the most the payout's own fee can hold there, or what the network's payout gate admits from the treasury net of the configured fee ceiling and the balance the treasury must keep. The gate's treasury is the reading less what the ledger took from the treasury above it. It is 0 where no payout lane runs, and for a Solana token: its gate pays from the associated token account alone, which no reading records. It is also 0 for an XRPL issued currency whose treasury line refuses to send for more than its balance, such as while its issuer has frozen it, and while transfer_refusal says why since when.
sh
curl -sS "$FIATLESS_URL/api/v1/admin/treasury" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | Every treasury, networks by name and native assets first. Headers: Cache-Control. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
networks | object[] | |
networks[].network_id | uuid | |
networks[].name | string | |
networks[].namespace | string | The network's family, such as eip155 or tron; empty before its runtime identity exists. |
networks[].assets | object[] | Every asset that is active, read or on the ledger, the native asset first. |
networks[].assets[].asset_id | uuid | |
networks[].assets[].symbol | string | |
networks[].assets[].decimals | integer or null | Null for an XRPL issued currency, which has no fixed scale. |
networks[].assets[].custody | object or null | |
networks[].assets[].custody.amount | string | treasury plus deposits: what is on chain at the install's addresses. |
networks[].assets[].custody.treasury | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
networks[].assets[].custody.deposits | string | The install's other addresses, by their recorded movements at position. |
networks[].assets[].custody.staked | string or null | What the treasury holds staked at position, such as TRX frozen or still unfreezing. Shown apart: never in amount or the gap. Null when the reading has none. |
networks[].assets[].custody.deposits_complete | boolean | False while a customer address's history is still being read. |
networks[].assets[].custody.position | integer | |
networks[].assets[].custody.block_hash | string or null | |
networks[].assets[].custody.read_at | date-time | |
networks[].assets[].custody.source | enum | One of node, recorded. |
networks[].assets[].counted | string or null | What the ledger counts for the treasury at the reading's position; null until it is settled. |
networks[].assets[].gap | string or null | The treasury on chain minus counted; null until the position is settled. |
networks[].assets[].gap_state | enum | One of not_read, not_settled, none, countable, negative. |
networks[].assets[].not_settled_reason | string or null | Why the position is not settled: evaluating, awaiting_new_reading, not_covered, reading_orphaned, payout_landed_after_failure, account_frozen, movement_unconfirmed, payout_unsettled, sweep_unlinked or movement_unposted. |
networks[].assets[].ledger | object | |
networks[].assets[].ledger.confirmed | string | Canonical signed plain decimal output. Zero has no sign; non-zero values have no exponent, leading zeroes, or insignificant trailing fractional zeroes. Balance deficits are represented exactly instead of being clamped to zero. |
networks[].assets[].ledger.held | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
networks[].assets[].ledger.available | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
networks[].assets[].payable | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
networks[].assets[].transfer_refusal | object or null | Why payable reads 0, and since when; null while nothing refuses the asset. token_refuses_the_treasury: the token refuses the treasury's own transfer, as under its issuer's freeze of the treasury or a pause of the token, so its sweeps wait and its payouts fail; it lifts by itself once the token accepts that transfer again. node_refuses_the_transfer: the network's node refused the asset's last payout in a dry run; it lifts once a payout's dry run passes. |
networks[].assets[].transfer_refusal.code | enum | One of token_refuses_the_treasury, node_refuses_the_transfer. |
networks[].assets[].transfer_refusal.since | date-time | |
networks[].assets[].funding | object | |
networks[].assets[].funding.counted | boolean | True while the ledger counts the treasury's outside movements by itself. |
networks[].assets[].funding.reason | string or null | Why not, such as needs_count, history_incomplete or family_off. |
networks[].assets[].funding.counted_since | date-time or null | |
networks[].assets[].funding.last_count | object or null | |
networks[].assets[].funding.last_count.position | integer | |
networks[].assets[].funding.last_count.at | date-time | |
networks[].assets[].funding.last_count.by | string | |
networks[].assets[].funding.last_count.amount | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
Count treasury money
countTreasury · POST /api/v1/treasury/counts · scope admin:chains
For the operator console. Credits the treasury gap of one asset, at the position the treasury was read at, as one operator adjustment with an audit event. From then on the ledger's automatic counting posts only what lies above that position, so nothing is counted twice. The first Count on a network whose outside movements are counted automatically opens that counting.
Send back the position and the gap the overview showed as expected_gap, a reason, and the id of the audit event the console recorded for the person, a few minutes ago at most, for this network, asset, position and gap. An expected_gap of 0 starts the automatic counting of an asset with no gap whose funding.reason is needs_count: it credits nothing and records no audit event of its own. The call is refused with 409 when the reading has moved (reading_moved), the position is not settled (not_settled, with the failing rule), the gap changed or was already counted (count_stale), there is nothing to count (nothing_to_count), or the ledger counts more than the chain holds (negative_gap).
Body
| Field | Type | Note |
|---|---|---|
network_id | uuid | Required. |
chain_asset_id | uuid | Required. |
position | integer | Required. The reading's position, as the overview showed it. |
expected_gap | any | Required. The gap the overview showed; a different gap refuses the Count. 0 starts counting an asset with no gap that waits for its first Count. |
reason | string | Required. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/treasury/counts" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"network_id": "$NETWORK_ID",
"chain_asset_id": "$CHAIN_ASSET_ID",
"position": 0,
"expected_gap": "$EXPECTED_GAP",
"reason": "$REASON",
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
201 | The count and the adjustment that credited it. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The Count was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
201 Created
| Field | Type | Note |
|---|---|---|
id | uuid | |
network_id | uuid | |
chain_asset_id | uuid | |
position | integer | |
block_hash | string or null | |
treasury_custody | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
counted | string | Canonical signed plain decimal output. Zero has no sign; non-zero values have no exponent, leading zeroes, or insignificant trailing fractional zeroes. Balance deficits are represented exactly instead of being clamped to zero. |
gap | string | What the adjustment credited; 0 for a Count that started counting. |
posting_id | uuid or null | The adjustment that credited gap; null when gap is 0. |
audit_event_id | uuid or null | The Count's own audit event; null when gap is 0. |
console_audit_event_id | uuid | |
reason | string | |
created_by | string | The person the console's audit event names. |
created_at | date-time |
Credit a deposit gap
creditDepositGap · POST /api/v1/admin/deposit-gaps/{id}/credit · scope admin:chains
For the operator console. Credits one open deposit gap, money a customer address holds on chain that no decoded deposit accounts for, to that address's customer: one operator adjustment with an audit event, and a wallet.deposit_credited event to every webhook endpoint. Nothing is credited automatically. On every network but Bitcoin a sweep then moves the credited money with the rest of the address's balance.
Send back the delta the gap showed as expected_delta, a reason, optionally the tx_hash of the transaction the deposit came in, and the id of the audit event the console recorded for the person, a few minutes ago at most, for this gap, delta, reason and hash. A second call for a gap already credited returns the first credit with 200 and writes nothing. The call is refused with 409 when the chain and the ledger agree again (gap_not_open), the delta or the ledger at its block changed or is still changing, as while the wallet's history is walked or a movement at or below the block confirms (gap_changed), the ledger counts more than the chain holds (ledger_above_chain), a spend at the address names no wallet, so the credit would count money the address no longer holds (unnamed_spend_at_address), the block the gap was read at left the chain (reading_orphaned), or a reorg froze the asset's ledger account (account_frozen).
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
expected_delta | string | Required. The gap's delta as the console showed it; a different delta refuses the credit. |
reason | string | Required. |
tx_hash | string | Optional. The transaction the deposit came in, when the operator found it. Evidence only. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/deposit-gaps/$DEPOSIT_GAP_ID/credit" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"expected_delta": "1",
"reason": "$REASON",
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The gap was already credited; this is that credit. Headers: Cache-Control. |
201 | The credit and the adjustment that made it. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The credit was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
id | uuid | The gap, and the credit_id of its wallet.deposit_credited event. |
network_id | uuid | |
deposit_wallet_id | uuid | The customer address credited, as getWallet reads it. |
chain_asset_id | uuid | |
position | integer | The block position the address was read at. |
block_hash | string or null | |
chain_balance | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
ledger_balance | string | Canonical signed plain decimal output. Zero has no sign; non-zero values have no exponent, leading zeroes, or insignificant trailing fractional zeroes. Balance deficits are represented exactly instead of being clamped to zero. |
delta | string | What the adjustment credited, the chain's balance less the ledger's. |
posting_id | uuid | |
audit_event_id | uuid | |
console_audit_event_id | uuid | |
credited_by | string | The person the console's audit event names. |
reason | string | |
tx_hash | string or null | |
credited_at | date-time |
Review a payment's arrivals
reviewPaymentArrivals · GET /api/v1/admin/transactions/{id}/unrequested-arrivals · scope admin:chains
For the operator console. What one payment left undecided at customer addresses, per asset those addresses did not request: the open incidents holding an undecided arrival of it, what is undecided at those addresses, any payment's, and the review of exactly those arrivals. shared counts the incidents that also hold another payment's undecided arrivals and shared_amount sums them: deciding this payment decides those too. An asset with nothing open is left out.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/transactions/$TRANSACTION_ID/unrequested-arrivals" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The payment's open arrivals, per asset. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
arrivals | object[] | |
arrivals[].transaction_id | uuid | |
arrivals[].network_id | uuid | |
arrivals[].tx_hash | string | |
arrivals[].chain_asset_id | uuid | |
arrivals[].symbol | string | |
arrivals[].incidents | integer | The open incidents holding an undecided arrival of the payment in the asset. |
arrivals[].amount | string | What is undecided at those addresses, any payment's. |
arrivals[].review | string | A digest of exactly the arrivals undecided there; a decision must still find them. |
arrivals[].shared | integer | The incidents that also hold another payment's undecided arrivals. |
arrivals[].shared_amount | string | What those other payments left there, decided with this one. |
Decide a payment's arrivals
resolvePaymentArrivals · POST /api/v1/admin/transactions/{id}/unrequested-arrivals · scope admin:chains
For the operator console. Decides every open incident the review lists for one asset, in one call and all of them or none, as fiatless resolve-arrival decides each: accept credits what is undecided at each address to its customer as a payment, dismiss credits nothing.
Send back the asset's incidents, amount and review as the review showed them, the decision, a reason, and the id of the audit event the console recorded for the person, a few minutes ago at most, for this transaction, asset, decision, incidents, amount, review and reason. Once the payment's arrivals are decided, the same decision returns the first one with 200 and writes nothing. The call is refused with 409, deciding nothing: arrival_changed when what is undecided there is not what was reviewed, or when a payment reached one of the addresses while an accept waited and is still being written or confirmed (run it again), arrival_not_open when nothing of the payment is open, asset_not_depositable, arrival_not_in_custody and arrival_history_incomplete as resolve-arrival refuses at one address, naming the first customer refused, arrivals_exceed_lock_table when the database's lock table, which every session shares, is full, and arrivals_exceed_console when an accept would name more than 100,000 arrivals, which the console cannot wait for: accept those with resolve-payment-arrivals.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
chain_asset_id | uuid | Required. |
decision | enum | Required. One of accept, dismiss. |
incidents | integer | Required. The asset's incidents as the review showed them. |
amount | string | Required. The asset's amount as the review showed it. |
review | string | Required. |
reason | string | Required. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/transactions/$TRANSACTION_ID/unrequested-arrivals" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"chain_asset_id": "$CHAIN_ASSET_ID",
"decision": "accept",
"incidents": 1,
"amount": "1",
"review": "$REVIEW",
"reason": "$REASON",
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The arrivals were already decided; this is that decision. Headers: Cache-Control. |
201 | The decision. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The decision was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
transaction_id | uuid | |
network_id | uuid | |
chain_asset_id | uuid | |
status | enum | One of accepted, dismissed. |
incidents | integer | |
amount | string | What the decisions credited or covered, together. |
decided_by | string | The person the console's audit event names. |
reason | string | |
audit_event_id | uuid | |
console_audit_event_id | uuid | |
transactions | integer | The transactions whose effects now name a customer's wallet; 0 for a dismissal. |
List treasury bindings
listTreasuryBindings · GET /api/v1/admin/treasury-bindings · scope admin:chains
For the operator console. Each network's bound treasury against the treasury the seed this process holds derives. A network whose seed derives another treasury is halted: it keeps crediting the customer addresses it issued, and issues no new one, pays nothing and sweeps nothing until the seed that derives the bound treasury returns, or until it is re-bound and the api restarts. One re-bound but not yet restarted is restart_pending. last_rebind is the newest re-bind, with what the old treasury held when it was last read: that money stays there, outside the ledger, until it is moved to the new treasury and counted there.
sh
curl -sS "$FIATLESS_URL/api/v1/admin/treasury-bindings" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | Every bound network. Headers: Cache-Control. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
networks | object[] | |
networks[].network_id | uuid | |
networks[].state | enum | One of bound, halted, restart_pending. |
networks[].bound_address | string | |
networks[].derived_address | string or null | What this seed derives instead; null while the network is bound. |
networks[].last_rebind | object or null | |
networks[].last_rebind.revision | integer | |
networks[].last_rebind.previous_address | string | |
networks[].last_rebind.address | string | |
networks[].last_rebind.at | date-time | |
networks[].last_rebind.by | string | The person the console's audit event names. |
networks[].last_rebind.left_behind | object[] | |
networks[].last_rebind.left_behind[].chain_asset_id | uuid | |
networks[].last_rebind.left_behind[].amount | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
networks[].last_rebind.left_behind[].position | integer | |
networks[].last_rebind.left_behind[].read_at | date-time |
Re-bind a halted treasury
rebindTreasury · POST /api/v1/admin/treasury-bindings/{id}/rebind · scope admin:chains
For the operator console. Binds a halted network to the treasury the seed this process holds derives, records the binding it replaced and what the old treasury held, and answers pending_restart: the network runs on the new treasury once the api restarts. Coins at the old treasury stay there and this seed cannot pay them out; move them to the new treasury with the old seed and count them there.
Refused with 409, changing nothing, when the network is not halted (network_not_halted), typed_suffix is not the new address's last six characters as shown (typed_suffix_mismatch), it is already re-bound (rebind_pending_restart), the bound seed issued customer addresses on it (customer_addresses_issued), the ledger counts money on it (ledger_counts_money), a payout on it is not finished (payout_in_flight) or the bound treasury's history is still being read (history_walk_running). Restore the seed that derives the bound treasury in those cases.
Send the typed_suffix, a reason and the id of the audit event the console recorded for the person, a few minutes ago at most, for this network, suffix and reason.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
typed_suffix | string | Required. The new address's last six characters, as the console shows them. |
reason | string | Required. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/treasury-bindings/$TREASURY_BINDING_ID/rebind" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"typed_suffix": "$TYPED_SUFFIX",
"reason": "$REASON",
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The re-bind. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The call was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | |
revision | integer | |
previous_address | string | |
address | string | |
status | string | The network runs on the new treasury once the api restarts. Always pending_restart. |
left_behind | object[] | |
left_behind[].chain_asset_id | uuid | |
left_behind[].amount | string | Canonical non-negative plain decimal output with no exponent, sign, leading zeroes, or insignificant trailing fractional zeroes. Thus an accepted input 125.500000 is returned and idempotently stored as 125.5. |
left_behind[].position | integer | |
left_behind[].read_at | date-time | |
audit_event_id | uuid | |
console_audit_event_id | uuid | |
rebound_by | string | The person the console's audit event names. |
Payouts
Payouts only a person can end.
Fail an unpayable payout
failPayout · POST /api/v1/admin/payouts/{id}/fail · scope admin:chains
For the operator console. Ends a queued payout that can never be paid: one its lane set aside after the same failure five times in a row, such as one of a token no longer enabled for payouts, or one queued for more than an hour, such as an XRPL payout whose issuer cannot be read. The payout fails with failed_by_operator, its amount and fee are available again, and payout.failed is sent. Nothing is sent to the chain.
The call is refused with 409 unless the payout is queued (payout_not_queued), its lane set it aside or it was queued more than an hour ago (payout_still_in_its_lane), and nothing it signed can still land (signed_send_may_land): a Tron, Solana or XRPL transaction it signed must be proven absent on the chain, past its expiry, and one that signed a Bitcoin or EVM transaction is never failed here. While a point-in-time recovery is open it is also refused until the recovery shows the old database did not pay the payout: recovery_not_settled while the payout's network has not been read past the recovery's first minutes (and on Solana 151 blocks, on XRPL 21 ledgers, made after them) or holds an undecided transfer, on an EVM or Bitcoin network until its payout lane has read that no send of the old database is still pending, on EVM also while that lane sees a treasury transaction pending since the recovery opened that has not landed, or while the database changed and no recovery is open yet, and transfer_pays_this_payout when such a transfer pays it exactly, which recovery-match-payout settles instead.
Send a reason and the id of the audit event the console recorded for the person, a few minutes ago at most, for this payout and reason.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
reason | string | Required. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/payouts/$PAYOUT_ID/fail" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"reason": "$REASON",
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The failed payout. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The call was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
withdrawal_id | uuid | |
network_id | uuid | |
status | string | Always failed. |
failure_code | string | Always failed_by_operator. |
set_aside | boolean | Its lane had set it aside; otherwise it was requested more than an hour ago. |
queued_since | date-time | When the payout was requested. |
released_holds | integer | The holds given back. A payout that never signed holds none. |
audit_event_id | uuid | |
console_audit_event_id | uuid | |
failed_by | string | The person the console's audit event names. |
Fail consumed-nonce payout
failConsumedNoncePayout · POST /api/v1/admin/payouts/{id}/fail-consumed-nonce · scope admin:chains
For the operator console. Ends an EVM payout that can never be paid because another transaction from the treasury took its nonce. The payout fails with nonce_consumed_elsewhere, its amount and fee are available again, and its reconciliation cases are closed. Nothing is sent.
The call is refused with 409 unless the payout still waits on its signed transaction (payout_not_awaiting_its_nonce), no reconciliation of it is running (reconciliation_in_flight), and the reconciliation task has proven, at a block the chain has confirmed, that the treasury's nonce is past the payout's while the payout's own transaction is not on chain (nonce_not_proven_consumed).
Send consumer_is_not_this_payout: true only once a person has checked that the transaction that took the nonce did not pay this payout in its place, with a reason and the id of the audit event the console recorded for that person, a few minutes ago at most, for this payout, reason and attestation.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
reason | string | Required. |
consumer_is_not_this_payout | boolean | Required. A person checked that the transaction that took the nonce is not this payout. Always true. |
console_audit_event_id | uuid | Required. The audit event the console recorded for the person, before the call. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/payouts/$PAYOUT_ID/fail-consumed-nonce" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"reason": "$REASON",
"consumer_is_not_this_payout": true,
"console_audit_event_id": "$CONSOLE_AUDIT_EVENT_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The failed payout and the proof it was failed on. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The call was refused; error.code says why. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
withdrawal_id | uuid | |
network_id | uuid | |
status | string | Always failed. |
failure_code | string | Always nonce_consumed_elsewhere. |
tx_hash | string | The payout's own transaction, which never reached the chain. |
nonce | string | The payout's nonce. |
proof_block_position | integer | The confirmed block the treasury's nonce was read at. |
proof_block_hash | string | |
account_nonce | string | The treasury's nonce at that block, past the payout's. |
released_holds | integer | The holds given back, the amount's and the fee's. |
audit_event_id | uuid | |
console_audit_event_id | uuid | |
failed_by | string | The person the console's audit event names. |
Sweeping
Sweep policies, each network's Auto sweep, Sweep now and each network's sweeps.
Sweep now
sweepNow · POST /api/v1/sweeps/sessions · scope admin:sweep
Plans the network's sweeps now instead of at Auto sweep's next pass, past its switch and interval, never past the rule that sweeps only customer addresses fresh at creation. Answers the sweeps and gas top-ups it queued, and for each reason how many customer addresses' assets it queued nothing for, among them below_minimum, used_before_fiatless, not_checked_yet, in_flight, set_aside, token_refused, treasury_refuses, fee_above_cap and waiting (the node, the scanner, the network's native funds or a failed sweep's quiet period; a later pass asks again). A Bitcoin network answers its consolidation run, opened now or already open, and no reasons.
Refused with 409, queueing nothing, when no sweep lane runs for the network in this process (lane_disabled).
Body
| Field | Type | Note |
|---|---|---|
network_id | uuid | Required. |
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/sessions" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"network_id": "$NETWORK_ID"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | What the pass queued, and why the rest queued nothing. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | Nothing was queued; error.code says why. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | |
queued | uuid[] | The sweeps and gas top-ups the pass queued; on Bitcoin, the open consolidation run. |
reasons | object[] | Why the pass queued nothing for the rest, the reason naming the most customer addresses' assets first. |
reasons[].reason | string | A code; a reason the operation's description does not list yet is a later planner's. |
reasons[].count | integer | How many customer addresses' assets it names. |
List sweeps
listSweeps · GET /api/v1/sweeps · scope admin:sweep
The network's 50 newest sweeps, gas top-ups and Bitcoin consolidation runs, newest first. A pass that queued nothing leaves no row.
Query
| Name | Type | Note |
|---|---|---|
network_id | uuid | Required. The network's id. |
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps?network_id=$NETWORK_ID" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The network's newest sweeps. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | |
sweeps | object[] | |
sweeps[].id | uuid | |
sweeps[].network_id | uuid | |
sweeps[].kind | enum | A sweep moves a customer address's asset to the treasury; a gas top-up sends the treasury's native coin to a customer address so its token sweep can pay its fee; a consolidation is a Bitcoin run gathering the customer addresses' coins. One of sweep, gas_top_up, consolidation. |
sweeps[].chain_asset_id | uuid | |
sweeps[].asset_key | string | |
sweeps[].symbol | string | |
sweeps[].source_address | string or null | The customer address a sweep leaves; null for a gas top-up and a consolidation. |
sweeps[].destination_address | string | The treasury, or for a gas top-up the customer address. |
sweeps[].amount | string or null | In the asset's units; a consolidation's is null until it is signed. |
sweeps[].fee | string or null | The network fee paid, in the network's coin, once known. |
sweeps[].status | string | queued, signing, broadcast, confirming, confirmed or failed; a consolidation is never confirming. |
sweeps[].tx_hash | string or null | |
sweeps[].failure_code | string or null | Why a failed one ended. |
sweeps[].waiting_code | string or null | What a queued one waits on: gas_top_up while its gas top-up has not confirmed, else the last wait or retry its lane recorded, as a code. |
sweeps[].after_withdrawal_id | uuid or null | The gas top-up a token sweep waits on. |
sweeps[].created_at | date-time | |
sweeps[].completed_at | date-time or null |
List sweep policies
listSweepAssets · GET /api/v1/sweeps/assets · scope admin:sweep
Every asset of the network with its sweep policy, natives first, and the network's sweeping: whether a sweep lane runs for it here, its Auto sweep switch, and when a sweep last confirmed on it. A lane that keeps its native minimum in its own setting shows that minimum where a policy would be.
Query
| Name | Type | Note |
|---|---|---|
network_id | uuid | Required. The network's id. |
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/assets?network_id=$NETWORK_ID" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The network's assets and sweeping. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | |
lane_enabled | boolean | A sweep lane runs for this network in this process. |
auto_sweep | boolean | The network's Auto sweep switch. |
interval_minutes | integer or null | Auto sweep's pace in minutes; null opens a pass on every tick of the lane. |
opens_now | boolean | Sweep now can open a session here. |
last_sweep_at | date-time or null | When a sweep last settled on this network. |
assets | object[] | |
assets[].id | uuid | The asset's id. |
assets[].asset_key | string | |
assets[].standard | string | |
assets[].symbol | string | |
assets[].name | string | |
assets[].state | string | The asset's state on the network. |
assets[].sweep_enabled | boolean | |
assets[].minimum_sweep_amount | string or null | The least balance an address must hold to be swept, in asset units; null with no policy. |
assets[].retain_amount | string or null | What a sweep leaves at the address, in asset units; null with no policy. |
assets[].source | enum or null | set by a person, default by the network; null with no minimum. One of set, default, null. |
assets[].declined | boolean | A person stopped its sweeping, so the network's default leaves it alone. |
assets[].updated_at | date-time |
Set a sweep policy
setSweepPolicy · POST /api/v1/sweeps/assets/{chain_asset_id} · scope admin:sweep
Sets, changes or removes one asset's sweep policy, with an audit event. It applies at the lane's next tick. sweep_enabled: true needs a minimum_sweep_amount; retain_amount defaults to 0. false removes the policy and takes no amounts.
Refused with 409 when the asset is not active (asset_not_active), a token's network has no native policy yet (native_policy_required), a native policy is removed while its tokens keep theirs (token_policies_remain), or there is no policy to remove (no_sweep_policy).
Path
| Name | Type | Note |
|---|---|---|
chain_asset_id | uuid | Required. The asset's id. |
Body
| Field | Type | Note |
|---|---|---|
sweep_enabled | boolean | Required. true sets or changes the policy; false removes it. |
minimum_sweep_amount | string | Optional. Required with sweep_enabled true, refused with false; in asset units. |
retain_amount | string | Optional. Refused with sweep_enabled false; in asset units. Default 0. |
reason | string | Required. Why; stored with the audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/assets/$ASSET_ID" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"sweep_enabled": false,
"reason": "$REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The asset's policy now, with its audit event. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The policy was not changed; error.code says why. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
chain_asset_id | uuid | |
sweep_enabled | boolean | |
minimum_sweep_amount | string or null | Null once the policy is removed. |
retain_amount | string or null | Null once the policy is removed. |
audit_event_id | uuid |
Switch Auto sweep
setAutoSweep · POST /api/v1/sweeps/networks/{network_id} · scope admin:sweep
Turns the network's Auto sweep on or off, with an audit event; the lane reads it at its next tick. Off keeps every policy and stops only new sessions. On restores them and writes the network's default policy for each active asset that has none and that no person declined; needs_minimum lists the assets that still sweep nothing until a person sets their minimum. Or sets Auto sweep's interval instead: a pass for an asset opens only once its newest one started that many minutes ago, 0 clears it, and Sweep now ignores it.
Path
| Name | Type | Note |
|---|---|---|
network_id | uuid | Required. The network's id. |
Body
| Field | Type | Note |
|---|---|---|
enabled | boolean | Optional. |
interval_minutes | integer | Optional. Auto sweep opens a pass for an asset only once its newest pass started this many minutes ago; 0 opens one on every tick of the lane. Sweep now ignores it. |
reason | string | Required. Why; stored with the audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/networks/$NETWORK_ID" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"reason": "$REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The network's Auto sweep now. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | |
auto_sweep | boolean | |
interval_minutes | integer or null | Auto sweep's pace in minutes; null opens a pass on every tick of the lane. |
needs_minimum | uuid[] | The active assets that sweep nothing until a person sets their minimum. |
audit_event_id | uuid |
Networks
Adding an EVM network, a network's confirmation count and payout fee limits, and listing a token.
List known EVM chains
listKnownEVMChains · GET /api/v1/blockchains/evm/available · scope admin:chains · testnet only
The public EVM chain list from chainid.network, read at most once an hour, to fill in the Add EVM network form.
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/evm/available" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The known chains. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
chains | object[] or null | |
chains[].name | string | |
chains[].chain | string | |
chains[].chain_id | integer | |
chains[].native_currency | object | |
chains[].native_currency.name | string | |
chains[].native_currency.symbol | string | |
chains[].native_currency.decimals | integer | |
chains[].slip44 | integer | |
chains[].rpcs | object[] or null | |
chains[].rpcs[].url | string | |
chains[].rpcs[].variables | string[] or null | The ${NAME} placeholders in url. |
chains[].explorers | string[] or null |
Add an EVM network
addEVMNetwork · POST /api/v1/blockchains · scope admin:chains · testnet only
Stages an EVM network and its native coin, with an audit event, after the chosen node profile reports the chain id. Nothing runs until the next restart, which admits every staged network or refuses to start. The request names signer and node profiles from the install's settings, never a secret.
Refused with 409 when the network conflicts with one already staged or the most networks a restart admits are staged.
Body
| Field | Type | Note |
|---|---|---|
name | string | Required. |
symbol | string | Required. |
chain_id | integer | Required. Not a built-in Ethereum or BSC chain id. |
explorer_url | string | Optional. Empty, or a credential-free https URL; one without {{tx_id}} gets /tx/{{tx_id}} appended. |
native_name | string | Required. |
native_symbol | string | Required. |
native_decimals | integer | Required. Always 18. |
slip44 | integer | Required. The coin type the network's keys derive under. |
signer_profile | string | Required. A signer profile the install's settings name. |
node_profile | string | Required. A node profile the install's settings name; it must report chain_id. |
maximum_gas_limit | integer | Required. The most gas one payout or sweep transfer may sign. |
maximum_fee_per_gas_atomic | string | Required. A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
maximum_total_fee_atomic | string | Required. A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"name": "$NAME",
"symbol": "$SYMBOL",
"chain_id": 1,
"native_name": "$NATIVE_NAME",
"native_symbol": "$NATIVE_SYMBOL",
"native_decimals": 18,
"slip44": 0,
"signer_profile": "$SIGNER_PROFILE",
"node_profile": "$NODE_PROFILE",
"maximum_gas_limit": 1,
"maximum_fee_per_gas_atomic": "50000000000",
"maximum_total_fee_atomic": "50000000000"
}
JSONResponses
| Status | Meaning |
|---|---|
202 | Staged; it runs after the next restart. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
409 | The state refuses the call; message says why. The code is resource_conflict. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
202 Accepted
| Field | Type | Note |
|---|---|---|
id | uuid | The network's id. |
status | string | Always pending_restart. |
config_digest | string | The SHA-256 of the network's staged settings, in hex. |
Set confirmation count
setConfirmationPolicy · POST /api/v1/blockchains/{id}/confirmation-policy · scope admin:chains · testnet only
Sets how many confirmations the network needs, with an audit event, as a new version of its confirmation policy. Transactions already seen keep the version they captured. Only a network that confirms by count can be changed here, to a count from 1 to 1,000; a Bitcoin network needs more than its configured reorg depth.
Refused with 409 when the network confirms by another mode or already needs that count.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
required_confirmation_count | integer | Required. |
change_reason | string | Required. Why; stored with the policy and its audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/$BLOCKCHAIN_ID/confirmation-policy" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"required_confirmation_count": 1,
"change_reason": "$CHANGE_REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The new policy version. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The state refuses the call; message says why. The code is resource_conflict. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
blockchain_id | uuid | |
policy_id | uuid | |
version | integer | |
previous_version | integer | |
mode | string | Always count. |
required_confirmation_count | integer | |
previous_required_confirmation_count | integer | |
activated_at | date-time | Database time; transactions seen from then on need the new count. |
Set payout fee limits
setFeePolicy · POST /api/v1/blockchains/{id}/fee-policy · scope admin:chains
Sets the most an EVM network's payouts and sweeps may spend in network fees, with an audit event, as the next revision of its fee policy. The api prices with the newest revision from its next start; revisions are never changed or removed. A transfer priced past either fee ceiling waits until the fee falls, one whose gas passes the gas ceiling fails, and the treasury keeps the most one payout may spend aside for each.
A built-in network starts from compiled limits: 200,000 gas, 50 gwei and 0.005 ETH a payout on Ethereum and Sepolia; 200,000 gas, 5 gwei and 0.001 BNB on BSC and its testnet. A network added with Add an EVM network starts from the limits it was added with.
The three ceilings are required. Each basis-point field left out keeps the newest revision's value, or the default: the gas estimate +20% (12000), twice the head block's base fee (20000), and the priority fee at 10000, 12000 or 15000 as a payout's fee_policy is slow, normal or fast.
Refused with 404 when the id names no EVM network, and with 409 when the newest revision already sets these limits or another change was written first.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
Body
| Field | Type | Note |
|---|---|---|
maximum_gas_limit | integer | Required. The most gas one payout or sweep transfer may sign. |
maximum_fee_per_gas_atomic | string | Required. A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
maximum_total_fee_atomic | string | Required. A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
gas_headroom_bps | integer | Optional. Basis points; 10000 is 1x. |
base_fee_headroom_bps | integer | Optional. Basis points; 10000 is 1x. |
slow_fee_multiplier_bps | integer | Optional. Basis points; 10000 is 1x. |
normal_fee_multiplier_bps | integer | Optional. Basis points; 10000 is 1x. |
fast_fee_multiplier_bps | integer | Optional. Basis points; 10000 is 1x. |
change_reason | string | Required. Why; stored with the revision and its audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/$BLOCKCHAIN_ID/fee-policy" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"maximum_gas_limit": 1,
"maximum_fee_per_gas_atomic": "50000000000",
"maximum_total_fee_atomic": "50000000000",
"change_reason": "$CHANGE_REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The new revision; the api prices with it from its next start. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The state refuses the call; message says why. The code is resource_conflict. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
blockchain_id | uuid | |
revision | integer | |
previous_revision | integer | 0 when the network had none. |
gas_headroom_bps | integer | Basis points; 10000 is 1x. |
base_fee_headroom_bps | integer | Basis points; 10000 is 1x. |
slow_fee_multiplier_bps | integer | Basis points; 10000 is 1x. |
normal_fee_multiplier_bps | integer | Basis points; 10000 is 1x. |
fast_fee_multiplier_bps | integer | Basis points; 10000 is 1x. |
maximum_gas_limit | integer | The most gas one payout or sweep transfer may sign. |
maximum_fee_per_gas_atomic | string | A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
maximum_total_fee_atomic | string | A whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero. |
status | string | Always pending_restart. |
Describe a token
describeToken · GET /api/v1/blockchains/{blockchain_id}/tokens/describe · scope admin:chains · testnet only
Reads a token contract through the network's node: its standard, name, symbol and decimals, the asset id it would be listed under, and its state when it is listed already.
Refused with 409 when no runtime in this process can read the network's contracts (no_describer), the contract is not a token (not_a_token), or its standard cannot be listed (unsupported_standard).
Path
| Name | Type | Note |
|---|---|---|
blockchain_id | uuid | Required. The network's id. |
Query
| Name | Type | Note |
|---|---|---|
contract | string | Required. The token's contract address, or its mint on Solana. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/$BLOCKCHAIN_ID/tokens/describe?contract=$CONTRACT" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The token as the node reports it. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The token cannot be described; error.code says why. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
503 | The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable. |
200 OK
| Field | Type | Note |
|---|---|---|
blockchain_id | uuid | |
standard | string | |
contract | string | The contract as the network writes it. |
name | string | |
symbol | string | |
decimals | integer | |
chain_asset_id | uuid | The asset id the token is or would be listed under. |
already_admitted | boolean | |
state | string or null | The listed asset's state; null when the token is not listed. |
Admit a token
admitToken · POST /api/v1/blockchains/{blockchain_id}/assets · scope admin:chains · testnet only
Lists a token on the network as an inert asset, with an audit event: the scanner starts decoding it, and nothing is credited or paid in it until it is enabled. The contract is read again, and decimals must be what the chain reports. status is adopted once the network's checkpoint takes the token (its scanner reloads before its next block), or admitted, answered with 200, when the token was admitted already.
Refused with 409 for the reasons describeToken gives, when decimals differs from the chain's (decimals_mismatch), a scanner tick held the network for the whole wait (scanner_busy), the network's checkpoint is halted (checkpoint_halted), or other admissions on the network won every attempt (allowlist_raced).
Path
| Name | Type | Note |
|---|---|---|
blockchain_id | uuid | Required. The network's id. |
Body
| Field | Type | Note |
|---|---|---|
contract | string | Required. |
coin | string | Required. The code of the coin the token is. |
decimals | integer | Required. The decimals the person expects; the chain's must match. |
reason | string | Required. Why; stored with the audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/$BLOCKCHAIN_ID/assets" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"contract": "$CONTRACT",
"coin": "$COIN",
"decimals": 0,
"reason": "$REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The token was admitted already; nothing changed. |
202 | Admitted, inert until it is enabled. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The token was not admitted; error.code says why. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
503 | The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable. |
200 OK
| Field | Type | Note |
|---|---|---|
chain_asset_id | uuid | |
revision | integer | The network's token list revision that holds the token. |
asset_count | integer | How many assets that revision lists. |
already_admitted | boolean | |
status | enum | One of adopted, admitted. |
message | string | What happened and what to do next, for people. |
Enable a token
enableToken · POST /api/v1/blockchains/{blockchain_id}/assets/{chain_asset_id}/enable · scope admin:chains · testnet only
Turns on deposits, payouts or both for an admitted token, with an audit event naming where a person checked the contract (verified_by). The scanner's current block is recorded as the point the check was made at.
Refused with 409 when the token is enabled already (already_active), is not waiting to be enabled (asset_not_pending), or the network has no usable checkpoint yet (checkpoint_unusable).
Path
| Name | Type | Note |
|---|---|---|
blockchain_id | uuid | Required. The network's id. |
chain_asset_id | uuid | Required. The asset's id. |
Body
| Field | Type | Note |
|---|---|---|
deposit | boolean | Optional. Turn on deposits. At least one of deposit and withdraw must be true. |
withdraw | boolean | Optional. Turn on payouts. |
verified_by | string | Required. Where a person checked the contract, such as the issuer's page. |
reason | string | Required. Why; stored with the audit event. |
sh
curl -sS "$FIATLESS_URL/api/v1/blockchains/$BLOCKCHAIN_ID/assets/$ASSET_ID/enable" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"verified_by": "$VERIFIED_BY",
"reason": "$REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The token is enabled. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
409 | The token was not enabled; error.code says why. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
chain_asset_id | uuid | |
verified_position | integer | The block the check was recorded at. |
verified_block_hash | string | |
audit_event_id | uuid |
Coins
The coins each network's assets settle as.
List coins
listCoins · GET /api/v1/coins · scope ledger:read · testnet only
Every coin. A coin is quoted when it has rate sources; there is no other switch. The call takes no query parameters.
sh
curl -sS "$FIATLESS_URL/api/v1/coins" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The coins. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
data | object[] | |
data[].id | uuid | |
data[].code | string | |
data[].name | string | |
data[].symbol | string | |
data[].logo_url | string or null | A path on the install's own origin, such as /static/btc.svg; null when the coin has no logo. |
Create a coin
createCoin · POST /api/v1/coins · scope admin:chains · testnet only
Creates a coin, with an audit event, exactly as a seed would: its id comes from its code. Each rate_sources entry maps a rate provider to that provider's instrument for the coin.
Refused with 409 when a coin with that code exists.
Body
| Field | Type | Note |
|---|---|---|
code | string | Required. Lower-cased and trimmed before it is checked. |
name | string | Required. |
symbol | string | Required. |
logo_url | string | Optional. Empty, or /static/<name>.svg or .png. |
rate_sources | object | Optional. Each rate provider's instrument for the coin, by provider, such as XXBTZUSD for kraken. |
sh
curl -sS "$FIATLESS_URL/api/v1/coins" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"code": "$CODE",
"name": "$NAME",
"symbol": "$SYMBOL"
}
JSONResponses
| Status | Meaning |
|---|---|
201 | The new coin. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
409 | The state refuses the call; message says why. The code is resource_conflict. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
201 Created
| Field | Type | Note |
|---|---|---|
id | uuid | |
code | string | |
name | string | |
symbol | string | |
logo_url | string or null | A path on the install's own origin, such as /static/btc.svg; null when the coin has no logo. |
Transactions
One Bitcoin transaction's inputs and outputs, read from the network's node.
Get a Bitcoin flow
getBitcoinFlow · GET /api/v1/transactions/{id}/bitcoin-flow · scope admin:chains
A Bitcoin transaction's inputs and outputs, read from the network's node at the block the install recorded it in. The request picks no node, block or hash; they come from the stored transaction. When they cannot be read, status is unavailable and reason says why in words, still with 200.
Path
| Name | Type | Note |
|---|---|---|
id | uuid | Required. The resource's id. |
sh
curl -sS "$FIATLESS_URL/api/v1/transactions/$TRANSACTION_ID/bitcoin-flow" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The transaction's inputs and outputs, or why there are none. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
503 | The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable. |
200 OK
| Field | Type | Note |
|---|---|---|
supported | boolean | Whether the transaction is on a Bitcoin network. |
status | enum | One of available, unavailable. |
reason | string | Optional. Why the inputs and outputs are unavailable, in words. |
tx_hash | string | |
blockchain_id | uuid | |
source | string | Always bitcoin-core. |
observed_at | date-time | |
inputs | object[] | |
inputs[].index | integer | |
inputs[].txid | string | Optional. The transaction whose output this input spends; absent for a coinbase. |
inputs[].vout | integer | Optional. |
inputs[].address | string | Optional. |
inputs[].value_sats | string or null | The spent output's value in satoshis; null when the node did not give it. |
inputs[].coinbase | boolean | Optional. |
inputs[].script_type | string | Optional. |
inputs[].script_hex | string | Optional. |
outputs | object[] | |
outputs[].index | integer | |
outputs[].address | string | Optional. |
outputs[].value_sats | string | In satoshis. |
outputs[].script_type | string | Optional. |
outputs[].script_hex | string | Optional. |
Catalog
The sources behind USD rates.
Set rate source state
setRateSourceState · POST /api/v1/rates/sources · scope admin:chains
Sets the enabled state of one mapped (coin, provider) pair. A suspended source is still collected and still appears in a rate's observations, but contributes to no status, quorum, price or peer median.
The collector suspends a source on its own when its price deviates from the median of at least three fresh, timestamped peers, and records the observed price, that median, how many sources it was taken over and the deviation as evidence. It returns that source by itself once its price has stayed within half the allowed deviation of its peers for 30 minutes, with an audit event (rate_source.recover). A suspension a person made stays until a person lifts it. Restoring clears the evidence, and a manual suspension records the operator's reason instead of numbers nobody observed.
reason is required in both directions and is stored as written. The change is attributed to the calling API key, never to collector.
An unknown code (compared without regard to case), or a provider that is not one of the five, answers 400 with error.field; a provider with no mapping for that coin answers 404.
Body
| Field | Type | Note |
|---|---|---|
code | string | Required. A coin code as stored. A request may send it in any case. At most 128 UTF-8 bytes, with no whitespace, control characters or commas. |
provider | enum | Required. One of kraken, bitfinex, bitstamp, gemini, btse. |
enabled | boolean | Required. |
reason | string | Required. Why the state is being changed. Required in both directions; stored as written. |
sh
curl -sS "$FIATLESS_URL/api/v1/rates/sources" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"code": "btc",
"provider": "kraken",
"enabled": false,
"reason": "$REASON"
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The pair's new state, with any collector evidence cleared. Headers: Cache-Control. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
404 | The resource does not exist. The code is resource_not_found. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
503 | Stored rates could not be read. The code is rates_unavailable. A coin with no fresh rate is not this error: it comes back in a 200. |
200 OK
| Field | Type | Note |
|---|---|---|
code | string | A coin code as stored. A request may send it in any case. At most 128 UTF-8 bytes, with no whitespace, control characters or commas. |
provider | enum | One of kraken, bitfinex, bitstamp, gemini, btse. |
enabled | boolean | False means this pair contributes to no status, quorum, price or peer median. Its observations are still collected and still listed. |
reason | string or null | outlier when the collector suspended it, recovered when the collector returned it after its price stayed within half the allowed deviation of its peers for 30 minutes; free operator text when a person decided. Null for a pair whose state has never been changed. |
observed_price | string or null | The price this source reported when it was suspended. Null unless a collector suspension stands. |
peer_median | string or null | The median its peers agreed on at that moment. Null unless a collector suspension stands. |
peer_count | integer or null | How many fresh sources, this one included, that median was taken over. Null unless a collector suspension stands. |
deviation_bps | integer or null | Distance from that median in basis points. Null unless a collector suspension stands. |
changed_at | date-time or null | Database time of the last state change; null for a pair never changed. |
changed_by | string or null | collector for an automatic suspension or return, operator:<api-key-id> for a person's decision. Null for a pair never changed. |
Operations
Monitoring for the operator.
Get metrics
getMetrics · GET /api/v1/metrics · scope admin:metrics
Text exposition (text/plain; version=0.0.4) of the install's backlogs and parked state machines: wallet and withdrawal counts by status, webhook delivery counts, unresolved reconciliation and reorg cases, unpublished outbox depth and age, per-network scanner checkpoint freshness and lag behind the node's head, and how long money has waited: deposits no sweep has handled, payouts in no block, and lanes that owe work and finish none.
The series describe the whole install, except fiatless_ready, the answering replica's readiness. The route needs a key because those counts reveal business volume; scrape it with a key holding only admin:metrics.
Responses are cached briefly, so a fast scrape interval does not turn into database load. A scrape that cannot read state returns 503 with no series rather than a successful all-zero body.
sh
curl -sS "$FIATLESS_URL/api/v1/metrics" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | Prometheus text exposition. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
503 | Operational state could not be read; no series are emitted. |
Webhooks
Which private addresses merchants' webhook endpoints may reach.
Read the private-address setting
getWebhookPrivateAddresses · GET /api/v1/admin/webhooks/private-addresses · scope admin:chains
Which private addresses webhook endpoints may reach. With block_private_addresses on, the default, an endpoint must reach a public address; off, it may also reach exactly the allowlist's addresses and ranges. Until an operator first sets it, the allowlist holds the seven private ranges turning the block off offers.
sh
curl -sS "$FIATLESS_URL/api/v1/admin/webhooks/private-addresses" \
-H "Authorization: Bearer $FIATLESS_KEY"Responses
| Status | Meaning |
|---|---|
200 | The setting. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
block_private_addresses | boolean | On, an endpoint must reach a public address. |
allowlist | string[] | What an endpoint may also reach while the block is off, each as a CIDR range: one address reads /32 or /128. |
Set the private-address setting
setWebhookPrivateAddresses · POST /api/v1/admin/webhooks/private-addresses · scope admin:chains
Replaces the setting, with an audit event. Registering an endpoint named by an address literal checks it at once; every delivery checks the address it connects to, whatever a DNS answer said before, from the delivery worker's next pass on. So an endpoint registered while its range was allowed is refused once the block is back on.
The allowlist is the only authority: no address is refused or allowed beyond it. With the block off, any key holding webhooks:manage can make the install POST to a listed address and read from each delivery's status code what answered there. A cloud metadata service answers the host itself: 169.254.169.254, and fd00:ec2::254 and 100.100.100.200, which the starting ranges fc00::/7 and 100.64.0.0/10 hold. List only the hosts your receivers run on.
Body
| Field | Type | Note |
|---|---|---|
block_private_addresses | boolean | Required. |
allowlist | string[] | Required. Addresses such as 10.0.0.5 and CIDR ranges such as 10.0.0.0/8, with no bits set past the mask; [] for none. Kept while the block is on. |
sh
curl -sS "$FIATLESS_URL/api/v1/admin/webhooks/private-addresses" \
-H "Authorization: Bearer $FIATLESS_KEY" \
--json @- <<JSON
{
"block_private_addresses": false,
"allowlist": [
"$ALLOWLIST"
]
}
JSONResponses
| Status | Meaning |
|---|---|
200 | The setting now. |
400 | A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
415 | The body was not sent as application/json. The code is unsupported_media_type. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
block_private_addresses | boolean | On, an endpoint must reach a public address. |
allowlist | string[] | What an endpoint may also reach while the block is off, each as a CIDR range: one address reads /32 or /128. |