from and to, and StarkFi resolves the pair (including cross rates through USDT when no direct market exists).
All Quote routes require your API key in the
x-api-key header. See Authentication.Endpoint
| Method | Path | Description |
|---|---|---|
GET | /quote/market | Market quote — any-to-any by from/to or legacy pair |
Any-to-any market quote
Preferred integration: pass the assets you care about. StarkFi tries both spot orientations (BASEQUOTE and QUOTEBASE), then falls back to a via USDT synthetic cross when needed.
Response highlights
data.price— ticker price for the resolved symbol (when applicable)data.source—binance,bybit, or combined sources for cross routesdata.requested— explicitfrom→torate when you sentfromandtodata.rates— both directions of the conversiondata.route— present for cross quotes (type: "via_usdt") with leg details
Legacy pair format
You can still pass an exchange symbol or fiat-oriented pair query params (used by older StarkPay integrations):
| Query shape | Example |
|---|---|
| String symbol | ?pair=BTCUSDT |
| Try both orientations | ?try_one=USDTETH&try_two=ETHUSDT |
from + to for clearer requested rates in the response.
Errors
| Status | status | When |
|---|---|---|
400 | params_mismatch | Missing or invalid pair / from / to |
400 | pair_not_found | No Binance/Bybit ticker and no USDT cross leg |
403 | — | Missing or invalid API key |
500 | server_failed | Upstream or internal error |
API reference
Request fields, response schema, and copy-paste examples for
GET /quote/market.png?fit=max&auto=format&n=I_v6ul4JDafNKFQP&q=85&s=f0ad25536f8a3ca42331fcff88ab2b26)