Skip to content

HTTP API ​

The calls behind the operator console and the metrics scrape.

OperationRequestScope
getTreasuryGET /api/v1/admin/treasuryadmin:chains
countTreasuryPOST /api/v1/treasury/countsadmin:chains
creditDepositGapPOST /api/v1/admin/deposit-gaps/{id}/creditadmin:chains
reviewPaymentArrivalsGET /api/v1/admin/transactions/{id}/unrequested-arrivalsadmin:chains
resolvePaymentArrivalsPOST /api/v1/admin/transactions/{id}/unrequested-arrivalsadmin:chains
listTreasuryBindingsGET /api/v1/admin/treasury-bindingsadmin:chains
rebindTreasuryPOST /api/v1/admin/treasury-bindings/{id}/rebindadmin:chains
failPayoutPOST /api/v1/admin/payouts/{id}/failadmin:chains
failConsumedNoncePayoutPOST /api/v1/admin/payouts/{id}/fail-consumed-nonceadmin:chains
sweepNowPOST /api/v1/sweeps/sessionsadmin:sweep
listSweepsGET /api/v1/sweepsadmin:sweep
listSweepAssetsGET /api/v1/sweeps/assetsadmin:sweep
setSweepPolicyPOST /api/v1/sweeps/assets/{chain_asset_id}admin:sweep
setAutoSweepPOST /api/v1/sweeps/networks/{network_id}admin:sweep
listKnownEVMChainsGET /api/v1/blockchains/evm/availableadmin:chains
addEVMNetworkPOST /api/v1/blockchainsadmin:chains
setConfirmationPolicyPOST /api/v1/blockchains/{id}/confirmation-policyadmin:chains
setFeePolicyPOST /api/v1/blockchains/{id}/fee-policyadmin:chains
describeTokenGET /api/v1/blockchains/{blockchain_id}/tokens/describeadmin:chains
admitTokenPOST /api/v1/blockchains/{blockchain_id}/assetsadmin:chains
enableTokenPOST /api/v1/blockchains/{blockchain_id}/assets/{chain_asset_id}/enableadmin:chains
listCoinsGET /api/v1/coinsledger:read
createCoinPOST /api/v1/coinsadmin:chains
getBitcoinFlowGET /api/v1/transactions/{id}/bitcoin-flowadmin:chains
setRateSourceStatePOST /api/v1/rates/sourcesadmin:chains
getMetricsGET /api/v1/metricsadmin:metrics
getWebhookPrivateAddressesGET /api/v1/admin/webhooks/private-addressesadmin:chains
setWebhookPrivateAddressesPOST /api/v1/admin/webhooks/private-addressesadmin: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

StatusMeaning
200Every treasury, networks by name and native assets first. Headers: Cache-Control.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
networksobject[]
networks[].network_iduuid
networks[].namestring
networks[].namespacestringThe network's family, such as eip155 or tron; empty before its runtime identity exists.
networks[].assetsobject[]Every asset that is active, read or on the ledger, the native asset first.
networks[].assets[].asset_iduuid
networks[].assets[].symbolstring
networks[].assets[].decimalsinteger or nullNull for an XRPL issued currency, which has no fixed scale.
networks[].assets[].custodyobject or null
networks[].assets[].custody.amountstringtreasury plus deposits: what is on chain at the install's addresses.
networks[].assets[].custody.treasurystringCanonical 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.depositsstringThe install's other addresses, by their recorded movements at position.
networks[].assets[].custody.stakedstring or nullWhat 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_completebooleanFalse while a customer address's history is still being read.
networks[].assets[].custody.positioninteger
networks[].assets[].custody.block_hashstring or null
networks[].assets[].custody.read_atdate-time
networks[].assets[].custody.sourceenumOne of node, recorded.
networks[].assets[].countedstring or nullWhat the ledger counts for the treasury at the reading's position; null until it is settled.
networks[].assets[].gapstring or nullThe treasury on chain minus counted; null until the position is settled.
networks[].assets[].gap_stateenumOne of not_read, not_settled, none, countable, negative.
networks[].assets[].not_settled_reasonstring or nullWhy 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[].ledgerobject
networks[].assets[].ledger.confirmedstringCanonical 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.heldstringCanonical 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.availablestringCanonical 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[].payablestringCanonical 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_refusalobject or nullWhy 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.codeenumOne of token_refuses_the_treasury, node_refuses_the_transfer.
networks[].assets[].transfer_refusal.sincedate-time
networks[].assets[].fundingobject
networks[].assets[].funding.countedbooleanTrue while the ledger counts the treasury's outside movements by itself.
networks[].assets[].funding.reasonstring or nullWhy not, such as needs_count, history_incomplete or family_off.
networks[].assets[].funding.counted_sincedate-time or null
networks[].assets[].funding.last_countobject or null
networks[].assets[].funding.last_count.positioninteger
networks[].assets[].funding.last_count.atdate-time
networks[].assets[].funding.last_count.bystring
networks[].assets[].funding.last_count.amountstringCanonical 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

