Building on QuantDesk
This tutorial walks through the V2 crankless execution path usingplace_order_v2 — the atomic entry point for all trades on QuantDesk V2.
Complete the Developer quickstart first — you need gateway health and Swagger access. You also need a funded Solana wallet on your target cluster (devnet or mainnet).
Limit-order makers must claim a seat before placing orders. This spam-protection gate is enforced on-chain.
1
Initialize your portfolio
Every trader needs a If this account already exists for the wallet + subaccount pair, skip to seat claim. Confirm via RPC or
PortfolioAccount PDA before placing orders. Pass subaccount_index (usually 0) and a referrer pubkey (PublicKey.default if none).GET /api/v2/portfolio after indexing.2
Claim a market seat
3
Place the order
relayer_fee_balance on the portfolio.4
Verify execution
- Fetch the transaction signature on your cluster explorer.
- Read portfolio state via RPC (portfolio parsing) or
GET /api/v2/portfolio. - Compare open orders against
GET /api/v2/markets/orderbook/:marketfor depth context.
V2 execution model (30-second version)
In a single transaction,place_order_v2:
- Validates oracle health and portfolio policy (including scoped session keys).
- Attempts a JIT institutional fill window when configured.
- Matches against the on-chain BST slab (bids and asks red-black trees).
- Routes any remainder to the qLP backstop vault.
Side encoding
Always confirm against the exported IDL in your environment. Client SDKs may expose friendlier enums that map to these values.
Common program errors
Full HTTP and program error guidance: Errors and rate limits.
Next steps
Portfolio parsing
Decode portfolio bytes from RPC.
Order entry
Terminal UX context for order types.
Copy trading
Social vault mechanics.
Errors & rate limits
HTTP and program error reference.