> For the complete documentation index, see [llms.txt](https://alphavantage-api.marcelwagner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alphavantage-api.marcelwagner.dev/deep-dive/fundamental.md).

# Fundamental

The `Fundamentals` class provides methods to interact with various endpoints of the Alphavantage API related to fundamental financial data. Each method fetches specific financial information about a given symbol or other relevant parameters.

### Methods

#### 1. Overview

Fetches the company overview for a given symbol.

**Signature:**

```php
public function overview(string $symbol): array
```

**Parameters:**

* `symbol` (string): The stock symbol to fetch the overview for.

**Returns:**

* `array`: An array containing the company overview data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 2. Income Statement

Fetches the income statement for a given symbol.

**Signature:**

```php
public function incomeState(string $symbol): array
```

**Parameters:**

* `symbol` (string): The stock symbol to fetch the income statement for.

**Returns:**

* `array`: An array containing the income statement data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 3. Balance Sheet

Fetches the balance sheet for a given symbol.

**Signature:**

```php
public function balanceSheet(string $symbol): array
```

**Parameters:**

* `symbol` (string): The stock symbol to fetch the balance sheet for.

**Returns:**

* `array`: An array containing the balance sheet data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 4. Cash Flow

Fetches the cash flow statement for a given symbol.

**Signature:**

```php
public function cashFlow(string $symbol): array
```

**Parameters:**

* `symbol` (string): The stock symbol to fetch the cash flow statement for.

**Returns:**

* `array`: An array containing the cash flow data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 5. Earnings

Fetches the earnings report for a given symbol.

**Signature:**

```php
public function earnings(string $symbol): array
```

**Parameters:**

* `symbol` (string): The stock symbol to fetch the earnings report for.

**Returns:**

* `array`: An array containing the earnings data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 6. Listing Status

Fetches the listing status of companies, either active or delisted, optionally filtered by date.

**Signature:**

```php
public function listingStatus(?Carbon $date = null, string $state = 'active'): array
```

**Parameters:**

* `date` (Carbon|null): Optional date to filter the listing status.
* `state` (string): The listing state, either 'active' or 'delisted'.

**Returns:**

* `array`: An array containing the listing status data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`
* `InvalidArgumentException`: Thrown if the state is not 'active' or 'delisted'.

#### 7. Earnings Calendar

Fetches the earnings calendar for a given symbol over a specified number of months.

**Signature:**

```php
public function earningsCalendar(?string $symbol, int $months = 3): array
```

**Parameters:**

* `symbol` (string|null): The stock symbol to fetch the earnings calendar for.
* `months` (int): The number of months to look ahead. Default is 3.

**Returns:**

* `array`: An array containing the earnings calendar data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

#### 8. IPO Calendar

Fetches the IPO calendar data.

**Signature:**

```php
public function ipoCalendar(): array
```

**Parameters:**

* None

**Returns:**

* `array`: An array containing the IPO calendar data.

**Exceptions:**

* `ApiVolumeReached`
* `ConnectionException`

***

Each method in the `Fundamentals` class is designed to interact with a specific endpoint of the Alphavantage API, ensuring easy and efficient retrieval of financial data. Be sure to handle the possible exceptions when using these methods to ensure robust error handling in your application.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://alphavantage-api.marcelwagner.dev/deep-dive/fundamental.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.