FieldTypeNote
network_iduuidRequired.
chain_asset_iduuidRequired.
positionintegerRequired. The reading's position, as the overview showed it.
expected_gapanyRequired. 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.
reasonstringRequired.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
201The count and the adjustment that credited it. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The Count was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

201 Created

FieldTypeNote
iduuid
network_iduuid
chain_asset_iduuid
positioninteger
block_hashstring or null
treasury_custodystringCanonical 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.
countedstringCanonical 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.
gapstringWhat the adjustment credited; 0 for a Count that started counting.
posting_iduuid or nullThe adjustment that credited gap; null when gap is 0.
audit_event_iduuid or nullThe Count's own audit event; null when gap is 0.
console_audit_event_iduuid
reasonstring
created_bystringThe person the console's audit event names.
created_atdate-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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
expected_deltastringRequired. The gap's delta as the console showed it; a different delta refuses the credit.
reasonstringRequired.
tx_hashstringOptional. The transaction the deposit came in, when the operator found it. Evidence only.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
200The gap was already credited; this is that credit. Headers: Cache-Control.
201The credit and the adjustment that made it. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The credit was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuidThe gap, and the credit_id of its wallet.deposit_credited event.
network_iduuid
deposit_wallet_iduuidThe customer address credited, as getWallet reads it.
chain_asset_iduuid
positionintegerThe block position the address was read at.
block_hashstring or null
chain_balancestringCanonical 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_balancestringCanonical 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.
deltastringWhat the adjustment credited, the chain's balance less the ledger's.
posting_iduuid
audit_event_iduuid
console_audit_event_iduuid
credited_bystringThe person the console's audit event names.
reasonstring
tx_hashstring or null
credited_atdate-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

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS "$FIATLESS_URL/api/v1/admin/transactions/$TRANSACTION_ID/unrequested-arrivals" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The payment's open arrivals, per asset. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
arrivalsobject[]
arrivals[].transaction_iduuid
arrivals[].network_iduuid
arrivals[].tx_hashstring
arrivals[].chain_asset_iduuid
arrivals[].symbolstring
arrivals[].incidentsintegerThe open incidents holding an undecided arrival of the payment in the asset.
arrivals[].amountstringWhat is undecided at those addresses, any payment's.
arrivals[].reviewstringA digest of exactly the arrivals undecided there; a decision must still find them.
arrivals[].sharedintegerThe incidents that also hold another payment's undecided arrivals.
arrivals[].shared_amountstringWhat 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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
chain_asset_iduuidRequired.
decisionenumRequired. One of accept, dismiss.
incidentsintegerRequired. The asset's incidents as the review showed them.
amountstringRequired. The asset's amount as the review showed it.
reviewstringRequired.
reasonstringRequired.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
200The arrivals were already decided; this is that decision. Headers: Cache-Control.
201The decision. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The decision was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
transaction_iduuid
network_iduuid
chain_asset_iduuid
statusenumOne of accepted, dismissed.
incidentsinteger
amountstringWhat the decisions credited or covered, together.
decided_bystringThe person the console's audit event names.
reasonstring
audit_event_iduuid
console_audit_event_iduuid
transactionsintegerThe 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

