curl --request GET \
--url 'https://api.starkfi.io/quote/market?from=ETH&to=USDT' \
--header 'x-api-key: <api_key>'
const params = new URLSearchParams({ from: "ETH", to: "USDT" });
const response = await fetch(
`https://api.starkfi.io/quote/market?${params}`,
{ headers: { "x-api-key": process.env.STARKFI_API_KEY } }
);
const data = await response.json();
import requests
response = requests.get(
"https://api.starkfi.io/quote/market",
params={"from": "ETH", "to": "USDT"},
headers={"x-api-key": "<api_key>"},
)
data = response.json()
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote",
"data": {
"symbol": "ETHUSDT",
"price": "3000",
"source": "binance",
"market": {
"symbol": "ETHUSDT",
"price": "3000"
},
"exchange": {
"symbol": "ETHUSDT",
"base": "ETH",
"quote": "USDT",
"meaning": "Exchange spot: 1 ETH costs 3000 USDT"
},
"rates": [
{
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
},
{
"from": "USDT",
"to": "ETH",
"price": "0.00033333",
"description": "1 USDT = 0.00033333 ETH"
}
],
"requested": {
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
}
}
}
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote via USDT",
"data": {
"symbol": null,
"price": "300000000",
"source": "binance",
"route": {
"type": "via_usdt",
"intermediary": "USDT",
"from": "ETH",
"to": "PEPE",
"legs": [
{ "symbol": "ETHUSDT", "price": "3000", "source": "binance" },
{ "symbol": "PEPEUSDT", "price": "0.00001", "source": "binance" }
]
},
"exchange": {
"symbol": null,
"base": "ETH",
"quote": "PEPE",
"meaning": "Cross rate via USDT: 1 ETH = 300000000 PEPE"
},
"requested": {
"from": "ETH",
"to": "PEPE",
"price": "300000000",
"description": "1 ETH = 300000000 PEPE"
}
}
}
{
"statusCode": 400,
"success": false,
"status": "params_mismatch",
"message": "Provide pair or from and to assets"
}
{
"statusCode": 400,
"success": false,
"status": "pair_not_found",
"message": "Pair to price conversion not found"
}
Quote
Market quote
Get a spot market quote for any asset pair using from/to or an exchange pair symbol.
GET
/
quote
/
market
curl --request GET \
--url 'https://api.starkfi.io/quote/market?from=ETH&to=USDT' \
--header 'x-api-key: <api_key>'
const params = new URLSearchParams({ from: "ETH", to: "USDT" });
const response = await fetch(
`https://api.starkfi.io/quote/market?${params}`,
{ headers: { "x-api-key": process.env.STARKFI_API_KEY } }
);
const data = await response.json();
import requests
response = requests.get(
"https://api.starkfi.io/quote/market",
params={"from": "ETH", "to": "USDT"},
headers={"x-api-key": "<api_key>"},
)
data = response.json()
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote",
"data": {
"symbol": "ETHUSDT",
"price": "3000",
"source": "binance",
"market": {
"symbol": "ETHUSDT",
"price": "3000"
},
"exchange": {
"symbol": "ETHUSDT",
"base": "ETH",
"quote": "USDT",
"meaning": "Exchange spot: 1 ETH costs 3000 USDT"
},
"rates": [
{
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
},
{
"from": "USDT",
"to": "ETH",
"price": "0.00033333",
"description": "1 USDT = 0.00033333 ETH"
}
],
"requested": {
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
}
}
}
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote via USDT",
"data": {
"symbol": null,
"price": "300000000",
"source": "binance",
"route": {
"type": "via_usdt",
"intermediary": "USDT",
"from": "ETH",
"to": "PEPE",
"legs": [
{ "symbol": "ETHUSDT", "price": "3000", "source": "binance" },
{ "symbol": "PEPEUSDT", "price": "0.00001", "source": "binance" }
]
},
"exchange": {
"symbol": null,
"base": "ETH",
"quote": "PEPE",
"meaning": "Cross rate via USDT: 1 ETH = 300000000 PEPE"
},
"requested": {
"from": "ETH",
"to": "PEPE",
"price": "300000000",
"description": "1 ETH = 300000000 PEPE"
}
}
}
{
"statusCode": 400,
"success": false,
"status": "params_mismatch",
"message": "Provide pair or from and to assets"
}
{
"statusCode": 400,
"success": false,
"status": "pair_not_found",
"message": "Pair to price conversion not found"
}
Returns a live market quote from Binance or Bybit. Supports any-to-any conversion via
from and to, with automatic fallback to a USDT cross rate when no direct pair is listed.
string
required
Your StarkFi API key.
string
Source asset symbol (e.g.
ETH, BTC, USDT, BRL). Use together with to for any-to-any quotes.string
Target asset symbol. Required with
from when not using pair.string
Legacy exchange pair symbol (e.g.
BTCUSDT). Omit when using from and to.string
First pair orientation to try (e.g.
USDTETH). Use with try_two for legacy fiat-oriented flows.string
Second pair orientation to try (e.g.
ETHUSDT). Use with try_one.curl --request GET \
--url 'https://api.starkfi.io/quote/market?from=ETH&to=USDT' \
--header 'x-api-key: <api_key>'
const params = new URLSearchParams({ from: "ETH", to: "USDT" });
const response = await fetch(
`https://api.starkfi.io/quote/market?${params}`,
{ headers: { "x-api-key": process.env.STARKFI_API_KEY } }
);
const data = await response.json();
import requests
response = requests.get(
"https://api.starkfi.io/quote/market",
params={"from": "ETH", "to": "USDT"},
headers={"x-api-key": "<api_key>"},
)
data = response.json()
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote",
"data": {
"symbol": "ETHUSDT",
"price": "3000",
"source": "binance",
"market": {
"symbol": "ETHUSDT",
"price": "3000"
},
"exchange": {
"symbol": "ETHUSDT",
"base": "ETH",
"quote": "USDT",
"meaning": "Exchange spot: 1 ETH costs 3000 USDT"
},
"rates": [
{
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
},
{
"from": "USDT",
"to": "ETH",
"price": "0.00033333",
"description": "1 USDT = 0.00033333 ETH"
}
],
"requested": {
"from": "ETH",
"to": "USDT",
"price": "3000",
"description": "1 ETH = 3000 USDT"
}
}
}
{
"statusCode": 200,
"success": true,
"status": "quote_ok",
"message": "Market quote via USDT",
"data": {
"symbol": null,
"price": "300000000",
"source": "binance",
"route": {
"type": "via_usdt",
"intermediary": "USDT",
"from": "ETH",
"to": "PEPE",
"legs": [
{ "symbol": "ETHUSDT", "price": "3000", "source": "binance" },
{ "symbol": "PEPEUSDT", "price": "0.00001", "source": "binance" }
]
},
"exchange": {
"symbol": null,
"base": "ETH",
"quote": "PEPE",
"meaning": "Cross rate via USDT: 1 ETH = 300000000 PEPE"
},
"requested": {
"from": "ETH",
"to": "PEPE",
"price": "300000000",
"description": "1 ETH = 300000000 PEPE"
}
}
}
{
"statusCode": 400,
"success": false,
"status": "params_mismatch",
"message": "Provide pair or from and to assets"
}
{
"statusCode": 400,
"success": false,
"status": "pair_not_found",
"message": "Pair to price conversion not found"
}
Notes
- Asset symbols must match exchange tickers (letters, numbers,
.,_,-; max 64 characters). - Prices follow the spot convention BASEQUOTE:
priceis how much quote asset one base costs. - StarkFi queries Binance first, then Bybit, for each candidate symbol.
⌘I
.png?fit=max&auto=format&n=I_v6ul4JDafNKFQP&q=85&s=f0ad25536f8a3ca42331fcff88ab2b26)