Skip to main content
Python function: getLatestPrice()
SpecificationValue
Delivery Frequencycontinuous
Data Frequencyreal-time snapshot
Reporting LagReal-time (with fallback to previous close)
CoverageAll asset classes: equities, indices, crypto, forex, options, tokenized assets
AvailabilityFree

Product Overview

Overview

Latest Price Snapshot provides a single unified function to retrieve the most recent price for any supported asset class — equities, ETFs, indices, cryptocurrencies, forex, options, and tokenized assets. It returns one row per ticker with the price and a timestamp indicating when that price was observed. This is the simplest way to get a current price quote across Scalar Field’s full asset universe.

Data Pipeline

The function automatically routes each ticker to the appropriate real-time data source based on its asset class:
Asset ClassRoutingSource
Equities/ETFs (e.g., AAPL, SPY)Real-time snapshot APIConsolidated exchange feed snapshot
Indices (e.g., I:SPX, I:VIX)Real-time snapshot APIExchange-disseminated index values
Crypto (e.g., X:BTCUSD)Real-time snapshot APIMulti-exchange aggregated prices
Forex (e.g., C:EURUSD)Real-time snapshot APIInstitutional BBO quotes
Options (e.g., AAPL260213C00280000)Live options quote1-minute strike-level options data; price is the theoretical mid-value
Tokenized assets (e.g., T:AAPLx, T:SPACEX)Jupiter Price APIReal-time on-chain prices from Jupiter, the primary Solana DEX aggregator

Fallback Behavior

If the real-time snapshot is unavailable for a ticker (e.g., outside of market hours), the system falls back to the most recent previous close.

Coverage

  • Equities/ETFs: 10,000+ U.S.-listed symbols.
  • Indices: Major U.S. indices (I:SPX, I:DJI, I:VIX, etc.).
  • Crypto: All major cryptocurrency pairs (X:BTCUSD, X:ETHUSD, etc.).
  • Forex: 1,750+ currency pairs (C:EURUSD, C:GBPUSD, etc.).
  • Options: Any valid OPRA symbol.
  • Tokenized assets: 74 tokens (T:AAPLx, T:SPACEX, etc.).

Querying the Data

Basic Usage

from scalarlib import getLatestPrice

# Single equity
prices = getLatestPrice(tickers=['AAPL'])
print(prices['AAPL'])

# Cross-asset snapshot
prices = getLatestPrice(tickers=[
    'AAPL',                    # equity
    'I:SPX',                   # index
    'X:BTCUSD',                # crypto
    'C:EURUSD',                # forex
    'AAPL260919C00250000',     # option
    'T:NVDAx',                 # tokenized equity
    'T:OPENAI',                # tokenized pre-IPO
])

for ticker, df in prices.items():
    if not df.empty:
        print(f"{ticker}: ${df['price'].iloc[0]:.2f} at {df['ts_recv'].iloc[0]}")

Parameters

ParameterTypeRequiredDescription
tickerslist of strYesAny combination of ticker types. The function auto-detects asset class from the ticker format.

Column Definitions

Latest Price Schema

ColumnTypeDescription
tickerstringThe ticker symbol as provided (e.g., AAPL, I:SPX, X:BTCUSD).
pricefloat64The most recent price. For options, this is the theoretical mid-value from the latest 1-minute snapshot.
ts_recvdatetime64[ns]Timestamp of the price observation (New York time for all asset classes).