Trade Quote API
What a buy or sell of this coin gets you right now: expected amount, price impact, route and fees.
You send
- mint The coin's mint address
- amount SOL to spend for a buy; tokens to sell for a sell
+ 3 optional: side, slippage_bps, chain
You get back
JSON with these fields, inside data:
amount, side, amount_in, in_unit, expected_out, out_unit, …
Example and every field explained ↓It costs
$0.002 / call
The first 100 priced calls a day are free on every key.
- Freshness
- live, every call
- Auth
- Bearer key
- Chains
- 8 chains
curl https://api.crypto2api.com/v1/memecoin/quote \
-H "Authorization: Bearer c2a_your_key" \
-H "Content-Type: application/json" \
-d '{
"mint": "8o9YbJHdhhpJgyPoWDRZBqvJkKCiKZYuVkW6Qpccpump",
"amount": 0.1,
"side": "buy",
"slippage_bps": 500,
"chain": "solana"
}'Swap in your key for c2a_your_key. No key yet? curl -X POST https://api.crypto2api.com/v1/keys makes one, free, no sign-up, or just press Run below.
Used forBuy & sell
Works on 8 chains. Pass chain=; it defaults to solana. Pick one in the playground and the cURL, JavaScript, Python and MCP snippets all follow it.
- solana
- ethereum
- base
- bsc
- arbitrum
- polygon
- avalanche
- optimism
Parameters
Required first. Each example is a value that works.
- mintrequiredbody · string
The coin's mint address.
e.g. 8o9YbJHdhhpJgyPoWDRZBqvJkKCiKZYuVkW6Qpccpump
- amountrequiredbody · number
SOL to spend for a buy; tokens to sell for a sell.
e.g. 0.1
- sideoptionalbody · string
"buy" (spend SOL) or "sell" (sell tokens).
e.g. buy
default buy
- slippage_bpsoptionalbody · number
Most the price may move before the swap fails, in basis points (100 = 1 %).
e.g. 500
default 500
- chainoptionalbody · string
Which chain: one of the 8 listed above. Default solana.
e.g. solana
default solana
Response
Every answer is { data, cost_usd, balance_usd, cached, request_id }. Below is a real data from this endpoint, read when the page was built.
Example data
Key fields
- amountnumber
- Amount.
- sidestring
- Side.
- amount_innumber
- Amount in.
- in_unitstring
- In unit.
- expected_outnumber
- What you should receive at the current price.
- out_unitstring
- Out unit.
- min_outnumber
- The least you will receive after slippage, or the trade fails.
- price_impact_pctnumber
- Price impact, in %.
- slippage_bpsnumber
- Allowed slippage, in basis points (100 = 1%).
- routearray
- Which pools the trade goes through.
5 more fields
- feesobject
- Fees: route fee sol, network fee sol, crypto2api fee usd.
- value_usdnumber
- Value, in US dollars.
- price_usdnumber
- Price, in US dollars.
- mintstring
- The coin's mint address (its contract address on Solana).
- sourcestring
- Where the numbers were read from.
The wrapper every answer comes in
- data
- The answer itself: the example above.
- cost_usd
- What this one call was charged — 0 while you are inside the free 100 a day.
- balance_usd
- What is left on the key after it.
- cached
- true means the answer was shared with another caller.
- request_id
- Quote this if you report something; it is on your Activity page too.
A fact the API could not read is left out or named, never estimated. When an upstream is down you get a 503 with a stable code you can branch on, not a half-filled answer.
Try it
A real call against the live API. The first 100 priced calls a day are free.
Response
What this example answered when the page was built, shortened. Run it for a live answer.
Copy it
Runs as-is, with your key in place of c2a_your_key. It follows the boxes above, on Solana.
curl https://api.crypto2api.com/v1/memecoin/quote \
-H "Authorization: Bearer c2a_your_key" \
-H "Content-Type: application/json" \
-d '{
"mint": "8o9YbJHdhhpJgyPoWDRZBqvJkKCiKZYuVkW6Qpccpump",
"amount": 0.1,
"side": "buy",
"slippage_bps": 500,
"chain": "solana"
}'Related
Guides that use it
Apps that show this data
Build what these apps show, from code: