Transactions/build_tx
Build it, checked
$0.03per call after 25 free a dayBuilds a SOL or token transfer, or a Jupiter swap, as an unsigned transaction with a fresh blockhash and a fair priority fee, then runs check_tx and tx_matches on it (and token_safety on a token being bought). Never signs or sends.
Run when an agent needs to send SOL or a token, or swap through Jupiter: it returns the unsigned transaction already checked, with ready_to_sign and the reasons. Sign only when ready_to_sign is true.
Saves money. An agent that builds its own transactions can get the token, amount, decimals or recipient wrong. This builds exactly what was asked, then refuses to call it ready unless check_tx says OK and tx_matches says MATCH.
Call it
| Transport | How |
|---|---|
| HTTP | POST /api/tools/build_tx with a JSON body of the inputs below. |
| MCP | tools/call with name build_tx on /mcp. |
Inputs
| Name | What it's looking for | Where to get it |
|---|---|---|
action"transfer" | "swap", required | Send a token to someone, or swap one token for another through Jupiter. | From the request. |
fromstring (base58 address), required | The wallet that pays and will sign. | The agent's or user's own wallet address. |
tostring (base58 address), optional | Transfers: who receives it. | From the request. Check it with whats_this first if it came from someone else. |
tokenstring ("SOL" or mint address), optional | The token to send (transfer) or to sell (swap). Default "SOL". | find_token turns a name like USDC into its mint address. Never guess a mint. |
amountstring (decimal), required | How much of token, in whole tokens: "1.5" means 1.5 USDC, not raw units. | From the request. |
buystring ("SOL" or mint address), optional | Swaps: the token to buy. | find_token gives the mint. |
slippage_bpsinteger 1-300, optional | Swaps: the most the price may move against you, in basis points (50 = 0.5%). Default 50, at most 300. | Leave the default unless the token is thinly traded. |
allow_avoidboolean, optional | Swaps: build even when token_safety says AVOID for the token being bought. Default false. | Only when the user has read the AVOID reasons and still wants it. |
network"mainnet-beta" | "devnet", optional | Default "mainnet-beta" (real money). | "devnet" only for test wallets. |
Returned fields
Every field the tool returns, what it is, and exactly how it's worked out.
| Field | What it is | How it's worked out |
|---|---|---|
ready_to_signboolean | True only when every check below passed. Sign only then. | check_tx OK, tx_matches MATCH, and for a swap the bought token isn't AVOID (unless allow_avoid). |
summarystring | What the transaction does and whether it's ready, in one or two sentences. | From the request and the checks. |
txstring (base64) | The unsigned transaction (version 0). Sign it with the from wallet and send it within about a minute, before the blockhash expires. | Transfers built here (Compute Budget, then the transfer; token transfers create the recipient's account if needed). Swaps built by Jupiter's swap API. |
reasons[]string[] | Why it isn't ready, in plain words. Empty when ready_to_sign is true. | The failing checks' own summaries. |
checksobject | The full answers: check_tx (verdict, summary, checks, balance_changes), tx_matches (verdict, summary, compared), and token_safety for a swap's bought token. | The same tools, run on the built transaction. |
quoteobject | null | Swaps: in_amount, out_amount and min_out_amount in raw units, price_impact_pct and slippage_bps. | Jupiter's quote that the transaction was built from. |
Limits
- Never signs or sends. The from wallet signs; keys never reach Pulse.
- A blockhash lasts about a minute: sign and send soon, or build again.
- The checks run on the transaction as built. If anything changes it afterwards, check it again.