# Stocks API

### **Stocks API Documentation**

A Stock API is like a personal stock market analyst, giving you real-time financial data and insights. You can use it to track stock prices, analyze trends, make informed investment decisions, and even automate trading strategies. Think of it as a live feed of market information that empowers you to make smarter financial decisions.

## Base URL

<pre><code><strong>https://santechapi.vercel.app
</strong></code></pre>

### Authentication

```
headers : {
"token" : {YOUR API KEY}
}
```

**Endpoint:** `stock/company/symbol/:q`

*HTTP Method: `Get`*

**Example request**

```
GET /company/symbol/TCS
```

**Example Response**

**`200`**

```json
{
	"Meta Data": {
		"1. Information": "Daily Prices (open, high, low, close) and Volumes",
		"2. Symbol": "TCS.BSE",
		"3. Last Refreshed": "2024-09-27",
		"4. Output Size": "Full size",
		"5. Time Zone": "US/Eastern"
	},
	"Time Series (Daily)": {
		"2024-09-27": {
			"1. open": "4343.3501",
			"2. high": "4378.4502",
			"3. low": "4300.1001",
			"4. close": "4309.0498",
			"5. volume": "86656"
		},
		"2024-09-26": {
			"1. open": "4255.0000",
			"2. high": "4316.3501",
			"3. low": "4255.0000",
			"4. close": "4291.2500",
			"5. volume": "66991"
		},
		"2024-09-25": {
			"1. open": "4257.9502",
			"2. high": "4289.0000",
			"3. low": "4240.0000",
			"4. close": "4275.9502",
			"5. volume": "61267"
		},
		"2024-09-24": {
			"1. open": "4264.9502",
			"2. high": "4290.0000",
			"3. low": "4243.3501",
			"4. close": "4272.3999",
			"5. volume": "25648"
		},
		"2024-09-23": {
			"1. open": "4286.0498",
			"2. high": "4303.9502",
			"3. low": "4252.7002",
			"4. close": "4267.5498",
			"5. volume": "53740"
		},
		"2024-09-20": {
			"1. open": "4320.9502",
			"2. high": "4331.2002",
			"3. low": "4226.6001",
			"4. close": "4285.2998",
			"5. volume": "503940"
		},
		"2024-09-19": {
			"1. open": "4397.7500",
			"2. high": "4421.0000",
			"3. low": "4282.8999",
			"4. close": "4296.8501",
			"5. volume": "81459"
		},
		"2024-09-18": {
			"1. open": "4516.9502",
			"2. high": "4516.9502",
			"3. low": "4321.6499",
			"4. close": "4346.6001",
			"5. volume": "68843"
		},
		"2024-09-17": {
			"1. open": "4505.1499",
			"2. high": "4535.0000",
			"3. low": "4468.7500",
			"4. close": "4503.6499",
			"5. volume": "17791"
		},
		"2024-09-16": {
			"1. open": "4530.0000",
			"2. high": "4544.7998",
			"3. low": "4495.9502",
			"4. close": "4513.0000",
			"5. volume": "16633"
		}
}
}
```

### Error Handling

`402`

In case of an error, the API will respond with an appropriate HTTP status code and an error message in the response body.

```json
{
    message: "param required for keyword based player details fetch"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://santech.gitbook.io/docs/stocks-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
