---
title: "Execute Swap"
method: POST
path: "/gateway/swap/execute"
tags: ["Gateway Swaps"]
---

# Execute Swap

`POST /gateway/swap/execute`

Execute a swap transaction via router (Jupiter, 0x).

Example:
    connector: 'jupiter'
    network: 'solana-mainnet-beta'
    trading_pair: 'SOL-USDC'
    side: 'BUY'
    amount: 1
    slippage_pct: 1
    wallet_address: (optional, uses default if not provided)

Returns:
    Transaction hash and swap details

## Request body

- SwapExecuteRequest — Request to execute a swap
  - `connector` string, required — DEX router connector (e.g., 'jupiter', '0x')
  - `network` string, required — Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')
  - `trading_pair` string, required — Trading pair (e.g., 'SOL-USDC')
  - `side` string, required — Trade side: 'BUY' or 'SELL'
  - `amount` union, required — Amount to swap
    - number
    - string
  - `slippage_pct` union — Maximum slippage percentage (default: 1.0)
    - number
    - string
  - `wallet_address` string, nullable — Wallet address (optional, uses default if not provided)

## Response `200`

Successful Response

- SwapExecuteResponse — Response after executing swap
  - `transaction_hash` string, required — Transaction hash
  - `trading_pair` string, required — Trading pair
  - `side` string, required — Trade side
  - `amount` string, required — Amount swapped
  - `status` string — Transaction status

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hummingbot/apis/hummingbot-api.md) · [All operations](https://skmtc.net/hummingbot/apis/hummingbot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hummingbot/hummingbot-api/versions/5347fe79537f/schema)
