Trade tokens [local RPC]
Make trade and sign
Method is used to get trade instructions for local RPC signing. It provides unsigned transaction and returns the transaction in base64 format.
POST
/tradeInstructions
Method is used to retrieve the unsigned swap transaction
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
public
Public key of buyer/seller/fee payer
Body
Response
Examples
Last updated