Presales
Presales are read-only in the public API. You can list every presale, read one presale’s public state, and read the participation record for the wallet your API key is pinned to. There are no presale write operations in v2 — deposits, claims, and refunds happen in the Blank app. For the product rules behind caps, allocations, and settlement, see Pre-Raise.Operations
Base URL is
https://api.blank.build/api/v2. See Scopes for how to grant presales:read, and Conventions for the pagination, caching, rate-limit, and retry contract.
Client setup
API keys are server-side only. Never ship one to a browser.{ data, metadata, response }. data is the parsed payload, metadata carries the request ID and rate-limit state, and response is the raw Response.
List presales
listPresales is newest-first and cursor paginated. Pass cursor and limit (1–100, default 50).
If-None-Match to get a 304 instead of a body.
Presale fields
All lamport fields are unsigned integer strings. 1 SOL = 1,000,000,000
lamports. Parse them with
BigInt, never Number — a large raise overflows
IEEE-754 precision and silently rounds.getPresale returns public state only. Custody internals are deliberately excluded from the API surface.
Your participation
getPresaleParticipation requires an API key with the presales:read scope and is never cached (private, no-store).
tokenAllocationRaw is a raw on-chain amount in the token’s base units — it is not scaled by decimals. Keep it as a BigInt and apply the mint’s decimals yourself when displaying it.
A useful polling shape: watch status move from active to claimable or refundable, then to claimed or refunded once the corresponding signature appears.
Errors
Errors use the shared problem-details body documented in Error Model. If a call behaves unexpectedly, Troubleshooting covers the common causes.