Skip to content
GitHub

Asset liquidity

Asset liquidity is the amount of value, denominated in a given asset, that Rafiki has available to handle cross-currency (foreign exchange) transactions between you and your peer. Whenever an outgoing payment/incoming payment is in a different asset than the peering relationship, the liquidity of asset accounts will change depending on the FX direction.

You should deposit and withdraw liquidity as necessary, based on your risk tolerance. Rafiki will fail any transaction that would cause an asset’s liquidity to fall below zero.

For more information about how Rafiki handles liquidity, see the Accounting concepts page and the low asset liquidity section of the webhook events page.

Manage asset liquidity using Rafiki Admin

You can deposit and withdraw asset liquidity through the Rafiki Admin application’s Assets screen.

Manage asset liquidity using the Backend Admin API

Deposit asset liquidity

mutation DepositAssetLiquidity($input: DepositAssetLiquidityInput!) {
depositAssetLiquidity(input: $input) {
assetId
amount
id
idempotencyKey
success
}
}

Withdraw asset liquidity

mutation CreateAssetLiquidityWithdrawal($input: CreateAssetLiquidityWithdrawalInput!) {
createAssetLiquidityWithdrawal(input: $input) {
success
}
}