# Reporting data

{% hint style="info" %}
Reach out to Kiln to get access on the data endpoints.
{% endhint %}

There are 2 ways to query reporting data for Kiln DeFi:

1. Using Kiln Connect API **(recommended)**: a simple REST API doing all aggregation for you
2. Using Kiln public TheGraph instances directly

## Get a user position(s) and total rewards inside of Vault(s)

**Route**: `GET /v1/defi/v1/stakes`

**Goals**

* Get a list of positions inside a list of vaults
* Positions include current deposited balance and total rewards and withdrawn amounts
* This data can be used to showcase current holdings of a user in Kiln DeFi vaults

**Query parameters**

* `wallets`: comma-separated list of wallet address to fetch position data for
* `vaults`: comma-separated list of vaults, where each value has the `protocol_address` format

These are not exclusive and can be used together. Some use-cases could be:

* query all current positions of a vault or a list of vaults
* query all current positions of a user or a list of users
* query all current positions of a user or a list of users within a vault or a list of vaults

**Specs:** [**https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiStakes**](https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiStakes)

## Get Operations on a position

**Route**: `GET /v1/defi/v1/operations`

**Goals**

* Get all operations performed on a list of positions inside a list of vaults
* Operations include `deposit` and `withdrawal` operations
* This data can be used for accounting reconciliation

**Query parameters**

* `wallets`: comma-separated list of wallet address to fetch position data for
* `vaults`: comma-separated list of vaults, where each value has the `protocol_address` format

These are not exclusive and can be used together. Some use-cases could be:

* query all operations of positions on a vault or a list of vaults
* query all operations of positions of a user or a list of users
* query operations of positions of a user or a list of users within a vault or a list of vaults

**Specs:** [**https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiOperations**](https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiOperations)

## Get Statistics of a vault

**Route**: `GET /v1/defi/v1/network-stats`

**Query parameters**

* `vaults`: comma-separated list of vaults, where each value has the `protocol_address` format

**Specs:** [**https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiNetworkStats**](https://docs.api.mainnet.kiln.fi/preview.html#tag/defi/operation/getDefiNetworkStats)


---

# 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.kiln.fi/v1/kiln-products/omnivaults/how-to-integrate/reporting-data.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.
