Integrating cryptocurrency market data into your applications can significantly enhance functionality and user experience. Whether you're building a trading dashboard, analytics tool, or portfolio tracker, accessing real-time and historical data through APIs is essential. This guide walks you through the core endpoints for retrieving crypto market data—covering trading pairs, real-time prices, candlestick (K-line) charts, and recent trades—with clear implementation examples and best practices.
The following documentation outlines a reliable set of RESTful API endpoints that provide comprehensive access to cryptocurrency market information. These interfaces support developers in fetching live data securely and efficiently.
🔹 1. Fetching Available Trading Pairs
To begin interacting with the market, you first need to know which trading pairs are available.
Request Details
- Method:
GET - Endpoint:
https://api.stocktv.top/crypto/getCoinMarket
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | Yes | Your unique API key |
start | Integer | No | Starting position (default: 1) |
limit | Integer | No | Number of records to return (default: 100, max: 100) |
Example Request
curl "https://api.stocktv.top/crypto/getCoinMarket?key=YOUR_API_KEY&start=1&limit=50"This returns a list of active trading pairs such as BTCUSDT, ETHUSDT, etc., along with their base and quote assets. Use this endpoint to dynamically populate dropdown menus or filter options in your app.
👉 Discover how easy it is to integrate real-time crypto data into your platform.
🔹 2. Retrieving Real-Time Market Ticker Data
Stay updated with the latest price movements across major cryptocurrencies.
Request Details
- Method:
GET - Endpoint:
https://api.stocktv.top/crypto/tickerPrice
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | Yes | Your API key |
symbols | String | No | Comma-separated trading pairs (e.g., BTCUSDT,ETHUSDT). If omitted, returns all.) |
Example Request
curl "https://api.stocktv.top/crypto/tickerPrice?key=YOUR_API_KEY&symbols=BTCUSDT,ETHUSDT"Sample Response
{
"code": 200,
"message": "Success",
"data": [
{
"symbol": "BTCUSDT",
"lastPrice": "66912.01000000",
"priceChangePercent": "4.304",
"highPrice": "68500.00000000",
"lowPrice": "65200.00000000",
"volume": "29847.65"
},
{
"symbol": "ETHUSDT",
"lastPrice": "3251.58000000",
"priceChangePercent": "2.470",
"highPrice": "3350.00000000",
"lowPrice": "3180.20000000",
"volume": "87654.32"
}
]
}This response includes critical metrics like last traded price, 24-hour change percentage, and volume—ideal for dashboards or alert systems.
🔹 3. Getting Latest Prices Only
When you only need the most recent price without extra metadata, this lightweight endpoint is perfect.
Request Details
- Method:
GET - Endpoint:
https://api.stocktv.top/crypto/lastPrice
Parameters
Same as above: key and optional symbols.
Use this when optimizing for speed and minimal bandwidth usage—especially useful in mobile apps or high-frequency polling scenarios.
🔹 4. Accessing K-Line (Candlestick) Chart Data
Visualizing price trends over time requires structured historical data.
Request Details
- Method:
GET - Endpoint:
https://api.stocktv.top/crypto/kline
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | Yes | API key |
symbol | String | Yes | Trading pair (e.g., BTCUSDT) |
interval | String | Yes | Time frame: "1", "5", "15", "30", "60" (minutes), or "1d" (daily) |
Example Request
curl "https://api.stocktv.top/crypto/kline?key=YOUR_API_KEY&symbol=BTCUSDT&interval=1"Each returned K-line contains:
- Open, close, high, low prices
- Volume
- Timestamps (open and close times)
Perfect for integrating with charting libraries like Chart.js, D3.js, or TradingView.
🔹 5. Fetching Recent Trade History
Monitor actual market activity by retrieving the latest executed trades.
Request Details
- Method:
GET - Endpoint:
https://api.stocktv.top/crypto/getTrades
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key | String | Yes | API key |
symbol | String | Yes | Specific trading pair |
Example Request
curl "https://api.stocktv.top/crypto/getTrades?key=YOUR_API_KEY&symbol=BTCUSDT"Sample Response
{
"code": 200,
"message": "Success",
"data": [
{
"id": 3702674679,
"price": "67033.05000000",
"qty": "0.00100000",
"time": 1721981582129
},
{
"id": 3702674678,
"price": "67032.98000000",
"qty": "0.00250000",
"time": 1721981579876
}
]
}This data helps detect trading patterns, validate execution prices, or build heatmaps of buy/sell pressure.
✅ Best Practices & Tips
- Always replace
"YOUR_API_KEY"with your actual authenticated key. - Validate input parameters before making requests to avoid errors.
- Implement rate limiting on your side to prevent overwhelming the server.
- For real-time applications (e.g., live tickers), consider upgrading to WebSocket connections for lower latency and continuous updates.
👉 Start building smarter crypto tools with instant market access today.
❓ Frequently Asked Questions (FAQ)
Q: Do I need an account to use these APIs?
A: Yes, you must obtain an API key from the service provider (e.g., StockTV) to authenticate your requests.
Q: Are these APIs free to use?
A: While some basic endpoints may be freely accessible, premium features or high-frequency access often require a subscription or developer plan.
Q: What rate limits apply to these endpoints?
A: Unless specified otherwise, assume a limit of 1–5 requests per second per IP/key. Exceeding limits may result in temporary blocking.
Q: Can I use this data commercially?
A: Check the provider’s terms of service. Some require attribution or restrict redistribution of raw data.
Q: Is there WebSocket support for real-time streaming?
A: Yes—while this guide focuses on REST APIs, WebSocket is recommended for real-time dashboards needing sub-second updates.
Q: How accurate is the price data?
A: Data is sourced directly from major exchanges and updated frequently, ensuring high accuracy suitable for analytical and trading purposes.
Final Thoughts
Connecting to cryptocurrency APIs opens the door to powerful financial applications—from automated trading bots to investor analytics platforms. By leveraging these well-documented endpoints for market data retrieval, you can build responsive, data-driven solutions that keep pace with fast-moving digital asset markets.
Whether you're pulling the latest BTC price or rendering full candlestick charts, understanding how to properly call and parse these interfaces is crucial for any crypto-focused development project.
👉 Unlock advanced crypto data tools and elevate your development workflow now.
Core Keywords: cryptocurrency API, market data API, real-time crypto prices, K-line data, trading pair list, latest price API, crypto trade history, API integration guide