Skip to content
// PRIZM API v1Developers

The terminal, as an API.

Swaps, limit and DCA orders, SOL-PERP leverage, lending and liquidity — the same engine the terminal runs on, driven from your own bot or agent. Non-custodial by construction: every build endpoint returns a transaction your wallet has not signed, your key signs locally, and a leaked API key can never move funds.

Non-custodial20 endpointsMCP-readyFree keys
quickstart · prove the key, swap SOL → USDC
# 0 · who am I? proves the key + names its wallet, scopes, limits
curl -s https://www.prizm.trading/api/v1/key -H "Authorization: Bearer $PZK"

# 1 · build — unsigned, fee already inside the transaction
curl -s https://www.prizm.trading/api/v1/swap/build \
  -H "Authorization: Bearer $PZK" -H "content-type: application/json" \
  -d '{"inputMint":"So11111111111111111111111111111111111111112",
       "outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
       "amountBase":"10000000"}'
# → { txBase64, lastValidBlockHeight, quote, fee, signer }

# 2 · sign LOCALLY (your key never leaves your machine) — @solana/web3.js
const tx = VersionedTransaction.deserialize(Buffer.from(b64, "base64"));
tx.sign([keypair]);
const SIGNED = Buffer.from(tx.serialize()).toString("base64");

# 3 · broadcast · signature verified, sent, rebroadcast every ~2 s for up to 25 s
curl -s https://www.prizm.trading/api/v1/execute \
  -H "Authorization: Bearer $PZK" -H "content-type: application/json" \
  -d '{"txBase64":"'"$SIGNED"'"}'
# → { signature, status: "confirmed" | "finalized", slot }
#   or { signature, status: "pending", blockHeight, resolveWith } → poll GET /tx/{signature}

Any agent · one paste

It discovers everything else itself.

prompt
Integrate PRIZM for me. Start from https://www.prizm.trading/llms.txt and use my API key: pzk_…

Claude Code · just ask

It reads /llms.txt and can wire the MCP server with the command below.

prompt
Connect to prizm.trading and set up my trading integration. My API key: pzk_…
or wire the MCP server explicitly: claude mcp add prizm …
Base URL
https://www.prizm.trading/api/v1
Auth
Authorization: Bearer pzk_…
Limits · per key
300/min · 100k/day
Reads
120/min · 20k/day
Trading

Fixed windows from the first call; quotes and every orders action count as trading. Backstops: 600/min per IP on REST, 240 messages/min per IP on MCP.

Keys are generated free from the Trading API card on your wallet page, bound to that wallet, and revocable any time — revokes propagate within thirty seconds.
// 01The model

Build, sign, execute.

01Build

Call an endpoint. It returns a transaction your wallet has not signed — fee payer set, fee already inside.

02Sign

Deserialize and sign locally with the wallet's key. PRIZM never sees it; a key alone cannot move funds.

03Execute

POST the signed bytes to /execute — it verifies your signature, broadcasts, rebroadcasts every ~2 s for up to 25 s, and answers confirmed, finalized, failed or pending. A pending is resolved with GET /tx/{signature}, never by rebuilding.

// 02Reference

Twenty endpoints, one contract.

MethodEndpointScopeWhat it does
GET/keyanyKey introspection · call this first.
GET/marketsreadThe curated top-150 catalog · symbols, mints and decimals. Swaps and orders accept any mint pair.
GET/prices
?ids=<mint>,<mint>
readSpot USD prices, 1-50 mints · a non-mint entry is refused by name, never dropped.
GET/balancesreadSOL + token holdings · size orders from this (8 s cache).
GET/defi/poolsreadMeteora DLMM pools · feeds /defi/build.
GET/positionsreadYour live SOL-PERP positions.
GET/defi/ratesreadKamino supply / borrow APY, marginfi supply APR (uncompounded · not comparable), jitoSOL stake APY, and the fee bps charged.
GET/defi/positionsreadYour Kamino (main market) + marginfi positions · supplied and borrowed, each valued by the venue's own oracle.
GET/signals
?tf=5m
readVIZION · next-bar lean (never tradeable · it measures the feed catching up), forming-bar call, reach band · each with measured accuracy + fee economics, plus the climax call; gate on health.ok.
GET/climax
?symbol=SOLUSDT
readThe climax rule's live view · whether a call is issued right now, and every input it decides on. SOLUSDT only.
GET/feeds/{name}
?n=<readings>
readOperator-pushed feeds (exchange positioning, liquidation watch) · latest reading and the n most recent pushes (1-300), one per push.
GET/vizionreadVIZION's recall · the last 40 completed bars against six years of windows, what followed the closest, and its measured accuracy.
POST/swap/quote
{ inputMint, outputMint, amountBase, slippageBps? }
tradeQuote a swap · the fee is carved out of amountBase · slippageBps 1-5000, default 50.
POST/swap/build
{ inputMint, outputMint, amountBase, slippageBps? }
tradeQuote + build a swap for your wallet to sign · allowlist verified server-side · returns lastValidBlockHeight.
POST/orders
{ kind, action, … }
tradeLimit & DCA · create / cancel / list. The fee is added on top at placement; DCA 2-1000 fills, 60 s-90 d apart.
POST/perps/build
{ action, side, collateralSol, sizeUsd }
perpsOpen / close a SOL-PERP · long or short, up to 100x. Opens are region-gated; closes never are (entirePosition or sizeUsdDelta).
POST/lev
{ action, side, collateralUi, leverage, … }
defiLeveraged SOL/USDC spot on Kamino · venue, position, setup, open / close, atomic or loop (loop actions return an ordered list of legs).
POST/defi/build
{ venue, action, … }
defiKamino / marginfi / Meteora · deposit, withdraw; Kamino borrow (region-gated) and repay. A Meteora withdraw closes the whole position.
POST/execute
{ txBase64 }
trade|perps|defiBroadcast your signed transaction · any trading scope. Answers confirmed, finalized, failed or pending; a pending is resolved below, never by rebuilding. A transaction that can never land — an empty co-signer slot, or a blockhash already expired — is refused 400 up front rather than polled.
GET/tx/{signature}anyWhere a broadcast stands · poll this after a pending /execute; a rebuild is safe only once blockHeight passes the lastValidBlockHeight every build returns.
Start every session with
GET /key

