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

# Get the user's account

> Returns the wallets the user picked for your app with their holdings, the agents they have running, and when the permit ends.



## OpenAPI

````yaml /partner-openapi.gen.json get /partner/v0.1/account
openapi: 3.1.0
info:
  title: Circuit partner API
  version: '0.1'
servers:
  - url: https://api.circuit.org
security: []
paths:
  /partner/v0.1/account:
    get:
      summary: Get the user's account
      description: >-
        Returns the wallets the user picked for your app with their holdings,
        the agents they have running, and when the permit ends.
      operationId: getAccount
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: The linked user's wallets and running agents.
                type: object
                properties:
                  permit_expires_at:
                    $ref: '#/components/schemas/Timestamp'
                    description: >-
                      When the permit ends. Send the user a new link before then
                      to keep their agents running.
                  wallets:
                    description: >-
                      The wallets the user picked for your app. Empty when they
                      picked none and use paper money only.
                    type: array
                    items:
                      $ref: '#/components/schemas/Wallet'
                  sessions:
                    description: >-
                      The user's running agents on those wallets and on paper
                      money, newest first.
                    type: array
                    items:
                      $ref: '#/components/schemas/Session'
                required:
                  - permit_expires_at
                  - wallets
                  - sessions
        default:
          description: Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerFailure'
      security:
        - permit: []
components:
  schemas:
    Timestamp:
      type: string
      format: date-time
    Wallet:
      description: A wallet the user picked for your app.
      type: object
      properties:
        id:
          description: The wallet's id, starting with `wal_`.
          type: string
        name:
          description: The name the user gave the wallet.
          type: string
        address:
          description: The wallet's onchain address.
          type: string
        value_usd:
          description: >-
            Total value in USD as a decimal string. Null when a holding could
            not be priced.
          type:
            - string
            - 'null'
        holdings:
          description: >-
            Everything the wallet holds: tokens, perps, prediction shares and
            lending positions.
          type: array
          items:
            $ref: '#/components/schemas/PartnerHolding'
      required:
        - id
        - name
        - address
        - holdings
    Session:
      description: An agent running for the user on one wallet or on paper money.
      type: object
      properties:
        id:
          description: The session's id, starting with `ses_`.
          type: string
        agent:
          description: The agent it runs, starting with `agt_`.
          type: string
        name:
          description: The agent's name.
          type: string
        wallet:
          description: >-
            The wallet it trades, starting with `wal_`. Null when it runs on
            paper money.
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/PartnerSessionStatus'
        value_usd:
          description: >-
            The current value of what the session holds, in USD as a decimal
            string. Null until Circuit first values a new session, about a
            minute after it starts, or when a holding can't be priced.
          type:
            - string
            - 'null'
        pnl_usd:
          description: >-
            Profit or loss since the session started, in USD as a decimal
            string. Null when unknown.
          type:
            - string
            - 'null'
        error:
          description: >-
            What the user needs to do when `status` is `needs_user`. Null
            otherwise.
          type:
            - string
            - 'null'
        started_at:
          $ref: '#/components/schemas/Timestamp'
          description: When the session started.
      required:
        - id
        - agent
        - name
        - status
        - started_at
    PartnerFailure:
      description: >-
        A failed call. Handle it by HTTP status and `code`, and show `error` to
        the user.
      type: object
      properties:
        error:
          description: A message you can show the user.
          type: string
        code:
          description: >-
            A stable code such as `BAD_REQUEST`, `NOT_FOUND`, `CONFLICT` or
            `UNAUTHORIZED`. New codes can appear.
          type: string
      required:
        - error
        - code
    PartnerHolding:
      description: One asset or position in a wallet.
      type: object
      properties:
        symbol:
          description: The asset, such as `BTC` or `USDC`.
          type: string
        network:
          description: >-
            Where it is held, such as `ethereum:8453`, `solana`, `hypercore` or
            `lighter`.
          type: string
        kind:
          description: >-
            What it is: `token`, `perp`, `prediction`, `supplied` or `borrowed`.
            New kinds can appear.
          type: string
        amount:
          description: The amount as a decimal string. Negative for a short or a debt.
          type: string
        value_usd:
          description: Value in USD as a decimal string. Null when Circuit cannot price it.
          type:
            - string
            - 'null'
      required:
        - symbol
        - network
        - kind
        - amount
    PartnerSessionStatus:
      oneOf:
        - description: The agent is running on its own schedule.
          type: string
          const: running
        - description: >-
            The agent is running but the user needs to do something. `error`
            says what, for example that the permit ends soon.
          type: string
          const: needs_user
        - description: The agent was stopped. Its positions stay open.
          type: string
          const: stopped
  securitySchemes:
    permit:
      description: The permit the user approved for your app.
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.