Trade
Our Trade API endpoint allows you to execute trades with a single request.
We handle the creation of the transaction as well as sending it through multiple endpoints to ensure the fastest possible landing.
Our Trade endpoint is currently in BETA. The trade fee is 0.1% of your equivalent SOL trade amount.
Endpoint
Since we are in BETA, this endpoint may change at any time.
https://api.monitor.ws/api/trade
Payload
Your private key
is not stored or logged. We will soon upgrade to an API key system.
{
"mint": "solana.PublicKey",
"private_key": "solana.PrivateKey",
"amount": "string", // Float64 | % can be used for Sell: 100%
"is_sol": bool, // True = amount is in SOL
"slippage": float64, // 20 = 20% | 100 = 100%
"fee": float64, // Priority Fee
"type": "string", // buy or sell
"pool": "string", // pumpfun_bonding / pumpfun_amm / raydium / auto
"mev_protection": bool, // true or false | use false for fast landing
"skip_preflight": bool, // true or false | true for fast landing
"custom_tip_address": "solana.Publickey",
"custom_tip_percentage": float64 // 20 = 20% | 100 = 100%
}
mev_protection
, skip_preflight
, custom_tip_address
, custom_tip_percentage
are optional parameters. You don't need to add them to the payload.
Success message returned
{
"Message":"Transaction sent successfully",
"event":{
"signature":"solana.Signature",
"signer":[
"solana.PublicKey",
"..."
],
"trade":{
"user":"solana.PublicKey",
"mint_in":"solana.PublicKey",
"token_in":float64,
"decimals_in":"int",
"mint_out":"solana.PublicKey",
"token_out":float64,
"decimals_out":"int",
"isBuy":"bool"
},
"pool":{
"type":"string",
"pairs":[
{
"mint":"solana.PublicKey",
"amount":float64,
"decimals":"int"
},
{
"mint":"solana.PublicKey",
"amount":float64,
"decimals":"int"
}
],
"marketcap":float64,
"marketcap_usd":float64,
"bonding_percentage":float64
},
"details":{
"slot":uint64,
"block_height":uint64,
"timestamp":int64
}
}
}
Error returned
{
"data": {},
"message": "string",
"status": int
}