This guide uses a testing app ID. Create your own API key at portal.garden.finance.
POST /quote prices the swap, creates the order, and returns the
transaction to initiate it on-chain.
1
Create Quote
Let’s trade 0.0002 WBTC on Arbitrum Sepolia for USDC on Solana Devnet.Set You may get more than one quote back, one per eligible solver. Pick one and use its
amount on the leg you want to fix. Here it is on source, so we’re spending exactly
0.0002 WBTC and the API works out what we receive.Response
id is the quote ID and the order ID. Once your initiate is indexed, poll it at
get order.initiate. The others expire on their own.2
Initiate the Swap
The Send
initiate block carries everything you need to fund the source leg. Its shape is
discriminated on type, which follows the source chain’s family.- EVM
- Starknet
- Solana
- Bitcoin
initiate_transaction as-is. value, data and gas_limit are hex strings.approval_transaction is null above because this wallet had already approved the
HTLC. When it isn’t null, send it first and wait for it to be mined, or the initiate
reverts.From a HyperCore source you also get core_to_evm_transfer. Send that first to
bridge to HyperEVM, then the initiate.3
Check Order Status
Poll the order with the same The swap is complete once both
id. The order exists once your initiate is on-chain; before
that, this call returns 404.source_swap and destination_swap have a redeem_tx_hash.Supported chains
Because v3 builds the initiate transaction for you, a swap can start from an EVM chain, Solana, Starknet or Bitcoin. Litecoin, Lightning and Spark aren’t supported as a v3 source yet. Use v2 for those. Any chain can be the destination. Call get chains for the current list.Receiving an exact amount
Putamount on destination instead, and the API works out what to spend:
Response