StatusMeaning
200Every bound network. Headers: Cache-Control.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
networksobject[]
networks[].network_iduuid
networks[].stateenumOne of bound, halted, restart_pending.
networks[].bound_addressstring
networks[].derived_addressstring or nullWhat this seed derives instead; null while the network is bound.
networks[].last_rebindobject or null
networks[].last_rebind.revisioninteger
networks[].last_rebind.previous_addressstring
networks[].last_rebind.addressstring
networks[].last_rebind.atdate-time
networks[].last_rebind.bystringThe person the console's audit event names.
networks[].last_rebind.left_behindobject[]
networks[].last_rebind.left_behind[].chain_asset_iduuid
networks[].last_rebind.left_behind[].amountstringCanonical 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[].positioninteger
networks[].last_rebind.left_behind[].read_atdate-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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
typed_suffixstringRequired. The new address's last six characters, as the console shows them.
reasonstringRequired.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
200The re-bind. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The call was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuid
revisioninteger
previous_addressstring
addressstring
statusstringThe network runs on the new treasury once the api restarts. Always pending_restart.
left_behindobject[]
left_behind[].chain_asset_iduuid
left_behind[].amountstringCanonical 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[].positioninteger
left_behind[].read_atdate-time
audit_event_iduuid
console_audit_event_iduuid
rebound_bystringThe 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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
reasonstringRequired.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
200The failed payout. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The call was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
withdrawal_iduuid
network_iduuid
statusstringAlways failed.
failure_codestringAlways failed_by_operator.
set_asidebooleanIts lane had set it aside; otherwise it was requested more than an hour ago.
queued_sincedate-timeWhen the payout was requested.
released_holdsintegerThe holds given back. A payout that never signed holds none.
audit_event_iduuid
console_audit_event_iduuid
failed_bystringThe 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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
reasonstringRequired.
consumer_is_not_this_payoutbooleanRequired. A person checked that the transaction that took the nonce is not this payout. Always true.
console_audit_event_iduuidRequired. 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"
}
JSON

Responses

StatusMeaning
200The failed payout and the proof it was failed on. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The call was refused; error.code says why.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
withdrawal_iduuid
network_iduuid
statusstringAlways failed.
failure_codestringAlways nonce_consumed_elsewhere.
tx_hashstringThe payout's own transaction, which never reached the chain.
noncestringThe payout's nonce.
proof_block_positionintegerThe confirmed block the treasury's nonce was read at.
proof_block_hashstring
account_noncestringThe treasury's nonce at that block, past the payout's.
released_holdsintegerThe holds given back, the amount's and the fee's.
audit_event_iduuid
console_audit_event_iduuid
failed_bystringThe 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

FieldTypeNote
network_iduuidRequired.
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/sessions" \
  -H "Authorization: Bearer $FIATLESS_KEY" \
  --json @- <<JSON
{
  "network_id": "$NETWORK_ID"
}
JSON

Responses

StatusMeaning
200What the pass queued, and why the rest queued nothing.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409Nothing was queued; error.code says why.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuid
queueduuid[]The sweeps and gas top-ups the pass queued; on Bitcoin, the open consolidation run.
reasonsobject[]Why the pass queued nothing for the rest, the reason naming the most customer addresses' assets first.
reasons[].reasonstringA code; a reason the operation's description does not list yet is a later planner's.
reasons[].countintegerHow 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

