The API Reference lists every parameter and field. This page covers what an integration needs to get right.
Gas API (gas.cashmere.exchange)
Purpose
The Gas API prices each route and signs a fee quote that the Cashmere contracts verify on-chain. A quote is valid for about 100 seconds.REST Endpoints
GET /getEcdsaSig_native
feeis in USDC base units (6 decimals) withisNative=false, and in wei withisNative=true. It pays for the mint on the destination chain, so it depends mostly on where the USDC goes: in October 2026, 0.19 USDC into most chains, 0.79 into Solana and about 1.48 into Ethereum. Request a quote for every transfer instead of hardcoding a fee.deadlineis in unix seconds, about 100 seconds after the quote was issued. The contract reverts after it.signatureis a 65-byte ECDSA signature. Passfee,deadlineandsignatureto the contract unchanged, and withisNative=truesendfeeas the transaction’svalue.
ecrecover, without the \x19Ethereum Signed Message prefix:
GET /getEd25519Sig_native
fee is in USDC base units with isNative=false. With isNative=true it is in lamports on Solana (9 decimals), octas on Aptos (8) or MIST on Sui (9).
Message encoding
message holds exactly the bytes that were signed, little-endian: 26 bytes, or 25 without version.
This is the Borsh layout the Solana program verifies, and the BCS layout of
TransferParamsV2 on Aptos and Sui. On Solana, put publicKey, message and signature in an Ed25519Program instruction right before the transfer instruction. Aptos and Sui take the signature as a call argument. See Signed Payloads.
WebSocket Broadcast
wss://gas.cashmere.exchange/subscribe sends the current fees and token prices as soon as you connect. Use it to show live fees in a UI, but request a signed quote right before each transfer: only a quote carries a signature.
- Keys are chain names (
ethereum,arbitrum,solana…), not domain IDs. fee.<destination>.nativeis in the source chain’s smallest native unit, andusdis in USDC base units ("190000"is 0.19 USDC).- Token prices are USD amounts as decimal strings, the same as
GET /tokenPrices.
Operational Notes
- Request a quote right before the user signs, and a fresh one if more than about 70 seconds have passed: the contracts revert once
block.timestamppassesdeadline. - Booleans must be lowercase
trueorfalse. - A missing
isNative, an unknown domain or any other bad input returns HTTP 500 with{"error":"Internal Server Error"}, not 400. Check your parameters before retrying. - A 5xx on a valid request means the API can’t price the route right now: retry with backoff, and never sign with an expired quote.
- For live fees, use the WebSocket instead of polling the quote endpoints.
Transaction APIs (kapi.cashmere.exchange)
/transactionsmainnet
Every mainnet transfer made through Cashmere, newest first.
- Native fees in wei can exceed
Number.MAX_SAFE_INTEGER, andJSON.parsethen rounds them. Use them for display, or parse the body with a big-integer JSON parser. destination_tx_hashcan be all zeros even when the status issuccess.- Responses are cached for 5 seconds, so polling more often than that returns the same page.
/transactions
The same query parameters and schema, for testnet transfers. It has no data newer than October 2025.
Points & Leaderboard API (kapi.cashmere.exchange)
Public endpoints for Cashmere’s points program and protocol stats. Stats responses are cached for 60 seconds, and leaderboard responses for 5. The Analytics reference shows every payload.
Points and multipliers are floats; round them for display. An unknown profile returns
404 {"error":"user not found"}.
Smart Contract Integration (Quick Ref)
- Request a quote. On EVM, call
/getEcdsaSig_nativewithisV2=true; on Solana, Aptos and Sui, call/getEd25519Sig_nativewithversion=2. Always passisNative. - Fill the contract parameters:
fee,deadlineandsignaturefrom the quote, unchanged;maxFeefrom Circle’sminimumFeeathttps://iris-api.circle.com/v2/burn/USDC/fees/{source}/{destination}(see From Quote to Call);gasDropAmount0, since gas drop is not offered;- on EVM,
hookData0x00: Circle rejects empty hook data.
- Approve
amountUSDC (EVM). WithisNative=true, sendfeeas the transaction’svalueon EVM, and on Sui pass it as a coin split from gas; the Solana and Aptos contracts take it from the sender’s balance. - Submit before
deadline. - Poll
/transactionsmainnetuntildestination_tx_statusissuccess.