This guide uses a testing app ID. Create your own API key at portal.garden.finance.
Starting a swap takes one call. 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 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.
Use owner addresses you control on both chains.
Response
id is the quote ID and the order ID. Once your initiate is indexed, poll it at get order.
You may get more than one quote back, one per eligible solver. Pick one and use its initiate. The others expire on their own.
2

Initiate the Swap

The initiate block carries everything you need to fund the source leg. Its shape is discriminated on type, which follows the source chain’s family.
Send 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 id. The order exists once your initiate is on-chain; before that, this call returns 404.
The swap is complete once both 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

Put amount on destination instead, and the API works out what to spend:
Response

Indexing your initiate

Swaps are detected automatically within a few seconds. To skip the wait, send us the transaction hash:

Checking a price without creating an order

Get estimate prices a route without creating anything.