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

# Update account

> Partial update. Only include fields you want to change. Updating credentials disconnects the active session.



## OpenAPI

````yaml /openapi-spec/easierprop.yaml put /api/accounts/{id}
openapi: 3.0.3
info:
  title: Easier Prop REST API
  version: 2.1.0
  description: >
    MT5 Trading Infrastructure API. Manage multiple broker accounts, execute
    trades, stream market data, and administer API keys, usage snapshots, and
    billing terms.


    **Client API** endpoints live under `/api` and require an `X-API-Key`
    header.

    **Admin API** endpoints live under `/admin` and accept either a JWT
    `Authorization: Bearer <jwt>` (obtained via `/admin/login`) or the same
    `X-API-Key` header used by client endpoints.


    Admin user provisioning is read-only via REST: `GET /admin/admins` lists
    admins, but creation, update, and deletion are performed out-of-band (DB /
    ops tooling). Bootstrap a brand-new deployment with `POST /admin/seed` while
    no superadmin exists.
servers:
  - url: https://api.easierprop.com
    description: Production
security: []
tags:
  - name: Admin
    description: Authentication, API key management, and admin user CRUD
  - name: Accounts
    description: Register and manage MT5 broker accounts
  - name: Sessions
    description: Control broker connections
  - name: Trading
    description: Place, modify, and close orders
  - name: Account Info
    description: Balance, equity, margin, and statistics
  - name: Market Data
    description: Symbols, quotes, OHLC history, and trade sessions
  - name: Expert Advisors
    description: Upload, run, stop, and monitor MQL5 Expert Advisors on your accounts
  - name: Enhanced
    description: >-
      Portfolio, risk, performance, copy-trade, hedge, breakeven, close-all, lot
      calculator, and position details
  - name: Extended
    description: >-
      Change password, server timezone, symbol sessions, closed positions,
      mails, tick value, equity stats, and more
paths:
  /api/accounts/{id}:
    parameters:
      - $ref: '#/components/parameters/accountId'
    put:
      tags:
        - Accounts
      summary: Update account
      description: >-
        Partial update. Only include fields you want to change. Updating
        credentials disconnects the active session.
      operationId: updateAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
      responses:
        '200':
          description: Updated account
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Account'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ApiKeyHeader: []
components:
  parameters:
    accountId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Account ID
  schemas:
    UpdateAccountRequest:
      type: object
      properties:
        label:
          type: string
        broker_host:
          type: string
        broker_port:
          type: integer
        server_name:
          type: string
        mt5_login:
          type: integer
          format: int64
        password:
          type: string
        is_enabled:
          type: boolean
        auto_connect:
          type: boolean
        hardware_id:
          type: string
        proxy_host:
          type: string
        proxy_port:
          type: integer
        proxy_user:
          type: string
        proxy_password:
          type: string
    Account:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 70f60784-20f1-45ba-9a04-8e01c0b810c3
        label:
          type: string
          example: ICMarkets Demo
        broker_host:
          type: string
          example: mt5-demo.icmarkets.com
        broker_port:
          type: integer
          example: 443
        server_name:
          type: string
          nullable: true
          example: ICMarketsSC-Demo
        mt5_login:
          type: integer
          format: int64
          example: 51234567
        is_enabled:
          type: boolean
          example: true
        auto_connect:
          type: boolean
          example: false
        hardware_id:
          type: string
          nullable: true
        has_proxy:
          type: boolean
          example: false
        session_status:
          type: string
          enum:
            - connected
            - disconnected
          example: disconnected
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        ok:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: ACCOUNT_NOT_FOUND
            message:
              type: string
              example: Account not found
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Client API key (prefixed with `sk_`). On `/api/*` endpoints the key
        is scoped to its own MT5 accounts. On `/admin/*` endpoints the key
        identifies its **owning admin** and grants access to all of that
        admin's keys — so any of your `sk_` works to manage any of your
        other keys (cross-admin operations are rejected as `400 Key not
        found`).

````