### Get Stock News - Go SDK Example Source: https://www.marketdata.app/docs/api/stocks/news Shows how to retrieve stock news using the MarketDataApp SDK for Go. This example demonstrates setting the symbol and making the GET request. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleStockNewsRequest_get() { news, err := StockNews().Symbol("AAPL").Get() if err != nil { fmt.Print(err) return } for _, article := range news { fmt.Println(article) } } ``` -------------------------------- ### Get Stock News - Python SDK Example Source: https://www.marketdata.app/docs/api/stocks/news Illustrates how to use the MarketDataClient library in Python to fetch news for a given stock symbol. This example assumes the SDK is installed. ```python from marketdata import MarketDataClient client = MarketDataClient() news = client.stocks.news("AAPL") print(news) ``` -------------------------------- ### Get Stock News - PHP SDK Example Source: https://www.marketdata.app/docs/api/stocks/news Demonstrates fetching stock news using the MarketDataApp Client in PHP. This example shows how to specify the symbol and date range. ```php use MarketDataApp\Client; $client = new Client(); $news = $client->stocks->news( symbol: "AAPL", from: "2024-01-01", to: "2024-01-31" ); // Display formatted news summary echo $news; ``` -------------------------------- ### GET /v1/options/chain/UNDERLYING/ - Free + Trial Plans (No Cached Mode) Source: https://www.marketdata.app/docs/api/troubleshooting/running-out-of-credits Examples of optimizing requests for Free and Trial plans by using server-side or local filtering, or by requesting historical data. ```APIDOC ## GET /v1/options/chain/UNDERLYING/ ### Description Examples for Free + Trial plans that do not support cached mode. Demonstrates server-side filtering, local filtering, and using historical data to reduce credit consumption. ### Method GET ### Endpoint `/v1/options/chain/UNDERLYING/` ### Query Parameters - **expiration** (string) - Required - Specifies the expiration date (e.g., `YYYY-MM-DD` or `all`). - **columns** (string) - Optional - Comma-separated list of columns to include in the response. - **strikeLimit** (integer) - Optional - Limits the number of strikes returned. - **minBid** (number) - Optional - Minimum bid price filter. - **maxBid** (number) - Optional - Maximum bid price filter. - **type** (string) - Optional - Filter by option type (e.g., `call` or `put`). - **strike** (number) - Optional - Filter by specific strike price. - **date** (string) - Optional - For historical data, specifies the date (e.g., `YYYY-MM-DD`). ### Request Examples #### One-step: Server-side filtering (quotes included) ``` GET https://api.marketdata.app/v1/options/chain/UNDERLYING/?expiration=YYYY-MM-DD&type=call&strikeLimit=5&minBid=0.50&maxBid=10&columns=symbol,strike,expiration,type,bid,ask,mid,last,openInterest,volume ``` #### Two-step (Step 1): Broad chain without quote columns ``` GET https://api.marketdata.app/v1/options/chain/UNDERLYING/?expiration=all&columns=symbol,strike,expiration,type,openInterest,volume ``` #### Two-step (Step 2): Quotes only for selected contracts ``` GET https://api.marketdata.app/v1/options/quotes/OPTION_SYMBOL/ ``` #### Historical chain example (lower-cost bulk snapshot) ``` GET https://api.marketdata.app/v1/options/chain/UNDERLYING/?date=YYYY-MM-DD&expiration=all ``` ### Response #### Success Response (200) - **symbol** (string) - The option symbol. - **strike** (number) - The strike price of the option. - **expiration** (string) - The expiration date of the option. - **type** (string) - The type of the option (call or put). - **bid** (number) - The current bid price. - **ask** (number) - The current ask price. - **mid** (number) - The midpoint between bid and ask. - **last** (number) - The last traded price. - **openInterest** (integer) - The open interest for the option. - **volume** (integer) - The trading volume for the option. #### Response Example (for one-step filtering) ```json { "underlying": "AAPL", "chain": [ { "symbol": "AAPL240621C00150000", "strike": 150.0, "expiration": "2024-06-21", "type": "call", "bid": 5.25, "ask": 5.35, "mid": 5.30, "last": 5.32, "openInterest": 1200, "volume": 850 } // ... more options ] } ``` ``` -------------------------------- ### GET /v1/options/chain/UNDERLYING/ - Starter + Trader (Daily Limits + Cached Mode) Source: https://www.marketdata.app/docs/api/troubleshooting/running-out-of-credits Example of using `mode=cached` for Starter and Trader plans to reduce credit usage by leveraging cached data. ```APIDOC ## GET /v1/options/chain/UNDERLYING/ with `mode=cached` ### Description This example demonstrates how to use the `mode=cached` parameter for Starter and Trader plans to efficiently retrieve data from the cache, reducing credit consumption. It includes optional `maxage` parameter to specify the maximum age of cached data. ### Method GET ### Endpoint `/v1/options/chain/UNDERLYING/` ### Query Parameters - **mode** (string) - Required - Set to `cached` to use cached data. - **maxage** (string) - Optional - Maximum age of cached data to consider fresh (e.g., `5min`, `1h`). - **expiration** (string) - Required - Specifies the expiration date (e.g., `YYYY-MM-DD`). ### Request Example ``` GET https://api.marketdata.app/v1/options/chain/UNDERLYING/?mode=cached&maxage=5min&expiration=YYYY-MM-DD ``` ### Response #### Success Response (200) - **updated** (string) - Timestamp indicating when the cached data was last updated. - **chain** (array) - Array of option chain data. - **symbol** (string) - The option symbol. - **strike** (number) - The strike price of the option. - **expiration** (string) - The expiration date of the option. - **type** (string) - The type of the option (call or put). - ... other relevant fields #### Response Example ```json { "underlying": "MSFT", "updated": "2023-10-27T10:30:00Z", "chain": [ { "symbol": "MSFT240719C00300000", "strike": 300.0, "expiration": "2024-07-19", "type": "call", "bid": 2.50, "ask": 2.60, "mid": 2.55, "last": 2.58, "openInterest": 500, "volume": 300 } // ... more options ] } ``` ``` -------------------------------- ### Get Mutual Fund Candles (Go) Source: https://www.marketdata.app/docs/api/funds/candles Illustrates fetching mutual fund candle data using the Go SDK. This example shows how to construct the request using method chaining and handle potential errors. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleFundCandlesRequest() { fcr, err := FundCandles().Resolution("D").Symbol("VFINX").From("2023-01-01").To("2023-01-06").Get() if err != nil { fmt.Print(err) return } for _, candle := range fcr { fmt.Println(candle) } } ``` -------------------------------- ### URL Parameter Authentication Example Source: https://www.marketdata.app/docs/api/authentication Demonstrates how to authenticate API requests by including the token as a URL parameter. This method is less secure than header authentication and is shown for completeness. The example uses a placeholder for the token. ```url https://api.marketdata.app/v1/stocks/quotes/SPY/?token={token} ``` -------------------------------- ### Get Option Quote - Go Source: https://www.marketdata.app/docs/api/options/quotes Fetches options quotes using the MarketDataApp Go SDK. This example shows how to make a request for a specific option symbol and handle potential errors. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleOptionQuoteRequest() { quotes, err := OptionQuote().OptionSymbol("AAPL271217C00250000").Get() if err != nil { fmt.Print(err) return } for _, quote := range quotes { fmt.Println(quote) } } ``` -------------------------------- ### Get Market Status using MarketData PHP Client Source: https://www.marketdata.app/docs/api/markets/status This PHP example shows how to use the MarketDataApp client to get market status. It demonstrates fetching status for a date range and for 'yesterday', specifying the country and outputting the results. ```php use MarketDataApp\Client; $client = new Client(); // Get market status for a date range $statuses = $client->markets->status( country: "US", from: "2020-01-01", to: "2020-12-31" ); // Display formatted market statuses echo $statuses; // Get market status for yesterday $yesterday = $client->markets->status( country: "US", date: "yesterday" ); echo $yesterday; ``` -------------------------------- ### API Response Example with Limited Columns Source: https://www.marketdata.app/docs/api/universal-parameters/columns This is an example of an API response when the 'columns' parameter is used to limit the results. Only the requested columns ('ask' and 'bid' in this case) are included in the JSON output. ```json { "ask": [152.14], "bid": [152.12] } ``` -------------------------------- ### Limit Parameter Documentation Source: https://www.marketdata.app/docs/api/universal-parameters/limit This section details the 'limit' parameter, its purpose, default and maximum values, and provides examples of its usage. ```APIDOC ## Limit Parameter ### Description The `limit` parameter allows you to limit the number of results for a particular API call or override an endpoint’s default limits to get more data. * Default Limit: 10,000 * Maximum Limit: 50,000 In the example below, the daily candle endpoint by default returns the last 252 daily bars. By using limit you could modify the behavior return the last two weeks or 10 years of data. ### Parameter `limit`= ### Use Example `/candles/daily/AAPL?limit=10` `/candles/daily/AAPL?limit=2520` ### Values #### integer (required) The limit parameter accepts any positive integer as an input. ``` -------------------------------- ### Fetch Option Chain Data (Go) Source: https://www.marketdata.app/docs/api/options/chain Provides an example of how to fetch an option chain for an underlying symbol using the Go SDK. It demonstrates setting the underlying symbol and retrieving contract details. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleOptionChainRequest() { AAPL, err := OptionChain().UnderlyingSymbol("AAPL").Get() if err != nil { fmt.Println("Error fetching option chain:", err) return } for _, contract := range AAPL { fmt.Println(contract) } } ``` -------------------------------- ### Get Stock News - HTTP Request Example Source: https://www.marketdata.app/docs/api/stocks/news Demonstrates how to fetch news for a stock symbol using a simple HTTP GET request. This is a basic example applicable across various tools and environments. ```HTTP GET https://api.marketdata.app/v1/stocks/news/AAPL/ ``` -------------------------------- ### Get Single Stock Quote (Go) Source: https://www.marketdata.app/docs/api/stocks/quotes Demonstrates how to get a delayed stock quote for a single symbol in Go. This example uses the MarketDataApp SDK for Go. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleStockQuoteRequest() { quotes, err := StockQuote().Symbol("AAPL").Get() if err != nil { fmt.Print(err) return } for _, quote := range quotes { fmt.Println(quote) } } ``` -------------------------------- ### Fetch Bulk Historical Candles Data (Go) Source: https://www.marketdata.app/docs/api/stocks/bulkcandles Illustrates how to request bulk historical candle data using the MarketDataApp SDK for Go. This example demonstrates setting resolution and symbols, then retrieving the data. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleBulkStockCandlesRequest_get() { symbols := []string{"AAPL", "META", "MSFT"} candles, err := BulkStockCandles().Resolution("D").Symbols(symbols).Get() if err != nil { fmt.Print(err) return } for _, candle := range candles { fmt.Println(candle) } } ``` -------------------------------- ### Lookup Option Symbol using Go Source: https://www.marketdata.app/docs/api/options/lookup Provides an example of how to use the MarketDataApp SDK for Go to look up an option symbol. It demonstrates setting the user input and retrieving the OCC symbol, handling potential errors. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleOptionLookupRequest() { optionSymbol, err := OptionLookup().UserInput("AAPL 7/28/2023 200 Call").Get() if err != nil { fmt.Print(err) return } fmt.Println(optionSymbol) } ``` -------------------------------- ### Get Stock News - NodeJS Fetch Example Source: https://www.marketdata.app/docs/api/stocks/news Provides an example of how to retrieve stock news using the Fetch API in NodeJS. It includes basic error handling for the request. ```javascript fetch("https://api.marketdata.app/v1/stocks/news/AAPL/") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); }); ``` -------------------------------- ### Strategies to Avoid Rate Limiting Source: https://www.marketdata.app/docs/api/rate-limiting Provides practical strategies and parameter recommendations to minimize API credit consumption and avoid rate limiting. ```APIDOC ## Strategies To Avoid Rate Limiting ### Description This section outlines effective strategies to reduce API credit consumption and prevent hitting rate limits. Implementing these techniques can significantly improve API usage efficiency, especially for high-volume applications. ### Strategies - **Optimize Option Chain Requests:** - If the current price is not essential, exclude the `bid`, `ask`, `mid`, and `last` columns from your option chain requests. - Utilize extensive option chain filters, such as `strikeLimit`, to retrieve only the necessary strike prices, reducing response size and credit consumption. - **Utilize Cached Mode (for Paying Customers):** - Paying customers can leverage the `mode=cached` parameter on supported bulk endpoints. - This parameter allows retrieval of previously cached quotes instead of making live requests, potentially saving thousands of credits. - **Note:** `mode=cached` is not available on Starter Trial and Trader Trial plans. ### Parameter Recommendations - **For Option Chains:** Consider omitting price-related columns if not strictly needed. - **For Option Chains:** Use `strikeLimit` to narrow down the range of strikes requested. - **For Bulk Quotes (Supported Endpoints):** Use `mode=cached` if you are a paying customer and cached data is acceptable. ``` -------------------------------- ### Get Mutual Fund Candles (HTTP) Source: https://www.marketdata.app/docs/api/funds/candles Example of how to fetch historical price candles for a mutual fund using an HTTP GET request. Requires specifying the resolution, symbol, and date range. ```http GET https://api.marketdata.app/v1/funds/candles/D/VFINX?from=2020-01-01&to=2020-01-10 ``` -------------------------------- ### Python Example: Check Endpoint Status Source: https://www.marketdata.app/docs/api/troubleshooting/service-outages Example code in Python demonstrating how to use the status API to check the operational status of specific endpoints like stock quotes and options chains. ```APIDOC ## Python Example: Check Endpoint Status ### Description This Python script uses the `requests` library to fetch status information from the Market Data API's status endpoint and checks the online status of specific API endpoints. ### Method N/A (Client-side script) ### Endpoint N/A (Client-side script, interacts with https://api.marketdata.app/status/) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # Importing the required library import requests # URL to the status endpoint url = "https://api.marketdata.app/status/" response = requests.get(url) json_data = response.json() # Function to check the status of a specific endpoint def check_endpoint_status(endpoint_path): try: index = json_data["service"].index(endpoint_path) return { "online": json_data["online"][index], "status": json_data["status"][index], "uptime30d": json_data["uptimePct30d"], "uptime90d": json_data["uptimePct90d"] } except ValueError: return None # Checking the status of specific endpoints stocks_quotes = check_endpoint_status("/v1/stocks/quotes/") options_chain = check_endpoint_status("/v1/options/chain/") stocks_candles = check_endpoint_status("/v1/stocks/candles/") print(f"Stocks Quotes: {'Online' if stocks_quotes and stocks_quotes['online'] else 'Offline' if stocks_quotes else 'Not found'}") print(f"Options Chain: {'Online' if options_chain and options_chain['online'] else 'Offline' if options_chain else 'Not found'}") print(f"Stocks Candles: {'Online' if stocks_candles and stocks_candles['online'] else 'Offline' if stocks_candles else 'Not found'}") ``` ### Response #### Success Response (Console Output) - **Output**: Prints the online/offline status for the checked endpoints. #### Response Example ``` Stocks Quotes: Online Options Chain: Offline Stocks Candles: Online ``` ``` -------------------------------- ### Get Single Stock Quote (HTTP) Source: https://www.marketdata.app/docs/api/stocks/quotes Fetches the most recent delayed quote for a single stock symbol using an HTTP GET request. This is a basic example demonstrating direct API interaction. ```http GET https://api.marketdata.app/v1/stocks/quotes/AAPL/ ``` -------------------------------- ### Get Option Expirations (NodeJS) Source: https://www.marketdata.app/docs/api/options/expirations Fetches a list of option expiration dates for a given underlying symbol using the MarketDataApp API. This example uses the fetch API to make an HTTP GET request and logs the response or any errors. ```javascript fetch("https://api.marketdata.app/v1/options/expirations/AAPL") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); }); ``` -------------------------------- ### Lookup Option Symbol using Python Source: https://www.marketdata.app/docs/api/options/lookup Shows how to perform an options lookup using the MarketDataClient library in Python. It initializes the client, calls the lookup method with a human-readable option description, and prints the resulting OCC symbol. ```python from marketdata import MarketDataClient client = MarketDataClient() lookup = client.options.lookup("AAPL 7/28/2023 200 Call") print(lookup) ``` -------------------------------- ### Get Single Stock Quote (PHP) Source: https://www.marketdata.app/docs/api/stocks/quotes Retrieves a delayed stock quote for a single symbol using PHP. This example utilizes the MarketDataApp Client library. ```php use MarketDataApp\Client; $client = new Client(); $quote = $client->stocks->quote("AAPL"); // Display formatted quote with price, change, bid/ask, volume echo $quote; ``` -------------------------------- ### Fetch Option Chain Data (Python) Source: https://www.marketdata.app/docs/api/options/chain Illustrates fetching an option chain for a specified underlying symbol using the Python SDK. Requires the 'marketdata' library to be installed. ```python from marketdata import MarketDataClient client = MarketDataClient() chain = client.options.chain("AAPL") print(chain) ``` -------------------------------- ### Dates and Times Support Source: https://www.marketdata.app/docs/api/dates-and-times This section details the supported date and time formats for all Market Data endpoints, allowing for flexible date input in your applications. ```APIDOC ## Dates and Times Support ### Description All Market Data endpoints support advanced date-handling features to allow you to work with dates in a way that works best for your application. Our API will accept date inputs in any of the following formats: ### Supported Formats * **American Numeric Notation**: Dates and times in MM/DD/YYYY format. For example, closing bell on Dec 30, 2020 for the NYSE would be: 12/30/2020 4:00 PM. * **Timestamp**: An ISO 8601 timestamp in the format YYYY-MM-DD. For example, closing bell on Dec 30, 2020 for the NYSE would be: 2020-12-30 16:00:00. * **Unix**: Dates and times in unix format (seconds after the unix epoch). For example, closing bell on Dec 30, 2020 for the NYSE would be: 1609362000. * **Spreadsheet**: Dates and times in spreadsheet format (days after the Excel epoch). For example, closing bell on Dec 30, 2020 for the NYSE would be: 44195.66667 * **Relative Dates and Times**: Keywords or key phrases that indicate specific days, relative to the current date. For example, "today" or "yesterday". * **Option Expiration Dates**: Keyphrase that select specific dates that correspond with dates in the US option expiration calendar. ### Request Example No specific endpoint is documented here, but examples of date formats are provided above. ``` -------------------------------- ### Get Multiple Stock Quotes (Python) Source: https://www.marketdata.app/docs/api/stocks/quotes Fetches delayed stock quotes for multiple symbols in Python. This example uses the MarketDataClient library, passing a list of symbols. ```python from marketdata import MarketDataClient client = MarketDataClient() quotes = client.stocks.quotes(["AAPL", "META", "MSFT"]) print(quotes) ``` -------------------------------- ### Get Single Stock Quote (Python) Source: https://www.marketdata.app/docs/api/stocks/quotes Fetches a delayed stock quote for a single symbol in Python. This example uses the MarketDataClient library for simplified API interaction. ```python from marketdata import MarketDataClient client = MarketDataClient() quotes = client.stocks.quotes("AAPL") print(quotes) ``` -------------------------------- ### NodeJS Example: Check Endpoint Status Source: https://www.marketdata.app/docs/api/troubleshooting/service-outages Example code in NodeJS demonstrating how to use the status API to check the operational status of specific endpoints like stock quotes and options chains. ```APIDOC ## NodeJS Example: Check Endpoint Status ### Description This NodeJS script utilizes the `axios` library to fetch status information from the Market Data API's status endpoint and checks the online status of specific API endpoints. ### Method N/A (Client-side script) ### Endpoint N/A (Client-side script, interacts with https://api.marketdata.app/status/) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript // Importing the required library const axios = require('axios'); // URL to the status endpoint const url = "https://api.marketdata.app/status/"; // Function to check the status of a specific endpoint async function checkEndpointStatus(endpointPath) { try { const response = await axios.get(url); const jsonData = response.data; const index = jsonData.service.indexOf(endpointPath); if (index !== -1) { return { online: jsonData.online[index], status: jsonData.status[index], uptime30d: jsonData.uptimePct30d[index], uptime90d: jsonData.uptimePct90d[index] }; } else { return null; } } catch (error) { console.error("Error fetching API status:", error); return null; } } // Checking the status of specific endpoints async function checkStatuses() { const stocksQuotes = await checkEndpointStatus("/v1/stocks/quotes/"); const optionsChain = await checkEndpointStatus("/v1/options/chain/"); const stocksCandles = await checkEndpointStatus("/v1/stocks/candles/"); console.log(`Stocks Quotes: ${stocksQuotes ? (stocksQuotes.online ? "Online" : "Offline") : "Not found"}`); console.log(`Options Chain: ${optionsChain ? (optionsChain.online ? "Online" : "Offline") : "Not found"}`); console.log(`Stocks Candles: ${stocksCandles ? (stocksCandles.online ? "Online" : "Offline") : "Not found"}`); } checkStatuses(); ``` ### Response #### Success Response (Console Output) - **Output**: Prints the online/offline status for the checked endpoints. #### Response Example ``` Stocks Quotes: Online Options Chain: Offline Stocks Candles: Online ``` ``` -------------------------------- ### Get Multiple Stock Quotes (PHP) Source: https://www.marketdata.app/docs/api/stocks/quotes Retrieves delayed stock quotes for multiple symbols using PHP. This example utilizes the MarketDataApp Client library with a list of symbols. ```php use MarketDataApp\Client; $client = new Client(); $quotes = $client->stocks->quotes(["AAPL", "META", "MSFT"]); // Display formatted quotes summary echo $quotes; ``` -------------------------------- ### Request Options Strikes (Go) Source: https://www.marketdata.app/docs/api/options/strikes Provides an example of requesting options strikes in Go using the MarketDataApp SDK. It demonstrates setting the underlying symbol, date, and expiration, then retrieving the strikes. ```go import ( "fmt" api "github.com/MarketDataApp/sdk-go" ) func ExampleOptionsStrikesRequest() { expirations, err := OptionsStrikes().UnderlyingSymbol("AAPL").Date("2023-01-03").Expiration("2023-01-20").Get() if err != nil { fmt.Print(err) return } for _, expiration := range expirations { fmt.Println(expiration) } } ``` -------------------------------- ### Get Option Quote - Python Source: https://www.marketdata.app/docs/api/options/quotes Retrieves an options quote using the MarketDataClient library in Python. This example demonstrates initializing the client and fetching quote data for a specified option symbol. ```python from marketdata import MarketDataClient client = MarketDataClient() quotes = client.options.quotes("AAPL271217C00250000") print(quotes) ``` -------------------------------- ### Example 429 Error Payload (JSON) Source: https://www.marketdata.app/docs/api/troubleshooting/too-many-concurrent-requests This JSON payload is a typical response when an account exceeds the concurrent request limit. It includes an error message and a link to a troubleshooting guide. ```json { "s": "error", "errmsg": "Too many concurrent requests. Please reduce parallel requests and retry.", "troubleshootingGuide": "https://www.marketdata.app/docs/api/troubleshooting/too-many-concurrent-requests" } ``` -------------------------------- ### Get Multiple Stock Quotes (NodeJS) Source: https://www.marketdata.app/docs/api/stocks/quotes Retrieves delayed stock quotes for multiple symbols using NodeJS. This example uses the fetch API to send the request with a list of symbols. ```javascript fetch("https://api.marketdata.app/v1/stocks/quotes/?symbols=AAPL,META,MSFT") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); }); ``` -------------------------------- ### Lookup Option Symbol using NodeJS Source: https://www.marketdata.app/docs/api/options/lookup Demonstrates how to use the fetch API in NodeJS to call the options lookup endpoint. It sends a GET request with a URL-encoded user input and logs the response or any errors. ```javascript fetch("https://api.marketdata.app/v1/options/lookup/AAPL%207/28/2023%20200%20Call") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); }); ``` -------------------------------- ### Get Single Stock Quote (NodeJS) Source: https://www.marketdata.app/docs/api/stocks/quotes Retrieves the latest delayed stock quote for a single symbol using NodeJS. This example utilizes the fetch API for making the HTTP request. ```javascript fetch("https://api.marketdata.app/v1/stocks/quotes/AAPL/") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); }); ``` -------------------------------- ### Request Full Live Option Chain Source: https://www.marketdata.app/docs/api/troubleshooting/running-out-of-credits This example demonstrates requesting a full, unfiltered live option chain for a given underlying symbol. This can consume a significant number of credits due to the potential volume of data returned. ```http GET https://api.marketdata.app/v1/options/chain/UNDERLYING/?expiration=all ```