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.

Attention! If you want to use the generated one-time wallet to sign transactions, just leave parameter "private" blank

If you want to sign transaction via API using you own private key - fill in the field "private" in base58 format.

If you want to use your own node to sign transactions - read Trade tokens [local RPC]

POST /trade

Method is used to generate a swap action

Headers

Parameters

Body

Response

{
  "signature": "your_transaction_signature"
}

Examples

curl --location 'https://rpc.api-pump.fun/trade' \
--header 'Content-Type: application/json' \
--header 'x-api-key: your_api_key' \
--data '{
  "mode": "buy",
  "token": token_contract,
  "amount": 100000,
  "amountInSol": false,
  "slippage": 500, 
  "priorityFee": 100000
}'

Last updated