Welcome to the Stocks API! This API allows you to access stock information.
This API is built using Node.js and Express.js. It provides a simple yet powerful interface for retrieving stock data from various sources. Whether you're building a financial app, conducting research, or just curious about stock prices, this API has you covered.
To install and run the Stocks API locally, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run npm install to install the dependencies.
- Run npm start to start the server.
Once the server is running, you can make HTTP requests to the provided endpoints to retrieve stock data. You can use tools like cURL, Postman, or your preferred programming language/library to interact with the API.
The API provides the following endpoints:
GET /search
: Search for a particular stock.GET /details
: Retrieve information about a specific stock.GET /chart
: Retrieve stock chart data.GET /recommendations
: Retrieve stock recommendations.GET /trending
: Retrieve trending stocks.
- Method: GET
- Description: Search for stocks by query.
- Parameters:
q
(required): Query string for search.
- Method: GET
- Description: Get details about a specific stock.
- Parameters:
name
(required): Stock name.
- Method: GET
- Description: Get chart data for a specific stock.
- Parameters:
name
(required): Stock name.period1
(required): Start timestamp for the chart data.
- Method: GET
- Description: Get recommendations for a specific stock.
- Parameters:
name
(required): Stock name.
- Method: GET
- Description: Get trending stocks.
- Parameters:
region
(required): Region for trending stocks.count
(required): Number of trending stocks to retrieve.
Contributions to this project are welcome! If you encounter any bugs, have feature requests, or would like to contribute code, please open an issue or submit a pull request on GitHub.