Webhooks
This API allows users to trade SunPump tokens using TRX. This includes Buy and Sell transactions.
Endpoint
URL:
/sunpump/trade
Method:
POST
Content-Type:
application/json
API Key Header:
api-key: your-api-key-here
Request Body
Parameter
Type
Required
Description
action
string
Yes
Type of transaction:
buy
or sell
tokenAddress
string
Yes
Token Contract Address
amount
number
Yes
Amount to trade (TRX for Buys)
slippage
number
No
Max allowed price change before transaction is reverted
priorityFee
number
No
Tip to speed up transactions (experimental ⚠️)
Example Request
Example Response JSON
Example Error Responses
Invalid Parameters:
Max Slippage Reached:
Insufficient Funds:
Invalid Action:
Last updated
Was this helpful?