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

# Get the current authenticated-user context

> Returns the current user, effective subscription projection, resource limits, credential type, and authorization scopes. Any valid Open API key can call this public endpoint. MCP OAuth may reach the same internal contract only through private, server-bound delegation; an MCP OAuth access token sent directly to this endpoint is rejected with `401 authentication_required`.



## OpenAPI

````yaml /openapi/portfobit-openapi.yaml get /me
openapi: 3.1.0
info:
  title: Portfobit Open API
  version: 0.1.0
  description: >
    Public REST API for direct API clients, CI, scripts, service accounts,
    third-party agents, and developer integrations.

    Public REST requests use scoped Portfobit Open API keys. OAuth access tokens
    issued for the Portfobit MCP resource are not accepted by `/api/v1/*`
    endpoints.

    Portfobit is crypto-CEX-only. Financial values are decimal strings and
    timestamps are RFC 3339 UTC strings.

    The API never supports withdrawals, external-address transfers,
    cross-exchange transfers, or P2P transfers.
servers:
  - url: https://api.portfobit.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Context
  - name: Accounts
  - name: Portfolios
  - name: Valuation
  - name: Activity
  - name: Trading
  - name: Market data
  - name: Support
paths:
  /me:
    get:
      tags:
        - Context
      summary: Get the current authenticated-user context
      description: >-
        Returns the current user, effective subscription projection, resource
        limits, credential type, and authorization scopes. Any valid Open API
        key can call this public endpoint. MCP OAuth may reach the same internal
        contract only through private, server-bound delegation; an MCP OAuth
        access token sent directly to this endpoint is rejected with `401
        authentication_required`.
      operationId: getCurrentUserContext
      responses:
        '200':
          $ref: '#/components/responses/CurrentUserContextResponse'
        '401':
          $ref: '#/components/responses/AuthenticationRequiredResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  responses:
    CurrentUserContextResponse:
      description: Current user context response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CurrentUserContextResponseSchema'
    AuthenticationRequiredResponse:
      description: >-
        The Open API key is missing or invalid, or an MCP-resource OAuth token
        was sent directly to the public REST API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticationRequiredResponseSchema'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    CurrentUserContextResponseSchema:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: object
          required:
            - user
            - subscription
            - authorization
            - api_key
          properties:
            user:
              type: object
              required:
                - id
                - username
                - display_name
                - avatar_url
                - onboarding_status
              properties:
                id:
                  type: string
                username:
                  type: string
                display_name:
                  type: string
                avatar_url:
                  type:
                    - string
                    - 'null'
                onboarding_status:
                  type: string
            subscription:
              type: object
              required:
                - current
                - latest_paid_entitlement
                - rewards
              properties:
                current:
                  type: object
                  required:
                    - plan
                    - status
                    - features
                    - limits
                  properties:
                    plan:
                      type: string
                    status:
                      type: string
                    features:
                      type: array
                      items:
                        type: string
                    limits:
                      type: object
                      required:
                        - connected_accounts
                        - custom_portfolios
                      properties:
                        connected_accounts:
                          $ref: >-
                            #/components/schemas/SubscriptionLimitProjectionSchema
                        custom_portfolios:
                          $ref: >-
                            #/components/schemas/SubscriptionLimitProjectionSchema
                latest_paid_entitlement:
                  type:
                    - object
                    - 'null'
                  required:
                    - plan
                    - status
                    - expires_at
                  properties:
                    plan:
                      type: string
                    status:
                      type: string
                    expires_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                rewards:
                  type: array
                  items:
                    type: object
                    required:
                      - program
                      - plan
                      - awarded_months
                    properties:
                      program:
                        type: string
                      plan:
                        type: string
                      awarded_months:
                        type: integer
            authorization:
              type: object
              required:
                - credential_type
                - scopes
              properties:
                credential_type:
                  type: string
                  enum:
                    - open_api_key
                    - mcp_oauth
                  description: >-
                    Public REST responses use `open_api_key`; `mcp_oauth` only
                    occurs on private server-bound delegation.
                scopes:
                  type: array
                  items:
                    type: string
            api_key:
              type:
                - object
                - 'null'
              description: >-
                Backward-compatible Open API key projection. It is null for a
                private `mcp_oauth` delegation actor.
              required:
                - scopes
              properties:
                scopes:
                  type: array
                  items:
                    type: string
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        data:
          user:
            id: usr_01J2K7M9N3
            username: u4q2m7x9c5k8d1p6z
            display_name: Alice
            avatar_url: null
            onboarding_status: configured_mcp
          subscription:
            current:
              plan: Free
              status: active
              features: []
              limits:
                connected_accounts:
                  used: 1
                  limit: 3
                  available: 1
                  plan_limited: 0
                  can_create: true
                custom_portfolios:
                  used: 1
                  limit: 3
                  available: 1
                  plan_limited: 0
                  can_create: true
            latest_paid_entitlement:
              plan: Plus
              status: expired
              expires_at: '2026-09-07T00:00:00Z'
            rewards:
              - program: marketing
                plan: Plus
                awarded_months: 1
          authorization:
            credential_type: open_api_key
            scopes:
              - account:read
              - account:write
              - portfolio:read
              - portfolio:write
              - order:read
              - trade:read
              - ledger:read
              - funding:read
              - marketdata:read
          api_key:
            scopes:
              - account:read
              - account:write
              - portfolio:read
              - portfolio:write
              - order:read
              - trade:read
              - ledger:read
              - funding:read
              - marketdata:read
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-07T08:00:01Z'
    AuthenticationRequiredResponseSchema:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              const: authentication_required
            message:
              type: string
            details:
              type:
                - object
                - 'null'
        meta:
          $ref: '#/components/schemas/Meta'
      example:
        error:
          code: authentication_required
          message: A valid Portfobit Open API key is required.
          details: null
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-09-13T08:00:00Z'
    ErrorEnvelope:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    SubscriptionLimitProjectionSchema:
      type: object
      required:
        - used
        - limit
        - available
        - plan_limited
        - can_create
      properties:
        used:
          type: integer
        limit:
          type: integer
        available:
          type: integer
        plan_limited:
          type: integer
        can_create:
          type: boolean
    Meta:
      type: object
      required:
        - request_id
        - generated_at
      properties:
        request_id:
          type: string
        generated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Portfobit Open API key

````

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