Trade tokens
Make trade and sign
Method is used to execute a trade. It processes a trade request and returns the signature of the transaction.
POST
/trade
Method is used to generate a swap action
Headers
Name
Value
Content-Type
application/json
x-api-key
The API key for authentication
Parameters
Parameter
Description
Required
mode
Mode of the trade (e.g., “buy”, “sell”)
Yes
token
Token to be traded
Yes
amount
Amount of the token to trade (lamports)
Yes
amountInSol
Boolean indicating if amount is in SOL
Yes
slippage
Allowed slippage percentage (basis points)
Yes
priorityFee
Priority fee for the transaction (microlamports)
Yes
private
Private key (optional)
Body
Response
Examples
Last updated