# U.S. Stock Market Data API

### Overview

The **Infoway U.S. Stock Real-Time Market Data API** delivers comprehensive market data coverage for more than **10,000 U.S. securities**, including **major indices** across all major exchanges.

Designed for traders, analysts, and developers, it enables real-time monitoring of U.S. equities with low-latency data delivery — empowering users to make fast and informed decisions.

### 1. Retrieving the U.S. Stock List

Infoway maintains a database of over **10,000 active U.S. securities**. You can access the complete list using one 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**](/en-docs/rest-api/get-basic-info/get-symbol-list.md) documentation for usage details.

{% hint style="info" %}
The stock list is updated periodically to include **newly listed companies** and remove **delisted securities**. To ensure your application always reflects the latest market data, it is recommended to refresh the list regularly.
{% endhint %}

### 2. Query Methods

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

| Method                  | Ideal Use Case                  | Description                                                                                                             |
| ----------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **HTTP API**            | Scheduled or batch queries      | Ideal for retrieving company fundamentals, historical data, real-time candlesticks, and order book snapshots on demand. |
| **WebSocket Streaming** | Low-latency, continuous updates | Best suited for real-time data feeds and live trading applications requiring minimal delay.                             |

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

### 3. Market Data Schemas

The Infoway U.S. Stock Market API supports several categories of real-time and reference data.

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

Provides up-to-the-second candlestick data for U.S. equities, including open, high, low, and close prices, along with trading volume and turnover.\
Use this feed to track market trends and price momentum throughout the trading session.

You can access this data via:

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

**Example Response**

```json
{
  "s": "AMZN.US",
  "respList": [
    {
      "t": "1752868800",
      "h": "226.200",
      "o": "226.120",
      "l": "226.110",
      "c": "226.110",
      "v": "2284098",
      "vw": "516502787.475",
      "pc": "0.00%",
      "pca": "-0.010"
    }
  ]
}
```

#### 3.2 Latest Trade

Retrieve the latest trade-level details for U.S. equities, including execution price, trade size, and direction.

Access methods:

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

**Example Response**

```json
{
  "s": "AMZN.US",
  "t": 1752883185720,
  "p": "225.975",
  "v": "1",
  "vw": "225.975",
  "td": 0
}
```

#### 3.3 Level-1 Order Book (Bid/Ask Depth)

Infoway provides access to **real-time bid and ask data** for U.S. equities, giving users insights into market depth and liquidity.

Access methods:

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

**Example Response**

```json
{
  "s": "AMZN.US",
  "t": 1753109345315,
  "a": [    
    [
      "227.900"
    ],
    [
      "10"
    ]
  ],
  "b": [    
    [
      "227.890"
    ],
    [
      "375"
    ]
  ]
}
```

#### 3.4 Company Fundamentals

Retrieve detailed company reference data and fundamentals for U.S.-listed securities, including corporate names, exchange identifiers, outstanding shares, and financial indicators.

**Example Response**

```json
{
  "symbol": "AMZN.US",
  "market": "US",
  "name_cn": "亚马逊",
  "name_en": "Amazon.com, Inc.",
  "name_hk": "亞馬遜",
  "exchange": "NASD",
  "currency": "USD",
  "lot_size": 1,
  "total_shares": 10616352407,
  "circulating_shares": 9585066132,
  "hk_shares": 0,
  "eps": "5.5808245363948382",
  "eps_ttm": "6.2115496426549624",
  "bps": "28.8109313136895758",
  "dividend_yield": "0",
  "stock_derivatives": "Option",
  "board": "Unknown"
}
```

#### 3.5 Trading Days & Market Hours

Query the U.S. market’s trading calendar and daily session schedules to synchronize your application with real-world trading hours and holidays.

**Query Methods**

* [**GET /trading-hours**](/en-docs/rest-api/get-basic-info/get-market-trading-hours.md) — Returns daily trading sessions and their start/end times
* [**GET /trading-days**](/en-docs/rest-api/get-basic-info/get-market-trading-days.md) — Returns valid trading days and half-days

**Example: Trading Hours**

```json
{
  "market": "US",
  "remark": "美股市场",
  "trade_schedules": [
    {
      "begin_time": "04:00:00",
      "end_time": "09:30:00",
      "type": "PreTrade"
    },
    {
      "begin_time": "09:30:00",
      "end_time": "16:00:00",
      "type": "NormalTrade"
    },
    {
      "begin_time": "16:00:00",
      "end_time": "20:00:00",
      "type": "PostTrade"
    }
  ]
}
```

**Example: Trading Days**

```json
{
  "trade_days": [
    "20250102",
    "20250103",
    "20250106",
    "20250107",
    "20250108",
    "20250110",
    "20250113",
    "20250114",
    "20250115"
  ]
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infoway.io/en-docs/readme/u.s.-stock-market-data-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
