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

# Portfolios

> List your portfolios

```bash theme={null}
curl "https://api.bendbasis.com/v1/portfolios" \
  -H "Authorization: Bearer $BENDBASIS_API_KEY"
```


## OpenAPI

````yaml GET /v1/portfolios
openapi: 3.1.0
info:
  title: bendbasis API
  description: Funding market and arbitrage data from bendbasis.
  version: 1.0.0-preview
servers:
  - url: https://api.bendbasis.com
security: []
tags:
  - name: Portfolio
    description: Read-only access to your portfolios and positions.
paths:
  /v1/portfolios:
    get:
      tags:
        - Portfolio
      summary: List portfolios
      operationId: listPortfolios
      responses:
        '200':
          description: Portfolio collection
          headers:
            X-API-Version:
              schema:
                type: string
              example: v1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioCollection'
              example:
                data:
                  - portfolio_id: 2f69612d-3b97-4820-babc-6c482a70fb68
                    name: Main
                    position_counts:
                      open: 4
                      closed: 12
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - BearerAuth: []
components:
  schemas:
    PortfolioCollection:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Portfolio'
    Portfolio:
      type: object
      additionalProperties: false
      required:
        - portfolio_id
        - name
        - position_counts
      properties:
        portfolio_id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        position_counts:
          $ref: '#/components/schemas/PositionCounts'
    ValidationError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
        message:
          type: string
      example:
        code: VALIDATION_ERROR
        message: Invalid parameter
    UnauthorizedError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - UNAUTHORIZED
        message:
          type: string
      example:
        code: UNAUTHORIZED
        message: Valid API key required
    ForbiddenError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
      example:
        code: FORBIDDEN
        message: API key does not grant the required scope
    PositionCounts:
      type: object
      additionalProperties: false
      required:
        - open
        - closed
      properties:
        open:
          type: integer
          minimum: 0
        closed:
          type: integer
          minimum: 0
  responses:
    ValidationFailed:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    Unauthorized:
      description: Missing or invalid API key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
          example: Bearer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
    Forbidden:
      description: The API key does not grant the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    RateLimited:
      description: Rate limit exceeded.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Personal API key created at bendbasis.com/account/api-keys.

````