> For the complete documentation index, see [llms.txt](https://docs.bancor.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bancor.network/developer-guides/read-functions/rewards/auto-compounding-rewards/programs.md).

# programs()

### Function programs()

{% code title="AutoCompoundingRewards.sol" %}

```javascript
function programs() external view returns (ProgramData[] memory);
```

{% endcode %}

This function is used to get detailed information about all rewards programs.

### Return Variables

This function returns a list with details about each rewards program. Each list item includes:

| Variable Type | Returns                                                                                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
| uint32        | The Unix timestamp indicating when the  rewards program started.                                                  |
| uint32        | The Unix timestamp indicating when the  rewards program will end.                                                 |
| uint32        | The half-life of the rewards program if the program does not use a linear distribution.                           |
| uint32        | The Unix timestamp of the previous distribution period.                                                           |
| Token         | The token address of the bnToken being distributed as rewards.                                                    |
| bool          | <p>True: The program is currently paused.<br>False: The program is not paused. </p>                               |
| uint8         | <p>The distribution schedule for the program. <br>0: Linear distribution<br>1: Exponential decay distribution</p> |
| uint256       | The total number of reward tokens being distributed through the program.                                          |
| uint256       | The number of reward tokens yet to be distributed.                                                                |


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.bancor.network/developer-guides/read-functions/rewards/auto-compounding-rewards/programs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
