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

# Get rebalance opportunities by symbol

> Filter rebalance opportunities for a single token symbol.

<ParamField header="x-api-key" type="string" required placeholder="your-api-key">
  Your StarkFi API key. You can find it in your [dashboard](https://app.starkfi.io).
</ParamField>

<ParamField path="symbol" type="string" required>
  Token symbol, e.g. `USDC`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.starkfi.io/yield/rebalance-opportunities/USDC \
    --header 'x-api-key: <api_key>'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.starkfi.io/yield/rebalance-opportunities/USDC",
    { headers: { "x-api-key": "<api_key>" } }
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.starkfi.io/yield/rebalance-opportunities/USDC",
      headers={"x-api-key": "<api_key>"},
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "statusCode": 200,
    "success": true,
    "status": "get_rebalance_opportunity_by_symbol_ok",
    "message": "Rebalance opportunity retrieved successfully",
    "data": {
      "opportunities": [],
      "sources": null
    }
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "statusCode": 404,
    "success": false,
    "status": "rebalance_opportunity_not_found",
    "message": "Rebalance opportunity not found"
  }
  ```
</ResponseExample>

### Response

<ResponseField name="data.opportunities" type="array" required>
  Filtered list for the symbol.
</ResponseField>

<ResponseField name="data.sources" type="object" />
