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

# Heartbeat

> Periodic account health snapshot with balance, equity, margin, and position count.

**Channel name:** `heartbeat`
**Required:** `account_id`
**Default interval:** 5000ms




## AsyncAPI

````yaml asyncapi-spec/websockets.yaml heartbeat
id: heartbeat
title: Heartbeat
description: >
  Periodic account health snapshot with balance, equity, margin, and position
  count.


  **Channel name:** `heartbeat`

  **Required:** `account_id`

  **Default interval:** 5000ms
servers:
  - id: production
    protocol: wss
    host: api.easierprop.com
    bindings: []
    variables: []
address: /ws
parameters: []
bindings: []
operations:
  - &ref_2
    id: subscribeHeartbeat
    title: Subscribe heartbeat
    description: Subscribe to heartbeat
    type: receive
    messages:
      - &ref_4
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe
            description: Subscribe to a channel
            type: object
            properties:
              - name: type
                type: string
                description: subscribe
                required: true
              - name: channel
                type: string
                description: Channel to subscribe to
                enumValues:
                  - quotes
                  - orders
                  - profit
                  - heartbeat
                  - new_position
                  - ohlc
                  - order_book
                  - tick_value
                required: true
              - name: account_id
                type: string
                description: MT5 account ID
                required: true
              - name: symbols
                type: array
                description: >-
                  Required for quotes and order_book. For ohlc and tick_value,
                  the first symbol is used.
                examples: &ref_0
                  - - EURUSD
                    - GBPUSD
                required: false
                properties:
                  - name: item
                    type: string
                    required: false
              - name: interval_ms
                type: integer
                description: >-
                  Minimum milliseconds between updates. For ohlc, this value is
                  interpreted as timeframe in minutes.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - channel
            - account_id
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-2>
            channel:
              type: string
              enum:
                - quotes
                - orders
                - profit
                - heartbeat
                - new_position
                - ohlc
                - order_book
                - tick_value
              description: Channel to subscribe to
              x-parser-schema-id: <anonymous-schema-3>
            account_id:
              type: string
              format: uuid
              description: MT5 account ID
              x-parser-schema-id: <anonymous-schema-4>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-6>
              description: >-
                Required for quotes and order_book. For ohlc and tick_value, the
                first symbol is used.
              examples: *ref_0
              x-parser-schema-id: <anonymous-schema-5>
            interval_ms:
              type: integer
              description: >-
                Minimum milliseconds between updates. For ohlc, this value is
                interpreted as timeframe in minutes.
              default: 500
              x-parser-schema-id: <anonymous-schema-7>
          examples:
            - type: subscribe
              channel: quotes
              account_id: 70f60784-20f1-45ba-9a04-8e01c0b810c3
              symbols:
                - EURUSD
                - GBPUSD
              interval_ms: 500
          x-parser-schema-id: <anonymous-schema-1>
        title: Subscribe
        description: Subscribe to a channel
        example: |-
          {
            "type": "subscribe",
            "channel": "quotes",
            "account_id": "70f60784-20f1-45ba-9a04-8e01c0b810c3",
            "symbols": [
              "EURUSD",
              "GBPUSD"
            ],
            "interval_ms": 500
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_1
      - id: x-parser-unique-object-id
        value: heartbeat
  - &ref_3
    id: receiveHeartbeat
    title: Receive heartbeat
    description: Receive heartbeat events
    type: send
    messages:
      - &ref_5
        id: event
        contentType: application/json
        payload:
          - name: Heartbeat
            description: Periodic account health snapshot
            type: object
            properties:
              - name: type
                type: string
                description: heartbeat
                required: false
              - name: account_id
                type: string
                required: false
              - name: balance
                type: number
                required: false
              - name: equity
                type: number
                required: false
              - name: free_margin
                type: number
                required: false
              - name: margin
                type: number
                required: false
              - name: position_count
                type: integer
                required: false
              - name: profit
                type: number
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: heartbeat
              x-parser-schema-id: <anonymous-schema-40>
            account_id:
              type: string
              format: uuid
              x-parser-schema-id: <anonymous-schema-41>
            balance:
              type: number
              example: 10000
              x-parser-schema-id: <anonymous-schema-42>
            equity:
              type: number
              example: 10142.5
              x-parser-schema-id: <anonymous-schema-43>
            free_margin:
              type: number
              example: 9642.5
              x-parser-schema-id: <anonymous-schema-44>
            margin:
              type: number
              example: 500
              x-parser-schema-id: <anonymous-schema-45>
            position_count:
              type: integer
              example: 3
              x-parser-schema-id: <anonymous-schema-46>
            profit:
              type: number
              example: 142.5
              x-parser-schema-id: <anonymous-schema-47>
          x-parser-schema-id: <anonymous-schema-39>
        title: Heartbeat
        description: Periodic account health snapshot
        example: |-
          {
            "type": "<string>",
            "account_id": "<string>",
            "balance": 123,
            "equity": 123,
            "free_margin": 123,
            "margin": 123,
            "position_count": 123,
            "profit": 123
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: event
    bindings: []
    extensions: *ref_1
sendOperations:
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: heartbeat
securitySchemes:
  - id: ApiKeyAuth
    name: apiKey
    type: httpApiKey
    description: >-
      API key passed as query parameter:
      wss://api.easierprop.com/ws?apiKey=sk_your_key
    in: query
    extensions: []

````