> ## 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.

# New Position

> Fires when a new position is opened on the account. Delivers the full order object in a `data` wrapper.

**Channel name:** `new_position`
**Required:** `account_id`




## AsyncAPI

````yaml asyncapi-spec/websockets.yaml new_position
id: new_position
title: New Position
description: >
  Fires when a new position is opened on the account. Delivers the full order
  object in a `data` wrapper.


  **Channel name:** `new_position`

  **Required:** `account_id`
servers:
  - id: production
    protocol: wss
    host: api.easierprop.com
    bindings: []
    variables: []
address: /ws
parameters: []
bindings: []
operations:
  - &ref_2
    id: subscribeNewPosition
    title: Subscribe new position
    description: Subscribe to new position events
    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: new_position
  - &ref_3
    id: receiveNewPosition
    title: Receive new position
    description: Receive new position events
    type: send
    messages:
      - &ref_5
        id: event
        contentType: application/json
        payload:
          - name: New Position
            description: Fired when a new position is opened
            type: object
            properties:
              - name: type
                type: string
                description: new_position
                required: false
              - name: account_id
                type: string
                required: false
              - name: data
                type: object
                description: Full order object for the new position
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: new_position
              x-parser-schema-id: <anonymous-schema-49>
            account_id:
              type: string
              format: uuid
              x-parser-schema-id: <anonymous-schema-50>
            data:
              type: object
              description: Full order object for the new position
              x-parser-schema-id: <anonymous-schema-51>
          x-parser-schema-id: <anonymous-schema-48>
        title: New Position
        description: Fired when a new position is opened
        example: No examples found
        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: new_position
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: []

````