Our Stock Data API provides a comprehensive solution for accessing real-time stock market data. Whether you're a developer building a custom trading application, a data analyst looking for historical market trends, or just someone interested in tracking stock performance, our API gives you the flexibility to retrieve stock data using both Python or HTTP API requests.
Retrieve detailed information about a specific stock, including its symbol, name, and other essential metadata.
amistock.get_stock_info()
import amistock
symbol = 'AAPL' # Example stock symbol
api_key = 'your_api_key'
stock_info = amistock.get_stock_info(symbol, api_key)
print(stock_info)
GET https://amistock.com/stockdata/get_stock_info/AAPL/
Authorization: your_api_key
URL: https://amistock.com/stockdata/get_stock_info/{symbol}/
Method: GET
Headers:
Authorization: your_api_key
Response: Returns metadata about the stock, including its name, symbol, and other details.
Retrieve historical stock data, including open, high, low, close, and volume (OHLCV) for a given stock over a specific date range.
amistock.get_stock_data()
import amistock
from datetime import datetime
symbol = 'AAPL'
api_key = 'your_api_key'
from_date = datetime(2020, 1, 1)
to_date = datetime(2021, 1, 1)
stock_data = amistock.get_stock_data(symbol, from_date, to_date, api_key)
print(stock_data)
GET https://amistock.com/stockdata/get_stock_data/AAPL/2020-01-01/2021-01-01/
Authorization: your_api_key
URL: https://amistock.com/stockdata/get_stock_data/{symbol}/{from_date}/{to_date}/
Method: GET
Headers:
Authorization: your_api_key
Response: Returns historical stock data (OHLCV) for the specified date range.
Fetch all stocks listed on a specific market such as HOSE or HNX.
amistock.get_stocks_by_market()
import amistock
market = 'HOSE' # Example market
api_key = 'your_api_key'
stocks = amistock.get_stocks_by_market(market, api_key)
print(stocks)
GET https://amistock.com/stockdata/get_stocks_by_market/HOSE/
Authorization: your_api_key
URL: https://amistock.com/stockdata/get_stocks_by_market/{market}/
Method: GET
Headers:
Authorization: your_api_key
Response: Returns a list of stocks associated with the specified market (e.g., HOSE).
Retrieve detailed information about the status and expiration of your API key.
amistock.get_key_info()
import amistock
api_key = 'your_api_key'
key_info = amistock.get_key_info(api_key)
print(key_info)
GET https://amistock.com/stockdata/get_key_info/
Authorization: your_api_key
URL: https://amistock.com/stockdata/get_key_info/
Method: GET
Headers:
Authorization: your_api_key
Response: Returns information about the API key, such as its expiration date, status, and associated permissions.
To interact with the API, you will need to authenticate your requests using an API key. The API key is required for each function call to ensure secure access to your stock data. You can pass the API key as an HTTP header (Authorization: your_api_key
) in every request.
Our Stock Data API offers seamless access to both real-time and historical stock data for developers, traders, and analysts. With the flexibility to use either Python via the amistock
library or direct HTTP API requests, you can integrate stock data into your applications easily.
If you have any questions or need support, feel free to contact us at amistockpro@gmail.com.
Chúng tôi cung cấp các dịch vụ chuyên nghiệp, bao gồm cài đặt phần mềm, lập trình AFL, hỗ trợ 24/7 và nhiều tính năng khác, giúp bạn tối ưu hóa quá trình đầu tư và giao dịch chứng khoán.
Contact us