Supported chains and tokens
GET /v3/catalog is the list of chains and tokens you can trade. Khalani adds chains and tokens continuously, both EVM and non-EVM, so read the list from the catalog. Any listed asset trades against any other, across chains or on the same chain. Pairs aren’t listed separately.
curl -sS https://api.hyperstream.dev/v3/catalog -H "X-API-Key: $KHALANI_API_KEY" | jq '.assets[] | {id, symbol, decimals}'The answer holds chains (each a CAIP-2 id and a name), assets, and your operatorFeeBps and commissionBps. Each asset is { id, chain, symbol, decimals, depositFee, withdrawFee }. Fees and commission explains the two fees.
Reading the catalog
Section titled “Reading the catalog”- Take asset ids from the catalog. Fetch it at startup and refresh it every few minutes. An asset can be added or removed at any time, and a quote with an id the catalog stopped listing answers
400 UNSUPPORTED_ASSETor400 UNSUPPORTED_PAIR. - Expect new chains. A chain you haven’t seen before can appear in the catalog. Offer its assets only once your integration can fund and receive on that chain. An option whose
requiresyou don’t know tells you that you can’t (see Quotes and pricing). - Decimals differ by chain, even for the same token. Read
decimalsfrom the asset. - The catalog is the same for every integrator, except your own
operatorFeeBpsandcommissionBps. - The minimum trade size isn’t in the catalog, because it depends on solvers’ current costs. A quote below it answers
422 AMOUNT_TOO_SMALLwith the range that works.
EVM and non-EVM chains
Section titled “EVM and non-EVM chains”The API works the same way on every chain: the same quote, order and tracking calls. What differs is how the user funds an order on the source chain:
| EVM source | Non-EVM source | |
|---|---|---|
| Funding | Contract calls the payer sends: any approvals, then the deposit. | One token transfer, from any wallet, to a deposit address. |
Option requires |
format:evm_call |
format:transfer, plus any capability the chain needs. |
payer |
Required: the deposit must come from it. | None. |
refundTo |
Optional, defaults to payer. |
Required. |
| Relay fee | Paid in the deposit’s value. |
None. |
Non-EVM chains accept transfers only. See Fund orders.
On the destination side, the recipient receives the token on any chain. Some chains limit which accounts can receive, as the notes below say.
Notes for specific chains
Section titled “Notes for specific chains”Most integrations need none of these. Read the section for a chain only when you offer it.
0G USDC.e
Section titled “0G USDC.e”Use chain eip155:16661 and asset eip155:16661/erc20:0x1f3AA82227281cA364bFb3d253B0f1af1Da6473E, with 6 decimals, when the catalog lists it. USDC.e is USDC bridged through Chainlink CCIP and backed by USDC locked on Ethereum. It is not Circle-issued USDC on 0G.
Delivery into 0G typically takes about 20 minutes and needs at least 30 minutes left before the order’s deadline. Fund the order promptly so a solver has time to deliver. Any unfilled remainder expires at fillBy and is returned through normal settlement. Orders out of 0G are fast.
These illustrative POST /v3/quote requests trade in each direction. Take asset ids from the live catalog, and use an amount within the quote’s supported range. A small amount can answer 422 AMOUNT_TOO_SMALL.
Base USDC to 0G USDC.e:
{ "send": { "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "5000000" }, "receive": { "asset": "eip155:16661/erc20:0x1f3AA82227281cA364bFb3d253B0f1af1Da6473E" }}0G USDC.e to Base USDC:
{ "send": { "asset": "eip155:16661/erc20:0x1f3AA82227281cA364bFb3d253B0f1af1Da6473E", "amount": "5000000" }, "receive": { "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" }}- Give addresses as Base58 (
T…) or hex (41…). The API returns Base58. - A recipient or
refundTomust be activated: it has received TRX or a token before. Otherwise order creation answers422 ACCOUNT_NOT_ACTIVATED. - Cancels use the format
tip191_cancel_proof: sign with TronWeb’ssignMessageV2and send the 65-byte signature as 0x hex.
const signature = await tronWeb.trx.signMessageV2(message);Stellar
Section titled “Stellar”- Give accounts as
G…or muxedM…addresses. A muxed address and itsG…account are different accounts. - A recipient or
refundTomust be able to take the asset: funded, with an authorized trustline that has room for the amount, and with no required memo. Otherwise order creation answers422 ACCOUNT_NOT_READY. - The deposit address is a muxed
M…address, and options carrystellar:muxed_destinationinrequires. Pay it exactly as given, with no memo: a payment to itsG…account isn’t credited. Offer the option only if the paying wallet can pay a muxed address. - Stellar assets have 7 decimals, so the same token can have different decimals here than on EVM.
- Cancels use the format
sep53_cancel_proof: sign with a SEP-53 call, such as Freighter’ssignMessage, and send the 64-byte signature as base64 or 0x hex.
// @stellar/freighter-api v4 or later, which returns base64const { signedMessage: signature } = await signMessage(message, { address: refundTo });Solana
Section titled “Solana”- Use the mainnet chain id
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpand USDC asset idsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. USDT usessolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB. Both have six decimals; use the catalog to check availability. Preserve the case of mints, wallet addresses and transaction signatures. Native SOL cannot fund these orders. - Give
recipientandrefundToas canonical base58 wallet-owner addresses, never token accounts. Order creation checks the wallet and its associated token account (ATA) for the asset’s mint; an invalid or frozen account is refused, and a failed account check can be retried. - For a Solana source, supply a Solana
refundToand the destination’srecipient. Omitpayer: anyone can fund the order. A Solana destination needs a Solanarecipient; use the source’s usual payer and refund roles. - A Solana source requires
format:transferandsolana:associated_token_account. The step’sto.addressis a one-time wallet owner. Derive the owner’s ATA for the asset’s mint under the standard SPL Token program and create it idempotently if absent. The sender pays SOL transaction fees and ATA rent. Send exactly the returned amount to the ATA, with no memo, split payment or top-up. Sending tokens to the owner as if it were a token account does not fund the order. - Use
terms.fundByandterms.fillByas returned. A Solana source reserves additional time to detect the deposit before trading, so itsfillByis later than an EVM order’s with the samefundBy. - Send one payment by
fundBy. The step can remain pending for up to a minute while Khalani observes it: do not pay again. Wrong amounts and extra payments can quarantine funds for manual recovery. A payment can finalize too late even when sent before the deadline; follow the order’s notices. Recovery has the same limits as other non-EVM sources and is separate from the trade’s payout or refund. - An order with Solana on either side cannot be cancelled early. Wait for settlement or expiry. Solana transaction references contain native base58 signatures, never hashes of those signatures.
These quote examples use one USDC (one million base units). USDT works the same way with its own mint: replace the Solana asset id with the USDT id above. Use the returned option id unchanged in POST /v3/orders. Read live ids and decimals from the catalog.
{ "send": {"asset": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "1000000"}, "receive": {"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}For EVM to Solana, reverse the assets; the EVM payer sends the returned calls in order.
{ "send": {"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "amount": "1000000"}, "receive": {"asset": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}- Take the ZEC asset id from the catalog. ZEC amounts use eight decimals. A ZEC order exchanges native ZEC with USDC.
- For a ZEC source, omit
payerand supply a ZcashrefundTo. The recipient is on the destination chain. The Zcash refund address must be mainnet transparent. Addresses are validated for their network, encoding and checksum. - A transparent deposit sends the exact amount in one output to the returned address, with no memo or OP_RETURN.
- Use
terms.fundByandterms.fillByas returned. A ZEC source reserves additional time for confirmations before trading; do not derive deadlines from another chain’s orders. Do not split, top up or reuse a deposit instruction. - A ZEC destination must be mainnet transparent. Unified and Sapling addresses are rejected for both payouts and refunds. An order with ZEC on either side cannot be cancelled early. Track its payout and refund until completed; a settlement transaction alone does not prove delivery.