STOCKAP DEVELOPER GUIDES
Crypto API guide: trading pairs, quote currency and fresh prices
By StockAP ยท Updated November 24, 2026
Build a crypto price tracker that preserves pair identity, source timestamps and quote currency.
A crypto tracker can display a plausible number while describing the wrong asset or currency. Before you add a live badge, decide which listing the number represents. StockAP uses market=crypto and a supported pair symbol for its authenticated quote endpoint.
Begin with one explicit pair
curl --fail-with-body "https://stockap.com/v1/quotes?market=crypto&symbol=BTCUSDT" -H "Authorization: Bearer $STOCKAP_API_KEY"
BTCUSDT expresses a BTC price quoted in USDT. Keep that unit visible in your own app. Do not rename it USD merely because the values often look similar. Likewise, USDC and USD listings are not interchangeable observations without a documented conversion and source policy.
Search before requesting an unfamiliar ticker
curl --fail-with-body "https://stockap.com/v1/symbols?market=crypto&q=BTC" -H "Authorization: Bearer $STOCKAP_API_KEY"
Use a supported symbol from the search response. Do not merge two assets solely because their ticker or display name matches. Exchange listings and blockchain identities answer different questions. A website or social handle is useful descriptive metadata, but it does not prove a token contract identity.
Keep receipt time separate from source time
The REST response wraps the result in data and includes market and received_at. Use data.time and data.stale for quote freshness; received_at is the response receipt time. The authenticated quotes endpoint currently marks data stale after 60 seconds or when source time is absent. A successful HTTP response by itself does not establish that the quote just changed.
Build a predictable refresh loop
Fetch from your backend so the API key stays private. Share cached results between users, prevent overlapping refreshes and keep the last successful quote when a refresh fails. Back off on 429 or temporary failures. Show an unavailable or stale state when appropriate; never manufacture a zero price. Select your refresh cadence based on account limits and your display requirements, not an assumed exchange latency guarantee.
Add historical context
Request candles with market=crypto, symbol=BTCUSDT and interval=1d for daily history. Weekly and monthly intervals are also supported. Read returned dates and source information before comparing two listings: available history can differ. The public BTCUSDT history page is a stored historical snapshot, not a substitute for the latest quote endpoint.
For a first integration, keep one pair, one quote unit and one chart visible. Expand discovery only after you have tested missing symbols, stale timestamps, network errors and account rate limits.