### Currency Conversion API Request Example Source: https://twelvedata.com/docs/ai/ai-data-assistant Example of a GET request to the currency conversion endpoint. Replace 'demo' with your actual API key. ```HTTP https://api.twelvedata.com/currency_conversion?symbol=EUR/USD&amount=100&apikey=demo ``` -------------------------------- ### Example Batch Request Source: https://twelvedata.com/docs/advanced/batch-requests This example demonstrates how to construct a batch request to fetch historical data for multiple symbols and timeframes. Ensure you have your API key configured. ```bash curl -G "https://api.twelvedata.com/batch_quotes" \ --data-urlencode "symbol=AAPL,MSFT,GOOG" \ --data-urlencode "interval=1day,1week" \ --data-urlencode "apikey=YOUR_API_KEY" ``` -------------------------------- ### Get Latest Stock Price with Twelve Data Node.js SDK Source: https://twelvedata.com/docs/ai/ai-data-assistant This JavaScript example shows how to fetch the latest stock price using the Twelve Data Node.js SDK. Install the SDK and provide your API key during configuration. ```javascript import { MarketDataApi, CreateConfig } from "@twelvedata/twelvedata-node"; const config = CreateConfig('your_api_key'); const api = new MarketDataApi(config); async function main() { const response = await api.getPrice({ symbol: "AAPL", }); console.log(response.data); } main().catch(console.error); ``` -------------------------------- ### Midpoint API Request Example Source: https://twelvedata.com/docs/ai/ai-data-assistant This is an example of a GET request to the Midpoint endpoint. It specifies the symbol, interval, and API key. ```http https://api.twelvedata.com/midpoint?symbol=AAPL&interval=1min&apikey=demo ``` -------------------------------- ### Example TYPPRICE API Request Source: https://twelvedata.com/docs/llms/price-transform/typprice.md Demonstrates how to request typical price data for a given symbol and interval using the Twelve Data API. ```bash curl "https://api.twelvedata.com/typprice?symbol=AAPL&interval=1min&apikey=demo" ``` -------------------------------- ### Funds Endpoint Request Example Source: https://twelvedata.com/docs/ai/ai-data-assistant This is an example of a GET request to the funds endpoint. Replace 'demo' with your actual API key. ```http https://api.twelvedata.com/funds?apikey=demo ``` -------------------------------- ### TRIMA API Request Example Source: https://twelvedata.com/docs/llms/overlap-studies/trima.md Example of how to request TRIMA data from the Twelve Data API. Ensure you replace 'demo' with your actual API key. ```bash curl "https://api.twelvedata.com/trima?symbol=AAPL&interval=1min&apikey=demo" ``` -------------------------------- ### Beta Endpoint Request Example Source: https://twelvedata.com/docs/llms/statistic-functions/beta.md Example of how to request beta data using curl. Ensure you replace 'demo' with your actual API key. ```bash curl "https://api.twelvedata.com/beta?symbol=AAPL&interval=1min&apikey=demo" ``` -------------------------------- ### DX API Request Example Source: https://twelvedata.com/docs/ai/ai-data-assistant Example of a GET request to the DX API endpoint for AAPL stock data with a 1-minute interval. ```http https://api.twelvedata.com/dx?symbol=AAPL&interval=1min&apikey=demo ```