Skip to main content
POST

Overview

Builds a sell transaction ($GOLD → USDC) and returns it partially-signed by GRAIL. The client must co-sign with the partner wallet and the user wallet, then either call Submit Sell or broadcast directly to a Solana RPC. Stateless — no database row is created at quote time. The Trade row is written by the indexer once the transaction confirms on-chain.
The partial-signed transaction expires in ~60 seconds (Solana recentBlockhash TTL). Re-quote if you miss the window.

Headers

string
required
A valid PARTNER scope key.

Request Body

string
required
GRAIL user ID (prefixed gu_). User must belong to the authenticated partner, be active, and have kyc_level: "full".
number
required
$GOLD the user will sell, in human decimal. Must be positive.
integer
Slippage tolerance in basis points. Default 50 (0.5%). Ignored if min_usdc_out is provided.
number
Absolute minimum USDC to receive (human decimal). If supplied, overrides slippage_bps.

Response

string
Trade identifier, prefixed trd_.
string
Always "sell".
object
string
Base64-encoded Solana transaction, signed by GRAIL. Co-sign with partner + user and submit.

Errors

Same error set as Quote Buy: invalid_request, kyc_level_insufficient, onchain_config_missing, wallet_missing, partner_mismatch, user_suspended, user_not_found, pricing_unavailable.