Skip to content
All library documents

Connecting Hummingbot to Orca Whirlpools on Solana

Article Hummingbot docs

Summary

This documentation explains how Hummingbot Gateway connects to Orca, a Solana-based decentralized exchange. It describes support for legacy automated market maker pools and Whirlpools, which use concentrated liquidity. Users configure a Solana wallet and choose the production network or a test network; the connector also handles wrapped SOL and Token-2022 tokens.

The page lists swap, pool information, and liquidity-position operations, including opening and closing positions and managing liquidity and fees. Its configuration includes a default swap slippage setting of 2% and a maximum of four routing hops. It also reports that position closing gained Token-2022 support and that pool pricing switched to live on-chain data for liquidity rebalancing. These are connector capabilities and setup details, not a trading strategy or evidence of profitability; the page gives no execution benchmarks or evaluation of liquidity-provider risk.

Key ideas

  • Orca Gateway connectivity is limited to the Solana blockchain and supports mainnet and devnet.
  • Orca Whirlpools use concentrated liquidity, while the connector also supports legacy pools.
  • The connector provides swap and liquidity-position functions, including fee collection.
  • Configuration specifies swap slippage and a maximum routing-hop count.
  • The documentation describes Token-2022 position closing and on-chain pool pricing updates, but provides no performance evidence.

Tags

Full text
# Orca


# Orca

!!! tip "Hackathon Sponsor"
    Orca is a sponsor of the [Agent Builders Cup](../../release-notes/2.16.0.md#agent-builders-cup-hackathon), a Hummingbot strategy hackathon with a \$20,000 total prize pool. Build an agent that trades on Orca and apply to the Orca team at [botcamp.xyz/hackathons](https://www.botcamp.xyz/hackathons)!

## 🛠 Connector Info

  - **Folder**: [https://github.com/hummingbot/gateway/tree/development/src/connectors/orca](https://github.com/hummingbot/gateway/tree/development/src/connectors/orca)
  - **Default Configs**: [https://github.com/hummingbot/gateway/blob/development/src/templates/orca.yml](https://github.com/hummingbot/gateway/blob/development/src/templates/orca.yml)

| Component | Status | Notes |
| --------- | ------ | ----- |
| [AMM Connector](https://www.google.com/search?q=%23amm-connector) | ✅ | Legacy Pools |
| [CLMM Connector](https://www.google.com/search?q=%23clmm-connector) | ✅ | Whirlpools (V3) |

## ℹ️ Exchange Info

  - **Website**: [https://www.orca.so/](https://www.orca.so/)
  - **CoinMarketCap**: [https://coinmarketcap.com/exchanges/orca/](https://coinmarketcap.com/exchanges/orca/)
  - **CoinGecko**: [https://www.coingecko.com/en/exchanges/orca](https://www.coingecko.com/en/exchanges/orca)
  - **Fees**: [https://docs.orca.so/reference/fees](https://www.google.com/search?q=https://docs.orca.so/reference/fees)
  - **API Docs**: [https://docs.orca.so/](https://docs.orca.so/)

## 🔑 How to Connect

Orca operates exclusively on the Solana blockchain. To transact on Orca, you must configure a Solana wallet within Gateway.

| Chain | Networks |
| ----- | -------- |
| `solana` | `mainnet-beta`, `devnet` |

### Solana

Orca's primary liquidity pools are "Whirlpools," which utilize concentrated liquidity (CLMM) technology similar to V3 pools on EVM chains.

**To connect your Solana wallet:**

1.  Run the Gateway connect command:


```bash
gateway connect solana
```

2.  Follow the prompts to either:

      - Import an existing wallet using your private key
      - Generate a new Solana wallet

3.  Select your network:

      - `mainnet-beta` for production trading
      - `devnet` for testing

The connector includes automatic WSOL (Wrapped SOL) handling and support for the Token-2022 standard.

**v2.13.0 Updates:**

- **Token-2022 position close**: CLMM position closing now uses Token-2022 instructions, enabling full rent recovery when closing LP positions (PR [#600](https://github.com/hummingbot/gateway/pull/600))
- **On-chain pool pricing**: Pool prices now use live on-chain whirlpool data instead of potentially stale Orca API data, improving accuracy for LP rebalancing decisions (PR [#603](https://github.com/hummingbot/gateway/pull/603))

## Configuration

Configure Orca settings in `/conf/connectors/orca.yml`.

Below are the Orca configuration parameters and their default values:

```yaml
# Global settings for Orca
# Default slippage percentage for swaps (2%)
slippagePct: 2

# For each swap, the maximum number of hops to consider
maximumHops: 4
```

## CLMM Endpoints

*Integration to Orca Whirlpools (concentrated liquidity)*

  - `/connectors/orca/clmm/quote-swap`
  - `/connectors/orca/clmm/execute-swap`
  - `/connectors/orca/clmm/pool-info`
  - `/connectors/orca/clmm/position-info`
  - `/connectors/orca/clmm/positions-owned`
  - `/connectors/orca/clmm/quote-position`
  - `/connectors/orca/clmm/open-position`
  - `/connectors/orca/clmm/close-position`
  - `/connectors/orca/clmm/add-liquidity`
  - `/connectors/orca/clmm/remove-liquidity`
  - `/connectors/orca/clmm/collect-fees`

For more info, run Gateway in development mode and go to [http://localhost:15888](https://www.google.com/search?q=http://localhost:15888) in your browser to see detailed documentation for each endpoint.

Shown in full with attribution under the source's licence. Licence: Apache-2.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.