---
title: "Build unsigned withdraw transaction"
method: POST
path: "/api/v1/withdraw/transaction"
tags: ["Staking"]
---

# Build unsigned withdraw transaction

`POST /api/v1/withdraw/transaction`

## Request

- Base URL: `https://solentic.theblueprint.xyz`
- URL: `https://solentic.theblueprint.xyz/api/v1/withdraw/transaction`
- Auth: none required

Creates an unsigned transaction to withdraw SOL from a deactivated stake account. Only works after cooldown is complete. Omit amountSol to withdraw the full balance.

## Request body

- WithdrawRequest
  - `walletAddress` string, required: Solana wallet address (base58 public key) — must be the withdraw authority
  - `stakeAccountAddress` string, required: Stake account address to withdraw from (base58). Must be deactivated (cooldown complete).
  - `amountSol` number, nullable: Amount to withdraw in SOL (omit or null for full balance)

## Response `200`

Unsigned transaction

- TransactionResponse
  - `transaction` string: Base64 encoded unsigned transaction
  - `stakeAccountAddress` string: New stake account address (only for create stake)
  - `message` string: Human/agent-readable instruction
  - `signers` string[]: Public keys that need to sign
  - `estimatedFeeSol` number: Estimated network fee in SOL (0.00001 for stake, 0.000005 for unstake/withdraw)
  - `expiresAt` string, date-time: ISO 8601 timestamp when this transaction expires (~60s after creation). Solana blockhashes are short-lived — sign and submit before this time or request a new transaction.
  - `epochTiming` EpochTiming: Current epoch timing information with estimated end time
    - `currentEpoch` integer: Current Solana epoch number
    - `slotsRemaining` integer: Slots remaining in current epoch
    - `estimatedSecondsRemaining` integer: Estimated seconds until epoch end
    - `estimatedEpochEnd` string, date-time: Estimated epoch end timestamp
    - `note` string: Explanation of epoch timing relevance
  - `warnings` string[]: Warnings including blockhash expiry and balance checks
  - `rewardsEstimate` object: Estimated staking rewards (included in stake transaction responses when epoch timing is available)
    - `note` string
    - `estimatedAnnualSol` number: Estimated annual reward in SOL
    - `estimatedPerEpochSol` number: Estimated reward per epoch in SOL
    - `basedOnApy` string: APY rate used for the estimate
  - `_meta` ResponseMeta: Navigation metadata included in most responses
    - `endpoint` string: The endpoint that generated this response
    - `description` string: Brief description of the response
    - `timestamp` string, date-time: ISO 8601 timestamp when this response was generated
    - `relatedEndpoints` object: Related REST endpoints for next actions
    - `relatedTools` object: Related MCP tool names (MCP responses only)
    - `nextSteps` object: Contextual next steps based on response data
    - `verifyThisCode` string: Endpoint to verify code integrity
    - `cacheTtlSeconds` integer: Cache TTL for this response
    - `documentation` string: Link to documentation
    - `support` object: Optional donation info — Blueprint is free, donation-supported infrastructure
      - `address` string: Solana address for donations
      - `message` string: Context about why donations help
      - `donate` string: How to build a donation transaction via API/MCP

## Other responses

- `400`: Validation error or invalid stake account
- `429`: Rate limited — 100 requests per 60-second sliding window
- `500`: Internal server error
- `502`: Solana RPC unavailable

---

[API](https://skmtc.dev/theblueprint/apis/blueprint-staking-api.md) · [All operations](https://skmtc.dev/theblueprint/apis/blueprint-staking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/theblueprint/apis/blueprint-staking-api/revisions/326d6015b851?raw)
