Quote
See what a trade would give you before you make it.
GEThttps://api.trenchy.tools/api/sol/quote
| Field | Type | Description |
|---|---|---|
| mint | string | The coin's address. |
| action | string | buy or sell. |
| amount | number | The quote asset (SOL, or USDC / the stock / the coin on a custom pair) for a buy, tokens for a sell (by default). |
| denominatedInSol | boolean | Override the unit (denominatedInQuote is the same switch). |
| pool | string | auto (default), pump or pump-amm. |
| denominatedInQuote | boolean | Same as denominatedInSol: true = amount is in the coin's quote asset, false = tokens. |
cURL
curl "https://api.trenchy.tools/api/sol/quote?mint=MINT_ADDRESS&action=buy&amount=0.1&api-key=YOUR_API_KEY"
Response
{
"pool": "pump",
"action": "buy",
"quote": { "mint": "So11111111111111111111111111111111111111112", "symbol": "SOL", "decimals": 9 },
"quoteIn": 0.1, // always, in the quote asset
"solIn": 0.1, // SOL coins only
"tokensOut": 2915779.4,
"avgPriceQuote": 3.4e-8,
"spotPriceQuote": 3.36e-8,
"avgPriceSol": 3.4e-8, // SOL coins only (same for spotPriceSol, marketCapSol)
"spotPriceSol": 3.36e-8,
"priceImpactPct": 1.27,
"marketCapQuote": 33.6,
"marketCapSol": 33.6,
"bondingProgressPct": 4.7,
"complete": false,
"mayhem": false
}