> ## 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.

# Trade

> Direct trading on centralized exchanges

The `/trade` command provides direct trading on centralized exchanges without creating executors.

## Supported Exchanges

| Exchange        | Spot | Perpetual |
| --------------- | ---- | --------- |
| **Binance**     | Yes  | Yes       |
| **Bybit**       | Yes  | Yes       |
| **OKX**         | Yes  | Yes       |
| **Kucoin**      | Yes  | Yes       |
| **Kraken**      | Yes  | No        |
| **Coinbase**    | Yes  | No        |
| **Hyperliquid** | No   | Yes       |

## Via Telegram

### Place Order

```
/trade → Select exchange → Select market → Buy/Sell → Enter amount
```

### Order Types

| Type       | Description                          |
| ---------- | ------------------------------------ |
| **Market** | Execute immediately at best price    |
| **Limit**  | Execute at specified price or better |

### Position Management (Perpetual)

For perpetual markets:

* Set leverage before opening position
* View entry price and unrealized P\&L
* Close position partially or fully

```
/trade → Positions → Select position → Close
```

## Via API

### Get Trading Rules

```bash theme={null}
curl -u admin:admin http://localhost:8000/connectors/binance/trading-rules
```

### Place Market Order

```bash theme={null}
curl -u admin:admin -X POST http://localhost:8000/trading/orders \
  -H "Content-Type: application/json" \
  -d '{
    "account_name": "master_account",
    "connector_name": "binance",
    "trading_pair": "BTC-USDT",
    "trade_type": "BUY",
    "amount": 0.001,
    "order_type": "MARKET"
  }'
```

### Place Limit Order

```bash theme={null}
curl -u admin:admin -X POST http://localhost:8000/trading/orders \
  -H "Content-Type: application/json" \
  -d '{
    "account_name": "master_account",
    "connector_name": "binance",
    "trading_pair": "BTC-USDT",
    "trade_type": "BUY",
    "amount": 0.001,
    "order_type": "LIMIT",
    "price": 60000.0
  }'
```

### Cancel Order

The account, connector, and client order ID go in the path:

```bash theme={null}
curl -u admin:admin -X POST \
  http://localhost:8000/trading/master_account/binance/orders/{client_order_id}/cancel
```

### Set Leverage (Perpetual)

```bash theme={null}
curl -u admin:admin -X POST \
  http://localhost:8000/trading/master_account/binance_perpetual/leverage \
  -H "Content-Type: application/json" \
  -d '{
    "trading_pair": "BTC-USDT",
    "leverage": 5
  }'
```

## Trade vs Executors

| Aspect              | /trade              | Executors                     |
| ------------------- | ------------------- | ----------------------------- |
| **Use Case**        | Quick manual trades | Agent-controlled operations   |
| **P\&L Tracking**   | Exchange-level      | Per-agent via `controller_id` |
| **Exit Conditions** | Manual              | Automatic (TP/SL/time)        |
| **Attribution**     | None                | Tagged to agent               |

For agent-controlled trading with P\&L attribution, use [Executors](/executors/overview) instead.
