Get Real-Time Quote
Retrieve live aggregated rates, minimum deposit thresholds, and estimated payout.
Fetches execution quote and parameters for trading pair. Quotes are locked for 15 minutes when creating a fixed order.
GET/api/v1/quote?from={symbol}&to={symbol}&amount={amount}&type={fixed|variable}
Parameters
| Parameter | In | Required | Description |
|---|---|---|---|
from | Query | Yes | Deposit cryptocurrency symbol (e.g. BTC, ETH, USDT) |
to | Query | Yes | Settlement cryptocurrency symbol (e.g. ETH, SOL, XMR) |
amount | Query | Yes | Deposit quantity to exchange |
type | Query | No | fixed (15m rate lock) or variable (live market) |
fromNetwork | Query | No | Deposit network (e.g. bitcoin, tron, ethereum) |
toNetwork | Query | No | Settlement network (e.g. ethereum, solana, arbitrum) |
marginPercent | Query | No | Custom margin percent (0.0 to 5.0). Net payout adjusts dynamically. |
curl -sS "https://swap-api.mehrnet.com/api/v1/quote?from=BTC&to=ETH&amount=0.1&marginPercent=1.0" \
-H "x-api-key: 3484700130:AtMlk9K8nt1UUmwcLn21C9V61fO8evfIfkys"
const url = new URL("https://swap-api.mehrnet.com/api/v1/quote");
url.searchParams.set("from", "BTC");
url.searchParams.set("to", "ETH");
url.searchParams.set("amount", "0.1");
url.searchParams.set("marginPercent", "1.0");
const res = await fetch(url, {
headers: { "x-api-key": "3484700130:AtMlk9K8nt1UUmwcLn21C9V61fO8evfIfkys" }
});
const quote = await res.json();
from urllib.request import Request, urlopen
import json
req = Request(
"https://swap-api.mehrnet.com/api/v1/quote?from=BTC&to=ETH&amount=0.1&marginPercent=1.0",
headers={"x-api-key": "3484700130:AtMlk9K8nt1UUmwcLn21C9V61fO8evfIfkys"}
)
quote = json.loads(urlopen(req).read())
req, _ := http.NewRequest("GET", "https://swap-api.mehrnet.com/api/v1/quote?from=BTC&to=ETH&amount=0.1&marginPercent=1.0", nil)
req.Header.Set("x-api-key", "3484700130:AtMlk9K8nt1UUmwcLn21C9V61fO8evfIfkys")
resp, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer resp.Body.Close()
{
"success": true,
"quote": {
"depositAmount": 0.1,
"settleAmount": 2.845120,
"rate": 28.4512,
"min": 0.002,
"max": 5.0,
"type": "fixed",
"validUntil": 1775225400000
}
}