POST /leokit/deposit
Generate unsigned transaction(s) for executing a swap based on a previously obtained quote.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
quote_id | string | Yes | UUID from quote response |
selected_protocol | string | Yes | Protocol to use (must exist in quote) |
Validation Rules
- Quote Existence - Quote must exist in database
- Client Ownership - Quote must belong to requesting client (API key match)
- Protocol Availability - Selected protocol must be in quote’s available protocols
- Quote Expiry - Quote must not be expired (protocol-specific rules)
- Ecosystem Support - Blockchain ecosystem must be supported
Response Formats by Ecosystem
The response format varies based on the source blockchain ecosystem.UTXO Chains (Bitcoin, Litecoin, Dogecoin, Dash)
Supported Chains: BTC, LTC, DOGE, DASHPSBT Format (BTC, LTC, DOGE)
Raw Transaction Format (DASH)
For DASH,raw_unsigned_tx is provided instead of psbt_hex:
Key Features
- PSBT Format: Bitcoin, Litecoin, Dogecoin use Partially Signed Bitcoin Transaction format
- OP_RETURN Memo: Embedded in transaction for THORChain/MAYA swaps
- UTXO Selection: Automatic selection with fee estimation
- Change Outputs: Only created if above dust threshold (546 sats for BTC/LTC, 1 DOGE for DOGE)
Memo Length Limits
- BTC/LTC: 150 bytes (OP_RETURN limit: 80 bytes)
- DOGE: 80 bytes
EVM Chains (Ethereum, BSC, Arbitrum, etc.)
Supported Chains: ETH, BSC, ARB, AVAX, BASE, POLYGON, OPTIMISM, FANTOMNative Token Transfer (ETH, BNB, etc.)
ERC20 Token Transfer with Approval
Key Features
- Multiple Transactions: ERC20 swaps require approval + deposit transactions
- USDT Special Case: Allowance reset to 0 before setting new amount
- Nonce Sequencing: Sequential nonce for each transaction in array
- EIP-1559: Supports both legacy (gasPrice) and EIP-1559 (maxFeePerGas) formats
- Router Contracts: THORChain/MAYA use depositWithExpiry function
- Direct Transfers: Chainflip and NEAR use simple transfers to deposit addresses
NEAR Protocol
Native NEAR Transfer
NEP-141 Token Transfer
Key Features
- YoctoNEAR: All amounts in yoctoNEAR (10^24 for native NEAR)
- Fixed Gas: 30 TGas for ft_transfer calls
- Attached Deposit: 1 yoctoNEAR required for token transfers
- Contract Parsing: Extracts contract address from asset format
Cosmos Chains
Supported Chains: Cosmos Hub, Kujira, THORChain (native RUNE)MsgSend (Standard Cosmos Transfer)
MsgDeposit (THOR.RUNE Native Swaps)
Key Features
- Gas Simulation: Real-time estimation with 30% buffer
- Dynamic Fees: Based on recommended_gas_rate from inbound_addresses API
- Account Lookup: Fetches sequence and account number automatically
- Fixed RUNE Fee: 0.02 RUNE for THORChain transactions