Overview
This documentation provides details on accessing BTC (Bitcoin) real-time market data through our RESTful API interface. The service delivers up-to-the-second cryptocurrency pricing information including open, high, low, and close values directly from major exchanges like Binance.
👉 Explore our premium crypto data solutions
API Endpoint Structure
# Base URL Format
https://tsanghi.com/api/fin/crypto/realtime?token={token}&ticker={ticker}Key Features
- Real-time updates (sub-second refresh rate)
- Multi-exchange support with Binance as default
- JSON/CSV response formats
- Customizable output columns
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | String | Yes | Your unique API authentication key |
ticker | String | Yes | Cryptocurrency pair (e.g., BTC/USD) |
exchange_code | String | No | Supported exchanges: Binance (default), Coinbase, Kraken |
fmt | String | No | Output format: json (default) or csv |
columns | String | No | Custom fields (comma-separated): open,high,low,close,volume,amount etc. |
Response Fields
| Field | Type | Description |
|---|---|---|
ticker | String | Cryptocurrency pair identifier |
date | DateTime | UTC timestamp (YYYY-MM-DD HH:MM:SS) |
open | Decimal | Opening price for the period |
high | Decimal | Highest observed price |
low | Decimal | Lowest observed price |
close | Decimal | Current/last price |
volume | Decimal | Traded volume in base currency |
👉 Compare exchange rates across platforms
Python Implementation Example
import requests
# Configuration
API_URL = "https://tsanghi.com/api/fin/crypto/realtime"
params = {
"token": "your_api_key",
"ticker": "BTC/USD",
"exchange_code": "Binance"
}
# Execute request
response = requests.get(API_URL, params=params).json()
print(f"Current BTC Price: ${response['close']}")Frequently Asked Questions
Q1: How frequently is the data updated?
The API provides real-time data with sub-second refresh rates directly from exchange websockets.
Q2: What's the rate limit for this API?
Free tier allows 60 requests/minute. Premium tiers offer higher limits - contact us for details.
Q3: Can I get historical data through this endpoint?
No, this is strictly for real-time data. Use our /historical endpoint for past prices.
Q4: Which exchanges are supported?
We currently integrate with Binance (default), Coinbase, Kraken, and 12 other major exchanges.
👉 Get started with enterprise API access
Best Practices
- Always handle API errors - Implement retry logic for HTTP 429 (rate limit) responses
- Cache frequent requests - Store common queries locally to minimize API calls
- Verify SSL certificates - Ensure secure connections to our endpoints
- Monitor usage - Track your request volume against allocated quotas
Note: All examples use demo credentials. Replace with your production tokens.