GET /api/v1/exchange/detail

Get Exchange Details

Get detailed information about a specific exchange, including statistics such as the total number of trading pairs and active trading pairs. This is a public endpoint and does not require authentication.

Request Parameters

Response Example

{
    "code": 200,
    "msg": "success",
    "data": {
        "id": 1,
        "code": "binance",
        "name": "Binance",
        "symbol_count": 1500,
        "active_symbol_count": 1450,
        "status": 1,
        "create_time": "2024-01-01 00:00:00"
    }
}

Code Example

// cURL example
curl -X GET "https://ziario.com/api/v1/exchange/detail?code=binance"

// PHP example
$response = file_get_contents("https://ziario.com/api/v1/exchange/detail?code=binance");
$data = json_decode($response, true);
if ($data["code"] == 200) {
    $exchange = $data["data"];
    echo "Exchange: " . $exchange["name"] . "\n";
    echo "Total Trading Pairs: " . $exchange["symbol_count"] . "\n";
    echo "Active Trading Pairs: " . $exchange["active_symbol_count"] . "\n";
}

// JavaScript example
fetch("https://ziario.com/api/v1/exchange/detail?code=binance")
    .then(response => response.json())
    .then(data => {
        if (data.code === 200) {
            const exchange = data.data;
            console.log(`Exchange: ${exchange.name}`);
            console.log(`Total Trading Pairs: ${exchange.symbol_count}`);
            console.log(`Active Trading Pairs: ${exchange.active_symbol_count}`);
        }
    })
    .catch(error => console.error("Error:", error));

// Python example
import requests

response = requests.get("https://ziario.com/api/v1/exchange/detail", params={"code": "binance"})
data = response.json()
if data["code"] == 200:
    exchange = data["data"]
    print(f"Exchange: {exchange["name"]}")
    print(f"Total Trading Pairs: {exchange["symbol_count"]}")
    print(f"Active Trading Pairs: {exchange["active_symbol_count"]}")

Related Documentation