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

# Get account information

> Returns `mt5.account_info()` fields including live balance, equity, margin, leverage, and currency. The bot uses `currency == 'USC'` to auto-detect cent accounts and adjust profit calculations.



## OpenAPI

````yaml https://terminal-api.novosky.tech/roboforex/main/openapi.json get /account
openapi: 3.0.3
info:
  description: >-
    Self-hosted HTTP REST API bridging the NOVOSKY trading bot to a MetaTrader 5
    terminal. All bot-to-broker communication goes through this service.
    Authentication is required on all endpoints except `GET /ping`.
  title: MT5 HEADLESS
  version: 1.0.0
servers:
  - url: /
security:
  - bearerAuth: []
tags:
  - description: Health, latency, and error diagnostics
    name: System
  - description: MT5 terminal lifecycle and server time
    name: Terminal
  - description: Broker server time and UTC offset detection
    name: Time
  - description: Live balance, equity, and margin
    name: Account
  - description: Symbol specs, ticks, and OHLCV rates
    name: Symbols
  - description: Open position management
    name: Positions
  - description: Pending order placement and management
    name: Orders
  - description: Closed deals and historical orders
    name: History
paths:
  /account:
    get:
      tags:
        - Account
      summary: Get account information
      description: >-
        Returns `mt5.account_info()` fields including live balance, equity,
        margin, leverage, and currency. The bot uses `currency == 'USC'` to
        auto-detect cent accounts and adjust profit calculations.
      operationId: get_account
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
          description: Account info
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Missing or invalid Bearer token
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Account info unavailable
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: MT5 not initialized
components:
  schemas:
    AccountResponse:
      additionalProperties: true
      description: MT5 account_info() fields.
      properties:
        balance:
          description: Raw balance in account currency units.
          example: 500000
          type: number
        currency:
          description: Account currency. `USC` indicates a cent account.
          example: USC
          type: string
        equity:
          example: 499850
          type: number
        leverage:
          example: 500
          type: integer
        login:
          example: 123456789
          type: integer
        margin:
          example: 150
          type: number
        margin_free:
          example: 499700
          type: number
        margin_level:
          description: Margin level as a percentage.
          example: 333200
          type: number
        name:
          example: NOVOSKY Bot
          type: string
        profit:
          example: -150
          type: number
        server:
          example: RoboForex-Pro
          type: string
        trade_allowed:
          example: true
          type: boolean
        trade_expert:
          example: true
          type: boolean
      type: object
    ErrorResponse:
      additionalProperties: true
      description: MT5 error payload returned on non-2xx responses.
      properties:
        message:
          example: Invalid stops
          type: string
        retcode:
          description: MT5 error code (e.g. 10014 = invalid stops, 10018 = market closed).
          example: 10014
          type: integer
      type: object
  securitySchemes:
    bearerAuth:
      description: Set `API_TOKEN` in `.env` to match the token configured on the server.
      scheme: bearer
      type: http

````