# Lending Positions

> Coming soon, upon request — this feature is turned on for your tenant by the Aurea team. [Contact us](https://www.aureahub.com/contact)

The user's lending position on each lending chain, the pool's current rate and what is still in the wallet.

## Overview

- One entry per lending chain of the network, for the user's first EVM wallet: `depositedWei` is the position, what was supplied and the interest it earned together; `apy` the pool's current yearly rate in percent, compounded; `tokenSymbol` `EUR.e`, `tokenAddress` and `tokenDecimals`. A chain that cannot be read is left out.
- `accruedYieldWei` and `totalAccruedYieldWei` are always `"0"`: the interest is inside `depositedWei`.
- `totalDepositedWei`: all positions added up. `hasDeposit`: whether any is above zero. `walletBalanceWei`: the EUR.e still in the wallet, on the first lending chain.
- No lending chain on the network, or no EVM wallet: an empty result, never an error.

## Endpoint

### `GET /v1/lending/positions`

Authentication: bearer token required.

The user's lending positions. Needs the user's access token and the tenant signature (or a server token).

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `isTestnet` | string | no | `true` for testnet; anything else, mainnet |

**Responses**

`200` OK

```json
{
  "positions": [
    {
      "chainSlug": "gnosis",
      "chainId": 100,
      "tokenSymbol": "EUR.e",
      "tokenAddress": "0xcB444e90D8198415266c6a2724b7900fb12FC56E",
      "depositedWei": "250431208766120045311",
      "accruedYieldWei": "0",
      "apy": 2.4137,
      "tokenDecimals": 18
    }
  ],
  "totalDepositedWei": "250431208766120045311",
  "totalAccruedYieldWei": "0",
  "hasDeposit": true,
  "walletBalanceWei": "12000000000000000000"
}
```

**Example request**

```bash
curl "https://api.aureahub.com/v1/lending/positions?isTestnet=false" \
  -H "Authorization: Bearer USER_ACCESS_TOKEN" \
  -H "x-tenant-api-key: YOUR_API_KEY" \
  -H "x-timestamp: UNIX_SECONDS" \
  -H "x-signature: HMAC_SHA256_HEX"
```

---

Web version: https://docs.aureahub.com/#lending-positions
