Skip to main content
POST
/
protocols
/
swap
/
uniswap
/
execute
/
swap
curl --request POST \
  --url http://localhost:4000/v1/protocols/swap/uniswap/execute/swap \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "signWith": "account-123",
  "tokenIn": "0x0000000000000000000000000000000000000000",
  "tokenOut": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "amountIn": "1000000000000000000",
  "amountOutMinimum": "1450000000",
  "chainId": 1,
  "autoApprove": true,
  "autoBroadcast": true
}
'
{
  "success": true,
  "message": "<string>",
  "statusCode": 123,
  "timestamp": "<string>",
  "data": {
    "success": true,
    "message": "Swap transaction signed and broadcasted successfully",
    "gasEstimation": {},
    "transactionHash": "0x123...",
    "signedTransaction": "<string>",
    "approvalTransactionHash": "<string>",
    "transactionId": "tx-123e4567-e89b-12d3-a456-426614174000"
  },
  "path": "<string>"
}

Authorizations

Authorization
string
header
required

Use this format: ApiKey <your_api_key>

Query Parameters

integratorId
string

Integrator ID (required for ADMIN/INTERNAL scope)

Example:

"uuid-integrator-id"

Body

application/json

Swap execution parameters

signWith
string
required

Wallet account ID or address to sign the transaction with

Example:

"account-123"

tokenIn
string
required

Input token address (use 0x0000000000000000000000000000000000000000 for native token)

Example:

"0x0000000000000000000000000000000000000000"

tokenOut
string
required

Output token address

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

amountIn
string
required

Amount to swap (in token decimals, as string)

Example:

"1000000000000000000"

amountOutMinimum
string
required

Minimum amount out (slippage protection)

Example:

"1450000000"

chainId
number
required

Chain ID

Example:

1

autoApprove
boolean

Automatically approve token if needed (default: true)

Example:

true

autoBroadcast
boolean

Automatically broadcast the transaction after signing (default: true)

Example:

true

deadline
number

Deadline timestamp (optional, defaults to 20 minutes from now)

Example:

1234567890

Response

success
boolean
required
message
string
required
statusCode
number
required
timestamp
string
required
data
object
path
string