Cross-Chain Swap (SwapKit)
Swap EVM tokens to non-EVM destinations that relay-swap cannot reach: ZEC (Zcash), DOGE, LTC, BCH, XRP, DASH, ATOM, SUI, ADA, NEAR, RUNE, CACAO. Routes through THORChain, Maya Protocol, Chainflip, and NEAR Intents. Note: For BTC and SOL destinations, prefer relay-swap (lower fees). Use swapkit-swap only when relay-swap has no route. Ideal for: ZEC/BTC acquisition, DCA into non-EVM assets, cross-chain bridging to Zcash/Bitcoin/Litecoin/Dogecoin.
Catalog action EVM Onchain wallet Gas bridge
Swap EVM tokens to non-EVM destinations that relay-swap cannot reach: ZEC (Zcash), DOGE, LTC, BCH, XRP, DASH, ATOM, SUI, ADA, NEAR, RUNE, CACAO. Routes through THORChain, Maya Protocol, Chainflip, and NEAR Intents. Note: For BTC and SOL destinations, prefer relay-swap (lower fees). Use swapkit-swap only when relay-swap has no route. Ideal for: ZEC/BTC acquisition, DCA into non-EVM assets, cross-chain bridging to Zcash/Bitcoin/Litecoin/Dogecoin.
This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.
At a Glance
| Field | Value |
|---|---|
| Action ID | swapkit-swap |
| Category | EVM Onchain |
| Connector | wallet |
| Requires gas | Yes |
| Funds movement | bridge |
| Tags | blockchain, evm, dex, swap, cross-chain, bridge, bitcoin, defi, crypto |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
sellAsset | string | Yes | SwapKit asset ID to sell. Format: "CHAIN.SYMBOL" for native or "CHAIN.SYMBOL-ContractAddress" for tokens. Examples: "ETH.ETH", "ETH.USDC-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "ARB.ETH" |
buyAsset | string | Yes | SwapKit asset ID to buy. Format: "CHAIN.SYMBOL" for native assets. Examples: "ZEC.ZEC", "BTC.BTC", "SOL.SOL", "DOGE.DOGE", "LTC.LTC" |
sellAmount | string | Yes | Human-readable amount to sell (e.g., "0.1" for 0.1 ETH, "100" for 100 USDC). NOT in smallest units — SwapKit API uses human-readable amounts. |
recipient | string | Yes | Destination address on the buy asset's chain. Format depends on chain: t-address for ZEC, bc1/1/3 for BTC, base58 for SOL, etc. |
srcChainId | number | Yes | EVM source chain ID (e.g., 1 for Ethereum, 8453 for Base, 42161 for Arbitrum) |
slippage | number | No | Slippage tolerance in percent (e.g., 3 for 3%). Default: 3. Max: 50. Must be greater than 0. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Status of the swap operation |
transactionHash | string | No | Transaction hash of the swap (EVM source chain) |
sellAsset | string | No | SwapKit asset ID that was sold |
buyAsset | string | No | SwapKit asset ID that was bought |
sellAmount | string | No | Human-readable amount sold |
expectedBuyAmount | string | No | Expected output amount (human-readable) |
expectedBuyAmountMaxSlippage | string | No | Minimum output after max slippage (human-readable) |
provider | string | No | Provider that routed the swap (e.g., THORCHAIN, MAYACHAIN, CHAINFLIP) |
estimatedTime | number | No | Estimated total swap time in seconds |
recipient | string | No | Destination address where bought asset will be delivered |
approvalTransactionHash | string | No | Transaction hash of ERC20 approval, if applicable |
Examples
json{ "type": "swapkit-swap", "payload": { "sellAsset": "ETH", "buyAsset": "ETH", "sellAmount": "1000000", "recipient": "0x0000000000000000000000000000000000000000", "srcChainId": 8453 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/swapkit-swap/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "sellAsset": "ETH", "buyAsset": "ETH", "sellAmount": "1000000", "recipient": "0x0000000000000000000000000000000000000000", "srcChainId": 8453 }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
