AMPD

API

Build on the amp

The same endpoints this site runs on. Plain JSON over HTTPS, no key needed. Read live Meteora pools, turn knob settings into exact deposits, read any wallet's positions, and get transactions ready for a wallet to sign. Nothing here can move money on its own.

GET/api/live240 a minute

Live pool

The busiest SOL/USDC pool on Meteora right now: price, the money sitting at each price step, and the last 24 hours of trading.

Returns

address, name, x and y token info (mint, symbol, decimals, USD price, icon), binStep, baseFeePct, activeId, price, bins[] with id, price, x, y and v (value in the quote token), tvl, volume24h, fees24h

Example

const pool = await fetch("https://YOUR_HOST/api/live").then(r => r.json())
console.log(pool.price, pool.fees24h)
GET/api/pools120 a minute, cached 20 seconds

Pool list

Every Meteora DLMM pool, searchable and sorted, with real token logos.

Query

qstringSearch by token symbol, name or address.
sortvolume | tvl | feesHow to sort. Default tvl.
page1 to 50Page number. Default 1.

Returns

pools[] (address, name, x, y, binStep, baseFeePct, tvl, volume24h, fees24h) and total

Example

const { pools } = await fetch("https://YOUR_HOST/api/pools?q=SOL&sort=volume").then(r => r.json())
GET/api/pool/{address}240 a minute

One pool

The same live snapshot as /api/live, for any DLMM pool address.

Query

address*pool addressIn the path.

Returns

Same shape as /api/live

Example

const pool = await fetch("https://YOUR_HOST/api/pool/5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6").then(r => r.json())
POST/api/plan240 a minute

Deposit plan

Turns knob settings into an exact deposit: the price window and how much of each token goes in. This is what the RANGE, STYLE and AMOUNT knobs call.

JSON body

pool*addressThe pool.
perSidenumberPrice steps on each side of the current price (the RANGE knob). Default 10.
sideboth | x | yBoth tokens, or one token only. Default both.
shape0 | 1 | 2STYLE: 0 Even (Spot), 1 Centered (Curve), 2 Edges (Bid Ask).
depositXRawinteger stringWithout a wallet: how much of token x in its smallest unit (1 SOL is 1000000000). The other token is filled for you.
owneraddressWith a wallet: plan from its balance instead.
master0 to 1With owner: the share of the most this wallet can put in (the AMOUNT knob).

Returns

plan (minBinId, maxBinId, lowPrice, highPrice, amountX, amountY, amountXRaw, amountYRaw), activeId, balances

Example

const r = await fetch("https://YOUR_HOST/api/plan", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ pool: "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", perSide: 10, side: "both", shape: 0, depositXRaw: "1000000000" }),
}).then(r => r.json())
console.log(r.plan.lowPrice, r.plan.highPrice, r.plan.amountY)
GET/api/positions60 a minute

Positions of a wallet

Every DLMM position a wallet owns, with whether it is earning, what it holds and the fees waiting to be claimed. Read only.

Query

owner*addressThe wallet to read.

Returns

positions[] with address, pool, name, x, y, lowerBinId, upperBinId, activeId, inRange, lowPrice, highPrice, price, token amounts and unclaimed fees

Example

const { positions } = await fetch("https://YOUR_HOST/api/positions?owner=WALLET").then(r => r.json())
positions.forEach(p => console.log(p.name, p.inRange ? "earning" : "not earning"))
POST/api/tx/open60 a minute

Open a position

Builds the transaction that opens a position for a plan. It is checked against Solana first. You sign and send it from the user's wallet; AMPD never signs for anyone.

JSON body

pool*addressThe pool.
owner*addressThe wallet that will sign and own the position.
minBinId, maxBinId*integersThe window, from /api/plan.
shape0 | 1 | 2STYLE, as in /api/plan.
amountXRaw, amountYRaw*integer stringsAmounts in smallest units, from /api/plan.

Returns

txs[] (base64, already signed by the new position key, waiting for the owner's signature), lastValidBlockHeight, position

Example

const plan = (await planRes).plan
const built = await fetch("https://YOUR_HOST/api/tx/open", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ pool, owner, shape: 0, ...plan }),
}).then(r => r.json())
// decode built.txs[0], have the wallet sign it, then send
POST/api/tx/action60 a minute

Pedals

Builds the transactions for a pedal on an existing position. Same rules: checked first, the owner signs.

JSON body

kind*claim | gate | loop | comp | addclaim collects fees, gate is EXIT, loop is REINVEST, comp is RECENTER, add is an EASE IN step.
pool, owner, position*addressesThe pool, the wallet and the position.
shape0 | 1 | 2For RECENTER and EASE IN.
amountXRaw, amountYRawinteger stringsOnly for add.

Returns

txs[] in order (RECENTER and REINVEST are two; send the second after the first confirms), lastValidBlockHeight

Example

const built = await fetch("https://YOUR_HOST/api/tx/action", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ kind: "claim", pool, owner, position }),
}).then(r => r.json())
Want to see these in action first? The rig is built entirely on them, and How it works explains what the numbers mean.