It proves the key is live and returns its wallet, scopes and rate ceilings — a dead key surfaces on call one, not as a wall of 401s later.

Errors
{ error: { code, message } }

Always that envelope, with a matching HTTP status. Auth is checked before argument validation.

Full request and response schemas — including the error-code table and unit conventions — live in the OpenAPI spec.
// 03Fees

Flat fees, inside the transaction.

Each fee is a single transfer to the treasury riding the same atomic transaction it belongs to — you can read it in the transaction before you sign, and a transaction that fails pays nothing. The API charges exactly what the terminal charges, and the per-call fee figure on every quote and build is authoritative for the wallet in hand: fee on swaps and orders, feeLamports on perps, feeBps / feeUi on DeFi, and feeBps per leg on /lev.

Swaps
of the input · carved out of the amount you commit, so the swap runs on the remainder
0.85%
Limit & DCA
of the committed amount · added on top at placement · not refunded if the order never fills or is cancelled
0.85%
Lending & liquidity
carved out of each deposit · withdraw, borrow and repay carry none
0.33%
Perpetuals
of notional on open, paid in SOL at the mark · closes carry none
0.10%
Leveraged spot · /lev
of the fresh stake on an atomic open · an atomic close carries none · loop legs pay the deposit (0.33%) and swap (0.85%) rates per leg, on open and on close · each leg reports its own feeBps
0.33%
Promoted wallets pay zero platform fees here too — automatically.
// 04For agents

Point your agent at prizm.trading. It figures out the rest.

Everything an agent needs is published by convention — the discovery kit below plus /llms.txt. All it needs from you is one API key.

any MCP client · config
{
  "mcpServers": {
    "prizm": {
      "type": "http",
      "url": "https://www.prizm.trading/api/mcp",
      "headers": { "Authorization": "Bearer pzk_…" }
    }
  }
}
What the tools cover

Sixteen MCP tools cover the REST surface: key introspection, balances, market data, prices, pools, positions, lending rates and positions, signals, swap quote and build, limit & DCA orders, SOL-PERP, DeFi, the broadcast lane, and the signature resolver a pending broadcast is followed up with. Leveraged spot (/lev), VIZION's recall, the climax view and the operator feeds are REST-only. Build tools return transactions your signer has not signed — the protocol handshake and the tool catalog are open, so a client can plan the whole integration before it authenticates. Errors: a missing or unusable key is an HTTP 401 JSON-RPC error (-32001), an unknown tool is -32602, a rate limit is 429 (-32000 with retryAfterSec), and a tool that ran and refused is a normal result with isError true carrying the same { error: { code, message } } envelope as REST.

initialize tools/list tools/call · JSON-RPC 2.0 over plain POST, stateless, spec revision 2025-06-18.

// 05Security

Non-custodial, and provably so.

  • Every transaction is built for the key's own wallet only, and returned without the wallet's signature (a Meteora deposit carries only the throwaway position key's signature).
  • /execute broadcasts only transactions your wallet signed — it is never an open relay.
  • A 503 maintenance (with Retry-After) means the operator has paused NEW exposure — quotes, swap builds, order and perp opens, deposits and borrows. Closes, cancels, withdrawals, repayments and /execute stay open throughout, so a position can always be exited.
  • Every 429 carries Retry-After; every 5xx body carries error.ref, the request id to quote when reporting one.
  • Keys are stored as a one-way hash plus a six-character preview, shown once, and revoke globally within thirty seconds.
  • Each key carries a scope set (read / trade / perps / defi) — a key minted on the wallet page carries all four; a narrower set is chosen with the signed key-management request — bound to one wallet (up to five keys per wallet), and rate-limited per minute and per day, with an IP backstop.
  • Perps opens, leveraged opens and Kamino borrows carry the same fail-closed regional gating as the terminal (wallets the operator designates for testing and operation, including its own, are judged on identity rather than country on keyed requests); closes and repays are never gated, so a position can always be exited.
  • Every fee rides inside the transaction you sign — a transaction that fails pays nothing.

The request model on perps means the worst case is a refund of the collateral — a keeper fills your request or returns the collateral; the platform fee on an open is paid with the request and is not refunded. Every error is a JSON envelope of the shape { error: { code, message } } with a matching HTTP status.