NameTypeNote
network_iduuidRequired. The network's id.
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps?network_id=$NETWORK_ID" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The network's newest sweeps.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuid
sweepsobject[]
sweeps[].iduuid
sweeps[].network_iduuid
sweeps[].kindenumA 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_iduuid
sweeps[].asset_keystring
sweeps[].symbolstring
sweeps[].source_addressstring or nullThe customer address a sweep leaves; null for a gas top-up and a consolidation.
sweeps[].destination_addressstringThe treasury, or for a gas top-up the customer address.
sweeps[].amountstring or nullIn the asset's units; a consolidation's is null until it is signed.
sweeps[].feestring or nullThe network fee paid, in the network's coin, once known.
sweeps[].statusstringqueued, signing, broadcast, confirming, confirmed or failed; a consolidation is never confirming.
sweeps[].tx_hashstring or null
sweeps[].failure_codestring or nullWhy a failed one ended.
sweeps[].waiting_codestring or nullWhat 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_iduuid or nullThe gas top-up a token sweep waits on.
sweeps[].created_atdate-time
sweeps[].completed_atdate-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

NameTypeNote
network_iduuidRequired. The network's id.
sh
curl -sS "$FIATLESS_URL/api/v1/sweeps/assets?network_id=$NETWORK_ID" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The network's assets and sweeping.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuid
lane_enabledbooleanA sweep lane runs for this network in this process.
auto_sweepbooleanThe network's Auto sweep switch.
interval_minutesinteger or nullAuto sweep's pace in minutes; null opens a pass on every tick of the lane.
opens_nowbooleanSweep now can open a session here.
last_sweep_atdate-time or nullWhen a sweep last settled on this network.
assetsobject[]
assets[].iduuidThe asset's id.
assets[].asset_keystring
assets[].standardstring
assets[].symbolstring
assets[].namestring
assets[].statestringThe asset's state on the network.
assets[].sweep_enabledboolean
assets[].minimum_sweep_amountstring or nullThe least balance an address must hold to be swept, in asset units; null with no policy.
assets[].retain_amountstring or nullWhat a sweep leaves at the address, in asset units; null with no policy.
assets[].sourceenum or nullset by a person, default by the network; null with no minimum. One of set, default, null.
assets[].declinedbooleanA person stopped its sweeping, so the network's default leaves it alone.
assets[].updated_atdate-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

NameTypeNote
chain_asset_iduuidRequired. The asset's id.

Body

FieldTypeNote
sweep_enabledbooleanRequired. true sets or changes the policy; false removes it.
minimum_sweep_amountstringOptional. Required with sweep_enabled true, refused with false; in asset units.
retain_amountstringOptional. Refused with sweep_enabled false; in asset units. Default 0.
reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The asset's policy now, with its audit event.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The policy was not changed; error.code says why.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
chain_asset_iduuid
sweep_enabledboolean
minimum_sweep_amountstring or nullNull once the policy is removed.
retain_amountstring or nullNull once the policy is removed.
audit_event_iduuid

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

NameTypeNote
network_iduuidRequired. The network's id.

Body

FieldTypeNote
enabledbooleanOptional.
interval_minutesintegerOptional. 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.
reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The network's Auto sweep now.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuid
auto_sweepboolean
interval_minutesinteger or nullAuto sweep's pace in minutes; null opens a pass on every tick of the lane.
needs_minimumuuid[]The active assets that sweep nothing until a person sets their minimum.
audit_event_iduuid

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

StatusMeaning
200The known chains.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
chainsobject[] or null
chains[].namestring
chains[].chainstring
chains[].chain_idinteger
chains[].native_currencyobject
chains[].native_currency.namestring
chains[].native_currency.symbolstring
chains[].native_currency.decimalsinteger
chains[].slip44integer
chains[].rpcsobject[] or null
chains[].rpcs[].urlstring
chains[].rpcs[].variablesstring[] or nullThe ${NAME} placeholders in url.
chains[].explorersstring[] 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

FieldTypeNote
namestringRequired.
symbolstringRequired.
chain_idintegerRequired. Not a built-in Ethereum or BSC chain id.
explorer_urlstringOptional. Empty, or a credential-free https URL; one without {{tx_id}} gets /tx/{{tx_id}} appended.
native_namestringRequired.
native_symbolstringRequired.
native_decimalsintegerRequired. Always 18.
slip44integerRequired. The coin type the network's keys derive under.
signer_profilestringRequired. A signer profile the install's settings name.
node_profilestringRequired. A node profile the install's settings name; it must report chain_id.
maximum_gas_limitintegerRequired. The most gas one payout or sweep transfer may sign.
maximum_fee_per_gas_atomicstringRequired. 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_atomicstringRequired. 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"
}
JSON

