BTC Bitcoin Real-Time Market Data API Guide

·

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


Request Parameters

ParameterTypeRequiredDescription
tokenStringYesYour unique API authentication key
tickerStringYesCryptocurrency pair (e.g., BTC/USD)
exchange_codeStringNoSupported exchanges: Binance (default), Coinbase, Kraken
fmtStringNoOutput format: json (default) or csv
columnsStringNoCustom fields (comma-separated): open,high,low,close,volume,amount etc.

Response Fields

FieldTypeDescription
tickerStringCryptocurrency pair identifier
dateDateTimeUTC timestamp (YYYY-MM-DD HH:MM:SS)
openDecimalOpening price for the period
highDecimalHighest observed price
lowDecimalLowest observed price
closeDecimalCurrent/last price
volumeDecimalTraded 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

  1. Always handle API errors - Implement retry logic for HTTP 429 (rate limit) responses
  2. Cache frequent requests - Store common queries locally to minimize API calls
  3. Verify SSL certificates - Ensure secure connections to our endpoints
  4. Monitor usage - Track your request volume against allocated quotas

Note: All examples use demo credentials. Replace with your production tokens.