Stock market data for a publicly traded company including current price, price changes, trading volume, market capitalization, daily price range, and exchange information. Used for stock trading platforms and financial dashboards.
https://api.mockly.codes/stocks?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/stocksGet a collection of stocks
/finance/stocks/stocks/:idGet a single stock by ID
/finance/stocks/:id/stocks/metaGet resource metadata and schema
/finance/stocks/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/stocks?q=laptopGET https://api.mockly.codes/stocks?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 stocks
fetch('https://api.mockly.codes/stocks?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/stocks?count=10'
)
data = response.json()curl "https://api.mockly.codes/stocks?count=10"fetch('https://api.mockly.codes/stocks?nocache=true')idintegerUnique identifier for the stock record
random_intsymbolstringStock ticker symbol (e.g., AAPL, GOOGL, MSFT)
stock_symbolnamestringFull company name of the stock issuer
companyexchangestringStock exchange where the stock is traded (e.g., NYSE, NASDAQ, LSE)
stock_exchangepricenumberCurrent stock price per share
stock_pricechangenumberPrice change amount from previous close (can be positive or negative)
stock_changechange_percentnumberPrice change percentage from previous close
stock_change_percentvolumeintegerNumber of shares traded during the current trading session
stock_volumemarket_capnumberTotal market capitalization (price × total shares outstanding)
market_caphighnumberHighest price reached during the current trading session
stock_pricelownumberLowest price reached during the current trading session
stock_priceopennumberOpening price at the start of the current trading session
stock_priceprevious_closenumberClosing price from the previous trading session
stock_pricecurrencystringISO currency code for the stock price (e.g., USD, EUR, GBP)
currencytimestampstringTimestamp when this stock data was recorded
date_timedate-timecountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request