Browse docs

Developer integration

Which programs should a client use?

Read GET /api/config for network, programId, hookProgramId, platform, feeBps, approvalMode, and configured. Pin the expected network and public keys in your integration, and verify the market belongs to those identities before signing.

The mint address and market address are not interchangeable. The market is a program-derived address using the seed “market” and mint public key; the token vault uses “vault” and the mint. The hook’s extra-account list uses “extra-account-metas” and the mint under the hook program.

Read endpoints

Raw token amounts and lamports are decimal strings. Parse them as integers, not JavaScript floating-point numbers. Human-readable amount fields use decimal strings with 6 token decimals or 9 SOL decimals.

EndpointResponse
GET /api/marketsMarkets belonging to this deployment, with reserves, phase, metadata, and approval fields.
GET /api/markets/{market}?wallet={wallet}Selected market and optional wallet token balance.
GET /api/markets/{market}/historyRecorded chart points and the partial-history flag.
GET /api/markets/{market}/holdersAggregated wallet holders and separate pool inventory.
GET /api/wallet/{wallet}Wallet SOL balance.
GET /api/prices/solSOL/USD value, source, timestamp, and stale status.
GET /api/eventsServer-sent events for live data; optional market and wallet parameters.

Quote, sign, and submit a trade

Transaction bodies use application/json. Requests with a browser Origin must match the app’s configured host; the app is not a general cross-origin API proxy. Preparations expire after 60 seconds and the API accepts slippageBps from 0 to 500.

  1. Quote: POST /api/quote with market, side (buy or sell), and amount as a decimal string. A buy amount is SOL; a sell amount is tokens. The response includes raw amountIn, amountOut, fee, priceImpactPct, and willGraduate.
  2. Prepare: POST /api/transactions with kind (buy or sell), wallet, market, amount, and slippageBps. The response includes id, a base64 transaction, requiresApproval, and lastValidBlockHeight. If existingSubmission is returned, resolve that receipt first.
  3. Sign: Decode and inspect the complete transaction, then have the wallet sign it without changing its message. If requiresApproval is true, POST id and the signed base64 transaction to /api/approve and use the co-signed transaction returned.
  4. Submit: POST id and the fully signed base64 transaction to /api/submit. Keep the receipt and signature. POST id to /api/transactions/status to reconcile; send acknowledge: true only after reviewing a terminal outcome.

How does an integration launch with metadata?

POST a wallet address to /api/metadata/challenge and sign the exact returned message. Upload multipart form data to /api/metadata with the returned id in x-upload-challenge and the base64 signature in x-upload-signature. The form contains metadata JSON, media, and optional banner; MP4 uploads also require a poster image.

Use the returned metadataId in POST /api/transactions with kind: create, wallet, approvalAfterGraduation, and optional initialBuySol. Continue through the same wallet-sign, approve, submit, and receipt flow. The upload record is bound to the wallet; private keys are never part of these requests.

Can I skip the web API?

A client can build and submit the public market instructions directly. The repository SDK provides deriveMarketPdas, fetchMarket, quoteBuy, quoteSell, minimumOutput, buyInstruction, and sellInstruction; the wire contract documents instruction account order and integer encoding.

Direct sells and open graduated buys do not need a platform signature. Restricted buys still do. Being able to construct the instruction does not bypass its signature or transfer-hook checks. Supply a Token-2022 account with ImmutableOwner while restrictions apply, and preserve all required hook accounts.

These are the current app and program interfaces, not a versioned API compatibility guarantee. Confirm deployment identity and current response fields before integrating.