Skip to main content
The Quote service returns live market prices from Binance and Bybit. Use it to convert between any supported assets without hard-coding exchange symbols: send 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

MethodPathDescription
GET/quote/marketMarket 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.
curl --request GET \
  --url 'https://api.starkfi.io/quote/market?from=ETH&to=BTC' \
  --header 'x-api-key: <api_key>'

Response highlights

  • data.price — ticker price for the resolved symbol (when applicable)
  • data.sourcebinance, bybit, or combined sources for cross routes
  • data.requested — explicit fromto rate when you sent from and to
  • data.rates — both directions of the conversion
  • data.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 shapeExample
String symbol?pair=BTCUSDT
Try both orientations?try_one=USDTETH&try_two=ETHUSDT
When possible, prefer from + to for clearer requested rates in the response.

Errors

StatusstatusWhen
400params_mismatchMissing or invalid pair / from / to
400pair_not_foundNo Binance/Bybit ticker and no USDT cross leg
403Missing or invalid API key
500server_failedUpstream or internal error

API reference

Request fields, response schema, and copy-paste examples for GET /quote/market