What you will accomplish
- Verify the public API is reachable
- Retrieve current exchange information
- Request a ticker for an active symbol
- Parse errors and preserve timestamps
Before you begin
- curl
- Python 3.10+ with requests installed, or modern Node.js
- Network access to https://app.quote.trade/api
- No API key for public endpoints
Check platform status
Start with the documented public status route. Save local receive time and any serverTime returned.
curl -sS https://app.quote.trade/api/statusInspect current exchange information
Use exchangeInfo for current serverTime, rate limits, symbol status, USD quote asset, quantityScale, and identifiers. Do not infer minimum order size, payment currency, or leverage permission from fields that are not returned.
curl -sS https://app.quote.trade/api/exchangeInfoCall ticker with Python and Decimal-safe values
Install requests once before running this example, set a timeout, and preserve price strings as Decimal for calculations.
from datetime import datetime, timezone
from decimal import Decimal
import requests
url = 'https://app.quote.trade/api/ticker?symbol=BTC'
received_at = datetime.now(timezone.utc)
response = requests.get(url, timeout=10)
response.raise_for_status()
data = response.json()
price = Decimal(str(data['price']))
bid = Decimal(str(data['bid']))
ask = Decimal(str(data['ask']))
print({'receivedAt': received_at.isoformat(), 'symbol': data.get('symbol'), 'price': str(price), 'bid': str(bid), 'ask': str(ask)})Call depth in JavaScript
Record the local receive time and keep price/quantity values as strings until a decimal library parses them.
const receivedAt = new Date().toISOString();
const response = await fetch('https://app.quote.trade/api/depth?symbol=BTC&limit=5');
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const depth = await response.json();
console.log({ receivedAt, symbol: depth.symbol, lastUpdateId: depth.lastUpdateId, bids: depth.bids, asks: depth.asks });Check whether the data is fresh
Use response serverTime, event/updateTime, or local receive time when available. lastUpdateId can help order updates but must not be compared to wall-clock time.
Common problems and fixes
The API returns Invalid symbol
Retrieve exchange information and use the exact symbol string returned by production.
Browser JavaScript reports a network or CORS error
Test from a server-side runtime or inspect current CORS headers; do not expose private credentials in browser code.
A 5xx response occurs
For public reads, back off and retry safely. For a trading operation, check the current order status before retrying because the first request may have executed.