Responses

StatusMeaning
202Staged; it runs after the next restart.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
409The state refuses the call; message says why. The code is resource_conflict.
500The install failed; the details stay in its logs. The code is internal_error.

202 Accepted

FieldTypeNote
iduuidThe network's id.
statusstringAlways pending_restart.
config_digeststringThe 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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
required_confirmation_countintegerRequired.
change_reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The new policy version.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The state refuses the call; message says why. The code is resource_conflict.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
blockchain_iduuid
policy_iduuid
versioninteger
previous_versioninteger
modestringAlways count.
required_confirmation_countinteger
previous_required_confirmation_countinteger
activated_atdate-timeDatabase 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

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
maximum_gas_limitintegerRequired. The most gas one payout or sweep transfer may sign.
maximum_fee_per_gas_atomicstringRequired. 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_atomicstringRequired. 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_bpsintegerOptional. Basis points; 10000 is 1x.
base_fee_headroom_bpsintegerOptional. Basis points; 10000 is 1x.
slow_fee_multiplier_bpsintegerOptional. Basis points; 10000 is 1x.
normal_fee_multiplier_bpsintegerOptional. Basis points; 10000 is 1x.
fast_fee_multiplier_bpsintegerOptional. Basis points; 10000 is 1x.
change_reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The new revision; the api prices with it from its next start.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The state refuses the call; message says why. The code is resource_conflict.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
blockchain_iduuid
revisioninteger
previous_revisioninteger0 when the network had none.
gas_headroom_bpsintegerBasis points; 10000 is 1x.
base_fee_headroom_bpsintegerBasis points; 10000 is 1x.
slow_fee_multiplier_bpsintegerBasis points; 10000 is 1x.
normal_fee_multiplier_bpsintegerBasis points; 10000 is 1x.
fast_fee_multiplier_bpsintegerBasis points; 10000 is 1x.
maximum_gas_limitintegerThe most gas one payout or sweep transfer may sign.
maximum_fee_per_gas_atomicstringA 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_atomicstringA whole number of the network's native wei, above 0 and at most 2^256 - 1, with no sign or leading zero.
statusstringAlways 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

NameTypeNote
blockchain_iduuidRequired. The network's id.

Query

NameTypeNote
contractstringRequired. 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

StatusMeaning
200The token as the node reports it.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The token cannot be described; error.code says why.
500The install failed; the details stay in its logs. The code is internal_error.
503The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable.

200 OK

FieldTypeNote
blockchain_iduuid
standardstring
contractstringThe contract as the network writes it.
namestring
symbolstring
decimalsinteger
chain_asset_iduuidThe asset id the token is or would be listed under.
already_admittedboolean
statestring or nullThe 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

NameTypeNote
blockchain_iduuidRequired. The network's id.

Body

FieldTypeNote
contractstringRequired.
coinstringRequired. The code of the coin the token is.
decimalsintegerRequired. The decimals the person expects; the chain's must match.
reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The token was admitted already; nothing changed.
202Admitted, inert until it is enabled.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The token was not admitted; error.code says why.
500The install failed; the details stay in its logs. The code is internal_error.
503The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable.

200 OK

FieldTypeNote
chain_asset_iduuid
revisionintegerThe network's token list revision that holds the token.
asset_countintegerHow many assets that revision lists.
already_admittedboolean
statusenumOne of adopted, admitted.
messagestringWhat 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

NameTypeNote
blockchain_iduuidRequired. The network's id.
chain_asset_iduuidRequired. The asset's id.

Body

