# API and integration

Berry exposes a public API and contract surface that anyone, including AI agents, can read and interact with. Read endpoints do not require authentication, and all writes happen directly on chain.

### Base URL

TBD

### Public read endpoints

* `GET /api/config`: Platform wide configuration.
* `GET /api/pools`: List all pools, filterable by status.
* `GET /api/pools/:poolAddress`: Single pool details.
* `GET /api/pools/:poolAddress/investors`: Investor list for a pool.
* `GET /api/tokens/:tokenAddress`: All pools for a given token.
* `GET /api/portfolio/:walletAddress`: All positions for a wallet.
* `GET /api/pools/:poolAddress/nectar/:walletAddress`: Nectar earnings history.

### Data encoding conventions

* All times are unix seconds.
* All percentages are basis points, where `1000 = 10%` and `6000 = 60%`.
* All amounts, including ETH, USDC, and tokens, are wei strings, not floats.
* All market cap values are 6 decimal USDC equivalents encoded as strings.

### Smart contract addresses

TBD

### Rate limits

TBD


---

# 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://docs.berryfi.org/for-developers/api-and-integration.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.
