BTB Finance for agents

Protocols / Dexs

Orca Whirlpools

Orca Whirlpools is Orca's concentrated liquidity AMM on Solana. An agent can swap between two tokens across one or two pools, and open, change, harvest and close liquidity positions in a chosen price range.

On-chainSOLANA1 contractsWebsite · Docs

get_protocol({ "protocol": "orca" })

Risks an agent should know

What an agent can do

swapSwap tokens on a whirlpool
Build the swap with the Orca SDK (quote, slippage, tick arrays) or the swap instruction, then sign and send. Route through Jupiter if the best path crosses several pools.
open-positionOpen a liquidity position in a price range
open_position_with_metadata (or open_position), then increase_liquidity with the chosen liquidity amount and maximum amounts for both tokens.
close-positionRemove liquidity and close a position
decrease_liquidity with the full liquidity, then collect_fees and collect_reward for each reward index, then close_position.

Contracts

solana

ContractAddressKey functionsTry
Whirlpool program
exchange
whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc
source
writeswap
writetwo_hop_swap
writeopen_position
writeopen_position_with_metadata
writeincrease_liquidity
writedecrease_liquidity
writecollect_fees
writecollect_reward
+3 more via get_protocol

APIs

Orca Whirlpools TypeScript SDK
auth: none
https://github.com/orca-so/whirlpools
Use the @orca-so/whirlpools package to build swaps and position transactions with the right tick arrays and accounts. The legacy @orca-so/whirlpools-sdk works with Solana web3.js. Use the SDK instead of hand-building accounts.

Notes

Program ID whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc comes from Orca's official repository README, which lists it as the deployment on Solana mainnet, and it was confirmed as an executable program with getAccountInfo. The README also points to a verifiable build on the Osec API. Instruction names were taken from the program source folder in the official repository (programs/whirlpool/src/instructions), and the v2 folder has newer versions of several instructions (including swap, two_hop_swap, increase_liquidity, decrease_liquidity, collect_fees, collect_reward and reposition_liquidity_v2) Use the SDK to pick the right version for each pool. Orca's older orca.so docs site was not checked directly, so the docs field points to the official GitHub docs folder. Eclipse, the other chain DefiLlama lists for Orca, is not included. Instruction arguments are described in plain language and not as exact Anchor types, since the IDL was not published in the repository path that was checked.

Sources

Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.