Skip to main content

GetSpendableBalanceInput

Input for querying spendable wallet balance.

walletstringrequired

Wallet address to inspect.

tokenstringrequired

Token identifier to get the balance for, e.g. BITCOIN-BTC or STARKNET-STRK.

targetChainstring

Target smart-chain identifier when estimating spendable Bitcoin balance. The estimate adjusts automatically based on the available swap routes between Bitcoin and the provided chain.

gasDropboolean

Whether gas-drop transaction size overhead should be included for Bitcoin-to-smart-chain swaps.

feeRate object

Manual fee-rate override used for spendable balance estimation. For Bitcoin balances this should be a positive numeric fee rate in sats/vB. For smart-chain balances the format is chain-specific: Solana uses <microLamports/CU>[;<base fee in lamports>], Starknet uses <l1GasCost>,<l2GasCost>,<l1DataGasCost>;v3 where all fee amounts are in Fri per gas, and EVM chains use <baseFeePerGas>,<priorityFeePerGas> where both values are in Wei per gas.

oneOf
number

For Bitcoin balances: positive fee rate in sats/vB.

Possible values: > 0

Example: 3.5
minBitcoinFeeRatenumber

Minimum Bitcoin fee rate to enforce during estimation.

feeMultipliernumber

Multiplier applied when feeRate is not provided. For Bitcoin balances it multiplies the fetched economical Bitcoin fee rate. For smart-chain balances it multiplies the smart-chain native-token commit fee estimate. This parameter cannot be specified alongside feeRate.

GetSpendableBalanceInput
{
"wallet": "string",
"token": "string",
"targetChain": "string",
"gasDrop": true,
"feeRate": 3.5,
"minBitcoinFeeRate": 0,
"feeMultiplier": 0
}