> ## Documentation Index
> Fetch the complete documentation index at: https://condor.hummingbot.org/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete REST API reference for Hummingbot API

## What is Hummingbot API?

**Hummingbot API** is a RESTful API server that provides programmatic access to all [Hummingbot](https://hummingbot.org) exchange connectors and trading strategies. It serves as the deterministic execution layer for Condor, handling:

* **Data collection**: Standardized access to order books, candles, balances, and positions across 50+ exchanges
* **Market access**: Connectors to spot, perpetual, and AMM exchanges, along with Solana and EVM networks
* **Trade execution**: Place orders, manage positions, and track fills
* **Bot management**: Deploy and manage containerized bots for long-running strategies

## Base URL

```
http://localhost:8000
```

For remote deployments, replace `localhost` with your server's address.

## Authentication

All endpoints require HTTP Basic Authentication:

```bash theme={null}
curl -u YOUR_USERNAME:YOUR_PASSWORD http://localhost:8000/accounts/
```

The username and password are the `USERNAME` and `PASSWORD` you set when you
installed Hummingbot API — they are stored in that install's `.env`, and in
Condor's `config.yml` under `servers:`. There are **no default credentials**:
setup requires you to choose them, and an API left without them answers `401`.

## API Routers

The tables below are an oriented tour of the API's routers, with the endpoints you will reach for first. The sidebar has the complete, playground-enabled reference for every endpoint, generated from the API's own OpenAPI spec.

### Accounts

Manage trading accounts, exchange credentials, and Gateway wallets.

| Endpoint | Method | Description |
| - | - | - |
| `/accounts/` | GET | List all account names |
| `/accounts/{account_name}/credentials` | GET | List configured connectors for an account |
| `/accounts/add-account` | POST | Create a new account |
| `/accounts/delete-account` | POST | Delete an account |
| `/accounts/add-credential/{account_name}/{connector_name}` | POST | Add exchange credentials |
| `/accounts/delete-credential/{account_name}/{connector_name}` | POST | Remove exchange credentials |
| `/accounts/gateway/add-wallet` | POST | Add a Gateway (DEX) wallet |
| `/accounts/gateway/wallets` | GET | List Gateway wallets |

### Portfolio

Real-time balances and portfolio analytics.

| Endpoint | Method | Description |
| - | - | - |
| `/portfolio/state` | POST | Get portfolio balances across all accounts and connectors |
| `/portfolio/history` | POST | Get historical portfolio states |
| `/portfolio/distribution` | POST | Token distribution across accounts |
| `/portfolio/accounts-distribution` | GET | Value distribution by account |

### Trading

Execute orders and manage positions.

| Endpoint | Method | Description |
| - | - | - |
| `/trading/orders` | POST | Place a new order |
| `/trading/orders/active` | POST | Get active orders |
| `/trading/orders/search` | POST | Search order history |
| `/trading/trades` | POST | Search trade fills |
| `/trading/{account_name}/{connector_name}/orders/{client_order_id}/cancel` | POST | Cancel an order |
| `/trading/positions` | POST | Get open positions (perpetual) |
| `/trading/{account_name}/{connector_name}/leverage` | POST | Set leverage |
| `/trading/{account_name}/{connector_name}/position-mode` | GET, POST | Get or set position mode |
| `/trading/funding-payments` | POST | Get funding payment history |

### Connectors

Exchange connector information and trading rules.

| Endpoint | Method | Description |
| - | - | - |
| `/connectors/` | GET | List available connectors |
| `/connectors/{connector_name}/config-map` | GET | Get required credential fields |
| `/connectors/{connector_name}/trading-rules` | GET | Get trading rules for pairs |
| `/connectors/{connector_name}/order-types` | GET | Get supported order types |

### Market Data

Prices, candles, order books, tickers, and conversion rates (the former Rate Oracle endpoints live here now).

| Endpoint | Method | Description |
| - | - | - |
| `/market-data/candles` | POST | Get real-time candles |
| `/market-data/historical-candles` | POST | Get historical candles |
| `/market-data/order-book` | POST | Get order book snapshot |
| `/market-data/prices` | POST | Get current prices |
| `/market-data/tickers` | GET | Get 24h ticker stats |
| `/market-data/funding-info` | POST | Get perpetual funding info |
| `/market-data/rate/{trading_pair}` | GET | Get conversion rate between assets |
| `/market-data/rates` | POST | Get conversion rates in bulk |
| `/market-data/pool-prices` | GET | Get DEX pool prices |

### Executors

Create and manage trading executors — single operations like an order, a TWAP, a grid, or an LP position.

| Endpoint | Method | Description |
| - | - | - |
| `/executors/` | POST | Create a new executor |
| `/executors/search` | POST | List and filter executors |
| `/executors/{executor_id}` | GET | Get executor details |
| `/executors/{executor_id}/stop` | POST | Stop an executor |
| `/executors/{executor_id}/logs` | GET | Get executor logs |
| `/executors/performance` | GET | Aggregate executor performance |
| `/executors/positions/summary` | GET | Summary of executor-held positions |
| `/executors/types/available` | GET | List available executor types |

### Bot Orchestration

Deploy and manage containerized Hummingbot trading bots.

| Endpoint | Method | Description |
| - | - | - |
| `/bot-orchestration/status` | GET | Get status of all bots |
| `/bot-orchestration/deploy-v2-controllers` | POST | Deploy a bot running V2 controllers |
| `/bot-orchestration/deploy-v2-script` | POST | Deploy a bot running a V2 script |
| `/bot-orchestration/start-bot` | POST | Start a bot |
| `/bot-orchestration/stop-bot` | POST | Stop a bot |
| `/bot-orchestration/stop-and-archive-bot/{bot_name}` | POST | Stop a bot and archive its database |
| `/bot-orchestration/{bot_name}/status` | GET | Get one bot's status |
| `/bot-orchestration/bot-runs` | GET | List bot runs |
| `/bot-orchestration/controller-performance-latest` | GET | Latest per-controller performance |

### Controllers

V2 strategy controller management.

| Endpoint | Method | Description |
| - | - | - |
| `/controllers/` | GET | List available controllers |
| `/controllers/{controller_type}/{controller_name}` | GET, POST, DELETE | Read, save, or delete a controller |
| `/controllers/configs/` | GET | List controller configs |
| `/controllers/configs/{config_name}` | GET, POST, DELETE | Read, save, or delete a config |
| `/controllers/{controller_type}/{controller_name}/config/template` | GET | Get a controller's config template |

### Scripts

V1 script management.

| Endpoint | Method | Description |
| - | - | - |
| `/scripts/` | GET | List available scripts |
| `/scripts/{script_name}` | GET, POST, DELETE | Read, save, or delete a script |
| `/scripts/configs/` | GET | List script configs |
| `/scripts/{script_name}/config/template` | GET | Get a script's config template |

### Gateway

DEX infrastructure via Hummingbot Gateway: lifecycle, connectors, and network configuration (tokens and pools per network).

| Endpoint | Method | Description |
| - | - | - |
| `/gateway/status` | GET | Get Gateway status |
| `/gateway/start` / `/gateway/stop` / `/gateway/restart` | POST | Manage the Gateway container |
| `/gateway/connectors` | GET | List Gateway connectors |
| `/gateway/networks` | GET | List supported networks |
| `/gateway/networks/{network_id}` | GET, POST | Read or update a network's config |
| `/gateway/networks/{network_id}/tokens` | GET, POST | List or add tokens on a network |
| `/gateway/networks/{network_id}/pools` | GET, POST | List or add pools on a network |
| `/gateway/logs` | GET | Get Gateway logs |

### Gateway Swap

DEX token swaps.

| Endpoint | Method | Description |
| - | - | - |
| `/gateway/swap/quote` | POST | Get swap quote |
| `/gateway/swap/execute` | POST | Execute a swap |
| `/gateway/swap/execute-quote` | POST | Execute a previously fetched quote |
| `/gateway/swaps/search` | POST | Search past swaps |
| `/gateway/swaps/{transaction_hash}/status` | GET | Get a swap's transaction status |

### Gateway CLMM

Concentrated-liquidity positions.

| Endpoint | Method | Description |
| - | - | - |
| `/gateway/clmm/pools` | GET | List available pools |
| `/gateway/clmm/pool-info` | GET | Get one pool's live state |
| `/gateway/clmm/quote-position` | POST | Quote a new position |
| `/gateway/clmm/open` | POST | Open a new position |
| `/gateway/clmm/add` | POST | Add liquidity to a position |
| `/gateway/clmm/remove` | POST | Remove liquidity from a position |
| `/gateway/clmm/close` | POST | Close a position |
| `/gateway/clmm/collect-fees` | POST | Collect accumulated fees |
| `/gateway/clmm/positions_owned` | POST | Get LP positions owned in a pool |

### Gateway AMM

Classic (full-range) AMM liquidity.

| Endpoint | Method | Description |
| - | - | - |
| `/gateway/amm/pool-info` | GET | Get one pool's live state |
| `/gateway/amm/quote-liquidity` | POST | Quote adding liquidity |
| `/gateway/amm/add-liquidity` | POST | Add liquidity |
| `/gateway/amm/remove-liquidity` | POST | Remove liquidity |
| `/gateway/amm/positions-owned` | POST | Get AMM positions owned |

### Backtesting

Strategy backtesting, synchronous or as background tasks.

| Endpoint | Method | Description |
| - | - | - |
| `/backtesting/run` | POST | Run a backtest synchronously |
| `/backtesting/tasks` | POST | Start a backtest as a background task |
| `/backtesting/tasks` | GET | List backtest tasks |
| `/backtesting/tasks/{task_id}` | GET | Get a task's status and results |
| `/backtesting/tasks/{task_id}` | DELETE | Cancel or delete a task |

### Archived Bots

Historical bot performance data.

| Endpoint | Method | Description |
| - | - | - |
| `/archived-bots/` | GET | List archived bot databases |
| `/archived-bots/{db_path}/summary` | GET | Summary of an archived run |
| `/archived-bots/{db_path}/performance` | GET | Get historical performance |
| `/archived-bots/{db_path}/trades` | GET | Trades from an archived run |
| `/archived-bots/{db_path}` | DELETE | Delete an archived database |

### Docker

Container lifecycle management.

| Endpoint | Method | Description |
| - | - | - |
| `/docker/running` | GET | Check if Docker is running |
| `/docker/active-containers` | GET | List active containers |
| `/docker/available-images/` | GET | List available bot images |
| `/docker/pull-image/` | POST | Pull an image |
| `/docker/clean-exited-containers` | POST | Remove exited containers |

### Storage and System

Disk usage of the API's data, and host resource stats.

| Endpoint | Method | Description |
| - | - | - |
| `/storage/` | GET | Storage overview: databases, archives, disk usage |
| `/system/resources` | GET | CPU, memory, and disk for the API host |

## Response Format

**Success responses** return the requested data:

```json theme={null}
["master_account"]
```

**Error responses** include a `detail` field:

```json theme={null}
{
  "detail": "Account not found"
}
```

## Interactive Playground

Each endpoint page includes an interactive playground where you can test API calls directly. Enter your credentials and server URL to make live requests.

## Resources

<CardGroup cols={2}>
  <Card title="Condor GitHub" icon="github" href="https://github.com/hummingbot/condor">
    Condor source code
  </Card>

  <Card title="API GitHub" icon="github" href="https://github.com/hummingbot/hummingbot-api">
    Hummingbot API source code
  </Card>

  <Card title="Discord" icon="discord" href="https://discord.gg/hummingbot">
    Community support
  </Card>

  <Card title="Give Feedback" icon="clipboard-list" href="https://forms.gle/7NpG3RtgfLrmpUNY8">
    2-minute survey that shapes the roadmap
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.