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

# Get Active Positions

> Retrieves the user's active positions.



## OpenAPI

````yaml POST /account/positions/active
openapi: 3.0.1
info:
  title: Vanish Core API
  description: API endpoints for the Vanish Core service.
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://core-api-dev.vanish.trade
security:
  - ApiKeyAuth: []
paths:
  /account/positions/active:
    post:
      description: Retrieves the user's active positions.
      requestBody:
        description: Request payload for querying positions.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountInfoRequest'
        required: true
      responses:
        '200':
          description: A successful response containing the user's positions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserPosition'
        '401':
          description: >-
            Unauthorized. The request is missing a valid API key or the
            signature is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/responses/UnauthorizedError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AccountInfoRequest:
      required:
        - timestamp
        - user_address
        - signature
      type: object
      properties:
        timestamp:
          description: >-
            The current timestamp in milliseconds used for signature
            verification. Can be provided as a string or a number.
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        user_address:
          description: The Solana wallet address of the user.
          type: string
        signature:
          description: >-
            Signature of the 'By signing, I hereby agree to Vanish's Terms of
            Service and agree to be bound by them (docs.vanish.trade/legal/TOS)


            Details: read:{timestamp}' string signed using the user's wallet.
          type: string
    UserPosition:
      required:
        - token_address
        - sol_bought
        - usd_bought
        - tokens_bought
        - sol_sold
        - usd_sold
        - tokens_sold
        - tokens_remaining
        - token_decimals
      type: object
      properties:
        token_address:
          description: The token mint address associated with this position.
          type: string
        sol_bought:
          description: Total amount of SOL spent buying this token (in lamports).
          type: string
          format: int64
        usd_bought:
          description: >-
            Total USD value spent buying this token, based on SOL price at the
            time of transactions.
          type: number
          format: double
        tokens_bought:
          description: Total number of tokens purchased (in smallest units).
          type: string
          format: int64
        sol_sold:
          description: Total amount of SOL received from selling this token (in lamports).
          type: string
          format: int64
        usd_sold:
          description: >-
            Total USD value received from selling this token, based on SOL price
            at the time of transactions.
          type: number
          format: double
        tokens_sold:
          description: Total number of tokens sold (in smallest units).
          type: string
          format: int64
        tokens_remaining:
          description: Current remaining token balance for this token (in smallest units).
          type: string
          format: uint64
        token_decimals:
          description: Number of decimal places used by the token (e.g., 9 for SOL).
          type: integer
          format: uint8
        created_at:
          description: >-
            Timestamp of the first trade related to this token position (ISO
            8601 format).
          type: string
          format: date-time
          nullable: true
        last_updated_at:
          description: >-
            Timestamp of the latest trade related to this token position (ISO
            8601 format).
          type: string
          format: date-time
          nullable: true
    Error:
      type: string
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````