Basic Buy
- TypeScript
- Python
Understanding the Flow
1
Input USDC
You specify how much USDC to spend.
2
Fee Deduction
Trading fees (1.70%) are deducted from your input.
3
Price Calculation
The bonding curve determines how many shares you receive.
4
Share Minting
New shares are minted to your position account.
5
Price Update
The price for this outcome increases.
Pre-Trade Calculations
Estimate the trade before submitting:- TypeScript
- Python
Account Requirements
USDC Balance
You need sufficient USDC in your wallet.
SOL for Fees
~0.005 SOL for transaction fees.
Position Account
Created automatically if this is your first trade in this market (~0.002 SOL rent).
ATA
Associated Token Account for USDC (created automatically if needed).
Error Handling
- TypeScript
- Python
After Buying
Your position is updated immediately:- TypeScript
- Python