During development, you can use the developer endpoints without an API key. For production use, you’ll need an API key to avoid rate limits.
1
Set up
Imports, env config, and the wallet used across every step.
Imports, env, and wallet
Imports, env, and wallet
2
Fixed Fees with platformFeeBps
Use
platformFeeBps to specify a fixed fee in basis points. Control which token the fee is collected from using platformFeeMode.Basic Example
Basic Example
Collect Fee from Input Mint
Collect Fee from Input Mint
Other Endpoints
Other Endpoints
feeAccount is required. It must be a token account for the mint you’re collecting the fee in (input or output, per platformFeeMode) and must already exist before the trade executes.3
Check Fee in Response
Both
/order and /quote responses include platformFee information.Reading Platform Fee from Response
Reading Platform Fee from Response
Related Resources
Platform Fees
How platform fees work, fee modes, and accepted denominations.
Send Orders
Send a spot order end-to-end.
Add Priority Fees
Control execution speed with priority fees.
Authenticate Requests
Authenticate requests for production rate limits.