API

Home Swap API

Same swap brain as Home Wallet, as an API for partners. Ask for a price or a ready-to-sign swap: you sign, we never touch funds.

Base URL

https://home-swap-api.vercel.app

Use this host for every endpoint (/api/v1/swap/price, /quote, /sources). In your app you can store it in an env var, e.g. HOME_SWAP_API_URL.

1. Get your key

Log in, create a key in the dashboard, put it in the header.

Authorization: Bearer hw_live_…
# or
X-HW-API-Key: hw_live_…

2. Get a price (estimate)

For the UI (“you’ll get ~X”). No signing. Endpoint /price.

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=worldchain&sellToken=0x2cFc85d8E48F8EAB294be644d9E25C3030863003&buyToken=0x79A02482A880bCE3F13e09Da970dC34db4CD24d1&sellAmount=100000000000000000" \
  -H "Authorization: Bearer hw_live_…"

sellAmount is in base units (wei / lamports). 0.1 WLD = 100000000000000000.

3. Do a swap (sign it)

When the user hits confirm use /quote. We return what to sign.

  • taker: user wallet that signs the swap
  • swapFeeRecipient: optional, where your partner fee should go
  • swapFeeBps: your fee in bps (50 = 0.50%). Home Wallet applies 0.15% by default on top
# taker = user wallet · swapFeeRecipient = your fee wallet (optional)
curl "https://home-swap-api.vercel.app/api/v1/swap/quote?chainId=worldchain&sellToken=0x2cFc85d8E48F8EAB294be644d9E25C3030863003&buyToken=0x79A02482A880bCE3F13e09Da970dC34db4CD24d1&sellAmount=100000000000000000&taker=0xUSER_WALLET&swapFeeRecipient=0xYOUR_FEE_WALLET&swapFeeBps=50" \
  -H "Authorization: Bearer hw_live_…"

On EVM you get to / data / value. On Solana you get instructions for the client to sign.

4. Typical flow

  1. While typing the amount → /price (debounce).
  2. On confirm → fresh /quote with the same pair + taker.
  3. Approve if needed, then sign & broadcast. Don’t reuse stale quotes.

5. Switch networks

Just change chainId and that network’s token addresses. Same endpoints.

Worldchain

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=worldchain&sellToken=0x2cFc85d8E48F8EAB294be644d9E25C3030863003&buyToken=0x79A02482A880bCE3F13e09Da970dC34db4CD24d1&sellAmount=100000000000000000" \
  -H "Authorization: Bearer hw_live_…"

Base

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=base&sellToken=0x4200000000000000000000000000000000000006&buyToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&sellAmount=10000000000000000" \
  -H "Authorization: Bearer hw_live_…"

Ethereum

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=ethereum&sellToken=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&buyToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&sellAmount=10000000000000000" \
  -H "Authorization: Bearer hw_live_…"

Solana

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=solana&sellToken=So11111111111111111111111111111111111111112&buyToken=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&sellAmount=100000000" \
  -H "Authorization: Bearer hw_live_…"

0.1 SOL = 100000000 lamports. Quote needs taker = Solana pubkey.

TON (experimental)

curl "https://home-swap-api.vercel.app/api/v1/swap/price?chainId=ton&sellToken=ton-native&buyToken=ton-usdt&amountIn=1&decimalsIn=9&decimalsOut=6" \
  -H "Authorization: Bearer hw_live_…"

TON Connect (no EVM calldata). Quote needs taker = CRC-verified TON wallet. Cross-chain TON↔EVM available with sufficient amount.

6. Available networks

Same swap networks as Home Wallet. Same-chain only, except experimental TON (cross-chain TON↔EVM).

NetworkchainIdStatus
Worldchainworldchain / 480active
Basebase / 8453active
Ethereumethereum / 1active
Solanasolanaactive
TONtonexperimental

Live catalog: GET https://home-swap-api.vercel.app/api/v1/swap/sources

7. Fees

  • Home Wallet applies 0.15% by default on every swap.
  • Your partner fee (swapFeeBps + swapFeeRecipient) is added on top, if you set it.
Home Wallet | Digital Era Labs