All posts
APIDevelopersAutomation

Axiom API Overview: Programmatic Access for Traders

A complete tour of the Axiom API — authentication, market data, order execution, portfolio sync, and webhooks — with code you can copy.

By Axiom EngineeringMay 30, 202614 min read

Who this is for

You already trade on Axiom and you want to automate something — a personal signal bot, a portfolio dashboard, a tax export, a copy-trading engine, or a fully custom UI on top of our execution layer. The Axiom API exposes the same primitives the product uses internally, with the same MEV protection, the same latency budget, and the same non-custodial guarantees.

This post is the 10,000-foot tour. Every endpoint links to the full reference; the goal here is to give you the mental model.

Core principles

Three rules shape every endpoint:

  • Non-custodial by default. The API never asks for a private key. You sign transactions client-side (or via your session wallet's MPC delegation) and submit the signed bytes. We never hold spendable authority over your funds.
  • One auth model for everything. A single API key, scoped to read, trade, or admin permissions, signed into every request. No OAuth dance, no per-endpoint tokens.
  • Latency is a feature. REST for state, WebSocket for streams, and a dedicated low-latency POST path for order submission that bypasses the standard gateway.

Authentication

Generate an API key from Settings → Developer. Keys are scoped:

  • read — market data, portfolio, history.
  • trade — everything in read, plus order submission and cancellation.
  • admin — key management, webhook configuration, sub-account control.

Every request signs an HMAC of the timestamp and body:

``bash curl https://api.axiom.trade/v1/portfolio \ -H "X-Axiom-Key: $KEY_ID" \ -H "X-Axiom-Timestamp: $(date +%s)" \ -H "X-Axiom-Signature: $SIGNATURE" ``

Rotate keys at least quarterly. Trade keys should live in a server-side vault, never in a browser bundle.

Market data

Three flavors, depending on freshness vs. throughput:

  • REST snapshotGET /v1/markets/{mint} returns the current top-of-book, last trade, 24h volume, and liquidity depth. Use for periodic polling and dashboards.
  • WebSocket trades — subscribe to trades.{mint} for every fill in real time, typically 50–200ms behind the chain.
  • WebSocket pulse — subscribe to pulse.new_pairs, pulse.final_stretch, or pulse.migrated to receive the same firehose the Pulse UI consumes.

A minimal listener:

``ts const ws = new WebSocket("wss://stream.axiom.trade/v1"); ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", channel: "pulse.new_pairs" })); ws.onmessage = (msg) => { const event = JSON.parse(msg.data); if (event.initial_liquidity_usd > 10_000) processCandidate(event); }; ``

Order execution

Two endpoints cover 99% of use cases:

  • POST /v1/orders — submit a market or limit order. Body includes mint, side, size, MEV mode, slippage tolerance, and optional take-profit/stop-loss legs.
  • DELETE /v1/orders/{id} — cancel a working limit order.

Example market buy with Reduced MEV mode:

``ts await axiom.post("/v1/orders", { mint: "Es9vMFrzaCERmJfrF4H2FYD4KConky11McCe8BenwNYB", side: "buy", type: "market", size_usd: 250, mev_mode: "reduced", max_slippage_bps: 100, take_profit_bps: 10_000, stop_loss_bps: 3_000, }); ``

The response includes the route the order took, the realized fill price, the MEV tip paid, and the on-chain signature. Persist that signature; it's the canonical reference for every downstream system.

Portfolio and PnL

GET /v1/portfolio returns positions, cost basis, unrealized PnL, and realized PnL across every venue Axiom routes through (Jupiter, Raydium, Pump.fun, Meteora, Drift, and our perpetuals engine). PnL is computed with FIFO cost basis by default; pass ?method=average for weighted-average or ?method=lifo for LIFO.

GET /v1/fills?since=... paginates every fill with realized slippage versus quote. This is the dataset behind the "MEV tax" measurement in the MEV modes guide.

Webhooks

For event-driven systems, configure webhooks instead of polling:

  • order.filled — fires when any order fills, partial or full.
  • position.liquidation_risk — fires when a perpetual position crosses 80% of maintenance margin.
  • pulse.alert — fires when a token matches a saved Pulse filter (e.g., "deployer in my Trackers list, initial liquidity > $20k").

Every webhook is HMAC-signed with the secret you set during configuration. Verify the signature before acting on the payload — webhook endpoints are public by definition.

``ts const expected = crypto.createHmac("sha256", WEBHOOK_SECRET) .update(rawBody).digest("hex"); if (!timingSafeEqual(Buffer.from(expected), Buffer.from(headerSig))) { return new Response("bad signature", { status: 401 }); } ``

Rate limits

  • Read endpoints — 600 requests per minute per key.
  • Trade endpoints — 60 orders per minute per key, plus a 10-orders-per-second burst.
  • WebSocket — 50 concurrent subscriptions per key.

Hitting a limit returns a 429 with a Retry-After header. Back off exponentially; don't hammer.

Idempotency and retries

Every mutating endpoint accepts an Idempotency-Key header. Generate a UUID per logical request and retry safely on network failure — the server deduplicates within a 24-hour window. This is the single most common source of double-fills in naive bots; use it from day one.

Versioning

The API is versioned in the path (/v1/). Breaking changes ship under a new major version and the previous version is supported for at least 12 months. Subscribe to the api-changelog mailing list in Settings → Developer for migration notices.

What to build first

If you're new to the API, build in this order:

  1. A portfolio sync — pull /v1/portfolio every five minutes and write to your own database. Zero risk, immediate value.
  2. A Pulse listener — subscribe to pulse.new_pairs, filter for your criteria, send a Telegram message. Still zero trade risk.
  3. A semi-automated entry bot — when the listener fires, draft an order via /v1/orders/draft (returns a quote without submitting) and require a manual click to confirm.
  4. Fully automated execution — only after the previous three have run in production for at least two weeks without surprises.

Further reading

Ship something small this week. The first bot that just logs your own fills to a Google Sheet teaches you more about the API than any documentation page can.

Put the playbook to work

Open Axiom Trade and run your next setup with MEV-aware execution.

Launch Axiom Trade