Docs menuTrading

API reference

Trading

Build a trade for a wallet to sign, follow a transaction, and read the SOL price.

How a trade works

  1. 1Build it: send the trade to /api/v1/transaction/build. You get an unsigned transaction.
  2. 2Sign it in the wallet. Zpad never signs and never sees a key.
  3. 3Send it to Solana, with your own connection or through the Solana relay.
  4. 4Follow it with /api/v1/transaction/status until it is success or failed.

Build a trade

POST/api/v1/transaction/buildNo sign in, CSRF header

Builds an unsigned buy or sell for a wallet, with PumpPortal's local transaction API. Only coins launched on Zpad. While a coin is on its curve the trade goes to the curve; once graduated it goes to PumpSwap. No sign in needed: the wallet signs the result itself.

PumpPortal takes 0.5% of the trade and pump.fun its own trading fee.

Sign in
Not needed
CSRF header
Needed: x-zpad: zpad
Cached
Never
Rate limit
20 a minute per address (IP)

Body

NameTypeWhat it is
mintstringThe coin's address.
sidestringbuy or sell.
amountnumber or stringA buy: SOL. A sell: tokens, or a share of the wallet's tokens from "1%" to "100%". At most 100 SOL when in SOL.
denominatedInSolbooleantrue when amount is SOL. A buy must be in SOL.
slippagenumberPercent, 0.1 to 100.
walletstringThe wallet that signs and pays.
priorityFeenumberOptional. SOL, 0 to 0.1. Default 0.00005.

Response

200
{
  "success": true,
  "message": "Transaction built",
  "data": {
    "tx": "<unsigned transaction, base64>"
  }
}

Errors

StatusMessageWhen
400Pick buy or sell and an amount.mint, side, amount or denominatedInSol is missing or wrong.
400Slippage is 0.1 to 100 percent.slippage is out of range.
400The priority fee is 0 to 0.1 SOL.priorityFee is out of range.
400Connect a wallet first.wallet is not a Solana address.
400A buy is an amount of SOL.A buy with denominatedInSol false.
400A percentage is only for a sell.A buy with a percentage.
400One trade here is 100 SOL at most.More than 100 SOL.
403Refused. Reload the page and try again.The CSRF header is missing, or the request came from another site.
404That coin was not launched on Zpad.The coin is not live on Zpad.
429Too many trade requests. Wait a moment and try again.More than 20 builds a minute. No envelope: { error, code }.
502pump.fun could not build this trade just now. Nothing was signed.PumpPortal refused or did not answer. The message may add its reason.

Example

Terminal
curl -s -X POST "/api/v1/transaction/build" \
  -H "x-zpad: zpad" \
  -H "content-type: application/json" \
  -d '{"mint":"<coin address>","side":"buy","amount":0.1,"denominatedInSol":true,"slippage":2,"wallet":"<wallet address>"}'

Transaction status

GET/api/v1/transaction/statusNo sign in

Where a transaction is, read from Solana. success means confirmed or finalized.

Sign in
Not needed
CSRF header
Not needed
Cached
Never
Rate limit
60 a minute per address (IP)

Query

NameTypeWhat it is
signaturestringThe transaction signature.

Response

200
{
  "success": true,
  "message": "Transaction status fetched",
  "data": {
    "signature": "<transaction signature>",
    "status": "processing" | "success" | "failed" | "not_found"
  }
}

Errors

StatusMessageWhen
400That is not a transaction signature.signature is missing or not base58.
429Too many requests. Wait a moment and try again.More than 60 a minute. No envelope: { error, code }.
503The chain could not be read just now. Try again in a moment.Solana did not answer.

Example

Terminal
curl -s "/api/v1/transaction/status?signature=<transaction signature>"

SOL price

GET/api/v1/price/solNo sign in

The price of 1 SOL in USD, from Jupiter with DexScreener as the fallback.

Sign in
Not needed
CSRF header
Not needed
Cached
15 seconds at the edge
Rate limit
None of its own

Response

200
{
  "success": true,
  "message": "SOL price fetched successfully",
  "data": number
}

Errors

StatusMessageWhen
503The SOL price is not known just now.No price source answered.

Example

Terminal
curl -s "/api/v1/price/sol"
Cookies On Our Website. We use cookies to keep you signed in and remember your settings.