API Documentation
This API is used to retrieve stock information, including predicted price, time, resolution, and actual price.
API Documentation
Overview
This API is used to retrieve stock information, including predicted price, time, resolution, and actual price.
Available Stock Data
Currently, stock data is only available for NASDAQ-100 companies. The list includes:
- Microsoft (MSFT)
- Apple (AAPL)
- Nvidia (NVDA)
- Alphabet (GOOGL, GOOG)
- Amazon (AMZN)
- Meta (META)
- Tesla (TSLA)
- Broadcom (AVGO)
- ASML (ASML)
- Costco (COST)
- Starbucks (SBUX)
- Intel (INTC)
- Netflix (NFLX)
- Adobe (ADBE)
- PayPal (PYPL)
Request Information
Endpoint URL
https://www.yanaoptima.com/API/stock/GetStockList
Request Method
POST
Request Format
The request body should be a JSON object, with the following format:
{
"apiKey": "APIKey",
"ticker": "Stock ticker symbol",
"resolution": "Data resolution type"
}
- apiKey: (string) The API key for authentication. Replace it with your actual API key.
- ticker: (string) The stock ticker symbol.
- resolution: (string) The data resolution type, e.g.,
daily
,minute
,15_min
, etc.
Resolution Types
There are two main categories of resolution:
- Dayline:
stock_dayline
: Daily stock data.index_dayline
: Daily index data.
- Shortline:
15_min
: 15-minute interval data.60_min
: 60-minute interval data.
Code Example
Below is a Python example to demonstrate how to make a request to the API:
import requests
# API URL
url = "https://www.yanaoptima.com/API/stock/GetStockList"
# JSON payload for the request
payload = {
"apiKey": "APIKey", # Replace "APIKey" with your actual API key
"ticker": "Stock ticker", # Replace with the specific stock ticker
"resolution": "Stock data type" # Replace with the type of data (e.g., daily, minute, etc.)
}
# Set headers to specify the content type as JSON
headers = {
"Content-Type": "application/json"
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Output the response
if response.status_code == 200:
print("Data retrieved successfully:")
print(response.json()) # Print the response data in JSON format
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
Response Information
Response Fields
- ticker: (string) The stock ticker symbol.
- result: (float) The predicted stock price at the specified time.
- time: (string, ISO 8601 format) The time of the stock data, formatted as
YYYY-MM-DDTHH:MM:SS
. Note that the time is in New York Time (Eastern Time Zone). - resolution: (string) The data resolution, such as
15_min
,daily
,minute
, etc. - real_data: (float) The actual stock price at the specified time.
Sample Response
[
{
"ticker": "AAPL",
"result": 225.65733595788478,
"time": "2024-10-01T19:59:00",
"resolution": "15_min",
"real_data": 225.751
},
{
"ticker": "AAPL",
"result": 226.98058726072313,
"time": "2024-10-02T19:33:00",
"resolution": "15_min",
"real_data": 226.985
}
]
Additional Notes
The time provided in the API response is based on New York time (Eastern Time Zone).
2Documentation
# API Documentation
## Table of Contents
- [API Documentation](#api-documentation)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Available Stock Data](#available-stock-data)
- [Request Information](#request-information)
- [Endpoint URL](#endpoint-url)
- [Request Method](#request-method)
- [Request Format](#request-format)
- [Resolution Types](#resolution-types)
- [Code Example](#code-example)
- [Response Information](#response-information)
- [Response Fields](#response-fields)
- [Sample Response](#sample-response)
- [Additional Notes](#additional-notes)
---
## Overview
This API is used to retrieve stock information, including predicted price, time, resolution, and actual price.
### Available Stock Data
Currently, stock data is only available for NASDAQ-100 companies. The list includes:
- Microsoft (MSFT)
- Apple (AAPL)
- Nvidia (NVDA)
- Alphabet (GOOGL, GOOG)
- Amazon (AMZN)
- Meta (META)
- Tesla (TSLA)
- Broadcom (AVGO)
- ASML (ASML)
- Costco (COST)
- Starbucks (SBUX)
- Intel (INTC)
- Netflix (NFLX)
- Adobe (ADBE)
- PayPal (PYPL)
---
## Request Information
### Endpoint URL
`https://www.yanaoptima.com/API/stock/GetStockList`
### Request Method
`POST`
### Request Format
The request body should be a JSON object, with the following format:
```json
{
"apiKey": "APIKey",
"ticker": "Stock ticker symbol",
"resolution": "Data resolution type"
}
```
- **apiKey**: (string) The API key for authentication. Replace it with your actual API key.
- **ticker**: (string) The stock ticker symbol.
- **resolution**: (string) The data resolution type, e.g., `daily`, `minute`, `15_min`, etc.
### Resolution Types
There are two main categories of resolution:
1. **Dayline**:
- `stock_dayline`: Daily stock data.
- `index_dayline`: Daily index data.
2. **Shortline**:
- `15_min`: 15-minute interval data.
- `60_min`: 60-minute interval data.
---
## Code Example
Below is a Python example to demonstrate how to make a request to the API:
```python
import requests
# API URL
url = "https://www.yanaoptima.com/API/stock/GetStockList"
# JSON payload for the request
payload = {
"apiKey": "APIKey", # Replace "APIKey" with your actual API key
"ticker": "Stock ticker", # Replace with the specific stock ticker
"resolution": "Stock data type" # Replace with the type of data (e.g., daily, minute, etc.)
}
# Set headers to specify the content type as JSON
headers = {
"Content-Type": "application/json"
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Output the response
if response.status_code == 200:
print("Data retrieved successfully:")
print(response.json()) # Print the response data in JSON format
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
```
---
## Response Information
### Response Fields
- **ticker**: (string) The stock ticker symbol.
- **result**: (float) The predicted stock price at the specified time.
- **time**: (string, ISO 8601 format) The time of the stock data, formatted as `YYYY-MM-DDTHH:MM:SS`. Note that the time is in New York Time (Eastern Time Zone).
- **resolution**: (string) The data resolution, such as `15_min`, `daily`, `minute`, etc.
- **real_data**: (float) The actual stock price at the specified time.
---
## Sample Response
```json
[
{
"ticker": "AAPL",
"result": 225.65733595788478,
"time": "2024-10-01T19:59:00",
"resolution": "15_min",
"real_data": 225.751
},
{
"ticker": "AAPL",
"result": 226.98058726072313,
"time": "2024-10-02T19:33:00",
"resolution": "15_min",
"real_data": 226.985
}
]
```
- **result**: The predicted stock price at the specified time.
- **time**: The time of the stock data in ISO 8601 format (New York Time).
- **resolution**: The data resolution, such as `15_min`.
- **real_data**: The actual stock price at the specified time.
---
## Additional Notes
- The time provided in the API response is based on New York time (Eastern Time Zone).
# API Documentation
# API Documentation
## Table of Contents
- [API Documentation](#api-documentation)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Available Stock Data](#available-stock-data)
- [Request Information](#request-information)
- [Endpoint URL](#endpoint-url)
- [Request Method](#request-method)
- [Request Format](#request-format)
- [Resolution Types](#resolution-types)
- [Code Example](#code-example)
- [Response Information](#response-information)
- [Response Fields](#response-fields)
- [Sample Response](#sample-response)
- [Additional Notes](#additional-notes)
---
## Overview
This API is used to retrieve stock information, including predicted price, time, resolution, and actual price.
### Available Stock Data
Currently, stock data is only available for NASDAQ-100 companies. The list includes:
- Microsoft (MSFT)
- Apple (AAPL)
- Nvidia (NVDA)
- Alphabet (GOOGL, GOOG)
- Amazon (AMZN)
- Meta (META)
- Tesla (TSLA)
- Broadcom (AVGO)
- ASML (ASML)
- Costco (COST)
- Starbucks (SBUX)
- Intel (INTC)
- Netflix (NFLX)
- Adobe (ADBE)
- PayPal (PYPL)
---
## Request Information
### Endpoint URL
`https://www.yanaoptima.com/API/stock/GetStockList`
### Request Method
`POST`
### Request Format
The request body should be a JSON object, with the following format:
```json
{
"apiKey": "APIKey",
"ticker": "Stock ticker symbol",
"resolution": "Data resolution type"
}
```
- **apiKey**: (string) The API key for authentication. Replace it with your actual API key.
- **ticker**: (string) The stock ticker symbol.
- **resolution**: (string) The data resolution type, e.g., `daily`, `minute`, `15_min`, etc.
### Resolution Types
There are two main categories of resolution:
1. **Dayline**:
- `stock_dayline`: Daily stock data.
- `index_dayline`: Daily index data.
2. **Shortline**:
- `15_min`: 15-minute interval data.
- `60_min`: 60-minute interval data.
---
## Code Example
Below is a Python example to demonstrate how to make a request to the API:
```python
import requests
# API URL
url = "https://www.yanaoptima.com/API/stock/GetStockList"
# JSON payload for the request
payload = {
"apiKey": "APIKey", # Replace "APIKey" with your actual API key
"ticker": "Stock ticker", # Replace with the specific stock ticker
"resolution": "Stock data type" # Replace with the type of data (e.g., daily, minute, etc.)
}
# Set headers to specify the content type as JSON
headers = {
"Content-Type": "application/json"
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Output the response
if response.status_code == 200:
print("Data retrieved successfully:")
print(response.json()) # Print the response data in JSON format
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
```
---
## Response Information
### Response Fields
- **ticker**: (string) The stock ticker symbol.
- **result**: (float) The predicted stock price at the specified time.
- **time**: (string, ISO 8601 format) The time of the stock data, formatted as `YYYY-MM-DDTHH:MM:SS`. Note that the time is in New York Time (Eastern Time Zone).
- **resolution**: (string) The data resolution, such as `15_min`, `daily`, `minute`, etc.
- **real_data**: (float) The actual stock price at the specified time.
---
## Sample Response
```json
[
{
"ticker": "AAPL",
"result": 225.65733595788478,
"time": "2024-10-01T19:59:00",
"resolution": "15_min",
"real_data": 225.751
},
{
"ticker": "AAPL",
"result": 226.98058726072313,
"time": "2024-10-02T19:33:00",
"resolution": "15_min",
"real_data": 226.985
}
]
```
- **result**: The predicted stock price at the specified time.
- **time**: The time of the stock data in ISO 8601 format (New York Time).
- **resolution**: The data resolution, such as `15_min`.
- **real_data**: The actual stock price at the specified time.
---
## Additional Notes
- The time provided in the API response is based on New York time (Eastern Time Zone).