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

# Get Allocation by Strategy

> GET /v1/allocations/strategy/:strategyId — Get allocation at a specific strategy

<Note>
  **Endpoint:** `GET https://api.rebelfi.io/v1/allocations/strategy/:strategyId`
</Note>

Get a specific allocation at a strategy for a wallet.

### Path Parameters

| Parameter    | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `strategyId` | `number` | Yes      | Strategy ID |

### Query Parameters

Provide one wallet identifier:

| Parameter       | Type     | Required | Description    |
| --------------- | -------- | -------- | -------------- |
| `walletAddress` | `string` | One of   | Wallet address |
| `walletId`      | `number` | One of   | Wallet ID      |

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.rebelfi.io/v1/allocations/strategy/1?walletId=42" \
    -H "x-api-key: your_api_key"
  ```

  ```typescript SDK theme={null}
  // By walletId
  const allocation = await client.allocations.get(1, 42);

  // By walletAddress
  const allocation = await client.allocations.get(1, 'So11...abc');
  ```
</CodeGroup>

### Example Response

```json theme={null}
{
  "strategyId": 1,
  "strategyName": "USDC Vault",
  "venueId": 1,
  "venueName": "Kamino",
  "walletAddress": "So11...abc",
  "blockchain": "solana",
  "token": "USDC",
  "tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "principal": "1000000000",
  "currentValue": "1008500000",
  "yieldEarned": "8500000",
  "apy": 0.085,
  "lastUpdated": "2024-01-15T10:30:00Z"
}
```

### Errors

| Code                   | Description                                 |
| ---------------------- | ------------------------------------------- |
| `ALLOCATION_NOT_FOUND` | No position at this strategy for the wallet |
| `WALLET_NOT_FOUND`     | Wallet ID doesn't exist                     |
