Skip to main content
POST
Before executing a swap on-chain, call this endpoint to obtain verificationData and timestamp. Both values must be passed directly into the swap() function — if either is modified or expired, the transaction will revert. Optionally, pass amountIn (and minAmountOut) to receive pre-built calldata ready for direct submission.

Selecting a Chain

Pass the target chain in the request body with chainId: Every pair is base token / quote token, so the stablecoin leg of your tokenIn/tokenOut must be that chain’s quote token — USDT on BNB Chain, not USDC. See Get Orderbook for addresses.
If chainId is omitted (or 0), the request targets Base (8453). chainId selects which chain’s pair list is validated against and which signing key is used — the token pair must be supported on that chain, or the request fails with 400 PAIR_NOT_FOUND. An unsupported chain returns 400 UNSUPPORTED_CHAIN.

Swap Execution Flow

Step 1 — Call this endpoint

Minimal (verification data only):
Response:
With calldata (pass amountIn and optionally minAmountOut):
Response:
The calldata field is ABI-encoded for swap(address,uint256,address,uint256,uint256,bytes) and can be submitted directly to the router without further encoding.

Step 2 — Approve the Router

Use the Router for the chain you passed as chainId (see Selecting a Chain). The example below is Base.

Step 3 — Execute the swap on-chain

Option A — build the call yourself:
Option B — use the calldata from the API (requires amountIn in Step 1):
The calldata is already ABI-encoded for swap(address,uint256,address,uint256,uint256,bytes) — no further encoding needed.

Request Fields


Fee Parameter

The fee field uses 0.1 bps resolution: The fee is deducted from the output amount (amountOut) and settled monthly in a mutually agreed currency.

Authorizations

X-API-KEY
string
header
required

API key issued by the Kipseli team. Required on every request. Authorization: Bearer <key> is accepted as an alternative.

Body

application/json
tokenIn
string
required

EVM hex address of the input token (checksummed or lowercase)

Example:

"0x4200000000000000000000000000000000000006"

tokenOut
string
required

EVM hex address of the output token (checksummed or lowercase)

Example:

"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"

fee
string
required

Fee tier as a decimal string in 0.1 bps resolution(e.g. "3000" = 3%)

Example:

"3000"

userAddress
string
required

EVM hex address of the user submitting the swap

Example:

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

chainId
integer<int64>
default:8453

Chain the swap will be executed on. Supported values: 56 (BNB Chain), 8453 (Base), 4663 (Robinhood Chain). Omit it (or pass 0) for the default chain, Base (8453).

It selects the pair list validated against and the signing key used. A chain the service does not serve returns 400 UNSUPPORTED_CHAIN; a pair not tracked on it returns 400 PAIR_NOT_FOUND.

Required range: x >= 0
Example:

8453

amountIn
string

Input token amount in wei as a decimal string. When provided, the response will include a calldata field with ABI-encoded calldata for the swap function.

Example:

"1000000000000000000"

minAmountOut
string

Minimum accepted output token amount in wei as a decimal string. Only used when amountIn is provided. Defaults to 0 if omitted.

Example:

"3150000000"

Response

Quote signed successfully

verificationData
string

ABI-encoded hex string (with 0x prefix) containing (fee, originRate, userAddress, signature). Pass this directly to the on-chain verification contract.

Example:

"0xabcdef..."

timestamp
integer<int64>

Unix timestamp (seconds) at which the signature was generated

Example:

1741737600

calldata
string

ABI-encoded calldata (with 0x prefix) for the swap(address,uint256,address,uint256,uint256,bytes) function. Only present when amountIn was provided in the request. The encoded arguments are (tokenIn, amountIn, tokenOut, minAmountOut, quoteTimestamp, verificationData).

Example:

"0x..."