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

# Query account

> Read an account with an active verification for your token.

## What this operation does

The API checks access to the login and queries MT5 data. A valid token is not enough if the binding is expired or revoked.

## Response fields

A successful response contains only `retcode` and `answer`. Within `answer`,
only `Login`, `Registration`, `LastAccess`, `Name`, `FirstName`,
`Balance`, and `Credit` are exposed. Fields missing from MT5 are omitted.

## Complete workflow

See [the step-by-step guide](/accounts) and [errors and their handling](/errors).

Playground values are examples. Replace the account, symbol, volume, and price with valid data for your integration.


## OpenAPI

````yaml openapi.json GET /api/v1/accounts/{login}
openapi: 3.1.0
info:
  title: MT5 API — Partner Portal
  description: >-
    Secure endpoints for account ownership verification, market data, and
    trading on previously verified accounts.
  version: 0.1.0
servers:
  - url: https://api-trading.vexprofx.com
    description: API Trading · Partners
security: []
paths:
  /api/v1/accounts/{login}:
    get:
      tags:
        - Accounts
      summary: Get a trading account
      operationId: account_api_v1_accounts__login__get
      parameters:
        - name: login
          in: path
          required: true
          schema:
            type: integer
            title: Login
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '422':
          description: Invalid request or incompatible closing parameters.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    type: string
              example:
                detail: Invalid request
      security:
        - HTTPBearer: []
components:
  schemas:
    AccountResponse:
      properties:
        retcode:
          type: string
          title: Retcode
        answer:
          $ref: '#/components/schemas/AccountData'
      additionalProperties: false
      type: object
      required:
        - retcode
        - answer
      title: AccountResponse
    AccountData:
      properties:
        Login:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Login
        Registration:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Registration
        LastAccess:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Lastaccess
        Name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        FirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        Balance:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: 'null'
          title: Balance
        Credit:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: 'null'
          title: Credit
      additionalProperties: false
      type: object
      title: AccountData
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        Send the provider-issued token in the Authorization header using Bearer
        authentication.

````

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