FieldTypeNote
depositbooleanOptional. Turn on deposits. At least one of deposit and withdraw must be true.
withdrawbooleanOptional. Turn on payouts.
verified_bystringRequired. Where a person checked the contract, such as the issuer's page.
reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The token is enabled.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The token was not enabled; error.code says why.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
chain_asset_iduuid
verified_positionintegerThe block the check was recorded at.
verified_block_hashstring
audit_event_iduuid

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

StatusMeaning
200The coins.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
dataobject[]
data[].iduuid
data[].codestring
data[].namestring
data[].symbolstring
data[].logo_urlstring or nullA 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

FieldTypeNote
codestringRequired. Lower-cased and trimmed before it is checked.
namestringRequired.
symbolstringRequired.
logo_urlstringOptional. Empty, or /static/<name>.svg or .png.
rate_sourcesobjectOptional. 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"
}
JSON

Responses

StatusMeaning
201The new coin.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
409The state refuses the call; message says why. The code is resource_conflict.
500The install failed; the details stay in its logs. The code is internal_error.

201 Created

FieldTypeNote
iduuid
codestring
namestring
symbolstring
logo_urlstring or nullA 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

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS "$FIATLESS_URL/api/v1/transactions/$TRANSACTION_ID/bitcoin-flow" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The transaction's inputs and outputs, or why there are none. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.
503The network's node did not answer, or what the call reads is unavailable; try again later. The code is service_unavailable.

200 OK

FieldTypeNote
supportedbooleanWhether the transaction is on a Bitcoin network.
statusenumOne of available, unavailable.
reasonstringOptional. Why the inputs and outputs are unavailable, in words.
tx_hashstring
blockchain_iduuid
sourcestringAlways bitcoin-core.
observed_atdate-time
inputsobject[]
inputs[].indexinteger
inputs[].txidstringOptional. The transaction whose output this input spends; absent for a coinbase.
inputs[].voutintegerOptional.
inputs[].addressstringOptional.
inputs[].value_satsstring or nullThe spent output's value in satoshis; null when the node did not give it.
inputs[].coinbasebooleanOptional.
inputs[].script_typestringOptional.
inputs[].script_hexstringOptional.
outputsobject[]
outputs[].indexinteger
outputs[].addressstringOptional.
outputs[].value_satsstringIn satoshis.
outputs[].script_typestringOptional.
outputs[].script_hexstringOptional.

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

FieldTypeNote
codestringRequired. 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.
providerenumRequired. One of kraken, bitfinex, bitstamp, gemini, btse.
enabledbooleanRequired.
reasonstringRequired. 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"
}
JSON

Responses

StatusMeaning
200The pair's new state, with any collector evidence cleared. Headers: Cache-Control.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.
503Stored 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

FieldTypeNote
codestringA 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.
providerenumOne of kraken, bitfinex, bitstamp, gemini, btse.
enabledbooleanFalse means this pair contributes to no status, quorum, price or peer median. Its observations are still collected and still listed.
reasonstring or nulloutlier 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_pricestring or nullThe price this source reported when it was suspended. Null unless a collector suspension stands.
peer_medianstring or nullThe median its peers agreed on at that moment. Null unless a collector suspension stands.
peer_countinteger or nullHow many fresh sources, this one included, that median was taken over. Null unless a collector suspension stands.
deviation_bpsinteger or nullDistance from that median in basis points. Null unless a collector suspension stands.
changed_atdate-time or nullDatabase time of the last state change; null for a pair never changed.
changed_bystring or nullcollector 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

StatusMeaning
200Prometheus text exposition.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
503Operational 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

StatusMeaning
200The setting.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
block_private_addressesbooleanOn, an endpoint must reach a public address.
allowliststring[]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

FieldTypeNote
block_private_addressesbooleanRequired.
allowliststring[]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"
  ]
}
JSON

Responses

StatusMeaning
200The setting now.
400A 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.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
block_private_addressesbooleanOn, an endpoint must reach a public address.
allowliststring[]What an endpoint may also reach while the block is off, each as a CIDR range: one address reads /32 or /128.