Skip to main content

Real-Time Prices
High Usage

Get real-time midpoint prices for one or more stocks. This endpoint returns real-time prices for stocks, using the SmartMid model.

Data Availability

This endpoint is available to all users and does not require any exchange entitlements. All users receive real-time prices regardless of their plan or access level.

User TypeExchange EntitlementPrice Type
All UsersNot RequiredReal-time
What are entitlements?

Entitlements are permissions granted by exchanges that allow access to real-time data. This endpoint does not require any exchange entitlements and provides real-time prices to all users. Learn more about entitlements.

Endpoint

https://api.marketdata.app/v1/stocks/prices/{symbol}/

or

https://api.marketdata.app/v1/stocks/prices/?symbols={symbol1},{symbol2},...

Method

GET

Request Examples

Response Example

{
"s": "ok",
"symbol": ["AAPL", "META", "MSFT"],
"mid": [149.07, 320.45, 380.12],
"change": [-2.052, 1.23, -0.85],
"changepct": [-0.0088, 0.0039, -0.0022],
"updated": [1663958092, 1663958092, 1663958092]
}

Request Parameters

You can provide the symbol(s) in one of two ways:

  1. As part of the URL path:

    • symbol string The company's ticker symbol.
  2. As a query parameter:

    • symbols string Comma-separated list of ticker symbols.

Response Attributes

  • s string

    Will always be ok when there is data for the symbols requested.

  • symbol array[string]

    Array of ticker symbols that were requested.

  • mid array[number]

    Array of midpoint prices, as calculated by the SmartMid model.

  • change array[number]

    Array of price changes in currency units compared to the closing price of the previous primary trading session.

  • changepct array[number]

    Array of price changes in percent, expressed as a decimal, compared to the closing price of the previous day. For example, a 3% change will be represented as 0.03.

note
  • When the market is open for primary trading, change and changepct are always calculated using the current midpoint price and the last primary session close. When the market is closed or in extended hours, this criteria is also used as long as extended is omitted or set to true.
  • When extended is set to false, and the market is closed or in extended hours, prices from extended hours are not considered. The values for change and changepct will be calculated using the last two closing prices instead.
  • updated array[date]

    Array of date/times for each stock price.