v1

latestOpenAPI 3.0.0raw.githubusercontent.com2026-04-107095124.5 KB
Swap endpoints

Retrieves swap transaction plan

Retrieves a swap transaction plan containing the required transactions that must be signed by the wallet to complete the swap. The wallet must sign each transaction in the order it is returned in the response. For example, the list of transactions may include a first a token approval transaction, and then a swap transaction.

post/public/{address}/swap

Path parameters

addressstring required

The wallet address initiating the swap

Query parameters

fromChainstring

The source token chain. Must be one of the supported chains (Bitcoin, Ethereum, Polygon, Base or Solana)

fromTokenstring

The source token contract address or ticker symbol. Contract address recommended.

fromTokenAmountstring

The desired swap amount, specified in token currency. A value in fromTokenAmount is prioritized over fromTokenAmountUsd.

fromTokenAmountUsdstring

The desired swap amount, specified in US Dollars. A value in fromTokenAmount is prioritized over fromTokenAmountUsd.

toChainstring

The destination token chain. Must be one of the supported chains (Bitcoin, Ethereum, Polygon, Base or Solana)

toTokenstring

The destination token contract address or ticker symbol. Contract address recommended.

toWalletAddressstring

(Optional) The destination wallet address for the swap funds. Defaults to source address if empty.

Request body

durationnumber
gasstring
gasUsdstring

Response

A list of transactions that must be signed to complete the swap.

idstring
typestring