v1

latestOpenAPI 3.1.02026-07-262771117.8 KB

Get Action

Generates a transaction for cross-chain swaps, bridges, and calls. The action includes transaction data, routing information, and fee calculations for executing the requested operation.

get/getAction

Query parameters

actionType'swap-action' | 'evm-calldata-tx' | 'polymarket' required

Type of action to perform.

Type of action to perform

senderstring required

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

The address of the sender/user

srcChainIdinteger required

Chain ID. Find in the list of supported networks.

Source chain ID

srcTokenstring required

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

Source token address

dstChainIdinteger required

Chain ID. Find in the list of supported networks.

Destination chain ID

dstTokenstring required

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

Destination token address

slippagenumber float required

Slippage tolerance in bps

amountstring

The exact in or exact out amount of the swap

Required: for swap-action

Required: for polymarket action type

swapDirection'exact-amount-in' | 'exact-amount-out'

Swap direction for the action.

Swap direction for the action

Required: for swap-action

Required: for polymarket action type (use exact-amount-in)

recipientstring

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

Address to receive the swapped tokens

Optional: for swap-action

Required: for polymarket action type (should be the proxy wallet address)

tostring

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

The EVM address of the target contract (20 bytes hex)

Required: for evm-calldata-tx action type

datastring

Hex string with 0x prefix

Calldata for the transaction

Required: for evm-calldata-tx action type

valuestring

Value to send with transaction

Optional: for evm-calldata-tx action type

erc20Amountstring

The amount of Erc20 being transferred

Optional: for evm-calldata-tx action type (use for calls requiring Erc20 transfers)

erc20Spenderstring

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

The Erc20 spender requiring approval for the transaction call

Optional: for evm-calldata-tx action type (will default to the to address)

solanaSponsorstring

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

Solana address that pays for tx fees and rent (e.g. ATA creation). Only used for Solana same chain swaps. Transaction must be signed by both the user and the sponsor.

Optional: When provided, the sponsor covers transaction costs on behalf of the user.

bridgeIdsBridgeId[]

Specific bridge protocols to use

Optional: Will default to all available protocols

refundTostring

Address type - can be EvmAddress, HyperCoreAddress, SolanaAddress, or AltVmAddress.

Alternate address to receive refunds

Optional: Will default to the sender

returnDepositAddressboolean

Return a deposit address for deposit-based flows

Optional: Set to true to receive a deposit address in the response

appFeesstring

Application fees configuration as JSON array

Optional: Will default to fees configured for the application

Example: [{ "bps": 50, "receiverAddress": "0x..." }]

userIdstring

Polymarket user ID - returned from POST /create

Required: for polymarket action type

side'BUY' | 'SELL'

Order side for Polymarket orders

Required: for polymarket action type

tokenIDstring

Polymarket CLOB token ID

Required: for polymarket action type

orderType'FOK' | 'FAK'

Polymarket order type

Required: for polymarket action type

  • FOK: Fill or Kill (market order)
  • FAK: Fill and Kill (market order)
feeRateBpsnumber

Fee rate in basis points (non-negative)

Required: for polymarket action type

tickSize'0.01' | '0.001' | '0.0001'

Price tick size for Polymarket orders

Required: for polymarket action type

negRisk'true' | 'false'

Negative risk flag for Polymarket

Required: for polymarket action type

gaslessboolean

Request gasless execution. When true, the response includes an executions array of signed steps to relay through the gasless provider instead of broadcasting a transaction directly.

Optional: Only supported on chains with a configured gasless provider (currently Tron). Requires the API key to have gasless enabled.

Response

Successful response with action data

txIdstring required

Hex string with 0x prefix

vmId'evm' | 'solana' | 'alt-vm' | 'hypercore' | 'tron' required

Virtual machine identifier.

bridgeIdsBridgeId[]

Bridge IDs used in the route.

exchangeRatenumber float required

Exchange rate for the swap.

estimatedTxTimenumber float required

Estimated transaction time in seconds.

estimatedPriceImpactnumber float nullable required

Estimated price impact percentage.

requiresTokenApprovalboolean required

Flag indicating whether the transaction object requires a source token approval check.

requiresRegisterTransactionboolean required

Flag indicating whether the transaction requires registration via the registerTxs endpoint. Mandatory for non-EVM transactions.

executionsType'DEFAULT' | 'GASLESS'

Indicates the execution mode. GASLESS when gasless=true was requested and a relay provider is available; DEFAULT otherwise.