> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turtle.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Deposits

> Retrieve deposit activity for your distributor.

<Note>
  All requests require an API key via the `X-API-Key` header.
  See [Authentication](/sdk/authentication/api-keys) for details.
</Note>

## Overview

Retrieve paginated deposit activity attributed to a specific distributor. Results are ordered by date descending. You can filter by opportunity or product to narrow results.

<Info>
  Looking for wallet-scoped activity across all distributors? See [Wallet Activity](/sdk/portfolio/activity) for deposits and withdrawals by wallet address.
</Info>

## Endpoint

### Get Deposits

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET "https://earn.turtle.xyz/v1/deposit/your-distributor-id?page=1&limit=20" \
    -H "X-API-Key: pk_live_xxxxx"
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    'https://earn.turtle.xyz/v1/deposit/your-distributor-id?page=1&limit=20',
    { headers: { 'X-API-Key': 'pk_live_xxxxx' } }
  );
  const data = await response.json();
  ```
</CodeGroup>

**Path Parameters**

<ParamField path="distributor_id" type="string" required>
  The unique identifier of the distributor to retrieve deposits for.
</ParamField>

**Query Parameters**

<ParamField query="opportunity_id" type="uuid">
  Filter deposits to a specific opportunity.
</ParamField>

<ParamField query="product_id" type="uuid">
  Filter deposits to opportunities belonging to a specific product. When combined with `opportunity_id`, the opportunity must belong to the product — otherwise an empty page is returned.
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number for pagination.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Number of deposits per page (max: 100).
</ParamField>

**Response**

```json theme={null}
{
  "deposits": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "opportunityId": "550e8400-e29b-41d4-a716-446655440000",
      "interaction": "deposit",
      "txHash": "0xedfdf71e0e4daec5afcb87988821a8bccd5c282647c8e81a65a71181a44a8e51",
      "chainId": 1,
      "blockTimestamp": "2025-10-08T16:18:07Z",
      "walletAddress": "0xe84ef330b7b5c02fb3fbe05f2a31cb331c2b874c",
      "amountToken": "89.704738",
      "amountInUsd": "89.73",
      "tokenSymbol": "USDC",
      "tokenIconUrl": "https://icons.llama.fi/usd-coin.jpg",
      "isSwap": false
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 142,
    "totalPages": 8,
    "hasNext": true,
    "hasPrevious": false
  }
}
```

<ResponseField name="deposits" type="array">
  Array of deposit activity items.
</ResponseField>

<ResponseField name="deposits[].id" type="uuid">
  Unique identifier for the interaction record.
</ResponseField>

<ResponseField name="deposits[].opportunityId" type="uuid">
  The opportunity the deposit was made into.
</ResponseField>

<ResponseField name="deposits[].interaction" type="string">
  Interaction type. Always `deposit` for this endpoint.
</ResponseField>

<ResponseField name="deposits[].txHash" type="string">
  On-chain transaction hash.
</ResponseField>

<ResponseField name="deposits[].chainId" type="integer">
  Chain ID where the transaction was executed.
</ResponseField>

<ResponseField name="deposits[].blockTimestamp" type="string">
  UTC timestamp of the block containing the transaction (ISO 8601).
</ResponseField>

<ResponseField name="deposits[].walletAddress" type="string">
  The depositor's wallet address.
</ResponseField>

<ResponseField name="deposits[].amountToken" type="string">
  Deposit amount in token units (human-readable). May be absent if token metadata is unavailable.
</ResponseField>

<ResponseField name="deposits[].amountInUsd" type="string">
  Deposit amount in USD. May be absent if price data is unavailable.
</ResponseField>

<ResponseField name="deposits[].tokenSymbol" type="string">
  Symbol of the deposited token (e.g., `USDC`). May be absent if token metadata is unavailable.
</ResponseField>

<ResponseField name="deposits[].tokenIconUrl" type="string">
  URL to the token's icon. May be absent.
</ResponseField>

<ResponseField name="deposits[].isSwap" type="boolean">
  Whether the deposit used swap mode.
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.
</ResponseField>

<ResponseField name="pagination.page" type="integer">
  Current page number.
</ResponseField>

<ResponseField name="pagination.limit" type="integer">
  Results per page.
</ResponseField>

<ResponseField name="pagination.total" type="integer">
  Total number of matching deposits.
</ResponseField>

<ResponseField name="pagination.totalPages" type="integer">
  Total number of pages.
</ResponseField>

<ResponseField name="pagination.hasNext" type="boolean">
  Whether a next page exists.
</ResponseField>

<ResponseField name="pagination.hasPrevious" type="boolean">
  Whether a previous page exists.
</ResponseField>

## Filter by product

Retrieve deposits scoped to a specific product and its associated opportunities.

```typescript theme={null}
const response = await fetch(
  `https://earn.turtle.xyz/v1/deposit/${distributorId}?product_id=${productId}&page=1&limit=50`,
  { headers: { 'X-API-Key': 'pk_live_xxxxx' } }
);
const { deposits, pagination } = await response.json();
```

## Paginate through all deposits

```typescript theme={null}
const getAllDeposits = async (distributorId: string) => {
  const all = [];
  let page = 1;

  while (true) {
    const response = await fetch(
      `https://earn.turtle.xyz/v1/deposit/${distributorId}?page=${page}&limit=100`,
      { headers: { 'X-API-Key': 'pk_live_xxxxx' } }
    );
    const { deposits, pagination } = await response.json();
    all.push(...deposits);

    if (!pagination.hasNext) break;
    page++;
  }

  return all;
};
```

## Error Handling

<AccordionGroup>
  <Accordion title="Distributor not found">
    **Status Code:** 404 Not Found

    ```json theme={null}
    {
      "error": {
        "status": "NOT_FOUND",
        "error": "distributor not found"
      }
    }
    ```

    **Solution:** Verify your distributor ID is correct and active.
  </Accordion>

  <Accordion title="Invalid opportunity_id or product_id">
    **Status Code:** 400 Bad Request

    ```json theme={null}
    {
      "error": {
        "status": "INVALID_ARGUMENT",
        "error": "invalid opportunity_id: not-a-uuid"
      }
    }
    ```

    **Solution:** Both `opportunity_id` and `product_id` must be valid UUIDs.
  </Accordion>
</AccordionGroup>
