# Crypto Market Data API

### Overview

The [**Infoway Cryptocurrency Real-Time Market Data API**](https://infoway.io/en/crypto-api) provides comprehensive data coverage for over **100 major cryptocurrencies**, including both real-time and historical data.\
It supports **candlestick** data, **trade tick details**, and **order book depth**.

### 1. Retrieving the Cryptocurrency List

Infoway maintains an updated list of more than **100 actively traded cryptocurrencies** across major global exchanges.

You can obtain this list using either of the following methods:

**Option 1 — Download from the Web Portal**

Log in to your Infoway account and download the latest stock excel list file from the **Downloads** section at the right side of the dashboard.

**Option 2 — Query via API**

You can also retrieve the list programmatically through the **HTTP Symbol List API**.\
Refer to the [**GET /symbol-list**](https://docs.infoway.io/en-docs/rest-api/get-basic-info/get-symbol-list) documentation for usage details.

### 2. Query Methods

Infoway Crypto API offers **two primary data-access methods**, optimized for different use cases:

| Method                  | Ideal Use Case                  | Description                                                                                                                                                            |
| ----------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **HTTP API**            | Scheduled or batch queries      | Suitable for regular polling or historical data retrieval. Supports requests for fundamentals, historical candlestick data, real-time snapshots, and order book depth. |
| **WebSocket Streaming** | Low-latency, continuous updates | Best for low-latency updates and live data feeds. Allows continuous streaming of FX quotes, trades, and depth updates.                                                 |

{% hint style="info" %}
Both HTTP and WebSocket interfaces are subject to rate limits. See the [*Rate Limit Policy*](https://docs.infoway.io/en-docs/getting-started/api-limitation) section for detailed constraints.
{% endhint %}

### 3. Market Data Schemas

The Infoway Cryptocurrency Market Data API provides multiple categories of real-time and historical data.

#### 3.1 Real-Time Candlestick (OHLCV) Data

Returns real-time candlestick data for supported cryptocurrencies, including open, high, low, close prices, volume, and turnover.\
This feed is commonly used for charting, market analysis, and algorithmic trading strategies.

You can access this data via:

* **HTTP Request:** see [*GET /candlestick*](https://docs.infoway.io/en-docs/rest-api/market-data/post-candlestick-real-historical)
* **WebSocket Subscription:** see [*WebSocket /candlestick*](https://docs.infoway.io/en-docs/websocket/websocket-subscribe-method/candlestick-subscription) topic

**Example Response (BTCUSDT)**

```json
{
  "s": "BTCUSDT",
  "respList": [
    {
      "t": "1752944400",
      "h": "117984.68000",
      "o": "117974.00000",
      "l": "117745.57000",
      "c": "117825.75000",
      "v": "119.69276",
      "vw": "14107044.9828691",
      "pc": "-0.13%",
      "pca": "-148.24000"
    }
  ]
}
```

#### 3.2 Real-Time Trade Ticks

Provides the latest executed trade data for a given cryptocurrency, including trade price, volume, and direction.\
Useful for tick-level trade analytics, real-time monitoring, and market-making algorithms.

Access methods:

* **HTTP API:** [*GET /trades*](https://docs.infoway.io/en-docs/rest-api/market-data/get-latest-trade)
* **WebSocket:** [*Subscribe to /trades*](https://docs.infoway.io/en-docs/websocket/websocket-subscribe-method/latest-trade-subscription)

**Example Response**

```json
{
  "s": "BTCUSDT",
  "t": 1752947397177,
  "p": "117783.22",
  "v": "0.00048",
  "vw": "56.5359456",
  "td": 2
}
```

#### 3.3 Real-Time Order Book Depth

Delivers real-time order book data, showing bid and ask levels with corresponding volumes.

Access methods:

* **HTTP API:** [*GET /market-depth*](https://docs.infoway.io/en-docs/rest-api/market-data/get-market-depth)
* **WebSocket:** [*Subscribe to /Depth*](https://docs.infoway.io/en-docs/websocket/websocket-subscribe-method/depth-subscription)

**Example Response**

```json
{
  "s": "BTCUSDT",
  "t": 1752947435539,
  "a": [
    [
      "117783.22000000",
      "36.18406000"
    ],
    [
      "117783.23000000",
      "0.06819000"
    ]
  ],
  "b": [
    [
      "117783.21000000",
      "1.17501000"
    ],
    [
      "117783.20000000",
      "0.07635000"
    ]
  ]
}
```
