openapi: 3.1.0
info:
  version: 2.3.0
  title: Trader's Room API
  description: |-
    The Trader's Room API provides a standards-based REST API that enables application developers to securely interact with the Trader's Room.

    Requests to the API follow a RESTful convention and use standard HTTP verbs against various resources to return JSON-formatted responses.

    Developers can call the API methods directly over HTTPS using a language of their choice, such as C, PHP, SwiftUI, and others.

    This document provides comprehensive information about the API that you can use to sign up and then sign in to the Trader's Room, retrieve real-time data about client trading accounts, transactions, and other entities, as well as make various actions, such as running verification procedures, creating new accounts, submitting tickets to HelpDesk, and many others.
security:
  - bearerAuth: []
tags:
  - name: 2FA
  - name: Applications
  - name: Auth
  - name: Auth history
  - name: Accounts
  - name: Announcements
  - name: Anti-phishing codes
  - name: Banners
  - name: Bonuses
  - name: Charts
  - name: Clients
  - name: Client settings
  - name: Confirmations
  - name: Countries
  - name: Currencies
  - name: Deposits
  - name: Static deposits
  - name: Deposits (deprecated)
  - name: Devices
  - name: Device tokens
  - name: Documents
  - name: Exchanges
  - name: Intercom
  - name: Key-value storage
  - name: Localizations
  - name: Menus
  - name: Mobile app settings
  - name: Passwords
  - name: Permissions
  - name: Photo
  - name: Platforms
  - name: Products
  - name: Profile
  - name: Client tests
  - name: Rates
  - name: Registration
  - name: Savings
  - name: System info
  - name: Support
  - name: Tickets
  - name: Transactions
  - name: Transfers
  - name: Verifications
  - name: Widgets
  - name: Withdrawals
  - name: Withdrawals (deprecated)
  - name: Withdrawal addresses
  - name: Withdrawal presets
  - name: Withdrawal templates
  - name: Zendesk
  - name: B2Copy
  - name: Notifications
  - name: Acuity Trading
  - name: Analytics
  - name: SideAuth

paths:
  /api/v2/my/2fa:
    get:
      tags:
        - 2FA
      summary: Get a list of 2FA methods
      description: Use this method to get a list of 2FA methods and check if they are enabled or disabled for a client.
      operationId: getClient2faCollection
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TFAProvider'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/2fa/{type}':
    get:
      tags:
        - 2FA
      summary: Get 2FA method details
      description: Use this method to check whether a specific 2FA method is enabled or disabled for a client.
      operationId: getClient2faResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: type
          in: path
          description: "The method used to deliver 2FA codes to a client. Possible values:\r\n\r\n- google — codes from the Google Authenticator app are used for confirmation\r\n\r\n- sms — codes are delivered to a client phone number via SMS"
          required: true
          schema:
            type: string
            enum:
              - google
              - sms
              - email
            example: google
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TFAProvider'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/2fa/{type}/disable/wizard':
    get:
      tags:
        - 2FA
      summary: Initialize the wizard for disabling 2FA
      description: 'To disable 2FA for a client, initialize the wizard for disabling 2FA, and then disable a selected 2FA method.'
      operationId: getClient2faDiasbleWizard
      parameters:
        - $ref: '#/components/parameters/language'
        - name: type
          in: path
          description: The 2FA method that you want to disable for a client.
          required: true
          schema:
            type: string
            enum:
              - google
              - sms
            example: google
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of disabling 2FA:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used for disabling 2FA is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that 2FA was successfully disabled"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    type: boolean
                    description: "- If *true*, 2FA was successfully disabled.\r\n\r\n - If *false*, confirmation with a verification code is required to disable 2FA."
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of disabling 2FA.
                  workflow:
                    type: string
                    description: "A string value indicating the next step of a procedure of disabling 2FA. Possible values:\r\n\r\n- 2fa_google – you selected to disable 2FA with Google Authenticator\r\n\r\n- 2fa_sms – you selected to disable 2FA with SMS\r\n\r\n Next, use the method to disable 2FA (POST/api/v2/my/2fa/wizard)."
                    example: 2fa_google
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/2fa/{type}/enable/wizard':
    get:
      tags:
        - 2FA
      summary: Initialize the wizard for enabling 2FA
      description: 'To enable 2FA for a client, initialize the wizard for enabling 2FA, and then enable a selected 2FA method.'
      operationId: getClient2faEnableWizard
      parameters:
        - $ref: '#/components/parameters/language'
        - name: type
          in: path
          description: The 2FA method that you want to enable for a client.
          required: true
          schema:
            type: string
            enum:
              - google
              - sms
            example: google
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of enabling 2FA:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used to enable 2FA is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that 2FA was successfully enabled"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    type: boolean
                    description: "- If *true*, 2FA was successfully enabled.\r\n\r\n - If *false*, confirmation with a verification code is required to enable 2FA."
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of enabling 2FA.
                  workflow:
                    type: string
                    description: "A string value indicating the next or final step of a procedure of enabling 2FA:\r\n\r\n- 2fa_google — at the next step, enable 2FA with Google Authenticator.\r\n\r\n- 2fa_sms_phone_create — at the next step, add a phone number for use with 2FA (refer to [Enable 2FA with SMS](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#method-front-enable-2fa-with-sms))."
                    example: 2fa_sms_phone_create
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/changes:
    get:
      tags:
        - 2FA
      summary: Get 2FA change history
      description: Use this method to obtain the log of 2FA-related changes made for a client.
      operationId: getClient2faCollectionChanges
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - time
              - provider
              - isEnabled
            default: time
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              isEnabled:
                type: boolean
                description: 'If *true*, 2FA is enabled for a client; otherwise, *false*.'
                example: true
              timeFrom:
                type: string
                description: The start date and time of a period for which you want to get a log of 2FA changes.
                example: '2022-12-01T07:23:59%2B00:00'
              timeTo:
                type: string
                description: The end date and time of a period for which you want to get a log of 2FA changes.
                example: '2022-12-01T07:23:59%2B00:00'
              provider:
                type: string
                description: "The method used to deliver 2FA codes to a client. Possible values:\r\n\r\n- google — codes from the Google Authenticator app are used for confirmation\r\n\r\n- sms — codes are delivered to a client phone number via SMS"
                example: sms
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TFAHistoryItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/2fa/changes/{changeId}':
    get:
      tags:
        - 2FA
      summary: Get 2FA change details
      description: Use this method to get detailed information about a specific 2FA change record.
      operationId: getClient2faHistoryItemResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: changeId
          in: path
          description: The identifier of a change record.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TFAHistoryItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/wizard:
    post:
      tags:
        - 2FA
      summary: Enable or disable 2FA
      description: "Use this method to enable or disable 2FA for a client after a corresponding wizard for enabling or disabling 2FA has already been initialized.\r\n\r\nFor details on how to enable 2FA with Google Authenticator, refer to [Enable 2FA with Google Authenticator](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#enable-2fa-with-google-authenticator).\r\n\r\nFor details on how to enable 2FA with SMS codes, refer to [Enable 2FA with SMS](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#enable-2fa-with-sms).\r\n\r\nFor details on how to disable 2FA, refer to [Disable 2FA](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#disable-2fa)."
      operationId: 2faWizard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) obtained after initializing the wizard for enabling 2FA or disabling 2FA.
                action:
                  type:
                    - string
                    - 'null'
                  description: Specify *code* to indicate that a verification code is required to enable 2FA or disable it.
                  example: code
                code:
                  type:
                    - string
                    - 'null'
                  description: The verification code from the Google Authenticator app or delivered to a client phone number via SMS (depending on which 2FA method you want to enable or disable).
                  example: '123456'
                phone:
                  type:
                    - string
                    - 'null'
                  description: The client phone number. Specify this parameter only when enabling 2FA with SMS codes for a client.
                  example: '+995500400300'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of enabling or disabling 2FA:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used for enabling or disabling 2FA is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that 2FA was successfully enabled"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: The details about a verification code required to confirm a specified phone number.
                    properties:
                      phone:
                        type: string
                        example: '+995500400300'
                      confirmation:
                        type: object
                        properties:
                          status:
                            type: integer
                            example: 0
                          entity_id:
                            type: integer
                            example: 1
                          entity_type:
                            type: string
                            example: phone
                          recipient:
                            type: object
                            properties:
                              class:
                                type: string
                                example: B2B\TCA\Confirmations\Recipients\PhoneRecipient
                              phone:
                                type: string
                                example: '+995500400300'
                              template:
                                type: string
                                example: default
                              type:
                                type: integer
                                example: 1
                              method:
                                type: string
                                example: phone
                          uuid:
                            $ref: '#/components/schemas/uuid'
                          updated_at:
                            $ref: '#/components/schemas/dateTime'
                          created_at:
                            $ref: '#/components/schemas/dateTime'
                          id:
                            type: integer
                            example: 1
                          sent:
                            type: integer
                            enum:
                              - 1
                              - 0
                          expired_at:
                            $ref: '#/components/schemas/dateTime'
                          sent_at:
                            $ref: '#/components/schemas/dateTime'
                          entity:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              phone:
                                type: string
                                example: '+995500400300'
                              type:
                                type: string
                                example: mobile
                              confirm:
                                type: boolean
                                example: true
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, 2FA was successfully enabled or disabled; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of enabling or disabling 2FA.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of enabling or disabling 2FA.
                    example: phone
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/google:
    post:
      tags:
        - Auth
      summary: Use Google Authenticator to safely sign in
      description: 'After initializing the Sing In wizard, use this method to authenticate a client in the Trader''s Room using Google Authenticator. This method can be used only if 2FA with Google Authenticator is enabled for the client.'
      operationId: 2faGoogle
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a client authentication session.
                code:
                  type: string
                  description: The Google Authenticator code that is used to obtain the access token.
                  example: '123456'
              required:
                - uuid
                - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication process:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that user authentication succeeded"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The access token and refresh token data:'
                    properties:
                      accessToken:
                        type: object
                        properties:
                          token:
                            type: string
                            description: The access token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                      refreshToken:
                        type:
                          - object
                          - 'null'
                        properties:
                          token:
                            type: string
                            description: The refresh token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of an authentication procedure.
                    example: login
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/sms:
    post:
      tags:
        - Auth
      summary: Use an SMS code to safely sign in
      description: 'After initializing the Sign In wizard, use this method to authenticate a client in the Trader''s Room using a code sent to the client phone number via SMS. This method can be used only if 2FA with SMS is enabled for the client.'
      operationId: 2faSms
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a client authentication session.
                code:
                  type: string
                  description: The SMS code sent to a client phone number.
                  example: '123456'
              required:
                - uuid
                - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication process:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that user authentication succeeded"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The access token and refresh token data:'
                    properties:
                      accessToken:
                        type: object
                        properties:
                          token:
                            type: string
                            description: The access token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                      refreshToken:
                        type:
                          - object
                          - 'null'
                        properties:
                          token:
                            type: string
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of an authentication procedure.
                    example: login
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/email:
    post:
      tags:
        - Auth
      summary: Use a code from email for confirmation
      description: 'Use this method to send a verification code required to confirm certain procedures to a client email address (for example, you can do it for password change procedures).'
      operationId: '2faEmail'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to an initiated procedure.
                code:
                  type: string
                  description: The code sent to a client email address.
                  example: '123456'
              required:
                - uuid
                - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an initiated procedure:\r\n\r\n- HTTP code 200 for an intermediary step after which the next procedure step should be completed\r\n\r\n- HTTP code 202 for the final step signaling that an initiated procedure was successfully competed"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    properties:
                      accessToken:
                        type: object
                        properties:
                          token:
                            type: string
                            example: 'null'
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                      refreshToken:
                        type:
                          - object
                          - 'null'
                        properties:
                          token:
                            type: string
                            example: 'null'
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                  done:
                    type: boolean
                    description: 'If *true*, an initiate procedure has succeeded; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to an initiated procedure.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of an initiated procedure.
                    example: password
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/2fa/challenge:
    get:
      tags:
        - Confirmations
      summary: Initiate a 2FA procedure for an authorized client
      description: Use this method to initiate a 2FA procedure for an authorized client.
      operationId: initTFAChain
      parameters:
        - name: businessProcess
          in: query
          description: The type of an operation for which confirmation with a 2FA code is required (such as *changePassword*).
          required: true
          example: changePassword
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The confirmation token required to complete the initiated 2FA procedure.
                    example: b2fcf999-2b0b-451d-9888-094a79117aa5
                  provider:
                    const: email
                    description: The method used to deliver a 2FA code. Always *email*.
                    example: email
                  expiresAt:
                    $ref: '#/components/schemas/dateTime'
                    description: The date and time when the confirmation token and 2FA code are due to expire.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  post:
    tags:
      - Confirmations
    summary: Complete the initiated 2FA procedure
    description: Use this method to complete the initiated 2FA procedure and obtain the success token required for performing certain operations (such as a password change operation or password recovery operation).
    operationId: ConfirmTFAChainStep
    requestBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              token:
                type: string
                description: The confirmation token obtained after a 2FA procedure has been initiated for an authorized or unauthorized client.
                example: b2fcf999-2b0b-451d-9888-094a79117aa5
              code:
                type: string
                description: The 2FA code delivered to a client email address.
                example: '64505'
            required:
              - token
              - code
    responses:
      '200':
        description: OK
        content:
          application/json:
            schema:
              type: object
              properties:
                successToken:
                  type: string
                  description: The success token.
                  example: 3929dfe8-161a-428c-9c71-fde728fe7285
                expiresAt:
                  $ref: '#/components/schemas/dateTime'
                  description: The date and time when the success token is due to expire.
              required:
                - successToken
                - expiresAt
      '401':
        $ref: '#/components/responses/Unauthorized'
      '429':
        $ref: '#/components/responses/TooManyRequests'
      '503':
        $ref: '#/components/responses/ServiceUnavailable'
    security:
      - bearerAuth: []
  /api/v2/my/2fa/unauthorized/challenge:
    post:
      tags:
        - Confirmations
      summary: Initiate a 2FA procedure for an unauthorized client
      description: Use this method to initiate a 2FA procedure for a client who isn't signed in to the Trader's Room.
      operationId: initUnauthorizedTFAChain
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                businessProcess:
                  type: string
                  description: The type of an operation for which confirmation with a 2FA code is required (such as *restorePassword*).
                  example: restorePassword
                email:
                  type: string
                  description: The client email address.
                  example: username@example.com
              required:
                - businessProcess
                - email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The confirmation token required to complete the initiated 2FA procedure.
                    example: b2fcf999-2b0b-451d-9888-094a79117aa5
                  provider:
                    const: email
                    description: The method used to deliver a 2FA code. Always *email*.
                    example: email
                  expiresAt:
                    $ref: '#/components/schemas/dateTime'
                    description: The date and time when the confirmation token and 2FA code are due to expire.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/accounts:
    get:
      tags:
        - Accounts
      summary: Get a list of accounts
      description: Use this method to obtain a list of accounts created for a client.
      operationId: getAccountCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              alphabeticCurrencyCode:
                type: string
                description: The alphabetic code of a currency in which a client account is denominated.
                minLength: 1
                maxLength: 255
                example: BTC
              permissions:
                $ref: '#/components/schemas/Permission'
              platformId:
                type: integer
                description: The identifier of a platform on which a client account is opened.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
      security:
        - bearerAuth: []
    post:
      tags:
        - Accounts
      summary: Create a new account
      description: 'Use this method to create new wallets as well as MT4, MT5, and cTrader trading accounts for a client.'
      operationId: createAccountResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                productCurrencyId:
                  type: integer
                  description: "The identifier of a product currency.\r\n\r\nThe product currency is a specific currency added for a product based on which an account is to be created. A new wallet or trading account will be denominated in a selected currency and created based on the product to which the currency refers.\r\n\r\nTo obtain product currency identifiers, use the method to get a list of product currencies (GET/api/v2/my/products/currencies)."
                  example: 1
                leverage:
                  type: number
                  nullable: true
                  description: "*Applicable only for trading accounts and platforms that support leverage (MT4, MT5, CTrader, MatchTrader).*\r\n\r\nThe leverage ratio assigned to a trading account."
                  example: 200
                startAmount:
                  type: number
                  description: "*Applicable only for demo accounts.*\r\n\r\nThe initial amount that is automatically deposited to a newly created demo account."
                  example: 100
                options:
                  type: object
              required:
                - productCurrencyId
                - startAmount
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '202':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}':
    get:
      tags:
        - Accounts
      summary: Get account details
      description: Use this method to obtain detailed information about a specific account.
      operationId: getAccountResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: accountId
          in: path
          description: The account identifier.
          example: '1'
          required: true
          schema:
            type: string

      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    put:
      tags:
        - Accounts
      summary: Update an account
      description: 'Use this method to change the account name displayed in the Trader''s Room, as well as mark or unmark an account as favorite.'
      operationId: putAccountResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: accountId
          in: path
          description: The account identifier
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                caption:
                  type: string
                  description: The account name displayed in the Trader's Room.
                  example: Bitcoin
                favorite:
                  type:
                    - boolean
                    - 'null'
                  description: 'If *true*, an account is marked as favorite; otherwise, *false*.'
                  example: true
              required:
                - caption
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    patch:
      tags:
        - Accounts
      summary: Update an account
      description: 'Use this method to change the account name displayed in the Trader''s Room, as well as mark or unmark an account as favorite.'
      operationId: patchAccountResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: accountId
          in: path
          description: The account identifier
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: object
              properties:
                caption:
                  type: string
                  description: The account name displayed in the Trader's Room.
                  example: Bitcoin
                favorite:
                  type:
                    - boolean
                    - 'null'
                  description: 'If *true*, an account is marked as favorite; otherwise, *false*.'
                  example: true
              required:
                - caption
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/add-demo-funds':
    post:
      tags:
        - Accounts
      summary: Add demo funds to a demo account
      description: |-
        Use this method to manually add demo funds to a demo trading account.

        If the account's `productCurrency.startAmounts` list is configured, the amount must match one of its values. If the list is empty, any positive amount up to 1000 (in the account currency) is accepted.
      operationId: postAddDemoFunds
      parameters:
        - $ref: '#/components/parameters/language'
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  description: The deposit amount. If the account's `productCurrency.startAmounts` list is configured, must match one of its values; otherwise any positive amount up to 1000 (in the account currency) is accepted.
                  example: 100
              required:
                - amount
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/archive':
    post:
      tags:
        - Accounts
      summary: Archive an account
      description: |-
        Use this method to archive MT4, MT5, and cTrader trading accounts. Only the accounts with zero balances can be archived.

        If there are available funds on an account, they are transferred to a fallback account before archiving. The fallback account is an account of the *personal* type, denominated in the same currency as an archived account.
      operationId: postArchiveAccount
      parameters:
        - $ref: '#/components/parameters/language'
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fallbackId:
                  type: integer
                  description: The identifier of an account to which funds from an archived account are to be transferred.
                  example: 2
              required:
                - fallbackId
      responses:
        '200':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password/wizard':
    get:
      tags:
        - Accounts
      summary: Initialize the wizard for changing a trading account password
      description: |-
        Use this method to initialize the wizard for changing a trading account password.

        Passwords can be changed for MT4, MT5, and cTrader trading accounts.
      operationId: getAccountPasswordChangeWizard
      parameters:
        - name: passwordType
          in: query
          description: "The type of a password that you want to change for a trading account. Possible values:\r\n\r\n- investor — the investor (read-only) password providing a limited access to a trading account\r\n\r\n- main — the main password providing the full access to a trading account"
          schema:
            type: string
            enum:
              - main
              - investor
            example: main
        - name: accountId
          in: path
          description: The account identifier.
          required: true
          example: 1
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    const: 200
                    description: "An HTTP code specifying the current step of a procedure of changing a trading account password:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used to change a trading account password is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that a trading account password was successfully changed"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The details about a verification code required to confirm a password change for a trading account:'
                    properties:
                      status:
                        type: integer
                        example: 0
                      sent:
                        type: integer
                        example: 1
                      expiredAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a verification code sent to a client email address is due to expire.
                      sentAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a verification code was sent to a client email address.
                      recipient:
                        type: object
                        description: The details about a verification code recipient.
                        properties:
                          template:
                            type: string
                            example: Withdraw_whitelistConfirm
                          email:
                            type: string
                            example: username@example.com
                          name:
                            type: string
                            example: Nick
                          url:
                            example: url/e57d34c6-4e64-4998-909b-b649294fbd04/44353
                          method:
                            type: string
                            example: email
                          class:
                            type: string
                            example: B2B\TCA\Confirmations\Recipients\PhoneRecipient
                          data:
                            type: object
                  done:
                    type: boolean
                    description: "If *true*, a trading account password was successfully changed; otherwise, *false*.\r\n\r\nAlways *false* at this step, indicating that confirmation with a verification code is required to change a trading account password."
                    default: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of changing a trading account password.
                    example: login
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password/confirm':
    post:
      tags:
        - Accounts
      summary: Confirm a procedure of changing a trading account password
      description: 'Confirm the current step of a procedure of changing a trading account password with a verification code. The same method is used to confirm a two-factor authentication (2FA) code (when 2FA is enabled) and a verification code delivered to a client email address — the wizard routes the code to the step it is currently on.'
      operationId: confirmAccountChangePassword
      parameters:
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: integer
                  description: The verification code delivered to a client email address.
                  example: 801765
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
              required:
                - code
                - uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step of a procedure of changing a trading account password:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used to change a trading account password is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that a trading account password was successfully changed"
                    example: 200
                  data:
                    type: object
                    example: {}
                  done:
                    type: boolean
                    description: "If *true*, a trading account password was successfully changed; otherwise, *false*.\r\n\r\nAlways *false* at this step, indicating that confirmation has succeeded, and a trading account password can be changed to a new one."
                    default: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                  workflow:
                    type: string
                    description: A string value indicating the next or final stet of a procedure of changing a trading account password.
                    example: account_password_change
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password':
    put:
      tags:
        - Accounts
      summary: Change a trading account password
      description: 'After confirming a procedure of changing a trading account password with a verification code, specify a new password for the trading account.'
      operationId: accountChangePassword
      parameters:
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: A new password specified for a trading account.
                passwordConfirmation:
                  type: string
                  description: The repeatedly specified new password.
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
              required:
                - password
                - passwordConfirmation
                - uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step of a procedure of changing a trading account password:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a form used to change a trading account password is displayed to a client\r\n- HTTP code 202 for a final wizard step signaling that a trading account password was successfully changed"
                    example: 202
                  data:
                    type: object
                    example: {}
                  done:
                    type: boolean
                    description: 'If *true*, a trading account password was successfully changed; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of changing a trading account password.
                    example: terminated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password/resend':
    post:
      tags:
        - Accounts
      summary: Resend the verification code for changing a trading account password
      description: 'After initializing the wizard for changing a trading account password, resend the verification code delivered to a client email address (for example, if the previous code was not received or has expired).'
      operationId: resendAccountChangePasswordCode
      parameters:
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
              required:
                - uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: An HTTP code specifying the current step of a procedure of changing a trading account password.
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The details about a verification code required to confirm a password change for a trading account.'
                    properties:
                      status:
                        type: integer
                        example: 0
                      sent:
                        type: integer
                        example: 1
                      expiredAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a verification code sent to a client email address is due to expire.
                      sentAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a verification code was sent to a client email address.
                      recipient:
                        type: object
                        description: The details about a verification code recipient.
                  done:
                    type: boolean
                    description: "If *true*, a trading account password was successfully changed; otherwise, *false*.\r\n\r\nAlways *false* at this step."
                    default: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of changing a trading account password.
                    example: email
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password/2fa':
    post:
      tags:
        - Accounts
      summary: Select a two-factor authentication method when changing a trading account password
      description: |-
        When a client has more than one two-factor authentication (2FA) method enabled, the wizard for changing a trading account password requires selecting a 2FA method before proceeding.

        Use this method to select a 2FA method. If a client has a single 2FA method enabled, it is selected automatically during wizard initialization, and this step is not required.
      operationId: pickAccountChangePasswordTfa
      parameters:
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                type:
                  type: string
                  description: A two-factor authentication method to use to confirm a password change for a trading account.
                  example: sms
              required:
                - uuid
                - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: An HTTP code specifying the current step of a procedure of changing a trading account password.
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The details about the selected two-factor authentication method required to confirm a password change for a trading account.'
                  done:
                    type: boolean
                    description: "If *true*, a trading account password was successfully changed; otherwise, *false*.\r\n\r\nAlways *false* at this step."
                    default: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of changing a trading account password.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of changing a trading account password.
                    example: 2fa_sms_phone_auth
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/password/wizard/status':
    get:
      tags:
        - Accounts
      summary: Check whether the trading account password change wizard is enabled
      description: 'Use this method to check whether the wizard for changing a trading account password is enabled. If the wizard is disabled, a trading account password cannot be changed through the wizard.'
      operationId: getAccountPasswordChangeWizardStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                    description: 'If *true*, the wizard for changing a trading account password is enabled; otherwise, *false*.'
                    example: true
                required:
                  - enabled
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/password/restore':
    post:
      tags:
        - Accounts
      summary: Restore a trading account password
      description: 'Use this method to restore a trading account password if it was forgotten by a client. Passwords can be restored for MT4, MT5, and cTrader trading accounts.'
      operationId: restoreAccountPassword
      parameters:
        - name: accountId
          in: path
          description: The account identifier.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                passwordType:
                  type: string
                  enum:
                    - main
                    - investor
                  description: "The type of a password that you want to restore for a trading account. Possible values:\r\n\r\n- investor — the investor (read-only) password providing a limited access to a trading account\r\n\r\n- main — the main password providing the full access to a trading account"
                  example: main
              required:
                - passwordType
      responses:
        '202':
          description: The email containing a new password for a specified trading account has been sent to a client who owns the account.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/accounts/total-balance:
    post:
      tags:
        - Accounts
      summary: Calculate total balance across all accounts
      description: |-
        Use this method to obtain aggregated balance information across all client accounts converted to one or more target currencies.

        This endpoint calculates the total available balance, current balance, and equity for all active accounts, grouped by account number and converted to the requested currencies using current exchange rates.

        **Key features:**
        - Supports multiple target currencies in a single request
        - Groups accounts by account number
        - Returns null for values when exchange rate is unavailable
        - Only includes active (non-archived) accounts
      operationId: calculateTotalBalance
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                currencies:
                  type: array
                  description: |-
                    An array of alphabetic currency codes to which account balances should be converted.

                    The response will contain calculations for each specified currency.
                  items:
                    type: string
                    minLength: 1
                    maxLength: 10
                    example: USD
                  minItems: 1
                  example:
                    - USD
                    - EUR
                filter:
                  type: object
                  description: Optional filters to narrow down which accounts to include in calculations.
                  properties:
                    accountTypes:
                      type: array
                      description: |-
                        Filter accounts by type. If not specified, all account types are included.

                        Possible values:
                        - personal — wallet accounts
                        - trade — trading accounts (MT4, MT5, cTrader, etc.)
                        - demo — demo trading accounts
                        - partner — partner accounts
                        - liquidity — liquidity accounts
                        - exchange — exchange accounts
                        - external — external accounts
                        - system — system accounts
                      items:
                        type: string
                        enum:
                          - personal
                          - trade
                          - demo
                          - partner
                          - liquidity
                          - exchange
                          - external
                          - system
                      example:
                        - trade
                        - personal
                    platformTypes:
                      type: array
                      description: |-
                        Filter accounts by platform type. If not specified, accounts from all platforms are included.
                      items:
                        type: string
                        enum:
                          - personal
                          - MatchTrader
                          - MetaTrader4
                          - MetaTrader5
                          - cTrader
                          - DXtrade
                          - B2TraderBrokeragePlatform
                          - OneZero
                          - PrimeXM
                          - Centroid
                          - TradeLocker
                      example:
                        - MetaTrader5
                        - cTrader
              required:
                - currencies
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalBalanceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/analytics/orders':
    get:
      tags:
        - Analytics
      summary: Get trading orders for an account
      description: |-
        Returns a paginated list of pending orders for the specified trading account.
        Supports filtering by date range and order side, sorting, and pagination.
      operationId: getAccountAnalyticsOrders
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/accountIdPath'
        - $ref: '#/components/parameters/analyticsLimit'
        - $ref: '#/components/parameters/analyticsOffset'
        - $ref: '#/components/parameters/analyticsDateFrom'
        - $ref: '#/components/parameters/analyticsDateTo'
        - name: sortBy
          in: query
          schema:
            type: string
            enum: [openTime, symbol]
            default: openTime
        - name: sortDirection
          in: query
          schema:
            type: string
            enum: [asc, desc]
            default: desc
        - name: filters[side]
          in: query
          schema:
            type: string
            enum: [BUY_LIMIT, SELL_LIMIT, BUY_STOP, SELL_STOP]
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of items without any filters
                      filtered:
                        type: integer
                        description: Count of items matching the filter criteria
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/AnalyticsOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/analytics/positions':
    get:
      tags:
        - Analytics
      summary: Get trading positions for an account
      description: |-
        Returns a paginated list of open positions for the specified trading account.
        Supports filtering by date range and trade side, sorting, and pagination.
      operationId: getAccountAnalyticsPositions
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/accountIdPath'
        - $ref: '#/components/parameters/analyticsLimit'
        - $ref: '#/components/parameters/analyticsOffset'
        - $ref: '#/components/parameters/analyticsDateFrom'
        - $ref: '#/components/parameters/analyticsDateTo'
        - name: sortBy
          in: query
          schema:
            type: string
            enum: [openTime, symbol]
            default: time
        - name: sortDirection
          in: query
          schema:
            type: string
            enum: [asc, desc]
            default: desc
        - name: filters[side]
          in: query
          schema:
            type: string
            enum: [BUY, SELL]
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of items without any filters
                      filtered:
                        type: integer
                        description: Count of items matching the filter criteria
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/AnalyticsPosition'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/accounts/{accountId}/analytics/deals':
    get:
      tags:
        - Analytics
      summary: Get trading deals for an account
      description: |-
        Returns a paginated list of deals (closed trades) for the specified trading account.
        Supports filtering by date range and trade side, sorting, and pagination.
      operationId: getAccountAnalyticsDeals
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/accountIdPath'
        - $ref: '#/components/parameters/analyticsLimit'
        - $ref: '#/components/parameters/analyticsOffset'
        - $ref: '#/components/parameters/analyticsDateFrom'
        - $ref: '#/components/parameters/analyticsDateTo'
        - name: sortBy
          in: query
          schema:
            type: string
            enum: [openTime, closeTime, symbol]
            default: closeTime
        - name: sortDirection
          in: query
          schema:
            type: string
            enum: [asc, desc]
            default: desc
        - name: filters[side]
          in: query
          schema:
            type: string
            enum: [BUY, SELL]
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of items without any filters
                      filtered:
                        type: integer
                        description: Count of items matching the filter criteria
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/AnalyticsDeal'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/announcements:
    get:
      tags:
        - Announcements
      summary: Get a list of unread announcements
      description: Use this method to obtain a list of unread announcements displayed to a client in the Trader's Room.
      operationId: getAnnouncementsCollection
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Announcement'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/announcements/mark-read:
    post:
      tags:
        - Announcements
      summary: Mark all announcements as read
      description: Use this method to mark all client announcements as read.
      operationId: readAllAnnouncements
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
      servers:
        - url: /api/v2/my
  '/api/v2/my/announcements/{announcementId}':
    get:
      tags:
        - Announcements
      summary: Get announcement details
      description: Use this method to obtain detailed information about a specific announcement. This method doesn't mark a requested announcement as read.
      operationId: getAnnouncementResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: announcementId
          in: path
          description: The announcement identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Announcement'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/announcements/{announcementId}/mark-read':
    post:
      tags:
        - Announcements
      summary: Mark an announcement as read
      description: Use this method to mark a selected announcement as read.
      operationId: markAnnouncementAsRead
      parameters:
        - $ref: '#/components/parameters/language'
        - name: announcementId
          in: path
          description: The announcement identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/anti-phishing-code:
    get:
      tags:
        - Anti-phishing codes
      summary: Get an anti-phishing code
      description: Use this method to get the anti-phishing code that is set for a client.
      operationId: getAntiPushingCodeResource
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type:
                      - string
                      - 'null'
                    description: The masked anti-phishing code.
                    example: 2******1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Anti-phishing codes
      summary: Set an anti-phishing code
      description: Use this method to set an anti-phishing code for a client.
      operationId: createAntiPushingCodeResource
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: The anti-phishing code.
                  example: '111111'
              required:
                - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step in a procedure of setting an anti-phishing code:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the form used to set an anti-phishing code is displayed to a client\r\n\r\n- HTTP code 202 for a final step signaling that an anti-phishing code was successfully set"
                    example: 200
                  data:
                    type:
                      - array
                      - 'null'
                    items:
                      type: object
                      properties:
                        status:
                          type: integer
                          example: 0
                        sent:
                          type: integer
                          example: 1
                        expiredAt:
                          $ref: '#/components/schemas/dateTime'
                        sentAt:
                          $ref: '#/components/schemas/dateTime'
                        recipient:
                          type: object
                          properties:
                            class:
                              type: string
                              example: B2B\TCA\Confirmations\Recipients\PhoneRecipient
                            phone:
                              type: string
                              example: '+995500400300'
                            template:
                              type: string
                              example: default
                            type:
                              type: integer
                              example: 1
                            method:
                              type: string
                              example: phone
                  done:
                    type: boolean
                    description: 'If *true*, an anti-phishing code was successfully set; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of setting an anti-phishing code for a client.
                  workflow:
                    type: string
                    description: "A string value indicating the next or final step of a procedure of setting an anti-phishing code.\r\n\r\n- 2fa_google_auth — confirmation with a code from the Google Authenticator app is required\r\n\r\n- 2fa_sms_auth — confirmation with an SMS code is required\r\n\r\n- If both 2FA methods are enabled for a client, choose one of them to confirm setting an anti-phishing code."
                    example: 2fa_sms
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    delete:
      tags:
        - Anti-phishing codes
      summary: Delete an anti-phishing code
      description: Use this method to remove the anti-phishing code that was previously set for a client.
      operationId: deleteAntiPushingCodeResource
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of removing an anti-phishing code:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the form used to remove an anti-phishing code is displayed to a client\r\n\r\n- HTTP code 202 for a final step signaling that an anti-phishing code was successfully removed"
                    example: 200
                  data:
                    type:
                      - array
                      - 'null'
                    items:
                      type: object
                      properties:
                        status:
                          type: integer
                          example: 0
                        sent:
                          type: integer
                          example: 1
                        expiredAt:
                          $ref: '#/components/schemas/dateTime'
                        sentAt:
                          $ref: '#/components/schemas/dateTime'
                        recipient:
                          type: object
                          properties:
                            class:
                              type: string
                              example: B2B\TCA\Confirmations\Recipients\PhoneRecipient
                            phone:
                              type: string
                              example: '+995500400300'
                            template:
                              type: string
                              example: default
                            type:
                              type: integer
                              example: 1
                            method:
                              type: string
                              example: phone
                  done:
                    type: boolean
                    description: 'If *true*, an anti-phishing code was successfully removed; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of removing an anti-phishing code.
                  workflow:
                    type: string
                    description: "A string value indicating the next or final step of a procedure of removing an anti-phishing code.\r\n\r\n- 2fa_google_auth — confirmation with a code from the Google Authenticator app is required\r\n\r\n- 2fa_sms_auth — confirmation with an SMS code is required\r\n\r\n- If both 2FA methods are enabled for a client, choose one of them to confirm deletion of an anti-phishing code."
                    example: 2fa_sms
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/anti-phishing-code/tfa:
    post:
      tags:
        - Anti-phishing codes
      summary: Choose a 2FA method
      description: Use this method to specify which 2FA method (the Google Authenticator app or SMS) should be used to confirm setting or removing an anti-phishing code if both 2FA methods are enabled for a client.
      operationId: antiPhishing2fa
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a procedure of setting or removing an anti-fishing code.
                type:
                  type: string
                  description: "The 2FA method that you want to use. Possible values:\r\n\r\n- google — a code from the Google Authenticator app\r\n\r\n- sms — a code sent to a client phone number via SMS"
                  example: sms
              required:
                - uuid
                - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of setting or removing an anti-phishing code:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the form used to set or remove an anti-phishing code is displayed to a client\r\n\r\n- HTTP code 202 for a final step signaling that an anti-phishing code was successfully set or removed"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    type: boolean
                    description: 'If *true*, an anti-phishing code was successfully set or removed; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of setting or removing an anti-phishing code.
                  workflow:
                    type: string
                    description: "A string value indicating the next step of a procedure of setting or removing an anti-phishing code. Possible values:\r\n\r\n- 2fa_google_auth — confirmation with a code from the Google Authenticator app is required\r\n\r\n- 2fa_sms_auth — confirmation with an SMS code is required\r\n\r\n- 2fa_sms_phone_create — a client phone number must be added for confirmations via SMS (refer to [Enable 2FA with SMS](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#method-front-enable-2fa-with-sms))"
                    example: 2fa_sms_phone_create
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/anti-phishing-code/confirm:
    post:
      tags:
        - Anti-phishing codes
      summary: Confirm setting or removing an anti-phishing code
      description: Use this method to confirm a procedure of setting or removing an anti-phishing code by using the 2FA method that was previously chosen.
      operationId: confirmAntiPushingCodeResource
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: integer
                  description: The code from the Google Authenticator app or SMS.
                  example: 213690
              required:
                - code
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step of a procedure of setting or removing an anti-phishing code:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the form used to set or remove an anti-phishing code is displayed to a client\r\n\r\n- HTTP code 202 for a final step signaling that an anti-phishing code was successfully set or removed"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    type: boolean
                    description: 'If *true*, an anti-phishing code was successfully set or removed; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of setting or removing an anti-phishing code.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of setting or removing an anti-phishing code.
                    example: terminated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/authorizations:
    get:
      tags:
        - Auth history
      summary: Get authorization history
      description: Use this method to obtain a log of client attempts to sign in to the Trader's Room.
      operationId: getClientAuthorizationsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: authDateTime
            default: authDateTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              ip:
                type: string
                description: The IP address from which a client signed in to the Trader's Room.
              status:
                type: string
                enum:
                  - success
                  - failure
                description: The result of a sign-in attempt.
                example: success
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AuthorizationHistory'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/authorizations/{authorizationId}':
    get:
      tags:
        - Auth history
      summary: Get authorization details
      description: Use this method to obtain detailed information about a specific sign-in attempt.
      operationId: getAuthorizationHistoryRecord
      parameters:
        - $ref: '#/components/parameters/language'
        - name: authorizationId
          in: path
          description: The identifier of a sign-in attempt.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationHistory'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/banners:
    get:
      tags:
        - Banners
      summary: Get a list of banners
      description: Use this method to obtain a list of banners.
      operationId: getBannerCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createTime
              - priority
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              type:
                type: string
                enum:
                  - desktop
                  - mobile
                description: "The banner type. Possible values:\r\n\r\n - desktop – banners of this type are displayed only in the Trader's Room\r\n\r\n - mobile – banners of this type are displayed only in the mobile app."
                example: desktop
              enabled:
                type: integer
                enum:
                  - 1
                  - 0
                description: 'If *1*, a banner is displayed to clients in the Trader''s Room or mobile app; otherwise, *0*.'
                example: 1
              url:
                type: string
                description: The URL of a page on which a banner is displayed in the Trader's Room.
                maxLength: 255
                example: 'https://example.com/dashboard'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Banner'
      security:
        - bearerAuth: []
  '/api/v2/my/banners/{bannerId}':
    get:
      tags:
        - Banners
      summary: Get banner details
      description: Use this method to obtain detailed information about a specific banner.
      operationId: getBannerResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: bannerId
          in: path
          description: The banner identifier.
          required: true
          example: 1
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Banner'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/bonuses:
    get:
      tags:
        - Bonuses
      summary: Get a list of bonuses
      description: Use this method to obtain a list of bonuses allocated to clients.
      operationId: getBonusesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/BonusStatus'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Bonus'
      security:
        - bearerAuth: []
  '/api/v2/my/bonuses/{bonusId}':
    get:
      tags:
        - Bonuses
      summary: Get bonus details
      description: Use this method to obtain detailed information about a specific bonus.
      operationId: getBonusResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: bonusId
          in: path
          description: The bonus identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bonus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/bonuses/temporary:
    get:
      tags:
        - Bonuses
      summary: Get a list of temporary bonuses
      description: Use this method to obtain a list of temporary bonuses that clients can claim in the Trader's Room.
      operationId: getBonusTemporariesResource
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter[claimed]
          in: query
          description: Filter by claimed status. 1 — only claimed bonuses, 0 — only unclaimed bonuses.
          required: false
          schema:
            type: string
            enum:
              - '0'
              - '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/BonusTemporary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/bonuses/temporary/{temporaryId}':
    get:
      tags:
        - Bonuses
      summary: Get temporary bonus details
      operationId: getBonusTemporaryResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: temporaryId
          in: path
          description: The identifier of a temporary bonus.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BonusTemporary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/bonuses/temporary/{temporaryId}/claim':
    post:
      tags:
        - Bonuses
      summary: Claim a temporary bonus
      description: Use this method to claim a temporary bonus for a client in the Trader's Room.
      operationId: postBonusTemporaryClaimResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: temporaryId
          in: path
          description: The identifier of a temporary bonus.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  $ref: '#/components/schemas/integer'
                  description: The account identifier.
              required:
                - accountId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BonusTemporary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/charts:
    get:
      tags:
        - Charts
      summary: Get charts data
      description: Use this method to get the data for creating the Equity charts for client trading accounts.
      operationId: getChartsData
      parameters:
        - $ref: '#/components/parameters/language'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              accountId:
                type: integer
                description: The account identifier.
                example: 1
              startDate:
                $ref: '#/components/schemas/dateTime'
                description: The start date and time for which you want to get data.
              step:
                type: string
                enum:
                  - 'Y'
                  - H
                  - d
                  - m
                description: "A period for tracking the movement of data points with the data recorded at regular intervals. Possible values:\r\n\r\n - Y — year\r\n\r\n - m — month\r\n\r\n - d — day\r\n\r\n - H — hour"
                example: 'Y'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Chart'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/countries:
    get:
      tags:
        - Countries
      summary: Get a list of countries
      description: Use this method to obtain a list of countries that clients can select when signing up to the Trader's Room (if they are required to select a country during registration).
      operationId: getCountriesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Country'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/countries/{country}':
    get:
      tags:
        - Countries
      summary: Get country details
      description: Use this method to obtain detailed information about a specific country.
      operationId: getCountryResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: country
          in: path
          description: The country identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/confirmations/resend:
    post:
      tags:
        - Confirmations
      summary: Resend a confirmation code
      description: 'Use this method to resend a verification code required to confirm certain procedures. For example, it''s possible to resend a code that a client must enter when attempting to restore a fogotten password from the Sign In page.'
      operationId: resendConfirmationCode
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to an initiated procedure.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step of an initiated procedure\r\n\r\n- HTTP code 200 for an intermediary step after which the next procedure step should be completed\r\n\r\n- HTTP code 202 for the final step signaling that an initiated procedure was successfully competed"
                    example: 200
                  data:
                    type: object
                    properties:
                      status:
                        type: integer
                        example: 0
                      sent:
                        type: integer
                        example: 1
                      expiredAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a code is due to expire.
                      sentAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a code was sent.
                      recipient:
                        type: object
                        description: 'The details about a code recipient:'
                        properties:
                          template:
                            type: string
                            example: Withdraw_whitelistConfirm
                          email:
                            type: string
                            example: username@example.com
                          name:
                            type: string
                            example: Nick
                          url:
                            example: url/e57d34c6-4e64-4998-909b-b649294fbd04/44353
                          method:
                            type: string
                            example: email
                  done:
                    type: boolean
                    description: 'If *true*, an initiated procedure has succeeded; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to an initiated procedure.
                  workflow:
                    type: string
                    description: A string value indicating the next step of an initiated procedure. Use the code that was resent to a client to complete the procedure.
                    example: 2fa_sms_auth
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/confirmations/confirm:
    post:
      tags:
        - Confirmations
      summary: Confirm a procedure with a code
      description: Use this method to confirm certain procedures with a verification code received by a client.
      operationId: resendConfirmationCodePost
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to an initiated procedure.
                code:
                  type: integer
                  description: The code received by a client.
                  example: 12345
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step of an initiated procedure\r\n\r\n- HTTP code 200 for an intermediary step after which the next procedure step should be completed\r\n\r\n- HTTP code 202 for the final step signaling that an initiated procedure was successfully competed"
                    example: 200
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: integer
                          example: 0
                        sent:
                          type: integer
                          example: 1
                        expiredAt:
                          $ref: '#/components/schemas/dateTime'
                          description: The date and time when a code is due to expire.
                        sentAt:
                          $ref: '#/components/schemas/dateTime'
                          description: The date and time when a code was sent.
                        recipient:
                          type: object
                          description: 'The details about a code recipient:'
                          properties:
                            template:
                              type: string
                              example: Withdraw_whitelistConfirm
                            email:
                              type: string
                              example: username@example.com
                            name:
                              type: string
                              example: Nick
                            url:
                              example: url/e57d34c6-4e64-4998-909b-b649294fbd04/44353
                            method:
                              type: string
                              example: email
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, an initiated procedure has succeeded; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to an initiated procedure.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of an initiated procedure.
                    example: 2fa_sms_auth
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/currencies/{alphabeticCode}/paired':
    get:
      tags:
        - Currencies
      summary: Get a list of paired currencies
      description: Use this method to get a list of currencies that are paired with a specified currency. The specified currency can be exchanged for any currency from the obtained list.
      operationId: getPairedCurrencies
      parameters:
        - $ref: '#/components/parameters/language'
        - name: alphabeticCode
          in: path
          description: The alphabetic code of a currency for which you want to get a list of paired currencies.
          required: true
          schema:
            type: string
            example: BTC
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about paired currencies
                items:
                  $ref: '#/components/schemas/Currency'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/currencies':
    get:
      tags:
        - Currencies
      summary: Get a list of available currencies
      description: Use this method to get a list of available currencies.
      operationId: getCurrencies
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Currency'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposits/currencies:
    get:
      tags:
        - Deposits
      summary: Get a list of deposit currencies
      description: "Use this method to obtain a list of enabled transaction and payment currencies added to the deposit methods that are available in the Trader's Room."
      operationId: getDepositCurrenciesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a deposit group for which you want to get a list of available currencies.
                example: 1
              type:
                type: string
                enum:
                  - tradersRoom
                  - paymentSystem
                description: "The type of a currency added to a deposit method. Possible values:\r\n\r\n- tradersRoom — transaction currencies\r\n\r\n- paymentSystem — payment currencies"
                example: tradersRoom
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available deposit currencies
                items:
                  $ref: '#/components/schemas/Currency'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposits/groups:
    get:
      tags:
        - Deposits
      summary: Get a list of deposit groups
      description: Use this method to obtain a list of available deposit groups that are used to categorize deposit methods.
      operationId: getDepositGroupsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - name
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available deposit groups
                items:
                  $ref: '#/components/schemas/DepositMethodGroup'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposits/methods:
    get:
      deprecated: true
      tags:
        - Deposits (deprecated)
      summary: Get a list of deposit methods
      description: Use this method to obtain a list of available deposit methods.
      operationId: getDepositMethodsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a group in which a deposit method is included.
                example: 1
              tradersRoomCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a transaction currency to a deposit method.
                example: 840
              paymentSystemCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a payment currency to a deposit method.
                example: 840
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - createTime
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available deposit methods
                items:
                  $ref: '#/components/schemas/DepositMethod'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/deposits/{hash}/view':
    get:
      tags:
        - Deposits
      summary: Deposits view render webhook
      operationId: depositUnauthorizedRenderWebhook
      parameters:
        - name: hash
          in: path
          description: The hashed deposit meta ID.
          example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Returns the rendered HTML view in JSON format
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposits:
    post:
      tags:
        - Deposits
      summary: Create deposit
      description: Use this method to submit deposit form.
      operationId: createDeposit
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                methodId:
                  type: integer
                  description: 'The identifier of a deposit method.'
                  example: 1
                accountId:
                  type: integer
                  description: 'The identifier of a destination account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2005
                amount:
                  type: string
                  description: 'Operation amount. **Empty string** if deposit has static type - Replenishment through cryptocurrency transfer.'
                  example: '100'
                data:
                  oneOf:
                    - type: object
                      title: Legacy
                      description: 'A one-dimensional object with data from a payment form. Compiled from field values obtained from the "/api/v2/my/deposit-methods/{id}/form" method.'
                      example: '{"account": 1, "bank_code": 2205}'
                    - $ref: '#/components/schemas/DepositFormSubmitRequest'
              required:
                - methodId
                - accountId
                - currencyCode
                - amount
                - data
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deposit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                oneOf:
                  - "$ref": '#/components/schemas/Error'
                  - "$ref": '#/components/schemas/OldError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposits/preview:
    post:
      tags:
        - Deposits
      summary: Get deposit preview
      description: Use this method to calculate deposit preview
      operationId: calculateDepositPreview
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                methodId:
                  type: integer
                  description: 'The identifier of a deposit method.'
                  example: 1
                accountId:
                  type: integer
                  description: 'The identifier of a destination account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2005
                amount:
                  type: string
                  description: 'Operation amount.'
                  example: '100'
                mode:
                  type: string
                  description: 'Operation calculation mode. Specifies which amount is used to calculate the operation.'
                  enum:
                    - source
                    - destination
                  example: 'source'
              required:
                - methodId
                - accountId
                - currencyCode
                - amount
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation.
                    example: '1.20'
                  commission:
                    type: string
                    description: Operation commission for destination account.
                    example: '10.00'
                  sourceCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for payment system.
                    example: 'USD'
                  sourceCurrencyAmount:
                    type: string
                    description: Operation amount for payment system.
                    example: '100.00'
                  destinationCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for destination account.
                    example: 'USD'
                  destinationCurrencyAmount:
                    type: string
                    description: Operation amount for destination account.
                    example: '100.00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/deposits/exchange-rate:
    get:
      tags:
        - Deposits
      summary: Get exchange rate for deposit method and account
      description: Use this method to receive exchange rate
      operationId: getDepositExchangeRate
      parameters:
        - name: methodId
          in: query
          description: The identifier of a deposit method
          example: 1
          required: true
          schema:
            type: integer
        - name: accountId
          in: query
          description: The identifier of a operation account
          example: 1
          required: true
          schema:
            type: integer
        - name: currencyCode
          in: query
          description: Operation currencyCode
          example: 2005
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation
                    example: '1.20'
                  baseCurrency:
                    type: object
                    description: Base currency
                    properties:
                      code:
                        type: integer
                        description: Currency code
                        example: 2005
                      alpha:
                        type: string
                        description: Currency alpha code
                        example: 'USDT'
                  quoteCurrency:
                    type: object
                    description: Quote currency
                    properties:
                      code:
                        type: integer
                        description: Currency code
                        example: 2005
                      alpha:
                        type: string
                        description: Currency alpha code
                        example: 'USDT'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/deposit-methods:
    get:
      tags:
        - Deposits
      summary: Get deposit methods list
      description: Use this method to get a list of available deposit methods
      operationId: getDepositMethods
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a group in which a deposit method is included.
                example: 1
              tradersRoomCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a transaction currency to a deposit method.
                example: 840
              paymentSystemCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a payment currency to a deposit method.
                example: 840
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: List of available deposit methods
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DepositMethodItem'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/deposit-methods/{id}/form:
    post:
      tags:
        - Deposits
      summary: Create deposit method form
      description: Use this method to create deposit method form.
      operationId: createDepositMethodForm
      parameters:
        - $ref: '#/components/parameters/language'
        - name: id
          in: path
          description: The identifier of a deposit method.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  type: integer
                  description: 'Operation account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2205
                deviceTimezone:
                  type: string
                  description: Client device local Timezone.
                  example: Europe/Moscow
                locale:
                  type: string
                  description: 'Client device locale.'
                  example: 'EN'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositMethodField'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: 'List of violations when generating a payment form'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSystemsViolations'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/identities:
    get:
      tags:
        - Static deposits
      summary: Get identities for account
      description: Use this method to get a list of available identities for account
      operationId: getStaticDepositIdentities
      parameters:
        - name: methodId
          in: query
          description: The identifier of a static deposit method
          example: 1
          required: true
          schema:
            type: integer
        - name: accountId
          in: query
          description: The identifier of a operation account
          example: 1
          required: true
          schema:
            type: integer
        - name: currencyCode
          in: query
          description: Operation currencyCode
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: List of available identities for account
                properties:
                  driver:
                    type: object
                    description: Identity driver
                    properties:
                      id:
                        $ref: '#/components/schemas/uuid'
                        description: Driver id
                      name:
                        type: string
                        description: Driver name
                        example: static_deposit_qa
                  identities:
                    type: array
                    items:
                      $ref: '#/components/schemas/StaticDepositIdentity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Static deposits
      summary: Create identity
      description: Use this method to submit static deposit identity creation form.
      operationId: createStaticDepositIdentity
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/uuid'
                  description: Static deposit identity id.
                formId:
                  $ref: '#/components/schemas/uuid'
                  description: Form identifier.
                methodId:
                  type: integer
                  description: The identifier of a static deposit method.
                  example: 1
                accountId:
                  type: integer
                  description: The identifier of a destination account.
                  example: 1
                name:
                  type: string
                  description: Optional identity custom name. If not provided, the default name from the payment system will be used.
                  maxLength: 255
                  example: 'USDT TRC20'
                currencyCode:
                  type: integer
                  description: Operation currency code.
                  example: 2005
                encryptedInput:
                  type: string
                  description: Encrypted values of filled fields from the form in string list format.
                  example: '{"name": ["Eric"], "email": ["eric@gmail.com"]}'
              required:
                - id
                - formId
                - methodId
                - accountId
                - currencyCode
                - encryptedInput
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                description: Identity creation result
                properties:
                  driver:
                    type: object
                    description: Identity driver
                    properties:
                      id:
                        $ref: '#/components/schemas/uuid'
                        description: Driver id
                      name:
                        type: string
                        description: Driver name
                        example: static_deposit_qa
                  result:
                    $ref: '#/components/schemas/StaticDepositIdentityCreationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/identities/form:
    post:
      tags:
        - Static deposits
      summary: Generate identity creation form
      description: Use this method to generate identity creation form.
      operationId: generateStaticDepositIdentityForm
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                methodId:
                  type: integer
                  description: The identifier of a static deposit method.
                  example: 1
                accountId:
                  type: integer
                  description: The identifier of a operation account.
                  example: 1
                currencyCode:
                  type: integer
                  description: Operation currency code.
                  example: 2205
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticDepositIdentityForm'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: 'Unprocessable Entity'
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/PaymentSystemsViolations'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/identities/{id}:
    get:
      tags:
        - Static deposits
      summary: Get identity
      description: Use this method to get available identity for account
      operationId: getStaticDepositIdentity
      parameters:
        - name: id
          in: path
          description: The identifier of a static deposit identity
          example: '36f59381-5b54-48bd-a0c7-3b908c476732'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Available identity for account
                properties:
                  driver:
                    type: object
                    description: Identity driver
                    properties:
                      id:
                        $ref: '#/components/schemas/uuid'
                        description: Driver id
                      name:
                        type: string
                        description: Driver name
                        example: static_deposit_qa
                  identity:
                    $ref: '#/components/schemas/StaticDepositIdentity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Identity not found
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/identities/{id}/rename:
    patch:
      tags:
        - Static deposits
      summary: Rename identity
      description: Use this method to rename a identity
      operationId: renameStaticDepositIdentity
      parameters:
        - name: id
          in: path
          description: The identifier of a static deposit identity
          example: '36f59381-5b54-48bd-a0c7-3b908c476732'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Identity custom name
                  maxLength: 255
                  example: 'USDT TRC20'
              required:
                - name
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/exchange-rate:
    get:
      tags:
        - Static deposits
      summary: Get exchange rate for static deposit method and account
      description: Use this method to receive exchange rate for static deposit operation
      operationId: getStaticDepositExchangeRate
      parameters:
        - $ref: '#/components/parameters/language'
        - name: methodId
          in: query
          description: The identifier of a static deposit method.
          example: 1
          required: true
          schema:
            type: integer
        - name: accountId
          in: query
          description: The identifier of a destination account.
          example: 1
          required: true
          schema:
            type: integer
        - name: currencyCode
          in: query
          description: Operation currency code.
          example: 2005
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Exchange rate for operation.
                    example: '1.20'
                  baseCurrency:
                    type: object
                    description: Base currency (payment system currency).
                    properties:
                      code:
                        type: integer
                        description: Currency code.
                        example: 2005
                      alpha:
                        type: string
                        description: Currency alpha code.
                        example: 'BTC'
                  quoteCurrency:
                    type: object
                    description: Quote currency (destination account currency).
                    properties:
                      code:
                        type: integer
                        description: Currency code.
                        example: 840
                      alpha:
                        type: string
                        description: Currency alpha code.
                        example: 'USD'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/identities/{id}/preview:
    post:
      tags:
        - Static deposits
      summary: Get static deposit preview for identity
      description: Use this method to calculate static deposit operation preview for a specific identity
      operationId: calculateStaticDepositIdentityPreview
      parameters:
        - $ref: '#/components/parameters/language'
        - name: id
          in: path
          description: The identifier of a static deposit identity
          example: '36f59381-5b54-48bd-a0c7-3b908c476732'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: string
                  description: 'Operation amount.'
                  example: '100'
                mode:
                  type: string
                  description: 'Operation calculation mode. Specifies which amount is used to calculate the operation.'
                  enum:
                    - source
                    - destination
                  example: 'source'
              required:
                - amount
                - mode
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation.
                    example: '1.20'
                  commission:
                    type: string
                    description: Operation commission.
                    example: '0'
                  sourceCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for payment system.
                    example: 'BTC'
                  sourceCurrencyAmount:
                    type: string
                    description: Operation amount for payment system.
                    example: '0.50000000'
                  destinationCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for destination account.
                    example: 'USD'
                  destinationCurrencyAmount:
                    type: string
                    description: Operation amount for destination account.
                    example: '30000.00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Identity not found
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/static-deposit/preview:
    post:
      tags:
        - Static deposits
      summary: Get static deposit preview
      description: Use this method to calculate static deposit operation preview
      operationId: calculateStaticDepositPreview
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                methodId:
                  type: integer
                  description: 'The identifier of a static deposit method.'
                  example: 1
                accountId:
                  type: integer
                  description: 'The identifier of a destination account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2005
                amount:
                  type: string
                  description: 'Operation amount.'
                  example: '100'
                mode:
                  type: string
                  description: 'Operation calculation mode. Specifies which amount is used to calculate the operation.'
                  enum:
                    - source
                    - destination
                  example: 'source'
                blockchainId:
                  type: string
                  description: 'Blockchain identifier. Required for methods configured with per-blockchain commissions; used to resolve the deposit commission.'
                  maxLength: 100
                  example: '195'
              required:
                - methodId
                - accountId
                - currencyCode
                - amount
                - mode
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation.
                    example: '1.20'
                  commission:
                    type: string
                    description: Operation commission.
                    example: '0'
                  sourceCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for payment system.
                    example: 'BTC'
                  sourceCurrencyAmount:
                    type: string
                    description: Operation amount for payment system.
                    example: '0.50000000'
                  destinationCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for destination account.
                    example: 'USD'
                  destinationCurrencyAmount:
                    type: string
                    description: Operation amount for destination account.
                    example: '30000.00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                "$ref": '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/devices:
    get:
      tags:
        - Devices
      summary: Get a list of devices
      description: Use this method to obtain a list of devices from which a client was signed in to the Trader's Room.
      operationId: getDevicesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: lastSignIn
            default: lastSignIn
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ClientDevice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    delete:
      tags:
        - Devices
      summary: Terminate all sessions except the current one
      description: Use this method to terminate all client sessions except the one used to make this request.
      operationId: deleteOtherDevicesResource
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/devices/{deviceId}':
    get:
      tags:
        - Devices
      summary: Get device details
      description: Use this method to obtain detailed information about a specific client device.
      operationId: getDeviceResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: deviceId
          in: path
          description: The device identifier
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientDevice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    delete:
      tags:
        - Devices
      summary: Delete a device
      description: Use this method to delete a specified client device.
      operationId: deleteDeviceResource
      parameters:
        - name: deviceId
          in: path
          description: The device identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/devices/tokens:
    post:
      tags:
        - Device tokens
      summary: Add an Apple device token
      description: 'Use this method to save a token obtained from a device for accessing the [Apple Push Notification service](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns).'
      operationId: createDeviceTokenResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: "The token obtained from a device for accessing the [Apple Push Notification service](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns).\r\n\r\nA user may have several Apple devices on which push notifications can be managed individually."
                  example: '.inf'
              required:
                - token
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceToken'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/devices/tokens/{token}':
    delete:
      tags:
        - Device tokens
      summary: Delete an Apple device token
      description: 'Use this method to remove a token obtained from a device for accessing the [Apple Push Notification service](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns).'
      operationId: deleteDeviceTokenResource
      parameters:
        - name: token
          in: path
          description: The token obtained from a device for accessing the Apple Push Notification service.
          required: true
          example: '.inf'
          schema:
            type: string
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/documents:
    get:
      tags:
        - Documents
      summary: Get a list of documents
      description: 'Use this method to obtain a list of documents (such as an ID card, passport, driver’s license, and others) submitted by a client for passing a verification procedure.'
      operationId: getDocumentCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Document'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Documents
      summary: Add a new document
      description: Use this method to add a new document required for passing a verification procedure by a client.
      operationId: createDocumentResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The filename of a document. Supported file types - JPG, JPEG, PNG, PDF, DOC, DOCX, XLSX, CSV, PAGES, NUMBERS, ZIP, 7Z, RAR, JFIF.
                  contentMediaType: application/octet-stream
                typeId:
                  type: integer
                  description: The identifier of a document type with which a document is associated.
                  example: 1
              required:
                - file
                - typeId
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/documents/{document}':
    get:
      tags:
        - Documents
      summary: Get document details
      description: Use this method to obtain detailed information about a specific document submitted by a client for passing a verification procedure.
      operationId: getDocumentResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: document
          in: path
          description: The document identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/localizations:
    get:
      tags:
        - Localizations
      summary: Get a list of localization options
      description: Use this method to obtain a list of localization options available in the Trader's Room.
      operationId: getLocalizationsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Localization'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/menus:
    get:
      tags:
        - Menus
      summary: Get a menu tree
      description: Use this method to get a menu tree displayed in the Trader's Room.
      operationId: getMenuTree
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: deep
          in: query
          description: 'If *1*, a full menu tree is returned. If *0* (the default value), only direct child items of the root menu item are returned.'
          schema:
            $ref: '#/components/schemas/booleanInt'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              parentId:
                type: integer
                description: The identifier of a parent menu item for which you want to get child items.
                example: 1
              new:
                type: integer
                description: 'If *1*, a menu item is marked as new in the Trader''s Room; otherwise, *0*.'
              caption:
                type: string
                description: The menu item name displayed in the Trader's Room.
                example: dashboard
              rootName:
                type: string
                description: The name of a root menu item. This filter parameter is ignored if the **parentId** parameter is specified.
                example: general
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - name
              - caption
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MenuItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/menus/{parentId}':
    get:
      tags:
        - Menus
      summary: Get menu item details
      description: Use this method to obtain detailed information about a specific menu item.
      operationId: getMenuItem
      parameters:
        - $ref: '#/components/parameters/language'
        - name: parentId
          in: path
          description: The identifier of a menu item.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MenuItemSingle'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/password/change:
    post:
      tags:
        - Passwords
      summary: Change a client password
      description: Use this method to change a client password.
      operationId: ChangePasswordResource
      parameters:
        - name: successToken
          in: header
          description: "The success token.\r\n\r\n To obtain the success token, use the methods to initiate a 2FA procedure (GET/api/v2/my/2fa/challenge) and then complete it (POST/api/v2/my/2fa/challenge)."
          example: b2fcf999-2b0b-451d-9888-094a79117aa5
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: The new password.
                  example: m#P52s@ap$V
              required:
                - password
      responses:
        '200':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/password/restore:
    post:
      tags:
        - Passwords
      summary: Restore a client password
      description: Use this method to restore a password for a client who isn't signed in to the Trader's Room.
      operationId: RestorePasswordResource
      parameters:
        - name: successToken
          in: header
          description: "The success token.\r\n\r\n To obtain the success token, use the methods to initiate a 2FA procedure (POST/api/v2/my/2fa/unauthorized/challenge) and then complete it (POST/api/v2/my/2fa/challenge)."
          example: b2fcf999-2b0b-451d-9888-094a79117aa5
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: The new password.
                  example: m#P52s@ap$V
              required:
                - password
      responses:
        '200':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/password/changes:
    get:
      tags:
        - Passwords
      summary: Get a password change history
      description: Use this method to get a full list of password change records.
      operationId: getClientPasswordChanges
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PasswordChangeRecord'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/password/changes/{change}':
    get:
      tags:
        - Passwords
      summary: Get password change details
      description: Use this method to obtain detailed information about a specific password change record.
      operationId: getClientPasswordChangeRecord
      parameters:
        - $ref: '#/components/parameters/language'
        - name: change
          in: path
          description: The identifier of a password change record.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasswordChangeRecord'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/permissions:
    get:
      tags:
        - Permissions
      summary: Client permissions
      description: Use this method to get the data about the permissions granted to a client.
      operationId: getClientPermissionsResource
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientPermissions'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/profile:
    get:
      tags:
        - Profile
      summary: Get client profile data
      description: Use this method to get client profile data.
      operationId: getClientProfileResource
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientProfile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    put:
      tags:
        - Profile
      summary: Update client profile data
      description: Use this method to update a client profile.
      operationId: putClientProfileResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientProfileUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientProfile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    patch:
      tags:
        - Profile
      summary: Update client profile data
      description: Use this method to update a client profile.
      operationId: patchClientProfileResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientProfileUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientProfile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/profile/info:
    patch:
      tags:
        - Profile
      summary: Update client personal data
      description: >-
        Use this method to request an update of personal data.
        The change is not applied immediately: a profile data change request
        (Application) is created and must be approved by an administrator.
        Verification is not reset. The response body returns the current
        (unchanged) personal data.
      operationId: patchClientInfoResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientInfoUpdateRequest'
      responses:
        '200':
          description: OK. A profile data change request has been created and awaits admin approval. The body returns the current (unchanged) personal data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientInfo'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/profile/addresses/residential:
    post:
      tags:
        - Profile
      summary: Update profile residential address
      description: Use this method to update profile residential address.
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientAddressUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientProfile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: [ ]
  /api/v2/my/profile/deactivation:
    get:
      tags:
        - Profile
      summary: Initialize client profile deactivation
      description: "Use this method to enable clients to deactivate their profiles through the mobile app.\r\n\r\n**Note:** If the **Delete data** option is enabled in the Back Office, the client’s personal data is removed from client profiles after they are deactivated.\r\n\r\nIf you want the client’s personal data to be removed only after the admin’s approval, enable the **Request required for Deleting Data** option.\r\n\r\nBoth options are available upon navigating to **System** > **Settings** in the Back Office."
      operationId: initializeProfileDeactivationWizard
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of deactivating a client profile:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the profile deactivation form is displayed to a client\r\n\r\n- HTTP code 202 for the final procedure step signaling that a client profile was successfully deactivated"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: The details about the verification code that has been sent to a client email address. The code is required to confirm a procedure of deactivating a client profile.
                    example: null
                  done:
                    type: boolean
                    description: 'If *true*, the client profile was successfully deactivated; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of profile deactivation.
                  workflow:
                    type: string
                    description: 'A string value indicating the next step of a procedure of profile deactivation. Always *email*, indicating that confirmation with the verification code sent to a client email address is required. Next, use the method to confirm client profile deactivation.'
                    example: email
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Profile
      summary: Confirm client profile deactivation
      description: Use this method to confirm the procedure of deactivating a client profile that was initialized by a client through the mobile app.
      operationId: initializeProfileDeactivationWizardPost
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) obtained after initializing a procedure of deactivating a client profile.
                code:
                  type: integer
                  description: The verification code sent to a client email address.
                  example: 12345
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a procedure of deactivating a client profile:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of the profile deactivation form is displayed to a client\r\n\r\n- HTTP code 202 for the final procedure step signaling that a client profile was successfully deactivated"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: "The object containing the **requestCreated**  field:\r\n\r\n- If *true*, a request for deactivating a client profile has been created and must be approved by the admin.\r\n\r\n- If *false*, a client profile is deactivated without the admin’s approval."
                    example: null
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, the client profile was successfully deactivated; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a procedure of profile deactivation.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a procedure of profile deactivation.
                    example: terminated
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/applications/{type}:
    get:
      tags:
        - Applications
      summary: Get active application by type
      description: |-
        Use this method to check if the authenticated client has an active (non-resolved) application of a given type.

        An application is considered active if its status is one of: `new`, `pending`, or `in_progress`.

        Returns 404 if no active application of the specified type exists.
      operationId: getActiveApplicationByType
      parameters:
        - $ref: '#/components/parameters/language'
        - name: type
          in: path
          required: true
          description: |-
            The application type. Possible values:

            - `account` — account type change
            - `avatar` — avatar/photo change
            - `address` — address change
            - `archive` — account archival
            - `deposit` — deposit assistance
            - `internal_transfer` — internal transfer
            - `investment_transfer` — investment platform transfer
            - `transfer` — regular transfer
            - `verification` — KYC/KYB verification
            - `withdraw` — withdrawal/payout
            - `exchange` — currency exchange
            - `deleting_account` — account deletion
          schema:
            type: string
            enum:
              - account
              - avatar
              - address
              - archive
              - deposit
              - internal_transfer
              - investment_transfer
              - transfer
              - verification
              - withdraw
              - exchange
              - deleting_account
            example: deleting_account
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearerAuth: []
  /api/v2/my/platforms:
    get:
      tags:
        - Platforms
      summary: Get a list of platforms
      description: Use this method to obtain a list of available platforms.
      operationId: getPlatforms
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available platforms
                items:
                  $ref: '#/components/schemas/Platform'
      security:
        - bearerAuth: []
  '/api/v2/my/platforms/{platformId}/auth':
    post:
      tags:
        - Platforms
      summary: Authenticate on a trading platform
      description: Use this method to obtain a pair of access and refresh tokens required for client authentication on B2TRADER.
      operationId: getPlatformAccessToken
      parameters:
        - name: Geo-Country-Code
          in: header
          required: false
          schema:
            type: string
            example: '+995'
        - name: Geo-Country-Name
          in: header
          required: false
          schema:
            type: string
            example: Georgia
        - name: platformId
          in: path
          description: 'The identifier of a trading platform on which you want to authenticate a client. Currently, clients can be authenticated only on B2Trader.'
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAccessToken'
          headers:
            X-Upstream-Token:
              schema:
                type: string
            X-Upstream-TTL:
              schema:
                type: string
            X-Upstream-URL:
              schema:
                type: string
            X-Upstream-Header:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/platforms/{platformId}/refresh':
    post:
      tags:
        - Platforms
      summary: Refresh the access token to authenticate on a trading platform
      description: You can use a valid refresh token to obtain a new pair of access and refresh tokens required for client authentication on B2Trader.
      operationId: refreshPlatformAccessToken
      parameters:
        - name: platformId
          in: path
          description: 'The identifier of a trading platform on which you want to authenticate a client. Currently, clients can be authenticated only on B2Trader.'
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                refreshToken:
                  type: string
                  description: The refresh token that was previously issued for a client.
                  example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
              required:
                - refreshToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAccessToken'
          headers:
            X-Upstream-Token:
              schema:
                type: string
            X-Upstream-TTL:
              schema:
                type: string
            X-Upstream-URL:
              schema:
                type: string
            X-Upstream-Header:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/products/currencies:
    get:
      tags:
        - Products
      summary: Get a list of product currencies
      description: Use this method to obtain a list of the available product currencies. A response includes only enabled product currencies.
      operationId: getProductCurrencies
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              alphabeticCode:
                type: string
                description: The alphabetic code of a currency.
                example: USD
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductCurrency'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/products/currencies/{currencyId}':
    get:
      tags:
        - Products
      summary: Get product currency details
      description: Use this method to obtain detailed information about a specific product currency.
      operationId: getProductCurrencyResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: currencyId
          in: path
          description: The identifier of a product currency.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductCurrency'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/products/groups:
    get:
      tags:
        - Products
      summary: Get a list of product groups
      description: Use this method to obtain a list of the available product groups. A response includes only enabled product groups.
      operationId: getProductGroups
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - caption
              - priority
              - createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/ProductGroupType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductGroup'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/products/groups/{groupId}':
    get:
      tags:
        - Products
      summary: Get product group details
      description: Use this method to obtain detailed information about a specific product group.
      operationId: getProductGroupResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: groupId
          in: path
          description: The product group identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductGroup'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/products/{productId}/preferences':
    get:
      tags:
        - Products
      summary: Get a list of product preferences
      description: "Use this method to obtain a list of preferences added to a specific product.\r\n\r\nThe preferences can include additional information about the product. Clients can view the preferences before opening product-associated accounts in the Trader's Room."
      operationId: getProductPreferencesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - id
              - createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              title:
                type: string
                description: The title added to product preferences.
        - name: productId
          in: path
          description: The product identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProductPreference'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/products/{productId}/preferences/{preferenceId}':
    get:
      tags:
        - Products
      summary: Get details of product preferences
      description: Use this method to obtain information about specific preferences added to a product.
      operationId: getProductPreferenceResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: productId
          in: path
          description: The product identifier.
          example: 1
          required: true
          schema:
            type: integer
        - name: preferenceId
          in: path
          description: The identifier of product prefernces.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPreference'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/photo:
    get:
      tags:
        - Photo
      summary: Get a client profile photo
      description: Use this method to get a profile photo uploaded for a client.
      operationId: getClientPhoto
      parameters:
        - $ref: '#/components/parameters/language'
        - name: size
          in: query
          description: 'The image size in which you want to return a profile photo, in kilobytes (KB). The default value is 200.'
          schema:
            type: integer
            example: 200
      responses:
        '200':
          description: Binary image of requested size
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Photo
      summary: Upload a client profile photo
      description: 'Use this method to upload a photo to a client profile. Supported image formats are GIF, JPEG, and PNG.'
      operationId: storeClientPhoto
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                photo:
                  type: string
                  format: binary
                  description: "The image file. The allowed mime types:\r\n\r\n- image/jpeg\r\n\r\n- image/png\r\n\r\n- image/gif"
      responses:
        '204':
          description: 'Uploaded. When uploading a new photo, it replaces the existing one.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    delete:
      tags:
        - Photo
      summary: Delete a client profile photo
      description: Use this method to delete a photo from a client profile.
      operationId: deleteProfilePhoto
      responses:
        '204':
          description: Deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/quizzes:
    get:
      tags:
        - Client tests
      summary: Get a list of client tests
      description: Use this method to get a list of tests that clients can pass in the Trader's Room.
      operationId: getQuizzes
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - createTime
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available client tests
                items:
                  $ref: '#/components/schemas/QuizShort'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/quizzes/{quizId}':
    get:
      tags:
        - Client tests
      summary: Get client test details
      description: Use this method to get detailed information about a specific client test.
      operationId: getQuizResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: quizId
          in: path
          description: The identifier of a test.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quiz'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/quizzes/results:
    get:
      tags:
        - Client tests
      summary: Get completed client tests
      description: Use this method to get the total number of tests completed by a client as well as the number of tests that were successfully passed.
      operationId: getQuizResults
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                    description: The number of tests completed by a client.
                  completed:
                    $ref: '#/components/schemas/integer'
                    description: The number of tests that were successfully passed by a client.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/quizzes/{quizId}/answers':
    post:
      tags:
        - Client tests
      summary: Submit answers to test’s questions
      description: Use this method to submit answers to the questions included in a specific client test.
      operationId: createQuizAttemptResource
      parameters:
        - name: quizId
          in: path
          description: The identifier of a test.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                answers:
                  type: object
                  description: 'An array of values identifying the questions included in a test, accompanied by values specifying the answers to these questions. An answer can be the integer specifting an answer option, a string containing several answer option identifiers separated by comma, or a string containing the text of an answer to an open-ended question.'
              required:
                - answers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuizAttempt'
      security:
        - bearerAuth: []
  '/api/v2/my/rates/{baseCurrency}':
    get:
      deprecated: true
      tags:
        - Rates
      summary: Get currency rates
      description: Use this method to obtain a list of currencies available for exchange and their current rates.
      operationId: getRatesResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: baseCurrency
          in: path
          description: The alphabetic code of a base currency for which the exchange rates are retrieved.
          example: btc
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Rate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/rates/{baseCurrency}/{quoteCurrency}':
    get:
      deprecated: true
      tags:
        - Rates
      summary: Get an exchange rate for a currency pair
      description: Use this method to obtain a current exchange rate for a specific currency pair.
      operationId: getRateResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: baseCurrency
          in: path
          description: The alphabetic code of a base currency.
          example: btc
          required: true
          schema:
            type: string
        - name: quoteCurrency
          in: path
          description: The alphabetic code of a quote currency.
          example: usd
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/rates/pairs:
    get:
      tags:
        - Rates
      summary: Get exchange rates for currency pairs
      description: Use this method to get the current exchange rates for specific currency pairs.
      operationId: getRatePairsResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: pairs
          in: query
          required: true
          description: "Comma-separated currency pairs."
          example: "USD_EUR,USD_GBP,USDT_USD,EUR_USDC"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatePairs'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/refresh:
    post:
      tags:
        - Auth
      summary: Refresh the access token
      description: "Use this method to refresh the access token.\r\n\r\nIf the access token has expired, you can use a valid refresh token to obtain a new set of access and refresh tokens."
      operationId: refresh
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                refreshToken:
                  type: string
                  description: The refresh token issued for a client.
                  example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
              required:
                - refreshToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type:
                      - object
                      - 'null'
                    description: 'The details about the access token:'
                    properties:
                      token:
                        type: string
                        description: The access token.
                        example: wyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                      createdAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a token was generated.
                      expiresAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a token is due to expire.
                  refreshToken:
                    type:
                      - object
                      - 'null'
                    description: The details about the refresh token.
                    properties:
                      token:
                        type: string
                        description: The refresh token.
                        example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                      createdAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a token was generated.
                      expiresAt:
                        $ref: '#/components/schemas/dateTime'
                        description: The date and time when a token is due to expire.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/settings:
    get:
      tags:
        - Client settings
      summary: Get client settings
      description: Use this method to get settings applied to a client profile.
      operationId: getClientSettings
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSettings'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    put:
      tags:
        - Client settings
      summary: Update client settings
      description: Use this method to change settings applied to a client profile.
      operationId: putClientSettings
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSettings'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSettings'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/settings/mobile:
    get:
      deprecated: true
      tags:
        - Mobile app settings
      summary: Get the mobile app settings
      description: 'You can display to clients QR codes for signing in to the Trader''s Room using the mobile app, as well as QR codes for downloading the mobile app to their iOS and Android devices. Use this method to get settings specified for these QR codes.'
      operationId: getMobileSettingsResource
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileSetting'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin/wizard:
    get:
      tags:
        - Auth
      summary: Initialize the Sign In wizard
      description: "Use this method to initialize the Sign In wizard for a client.\r\n\r\nFor detailed instructions, refer to [Authenticate a client and obtain the access token](https://docs.b2core.b2broker.com/en/rest-api-reference-front-authentication.html#authenticate-a-client-and-obtain-the-access-token)."
      operationId: initializeSignInWizard
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication procedure:\r\n\r\n - HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n - HTTP code 202 for a final wizard step signaling that client authentication succeeded"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The object that includes the following fields:'
                    properties:
                      recaptcha:
                        $ref: '#/components/schemas/Recaptcha'
                        deprecated: true
                      is_qr_available:
                        type: boolean
                        description: 'If *true*, a QR code is displayed on the Sign In page, enabling a client to sign in to the Trader''s Room by scanning the QR code; otherwise, *false*.'
                        example: true
                      is_password_recovery_available:
                        type: boolean
                        description: 'If *true*, a client can restore a forgotten password by clicking a password recovery link displayed on the Sign In page; otherwise, *false*.'
                  done:
                    type: boolean
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: "The string value *login* indicates that client credentials must be entered at the next step. Next, use POST/api/v2/my/signin."
                    example: login
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin:
    post:
      tags:
        - Auth
      summary: Sign in
      description: "After initializing the Sign In wizard, use this method to sign in a client to the Trader's Room.\r\n\r\n**Note:** If you exceed the allowed number of sign-in attempts, you’ll not be allowed to authenticate during a certain period.\r\n\r\nThe default number of allowed attempts is 5 within a minute, and the default blocking period is 10 minutes.\r\n\r\nThe default limits can be changed by the admin in the section **User Auth Settings**, which is available upon navigating to **System** > **Settings** in the Back Office."
      operationId: signIn
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) assigned to a client authentication session.
                email:
                  type: string
                  description: The client email address.
                  example: username@example.com
                password:
                  type: string
                  description: The client password.
                  example: m#P52s@ap$V
                device_fingerprint:
                  type: string
                  description: "The free-form JSON data (which includes the required *user_agent* field) generated by a client in the format of a Base64-encoded string that uniquely identifies a device from which a request is sent.\r\n\r\nTo learn how to get a device fingerprint, refer to [Obtain a device fingerprint](https://docs.b2core.b2broker.com/en/rest-api-reference-front-obtain-device-fingerprint.html)."
                  example: eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0XC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWVcLzExOC4wLjAuMCBTYWZhcmlcLzUzNy4zNiJ9
              required:
                - uuid
                - email
                - password
                - device_fingerprint
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication procedure:\r\n\r\n - TTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n - HTTP code 202 for a final wizard step signaling that client authentication succeeded"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'If authentication has succeeded, the details about the access and refresh tokens:'
                    properties:
                      accessToken:
                        type: object
                        properties:
                          token:
                            type: string
                            description: The access token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                      refreshToken:
                        type:
                          - object
                          - 'null'
                        properties:
                          token:
                            type: string
                            description: The refresh token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                      tfaProviders:
                        type: array
                        description: "An array of objects specifying whether any of the available 2FA methods are enabled for a client. The available 2FA methods include:\r\n\r\n- the Google Authenticator app\r\n\r\n- SMS codes"
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The 2FA method name.
                              example: sms
                            localizedCaption:
                              type: string
                              description: 'The localized name of a 2FA method, displayed in the Trader''s Room.'
                              example: SMS Confirmation
                            enabled:
                              type: boolean
                              description: 'If *true*, a 2FA method is enabled; otherwise, *false*.'
                              example: true
                  done:
                    type: boolean
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: "A string value indicating the next or final step of an authentication procedure. Possible values:\r\n\r\n- terminate — indicates that authentication succeeded and the access and refresh tokens were obtained\r\n\r\n- 2fa_google_auth — indicates that authentication must be completed by providing a 2FA code from the Google Authenticator app. Next, use POST[host]/api/v2/my/2fa/google.\r\n\r\n- 2fa_sms_auth — indicates that authentication must be completed by providing a 2FA code sent to a client phone number. Next, use POST[host]/api/v2/my/2fa/sms.\r\n\r\n- 2fa — indicates that both 2FA methods are enabled for a client (the Google Authenticator app and SMS codes). Next, select the preferred 2FA method."
                    example: terminate
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin/2fa:
    post:
      tags:
        - Auth
      summary: Choose a 2FA method
      description: Use this method to specify which 2FA method (the Google Authenticator app or SMS codes) should be used for authentication in the Trader's Room if both 2FA methods are enabled for a client.
      operationId: signIn2fa
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: "The universally unique identifier (UUID) assigned to a client authentication session.\r\n\r\nThis identifier is obtained after initializing the Sign In wizard."
                type:
                  type: string
                  description: "The 2FA method to be used for authentication. Possible values:\r\n\r\n- google — a code from the Google Authenticator app\r\n\r\n- sms — a code sent to a client phone number via SMS"
                  example: sms
              required:
                - uuid
                - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication process:\r\n\r\n - HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n - HTTP code 202 for a final wizard step signaling that client authentication succeeded"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    type: boolean
                    description: 'Always *false*, indicating that 2FA with a selected method must be completed.'
                    example: false
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: "A string value indicating the next step of an authentication procedure. Possible values:\r\n\r\n - 2fa_google_auth — use Google Authenticator to safely sign in to the Trader's Room\r\n\r\n - 2fa_sms_auth — use an SMS code to safely sign in to the Trader's Room\r\n\r\n - 2fa_sms_phone_create — add a phone number for use with 2FA (refer to [Enable 2FA with SMS](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#method-front-enable-2fa-with-sms))"
                    example: 2fa_sms_auth
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin/qrcodes:
    get:
      tags:
        - Auth
      summary: Get a QR code sign-in channel
      description: "You can enable clients to sign in to the Trader's Room by scanning QR codes displayed on the Sign In page using the mobile app to which they have already been signed in.\r\n\r\nUse this method to get the sign-in channel that is used to monitor the client’s authentication status when signing in to the Trader's Room using a QR code."
      operationId: getQrCodeChannel
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to the sign-in channel.
                  lifetimeMinutes:
                    type: integer
                    description: 'The channel lifetime, in minutes.'
                    example: 2
                  ip:
                    type: string
                    description: The client’s IP address.
                    example: 127.0.0.1
                  location:
                    type:
                      - string
                      - 'null'
                    description: "The client city that is determined based on the IP address.\r\n\r\nNext, use the method to get an authorization token for signing in using a QR code (POST/api/v2/my/signin/tokens)."
                    example: null
      security:
        - bearerAuth: []
    post:
      tags:
        - Auth
      summary: Sign in using a QR code
      description: Use this method to obtain a pair of access and refresh tokens.
      operationId: signUpQr
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                deviceFingerprint:
                  type: string
                  description: "The free-form JSON data (which includes the required user_agent field) generated by the client in the format of a Base64-encoded string that uniquely identifies a device from which a request is sent.r\n\r\nTo learn how to get a device fingerprint, refer to [Obtain a device fingerprint](https://docs.b2core.b2broker.com/en/rest-api-reference-front-obtain-device-fingerprint.html)."
                  example: eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0XC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWVcLzExOC4wLjAuMCBTYWZhcmlcLzUzNy4zNiJ9
                authorizationToken:
                  type: string
                  description: The authorization token generated for the client.
                  example: $2y$10$qZqqwQqqEX7X6nsPLfPkte2pB6gSHazY1v2CLutwBGWCeF4J6ZG06
              required:
                - deviceFingerprint
                - authorizationToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientId:
                    type: integer
                    description: The client identifier.
                    example: 1
                  tokens:
                    type: object
                    description: 'The details about tokens:'
                    properties:
                      accessToken:
                        type: object
                        properties:
                          token:
                            type: string
                            description: The access token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
                      refreshToken:
                        type:
                          - object
                          - 'null'
                        properties:
                          token:
                            type: string
                            description: The refresh token.
                            example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
                          createdAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token was generated.
                          expiresAt:
                            $ref: '#/components/schemas/dateTime'
                            description: The date and time when the token is due to expire.
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /api/v2/my/signin/tokens:
    post:
      tags:
        - Auth
      summary: Get an authorization token for signing in using a QR code
      description: "Use this method to get the authorization token required to sign in to the Trader's Room using a QR code.\r\n\r\nTo get the authorization token, a client must already be authenticated in the mobile app."
      operationId: generateQrCodeToken
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channelId:
                  type: string
                  description: "The identifier of the sign-in channel.\r\n\r\n To get the identifier, use the method to get a QR code sign-in channel."
              required:
                - channelId
      responses:
        '201':
          description: "The generated authorization token is returned after the qr_code_login WebSocket event is triggered.\r\n\r\nNext, use the method to sign in using a QR code (POST/api/v2/my/signin/qrcodes)."
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin/password/restore:
    post:
      tags:
        - Auth
      summary: Reset a password from the Sign In page
      description: 'After a client is forced to reset their password by the admin, use this method to start a password reset procedure for the client.'
      operationId: restorePasswordSignIn
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  description: Specify *code* to indicate that a verification code is required to restore a password.
                  example: code
                code:
                  type: string
                  description: The verification code sent to a client email address.
                  example: '12345'
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) obtained after initializing the Sign In wizard.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication procedure:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that client authentication succeeded"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: "A string value indicating the next step of an authentication procedure.\r\n\r\nreset_password — indicates that a new password must be set up for the client to sign in to the Trader's Room.\r\n\r\nNext, use the method to set up a new password from the Sign In page (POST/api/v2/my/signin/password/reset)."
                    example: reset_password
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signin/password/reset:
    post:
      tags:
        - Auth
      summary: Set up a new password from the Sign In page
      description: 'After a client is forced to reset their password by the admin, use this method to set up a new password for the client.'
      operationId: resetPasswordSignIn
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: A new password.
                  example: m#P52s@ap$V
                passwordConfirmation:
                  type: string
                  description: The repeatedly specified new password.
                  example: m#P52s@ap$V
                uuid:
                  $ref: '#/components/schemas/uuid'
                  description: The universally unique identifier (UUID) obtained after initializing the Sign In wizard.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of an authentication procedure:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of an authentication form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that client authentication succeeded"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    example: null
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, authentication has succeeded; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client authentication session.
                  workflow:
                    type: string
                    description: "A string value indicating the next step of an authentication procedure.\r\n\r\nThe client can now sign in to the Trader's Room using the new password. To do this, initialize the Sign In wizard again, and then use the method to sign in to the Trader's Room."
                    example: login
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signup/wizard:
    post:
      tags:
        - Registration
      summary: Initialize the Registration wizard
      description: "Use this method to initialize the Registration wizard for signing up a client to the Trader's Room. \r\n\r\nFor detailed instructions, refer to [Register a client](https://docs.b2core.b2broker.com/en/rest-api-reference-front-registration.html#register-a-client)."
      operationId: initializeSignUpWizard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                wizard:
                  type: string
                  description: The universally unique identifier (UUID) assigned to a registration procedure.
                utm:
                  type: object
                  description: 'The details about the UTM parameters included in a client registration link:'
                  properties:
                    utm_source:
                      type: string
                      description: The website which the client came from.
                    utm_medium:
                      type: string
                      description: The marketing channel that brought the client.
                    utm_campaign:
                      type: string
                      description: The promotion or strategic campaign.
                    utm_content:
                      type: string
                      description: The element that was clicked by the client.
                    utm_term:
                      type: string
                      description: The keyword associated with the campaign.
                    utm_uri:
                      type: string
                      description: The URI of the website which the client came from.
                    utm_referral:
                      type: string
                      description: The referral code that determines the client registration link address.
                      example: 29734fc149dc93809d18f49ae970810a
                    referral:
                      type: string
                      example: 29734fc149dc93809d18f49ae970810a
                    gclid:
                      type: string
                      description: The Google Click identifier passed to the client registration link.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a registration procedure:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a registration form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that a registration procedure succeeded"
                    example: 200
                  data:
                    type: 'null'
                    oneOf:
                      - $ref: '#/components/schemas/BasicRegisterFormWorkflow'
                      - $ref: '#/components/schemas/RegistrationListWorkflow'
                      - $ref: '#/components/schemas/TerminateWorkflow'
                  done:
                    type: boolean
                    description: 'If *true*, registartion has been successfully completed; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a registration procedure.
                  workflow:
                    type: string
                    enum:
                      - basic_register_form
                      - registration_list
                    description: "A string value indicating the next or final step of a registration procedure.\r\n\r\n- basic_register_form — indicates that a list of fields that a client must fill in has been received in the responce. Next, use POST/api/v2/my/signup and specify those fields as parameters in the request body.\r\n\r\n- registration_list — indicates that a list of Registration wizards (if there is more than one wizard can be used for registration) has been received in the responce. Next, use POST/api/v2/my/signup and specify the *uuid* and *wizard_id* parameters in the request body."
                    example: basic_register_form
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signup:
    post:
      tags:
        - Registration
      summary: Sign up
      description: "After initializing the Registration wizard, use this method to sign up a client to the Trader's Room.\r\n\r\nIf after initializing the Registration wizard, you received the *basic_register_form* workflow, specify the received fields in the request body of POST/api/v2/my/signup.\r\n\r\nIf after initializing the Registration wizard, you received the *registration_list* workflow, specify the *uuid* and *wizard_id* parameters in the request body of POST/api/v2/my/signup."
      operationId: signUp
      requestBody:
        content:
          application/json:
            schema:
              description: Depends on the response obtained after initialing the Registration wizard.
              oneOf:
                - type: object
                  description: 'For the *registration_list* response:'
                  properties:
                    uuid:
                      $ref: '#/components/schemas/uuid'
                      description: The universally unique identifier (UUID) assigned to a registration procedure.
                    wizard_id:
                      type: integer
                      description: The identifier of the Registration wizard to be used to sign up a client to the Trader's Room.
                  required:
                    - uuid
                    - wizard_id
                - type: object
                  description: 'For *basic_register_form* response:'
                  properties:
                    uuid:
                      $ref: '#/components/schemas/uuid'
                    addresses:
                      type: object
                      properties:
                        '0':
                          type: object
                          properties:
                            country_code:
                              type: string
                              example: '16'
                    email:
                      type: string
                      example: username@example.com
                    info:
                      type: object
                      properties:
                        familyName:
                          type: string
                          example: John
                        givenName:
                          type: string
                          example: Logan
                    password:
                      type: string
                      example: Secret123
                    password_confirmation:
                      type: string
                      example: Secret123
                    device_fingerprint:
                      type: string
                      example: dwqdnNFJBOEBFJEBjqewbkjqbdwjqwbndjnbj
                  required:
                    - uuid
                    - email
                    - password
                    - password_confirmation
                    - device_fingerprint
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                      - 202
                    description: "An HTTP code specifying the current step of a registration procedure:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a registration form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that a registration procedure succeeded"
                    example: 202
                  data:
                    type: 'null'
                    oneOf:
                      - $ref: '#/components/schemas/BasicRegisterFormWorkflow'
                      - $ref: '#/components/schemas/TerminateWorkflow'
                  done:
                    $ref: '#/components/schemas/boolean'
                    description: 'If *true*, registartion has been successfully completed; otherwise, *false*.'
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a registration procedure.
                  workflow:
                    type: string
                    enum:
                      - terminate
                      - basic_register_form
                    description: "A string value indicating the next or final step of a registration procedure.\r\n\r\n- terminate — indicates that a client has been successfully registered in the Trader's Room.\r\n\r\n- basic_register_form — indicates that a list of fields that a client must fill in has been received in the responce. Next, use POST/api/v2/my/signup again and specify those fields in the request body."
                    example: terminate
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signup/list:
    get:
      tags:
        - Registration
      summary: Get registration configurations
      description: Use this method to retrieve a list of enabled registration configurations available for signing up.
      operationId: getSignupList
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          $ref: '#/components/schemas/uuid'
                          description: The universally unique identifier (UUID) of the registration configuration.
                        type:
                          type: string
                          enum:
                            - individual
                            - corporate
                          description: The type of client registration.
                          example: individual
                        caption:
                          type: string
                          description: The localized display name of the registration configuration.
                          example: Individual
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
  /api/v2/my/signup/{configId}/form:
    get:
      tags:
        - Registration
      summary: Get registration form
      description: Use this method to retrieve the registration form fields for a specific registration configuration.
      operationId: getSignupForm
      parameters:
        - name: configId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
          description: The universally unique identifier (UUID) of the registration configuration.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      form:
                        type: object
                        description: The registration form structure containing fields to be filled in.
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
  /api/v2/my/signup/{configId}/initialize:
    post:
      tags:
        - Registration
      summary: Initialize registration
      description: "Use this method to initialize a registration procedure for a specific registration configuration.\r\n\r\nIf email confirmation is required, the method returns a *registerId* to be used to confirm the email address. Otherwise, the registration is completed immediately and HTTP 201 is returned."
      operationId: initializeSignup
      parameters:
        - name: configId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
          description: The universally unique identifier (UUID) of the registration configuration.
        - name: acc
          in: header
          required: false
          schema:
            type: string
            default: en
          description: The locale code for the registration session.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - encryptedInput
              properties:
                encryptedInput:
                  type: string
                  description: The encrypted registration form data.
                utm:
                  type: object
                  description: The UTM parameters associated with the registration link.
                  properties:
                    utm_source:
                      type: string
                      description: The website which the client came from.
                    utm_medium:
                      type: string
                      description: The marketing channel that brought the client.
                    utm_campaign:
                      type: string
                      description: The promotion or strategic campaign.
                    utm_content:
                      type: string
                      description: The element that was clicked by the client.
                    utm_term:
                      type: string
                      description: The keyword associated with the campaign.
      responses:
        '200':
          description: OK — Email confirmation is required. Use the returned *registerId* to confirm the email address.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      registerId:
                        $ref: '#/components/schemas/uuid'
                        description: The identifier of the pending registration. Use it to confirm the email address or resend the confirmation code.
        '201':
          description: Created — Registration completed successfully, no confirmation required. Returns authentication tokens.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrationAuthResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
  /api/v2/my/signup/{registerId}/confirm:
    post:
      tags:
        - Registration
      summary: Confirm email
      description: Use this method to confirm the email address of a pending registration using the confirmation code sent to the client.
      operationId: confirmSignupEmail
      parameters:
        - name: registerId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
          description: The identifier of the pending registration received from the initialize endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - code
              properties:
                code:
                  type: string
                  description: The confirmation code sent to the client's email address.
      responses:
        '201':
          description: Created — Email confirmed and registration completed successfully. Returns authentication tokens.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RegistrationAuthResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
  /api/v2/my/signup/{registerId}/resend:
    post:
      tags:
        - Registration
      summary: Resend confirmation code
      description: Use this method to resend the confirmation code to the client's email address for a pending registration.
      operationId: resendSignupConfirmationCode
      parameters:
        - name: registerId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
          description: The identifier of the pending registration received from the initialize endpoint.
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
  /api/v2/my/signup-context:
    post:
      tags:
        - Registration
      summary: Submit marketing attribution data
      description: "After the first successful authentication, the front-end submits captured marketing attribution data (UTM parameters, click IDs, device context, and the full journey of marketing touches) for the authenticated client. The endpoint is idempotent on (clientId, sessionId): repeated calls from the same browser do not duplicate data."
      operationId: submitSignupContext
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignupContextPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/signout:
    post:
      tags:
        - Auth
      summary: Sign out
      description: Use this method to sign out of the Trader's Room.
      operationId: signOut
      responses:
        '200':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/storage/values:
    get:
      tags:
        - Key-value storage
      summary: Get a list of key-value pairs
      description: "The key-value storage keeps the parameters (such as text color, company name, or others) and their values, which are used in email templates for client notifications. The parameters and their values are stored as key-value pairs.\r\n\r\nUse this method to obtain a list of defined key-value pairs."
      operationId: getStorageValuesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              keys:
                type: array
                description: An array of string values specifying key names.
                items:
                  type: string
              tags:
                type: array
                description: An array of integer values specifying identifiers of the tags assigned to key-value pairs.
                items:
                  type: integer
              value:
                type: string
                description: The value assigned to a key.
              type:
                type: integer
                enum:
                  - 0
                  - 1
                  - 2
                  - 3
                description: 'The value type. Possible values: 0 – string, 1 – html, 2 – mail, 3 – url.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/KeyStorageValue'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/storage/values/{valueId}':
    get:
      tags:
        - Key-value storage
      summary: Get key-value pair details
      description: Use this method to obtain detailed information about a specific key-value pair.
      operationId: getStorageValuesResource
      parameters:
        - name: valueId
          in: path
          description: The identifier of a key-value pair.
          required: true
          schema:
            $ref: '#/components/schemas/integer'
            example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyStorageValue'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/support/user/ensure-exists:
    get:
      tags:
        - Support
      summary: Check if a client exists in SupportPal
      description: "Use this method to check if a client exists in SupportPal.\r\n\r\nThe third-party solution for providing help desk services, [SupportPal](https://www.supportpal.com/), enables you to manage tickets submitted by clients via the Trader's Room."
      operationId: ensureUserExists
      responses:
        '200':
          description: Exists
        '201':
          description: Created
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - bearerAuth: []
  /api/v2/my/tickets:
    get:
      tags:
        - Tickets
      summary: Get a list of tickets
      description: "Use this method to get a list of the tickets submitted by a client to a help desk system.\r\n\r\nThe third-party solution for providing help desk services, [SupportPal](https://www.supportpal.com/), enables you to manage tickets submitted by clients via the Trader's Room."
      operationId: getTicketCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createTime
              - id
              - number
              - subject
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              type:
                type: string
                enum:
                  - message_text
                  - subject
                description: "The filter type. Possible values:\r\n\r\n- subject — to filter by ticket subject\r\n\r\n- message_text — to filter by ticket message"
              typeValue:
                type: string
                description: The value used to filter a list of tickets.
                example: issues
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Ticket'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Tickets
      summary: Submit a ticket
      description: Use this method to submit a ticket to a help desk system.
      operationId: createTicket
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subject:
                  type: string
                  description: The ticket subject.
                  example: Bug
                text:
                  type: string
                  description: The ticket text describing an issue or including a question.
                  example: Fix it please
                attachments:
                  type: array
                  description: An array of string values specifying the attachments that you want to add to a ticket.
                  example:
                    - example.csv
                  items:
                    type: string
                    cformat: binary
                supportpalSendEmail:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: 'If *1*, an email notification about a submitted ticket is sent to a client from SupportPal; otherwise, *0*.'
                customFields:
                  type: object
                  description: The objects specifying custom fields that must be filled in for submitting a ticket.
              required:
                - subject
                - text
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    $ref: '#/components/schemas/uuid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/tickets/{ticketId}':
    get:
      tags:
        - Tickets
      summary: Get ticket details
      description: Use this method to get detailed information about a specific ticket submitted to a help desk system.
      operationId: getTicketResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: ticketId
          in: path
          description: The ticket identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/tickets/{ticketId}/close':
    post:
      tags:
        - Tickets
      summary: Close a ticket
      description: Use this method to close a ticket after it was resolved.
      operationId: closeTicket
      parameters:
        - name: ticketId
          in: path
          description: The ticket identifier.
          example: '1'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                  description: The feedback comment left by a client.
                status:
                  type: string
                  enum:
                    - extraPositive
                    - positive
                    - neutral
                    - negative
                    - extraNegative
                  description: The client satisfaction rating.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    $ref: '#/components/schemas/uuid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/tickets/{ticketId}/reopen':
    post:
      tags:
        - Tickets
      summary: Reopen a ticket
      description: Use this method to reopen a ticket that was previously closed.
      operationId: reopenTicket
      parameters:
        - name: ticketId
          in: path
          description: The ticket identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '202':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    $ref: '#/components/schemas/uuid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/tickets/{ticketId}/messages':
    get:
      tags:
        - Tickets
      summary: Get a list of messages sent to the support chart
      description: Use this method to get a list of the messages related to a specific ticket that were sent to the support chat.
      operationId: getTicketMessageCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createTime
              - id
              - text
            default: createTime
        - name: ticketId
          in: path
          description: The ticket identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TicketMessage'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Tickets
      summary: Send a message to the support chart
      description: Use this method to send a massage to the support chat.
      operationId: createTicketMessage
      parameters:
        - name: ticketId
          in: path
          description: The identifier of a ticket to which a message relates.
          example: '1'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: The message text.
                attachments:
                  type: array
                  description: An array of string values specifying the attachments that you want to add to a message.
                  example:
                    - example.csv
                  items:
                    type: string
                    contentMediaType: application/octet-stream
              required:
                - text
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    $ref: '#/components/schemas/uuid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/tickets/attachments/{attachmentId}':
    get:
      tags:
        - Tickets
      summary: Download ticket attachments
      description: Use this method to download the files attached to help desk tickets.
      operationId: downloadTicketAttachment
      parameters:
        - name: attachmentId
          in: path
          description: The attachment identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
                example: example.csv
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
  /api/v2/my/tickets/fields:
    get:
      tags:
        - Tickets
      summary: Get ticket fields
      description: Use this method to get a list of the custom fields that clients must fill in to submit a ticket to a help desk system.
      operationId: getTicketFields
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: 'An array of objects providing details about the custom fields:'
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The field name.
                      example: customField
                    label:
                      type: string
                      description: The field caption displayed in the Trader's Room.
                      example: Custom Field
                    rules:
                      type: array
                      description: The field rules.
                      items:
                        type: object
                        example: {}
                    subFields:
                      type: array
                      description: Additional fields related to a given field.
                      items:
                        type: object
                        example: {}
                    type:
                      type: integer
                      description: The field type.
                      example: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/transactions:
    get:
      tags:
        - Transactions
      summary: Get a list of transactions
      description: "Use this method to obtain a list of transactions (such as deposits, withdrawals, exchanges, and transfers) made on accounts owned by the currently authorized client.\r\n\r\nWhen a request doesn’t include a filter parameter indicating the transaction *type*, a response includes transactions of all types.\r\n\r\n**Note:** A response includes transactions with any status, except for those marked as *new*."
      operationId: getTransactionCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createTime
              - creditAmount
              - debitAmount
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              accountId:
                type: integer
                description: The identifier of a client account.
                example: 1
              sourceCurrencyCode:
                type: integer
                description: The numeric code of a source currency.
                example: 840
              destinationCurrencyCode:
                type: integer
                description: The numeric code of a destination currency.
                example: 840
              currencyCode:
                type: integer
                description: The numeric code of a currency matched on either side of a transaction (source OR destination).
                example: 840
              status:
                $ref: '#/components/schemas/TransactionStatus'
              type:
                $ref: '#/components/schemas/TransactionType'
              createTimeFrom:
                type: string
                description: The start date and time of a period for which you want to get transactions.
                example: '2025-04-01T07:23:59%2B00:00'
              createTimeTo:
                type: string
                description: The end date and time of a period for which you want to get transactions.
                example: '2025-04-04T07:23:59%2B00:00'
              idFrom:
                type: integer
                description: The minimum transaction identifier (inclusive). Returns transactions with ID >= idFrom.
                example: 100
              idTo:
                type: integer
                description: The maximum transaction identifier (inclusive). Returns transactions with ID <= idTo.
                example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Transaction'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/transactions/{transaction}':
    get:
      tags:
        - Transactions
      summary: Get transaction details
      description: Use this method to obtain detailed information about a specific transaction.
      operationId: getTransactionResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: transaction
          in: path
          description: The transaction identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/types:
    get:
      tags:
        - Clients
      summary: Get a list of client types
      description: Use this method to obtain a list of types that can be assigned to clients.
      operationId: getClientTypeCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TypeClient'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/types/{typeId}':
    get:
      tags:
        - Clients
      summary: Get client type details
      description: Use this method to obtain detailed information about a specific client type.
      operationId: getClientTypeResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: typeId
          in: path
          description: The client type identifier.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TypeClient'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/verifications:
    get:
      tags:
        - Verifications
      summary: Get verification history
      description: Use this method to obtain a list of all operations of granting verification levels to a client.
      operationId: getVerificationCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Verification'
      security:
        - bearerAuth: []
    post:
      tags:
        - Verifications
      summary: Run a verification procedure
      description: 'After intializing the wizard for running a verification procedure, use this method to run the procedure for a client.'
      operationId: createVerificationResource
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: The documents submitted for passing a verification procedure.
                  properties:
                    documents:
                      type: object
                      properties:
                        type:
                          type: integer
                          description: The identifier of a document type.
                          example: 1
                        files:
                          type: array
                          description: An array of string values specifying filenames of the submitted documents.
                          items:
                            type: string
                            format: binary
                    uuid:
                      $ref: '#/components/schemas/uuid'
                      description: The universally unique identifier (UUID) obtained after initializing a wizard for running a verification procedure.
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step in a progression of wizard pages:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a KYC form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that verification was completed"
                    example: 202
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The details about submitted document types:'
                    properties:
                      types:
                        $ref: '#/components/schemas/VerificationType'
                  done:
                    type: boolean
                    description: 'If *true*, a verification procedure has succeeded; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client verification procedure.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a verification procedure.
                    example: terminate
                  rules:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/verifications/{verification}':
    get:
      tags:
        - Verifications
      summary: Get verification details
      description: Use this method to obtain detailed information about a specific operation of granting a verification level to a client.
      operationId: getVerificationResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: verification
          in: path
          description: The identifier of an operation of granting a verification level.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Verification'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/verifications/levels:
    get:
      tags:
        - Verifications
      summary: Get a list of verification levels
      description: Use this method to obtain a list of verification levels that clients can obtain in the Trader's Room.
      operationId: getVerificationLevelCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/VerificationLevel'
      security:
        - bearerAuth: []
  '/api/v2/my/verifications/levels/{levelId}':
    get:
      tags:
        - Verifications
      summary: Get verification level details
      description: Use this method to obtain detailed information about a specific verification level.
      operationId: getVerificationLevelResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: levelId
          in: path
          description: The identifier of a verification level.
          example: '1'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationLevel'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/verifications/wizard:
    get:
      tags:
        - Verifications
      summary: Initialize the wizard for running a verification procedure
      description: Use this method to initialize the wizard for running a verification procedure for a client.
      operationId: getVerificationWizardCollection
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: "An HTTP code specifying the current step in a progression of wizard pages:\r\n\r\n- HTTP code 200 for an intermediary step after which another page of a KYC form is displayed to a client\r\n\r\n- HTTP code 202 for a final wizard step signaling that verification was completed"
                    example: 200
                  data:
                    type:
                      - object
                      - 'null'
                    description: 'The details about document types required for obtaining this verification level:'
                    properties:
                      types:
                        $ref: '#/components/schemas/VerificationType'
                  done:
                    type: boolean
                    description: 'If *true*, a verification procedure has succeeded; otherwise, *false*.'
                    example: true
                  uuid:
                    $ref: '#/components/schemas/uuid'
                    description: The universally unique identifier (UUID) assigned to a client verification procedure.
                  workflow:
                    type: string
                    description: A string value indicating the next or final step of a verification procedure.
                    example: ShuftiProSDKWorkflow
                  rules:
                    type: array
                    items:
                      type: string
        '202':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 202
                  message:
                    type: string
      security:
        - bearerAuth: []
  /api/v2/my/widgets:
    get:
      tags:
        - Widgets
      summary: Get a list of widgets
      description: Use this method to obtain a list of widgets available to clients in the Trader's Room.
      operationId: getWidgetCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Widget'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/widgets/{widgetId}':
    get:
      tags:
        - Widgets
      summary: Get widget details
      description: Use this method to obtain detailed information about a specific widget.
      operationId: getWidgetResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: widgetId
          in: path
          description: The widget identifier.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Widget'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals:
    post:
      tags:
        - Withdrawals
      summary: Start withdrawal
      description: Use this method to submit withdrawal form.
      operationId: startWithdrawal
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/uuid'
                  description: The identifier of a withdrawal. Idempotency key when creating a withdrawal.
                methodId:
                  type: integer
                  description: 'The identifier of a withdrawal method.'
                  example: 1
                accountId:
                  type: integer
                  description: 'The identifier of a source account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2005
                amount:
                  type: string
                  description: 'Operation amount.'
                  example: '100'
                data:
                  oneOf:
                    - type: object
                      title: Legacy
                      description: 'A one-dimensional object with data from a payment form. Compiled from field values obtained from the "/api/v2/my/withdrawal-methods/{id}/form" method.'
                      example: '{"account": 1, "bank_code": 2205}'
                    - $ref: '#/components/schemas/WithdrawalFormSubmitRequest'
              required:
                - id
                - methodId
                - accountId
                - currencyCode
                - amount
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/uuid'
                    description: The identifier of a withdrawal.
                  confirmationChannel:
                    type: string
                    enum:
                      - empty
                      - email
                      - phone
                      - googleAuthenticator
                    example: email
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/StartWithdrawalUnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/{id}:
    get:
      tags:
        - Withdrawals
      summary: Get withdrawal
      description: Use this method to get withdrawal.
      operationId: getWithdrawal
      parameters:
        - $ref: '#/components/parameters/language'
        - name: id
          in: path
          description: The identifier of a withdrawal.
          example: '36f59381-5b54-48bd-a0c7-3b908c476732'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/uuid'
                    description: The identifier of a withdrawal.
                  method:
                    type: object
                    description: Withdrawal method information.
                    properties:
                      id:
                        $ref: '#/components/schemas/integer'
                        description: Withdrawal method identifier.
                      caption:
                        type: string
                        description: Withdrawal method caption.
                        example: 'B2BInPay'
                  rate:
                    type: string
                    description: Rate for operation.
                    example: '1.20'
                  commission:
                    type: string
                    description: Operation commission for source account.
                    example: '10.00'
                  sourceCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for source account.
                    example: 'USD'
                  sourceCurrencyAmount:
                    type: string
                    description: Operation amount for source account.
                    example: '100.00'
                  destinationCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for payment system.
                    example: 'USD'
                  destinationCurrencyAmount:
                    type: string
                    description: Operation amount for payment system.
                    example: '100.00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/preview:
    post:
      tags:
        - Withdrawals
      summary: Get withdrawal preview
      description: Use this method to calculate withdrawal preview
      operationId: calculateWithdrawalPreview
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                methodId:
                  type: integer
                  description: 'The identifier of a withdrawal method.'
                  example: 1
                accountId:
                  type: integer
                  description: 'The identifier of a source account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2005
                amount:
                  type: string
                  description: 'Operation amount.'
                  example: '100'
                mode:
                  type: string
                  description: 'Operation calculation mode. Specifies which amount is used to calculate the operation.'
                  enum:
                    - source
                    - destination
                  default: 'source'
              required:
                - methodId
                - accountId
                - currencyCode
                - amount
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation.
                    example: '1.20'
                  amount:
                    type: string
                    description: Operation amount.
                    example: '110.00'
                  commission:
                    type: string
                    description: Operation commission for source account.
                    example: '10.00'
                  sourceCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for source account.
                    example: 'USD'
                  sourceCurrencyAmount:
                    type: string
                    description: Operation amount for source account.
                    example: '100.00'
                  destinationCurrencyAlphaCode:
                    type: string
                    description: Currency alpha code for payment system.
                    example: 'USD'
                  destinationCurrencyAmount:
                    type: string
                    description: Operation amount for payment system.
                    example: '100.00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/exchange-rate:
    get:
      tags:
        - Withdrawals
      summary: Get exchange rate for withdrawal method and account
      description: Use this method to receive exchange rate
      operationId: getWithdrawalExchangeRate
      parameters:
        - name: methodId
          in: query
          description: The identifier of a withdrawal method
          example: 1
          required: true
          schema:
            type: integer
        - name: accountId
          in: query
          description: The identifier of a operation account
          example: 1
          required: true
          schema:
            type: integer
        - name: currencyCode
          in: query
          description: Operation currencyCode
          example: 2005
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rate:
                    type: string
                    description: Rate for operation
                    example: '1.20'
                  baseCurrency:
                    type: object
                    description: Base currency
                    properties:
                      code:
                        type: integer
                        description: Currency code
                        example: 2005
                      alpha:
                        type: string
                        description: Currency alpha code
                        example: 'USDT'
                  quoteCurrency:
                    type: object
                    description: Quote currency
                    properties:
                      code:
                        type: integer
                        description: Currency code
                        example: 2005
                      alpha:
                        type: string
                        description: Currency alpha code
                        example: 'USDT'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: [ ]
  /api/v2/my/withdrawals/confirm:
    post:
      tags:
        - Withdrawals
      summary: Confirm withdrawal
      description: Use this method to withdrawal confirmation
      operationId: confirmWithdrawal
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/uuid'
                  description: The identifier of a withdrawal.
                code:
                  type: string
                  description: Verification code
                  example: 12345
              required:
                - id
                - code
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/resend:
    post:
      tags:
        - Withdrawals
      summary: Resend withdrawal confirmation
      description: Use this method to resend withdrawal confirmation
      operationId: resendWithdrawalConfirmation
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/uuid'
                  description: The identifier of a withdrawal.
              required:
                - id
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawal-methods:
    get:
      tags:
        - Withdrawals
      summary: Get withdrawal methods list
      description: Use this method to get a list of available withdrawal methods
      operationId: getWithdrawalMethods
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a group in which a withdrawal method is included.
                example: 1
              tradersRoomCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a transaction currency to a withdrawal method.
                example: 1
              paymentSystemCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a payment currency to a withdrawal method.
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - createTime
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: List of available withdrawal methods
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WithdrawalMethodItem'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawal-methods/{id}/form:
    post:
      tags:
        - Withdrawals
      summary: Create withdrawal method form
      description: Use this method to create withdrawal method form.
      operationId: createWithdrawalMethodForm
      parameters:
        - $ref: '#/components/parameters/language'
        - name: id
          in: path
          description: The identifier of a withdrawal method.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  type: integer
                  description: 'Operation account.'
                  example: 1
                currencyCode:
                  type: integer
                  description: 'Operation currency code.'
                  example: 2205
                deviceTimezone:
                  type: string
                  description: Client device local Timezone.
                  example: Europe/Moscow
                locale:
                  type: string
                  description: 'Client device locale.'
                  example: 'EN'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalMethodField'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: 'List of violations when generating a payment form'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSystemsViolations'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/currencies:
    get:
      tags:
        - Withdrawals
      summary: Get a list of withdrawal currencies
      description: Use this method to obtain a list of enabled transaction and payment currencies added to the withdrawal methods that are available to clients in the Trader's Room.
      operationId: getWithdrawalCurrenciesCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            const: createTime
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a withdrawal group for which you want to get a list of available currencies.
              type:
                type: string
                enum:
                  - tradersRoom
                  - paymentSystem
                description: "The type of a currency added to a withdrawal method. Possible values:\r\n\r\n - tradersRoom — transaction currencies\r\n\r\n - paymentSystem — payment currencies"
                example: tradersRoom
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available withdrawal currencies
                items:
                  $ref: '#/components/schemas/Currency'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/groups:
    get:
      tags:
        - Withdrawals
      summary: Get a list of withdrawal groups
      description: Use this method to obtain a list of available groups that are used to categorize withdrawal methods.
      operationId: getWithdrawalGroupsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - name
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available withdrawal groups
                items:
                  $ref: '#/components/schemas/WithdrawalMethodGroup'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/methods:
    get:
      deprecated: true
      tags:
        - Withdrawals (deprecated)
      summary: Get a list of withdrawal methods
      description: Use this method to obtain a list of available withdrawal methods.
      operationId: getWithdrawalMethodsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/order'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              groupId:
                type: integer
                description: The identifier of a group in which a withdrawal method is included.
                example: 1
              tradersRoomCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a transaction currency to a withdrawal method.
                example: 1
              paymentSystemCurrencyNumericCode:
                type: integer
                description: The numeric code of a currency that is added as a payment currency to a withdrawal method.
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - priority
              - createTime
            default: priority
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: An array of objects providing details about available withdrawal methods
                items:
                  $ref: '#/components/schemas/WithdrawalMethod'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/withdrawals/methods/{methodId}':
    get:
      deprecated: true
      tags:
        - Withdrawals (deprecated)
      summary: Get withdrawal method details
      description: Use this method to obtain detailed information about a specific withdrawal method.
      operationId: getWithdrawalMethodResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: methodId
          in: path
          description: The identifier of a withdrawal method.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalMethod'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/patterns:
    get:
      tags:
        - Withdrawal presets
      summary: Get withdrawal presets
      description: "Use this method to obtain a list of saved withdrawal presets.\r\n\r\nWhen making withdrawals in the Trader's Room, clients can save withdrawal details as presets to avoid the need to enter the same information repeatedly for frequent withdrawals."
      operationId: getWithdrawalPatternsCollection
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createTime
              - name
            default: createTime
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              name:
                type: string
                description: The name of a withdrawal preset.
                example: My withdrawal preset
              fromCreateTime:
                type: string
                description: The start date of a period when withdrawal presets were saved.
                example: '2022-12-01T07:23:59%2B00:00'
              toCreateTime:
                type: string
                description: The end date of a period when withdrawal presets were saved.
                example: '2022-12-01T07:23:59%2B00:00'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WithdrawalPattern'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    post:
      tags:
        - Withdrawal presets
      summary: Save a withdrawal preset
      description: Use this method to save a withdrawal preset.
      operationId: storeWithdrawalPatternResource
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of a withdrawal preset.
                  example: My withdrawal preset
                accountId:
                  type: string
                  description: The identifier of an account from which funds are to be withdrawn.
                  example: '1'
                amount:
                  type: string
                  description: The withdrawal amount.
                  example: '200'
                amountTo:
                  type: string
                  description: The withdrawal amount converted to the currency in which the wallet for withdrawing funds is denominated.
                  example: '200'
                methodId:
                  type: integer
                  description: The identifier of a withdrawal method.
                  example: 1
                currencyNumericCode:
                  type: integer
                  description: The numeric code of the currency in which a withdrawal transaction is made.
                  example: 840
                groupId:
                  type: integer
                  description: The identifier of the group in which a withdrawal method is included.
                  example: 1
                data:
                  type: object
                  description: The transaction details specific to a withdrawal method.
                isWhitelisted:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: 'If *1*, the withdrawal address saved with a preset is added to a client whitelist; otherwise, *0*. This parameter can’t be set if the option for managing withdrawal address whitelists is disabled for a client.'
              required:
                - name
                - amount
                - data
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalPattern'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  '/api/v2/my/withdrawals/patterns/{patternId}':
    get:
      tags:
        - Withdrawal presets
      summary: Get withdrawal preset details
      description: Use this method to obtain detailed information about a specific withdrawal preset.
      operationId: getWithdrawalPatternResource
      parameters:
        - $ref: '#/components/parameters/language'
        - name: patternId
          in: path
          description: The identifier of a withdrawal preset.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalPattern'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    patch:
      tags:
        - Withdrawal presets
      summary: Update a withdrawal preset
      description: Use this method to update a withdrawal preset.
      operationId: updateWithdrawalPatternResource
      parameters:
        - name: patternId
          in: path
          description: The identifier of a withdrawal preset.
          example: 1
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of a withdrawal preset.
                  example: My withdrawal preset
                data:
                  type: object
                  description: The transaction data specific to a withdrawal method.
                isWhitelisted:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: 'If *1*, the withdrawal address saved with a preset is added to a client whitelist; otherwise, *0*. This parameter can’t be updated if the option for managing withdrawal address whitelists is disabled for a client.'
                accountId:
                  type: integer
                  description: The identifier of an account from which funds are to be withdrawn.
                  example: 1
                amount:
                  type: string
                  description: The withdrawal amount.
                  example: '200'
                amountTo:
                  type: string
                  description: The withdrawal amount converted to the currency in which the wallet for withdrawing funds is denominated.
                  example: '200'
                methodId:
                  type: integer
                  description: The identifier of a withdrawal method.
                  example: 1
                currencyNumericCode:
                  type: integer
                  description: The numeric code of the currency in which a withdrawal transaction is made.
                  example: 840
                groupId:
                  type: integer
                  description: The identifier of the group in which a withdrawal method is included.
                  example: 1
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalPattern'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
    delete:
      tags:
        - Withdrawal presets
      summary: Delete a withdrawl preset
      description: Use this method to remove a specific withdrawal preset.
      operationId: deleteWithdrawalPatternResource
      parameters:
        - name: patternId
          in: path
          description: The identifier of a withdrawal preset.
          example: 1
          required: true
          schema:
            type: integer
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/withdrawals/templates:
    get:
      tags:
        - Withdrawal templates
      summary: Get withdrawal templates
      description: "Use this method to obtain a list of saved withdrawal templates.\r\n\r\nWhen making withdrawals in the Trader's Room, clients can save withdrawal details as presets to avoid the need to enter the same information repeatedly for frequent withdrawals."
      operationId: getWithdrawalTemplates
      parameters:
        - $ref: '#/components/parameters/language'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              name:
                type: string
                description: The name of a withdrawal template.
                example: My withdrawal template
              methodId:
                type: int
                description: The identifier of a withdrawal method.
                example: 1
              currencyCode:
                type: string
                description: Comma-separated wallet currency codes.
                example: 2005,840
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: '#/components/schemas/integer'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WithdrawalTemplate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
  /api/v2/my/savings/presets:
    get:
      summary: Get a list of savings presets
      description: "Use this method to get a list of all available presets. Presets contain settings of the savings programs to which clients can subscribe in the Trader's Room. Savings plans are created based on presets when clients subscribe to savings programs."
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    minItems: 0
                    items:
                      $ref: '#/components/schemas/SavingsPreset'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Savings
      operationId: savings-presets-list
    parameters: []
  '/api/v2/my/savings/presets/{preset_id}/calculate':
    post:
      summary: Calculate the savings details of a specific preset
      description: Use this method to calculate the savings details of a specific preset and get a schedule of interest payments.
      parameters:
        - name: preset_id
          in: path
          required: true
          description: The universally unique identifier (UUID) of a savings preset.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SavingsPresetCalculation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Preset not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Preset not Found
              examples:
                Preset not found:
                  value:
                    error:
                      message: Preset not Found
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Insufficient wallet balance
              examples:
                Inactive preset:
                  value:
                    error:
                      message: Cannot calculate inactive preset
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      operationId: savings-presets-calculate
      tags:
        - Savings
    parameters:
      - schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
        name: preset_id
        in: path
        required: true
  /api/v2/my/savings/plans:
    post:
      summary: Create a savings plan
      description: Use this method to create a savings plan based on a specific preset.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - presetId
                - walletId
              properties:
                presetId:
                  type: string
                  format: uuid
                  description: The universally unique identifier (UUID) of a savings preset.
                  minLength: 36
                  maxLength: 36
                  example: 09d5ce50-5fe8-469f-b6c4-c39698f98c22
                walletId:
                  type: string
                  example: '4815162342'
                  minLength: 1
                  maxLength: 36
                  description: "The number of a client's wallet."
                attributes:
                  type: object
                  properties:
                    amount:
                      type: number
                      format: double
                      description: The amount that must be contributed to a savings program.
                      example: 1000.5
                      minimum: 0
                      exclusiveMinimum: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/SavingsPlan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: |-
            Precondition Failed
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    error:
                      message: Insufficient wallet balance
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        readOnly: true
              examples:
                Insufficient balance:
                  value:
                    error:
                      message: Insufficient wallet balance
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      operationId: savings-plans-create
      tags:
        - Savings
    get:
      summary: Get a list of savings plans
      description: Use this method to get a list of all savings plans.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SavingsPlan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Savings
      operationId: savings-plans-list
    parameters: []
  '/api/v2/my/savings/plans/{plan_id}/payments':
    get:
      summary: Get a list of interest payments for a specific savings plan
      description: Use this method to get a list of interest payments included in a specific savings plan.
      parameters:
        - name: plan_id
          in: path
          required: true
          description: The universally unique identifier (UUID) of a savings plan.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    minItems: 1
                    items:
                      $ref: '#/components/schemas/SavingsPlanPayment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Plan not found
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Savings
      operationId: savings-plans-payments-list
    parameters:
      - schema:
          type: string
        name: plan_id
        in: path
        required: true
  '/api/v2/my/savings/plans/{plan_id}':
    delete:
      summary: Cancel a savings plan
      description: Use this method to a cancel a specific savings plan.
      parameters:
        - name: plan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The universally unique identifier (UUID) of a savings plan.
      responses:
        '204':
          description: Canceled
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: 'Precondition Failed:'
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Account is no longer available
              examples:
                Account is archived:
                  value:
                    error:
                      message: Account is archived
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Savings
      operationId: savings-plans-cancel
    parameters:
      - schema:
          type: string
        name: plan_id
        in: path
        required: true
  '/api/v2/my/savings/flexible/plans/{plan_id}/add-funds':
    post:
      summary: Add funds to savings plans with flexible strategies
      description: "After subscribing to a savings program with the *flexible* strategy, clients can add funds to their initial investments and increase their interest rates.\r\n\r\nUse this method to add funds to existing savings plans."
      parameters:
        - name: plan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The universally unique identifier (UUID) of a savings plan.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - amount
              properties:
                amount:
                  type: number
                  format: double
                  description: The amount of funds to be added to a savings plan.
                  example: 1000.5
                  minimum: 0
                  exclusiveMinimum: true
      responses:
        '201':
          description: Funds added
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/SavingsPlan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: 'Precondition Failed:'
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Account is no longer available
              examples:
                Account is archived:
                  value:
                    error:
                      message: Account is archived
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Savings
      operationId: savings-plans-add-funds
  /api/v2/my/system-info:
    get:
      tags:
        - System info
      summary: Get system info
      description: Use this method to get information about your system.
      operationId: getSystemInfo
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - tenantName
                  - versions
                  - frontendUrl
                  - helpdesk
                  - mobileApps
                  - analytics
                properties:
                  tenantName:
                    type: string
                    description: The system tenant codename.
                    example: 'black-cat'
                  versions:
                    type: object
                    properties:
                      coreMonolith:
                        type: string
                        description: The deployed version.
                        example: '12.1.5'
                  frontendUrl:
                    type: string
                    description: "The URL of the Helpdesk system to which clients are redirected from the Trader's Room or mobile app."
                    example: 'https://example.com'
                  helpdesk:
                    type: object
                    description: 'The details about the enabled Helpdesk system:'
                    properties:
                      backends:
                        type: array
                        items:
                          type: string
                          enum:
                            - supportpal
                            - zendesk
                            - intercom
                      backendParams:
                        type: object
                        properties:
                          zendesk:
                            type: object
                            properties:
                              webWidgetEnabled:
                                type: boolean
                                description: Whether the Zendesk web widget is enabled
                              webWidgetId:
                                type: string
                                format: uuid
                                description: The Zendesk web widget ID
                                example: '550e8400-e29b-41d4-a716-446655440000'
                              androidMessagingEnabled:
                                type: boolean
                                description: Whether Zendesk messaging is enabled for Android
                              androidMessagingChannelId:
                                type: string
                                format: uuid
                                description: The Zendesk messaging channel ID for Android
                                example: '550e8400-e29b-41d4-a716-446655440001'
                              iosMessagingEnabled:
                                type: boolean
                                description: Whether Zendesk messaging is enabled for iOS
                              iosMessagingChannelId:
                                type: string
                                format: uuid
                                description: The Zendesk messaging channel ID for iOS
                                example: '550e8400-e29b-41d4-a716-446655440002'
                          intercom:
                            type: object
                            properties:
                              appId:
                                type: string
                                description: The Intercom app ID
                                example: 'abc12345'
                              region:
                                type: string
                                description: The Intercom region
                                enum:
                                  - us
                                  - eu
                                  - au
                                example: 'us'
                              apiBase:
                                type: string
                                description: The Intercom API base URL
                                example: 'https://api-iam.intercom.io'
                              webMessengerEnabled:
                                type: boolean
                                description: Whether Intercom web messenger is enabled
                              iosMessengerEnabled:
                                type: boolean
                                description: Whether Intercom iOS messenger is enabled
                              androidMessengerEnabled:
                                type: boolean
                                description: Whether Intercom Android messenger is enabled
                              hideDefaultLauncher:
                                type: boolean
                                description: Whether to hide the default Intercom launcher
                              helpCenterEnabled:
                                type: boolean
                                description: Whether Intercom Help Center is enabled
                              helpCenterUrl:
                                description: The Intercom Help Center URL
                                oneOf:
                                  - type: string
                                  - type: 'null'
                                example: null
                              iosApiKey:
                                type: string
                                description: The API key for initializing the Intercom iOS SDK
                                example: 'ios_sdk-abc12345'
                              androidApiKey:
                                type: string
                                description: The API key for initializing the Intercom Android SDK
                                example: 'android_sdk-abc12345'
                          supportpal:
                            type: object
                            properties:
                              isReadOnly:
                                type: boolean
                                default: false
                  mobileApps:
                    type: object
                    description: 'The details about the Mobile Apps'
                    properties:
                      androidGooglePlayUrl:
                        type: string
                      iosAppStoreUrl:
                        type: string
                      androidApkRegistryUrl:
                        type: string
                  analytics:
                    type: object
                    description: 'The details about the supported Analytics services'
                    properties:
                      rudderStack:
                        description: 'The details about RudderStack connections'
                        type: array
                        items:
                          type: object
                          properties:
                            dataPlaneUrl:
                              type: string
                            writeKey:
                              type: string
                      amplitude:
                        description: 'The details about Amplitude connections'
                        type: array
                        items:
                          type: object
                          properties:
                            apiKey:
                              type: string
                            serverZone:
                              type: string
                              enum:
                                - US
                                - EU
                            userIdGenerationStrategy:
                              type: string
                              enum:
                                - user_id
                                - user_id_with_zeroes
                                - email
                                - email_sha256
                      adjust:
                        description: 'The details about Adjust connections'
                        type: array
                        items:
                          type: object
                          properties:
                            appToken:
                              type: string
                  uiConfig:
                    type: object
                    description: 'UI Configuration details'
                    properties:
                      theme:
                        type:
                          - object
                        description: 'Legacy theme details'
                        properties:
                          light:
                            $ref: '#/components/schemas/VisualCustomizationThemeDetails'
                            description: 'Light theme details'
                          dark:
                            $ref: '#/components/schemas/VisualCustomizationThemeDetails'
                            description: 'Dark theme details'
                          defaultTheme:
                            type: string
                      themeV2:
                        type:
                          - object
                        description: 'Semantic theme details (new variables)'
                        properties:
                          light:
                            $ref: '#/components/schemas/VisualCustomizationSemanticThemeDetails'
                            description: 'Light semantic theme details'
                          dark:
                            $ref: '#/components/schemas/VisualCustomizationSemanticThemeDetails'
                            description: 'Dark semantic theme details'
                          defaultTheme:
                            type: string
                      icons:
                        type:
                          - object
                        description: 'Favicons'
                        properties:
                          favicon:
                            type:
                              - string
                              - 'null'
                            description: 'Favicon .ico'
                          faviconSvg:
                            type:
                              - string
                              - 'null'
                            description: 'Favicon .svg'
                          appleTouchIcon:
                            type:
                              - string
                              - 'null'
                            description: 'Apple touch icon (.png)'
                      scripts:
                        type:
                          - string
                          - 'null'
                        description: 'Scripts file link'
                      tradingViewStyles:
                        type:
                          - string
                          - 'null'
                        description: 'Trading view styles file link'
                      projectName:
                        type:
                          - string
                          - 'null'
                        description: 'Project Name'
                  signup:
                    oneOf:
                      - type: object
                        description: Registration configuration.
                        properties:
                          simplified:
                            type: boolean
                            description: Whether the simplified (default) registration flow is used.
                            example: true
                      - type: 'null'
                    description: Registration configuration. Null if registration V2 is not configured.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  '/api/v2/my/auth/magic-link':
    post:
      security:
        - bearerAuth: []
      parameters: []
      summary: Get a temporary token
      responses:
        '200':
          description: Temporary token created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      temporaryToken:
                        type: string
                        description: The generated temporary token.
                        example: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
                      expiresAt:
                        type: string
                        description: The date and time when the token is due to expire.
                        format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: 'Precondition Failed:'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: "Use this method to obtain a temporary token for seamless authorization of a client from the Android app to the Trader's Room."
      tags:
        - Auth
      operationId: magic-link-get-token
    parameters: []
  '/api/v2/my/auth/magic-link/exchange':
    post:
      summary: Authorize a client using a temporary token
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - temporaryToken
                - deviceFingerprint
              properties:
                temporaryToken:
                  type: string
                  description: The obtained temporary token.
                  example: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
                deviceFingerprint:
                  type: string
                  description: "The free-form JSON data (which includes the required user_agent field) generated by the client in the format of a Base64-encoded string that uniquely identifies a device from which a request is sent.r\n\r\nTo learn how to get a device fingerprint, refer to [Obtain a device fingerprint](https://docs.b2core.b2broker.com/en/rest-api-reference-front-obtain-device-fingerprint.html)."
                  example: eyJ1c2VyX2FnZW50IjoiTW96aWxsYVwvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0XC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWVcLzExOC4wLjAuMCBTYWZhcmlcLzUzNy4zNiJ9
      responses:
        '200':
          description: Successful authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: 'If authentication has succeeded, the details about the access and refresh tokens:'
                    properties:
                      tokens:
                        type: object
                        properties:
                          accessToken:
                            type: object
                            properties:
                              token:
                                type: string
                                description: The access token.
                              createdAt:
                                type: string
                                description: The date and time when the token was generated.
                                format: date-time
                              expiresAt:
                                type: string
                                description: The date and time when the token is due to expire.
                                format: date-time
                          refreshToken:
                            properties:
                              token:
                                type: string
                                description: The refresh token.
                              createdAt:
                                type: string
                                description: The date and time when the token was generated.
                                format: date-time
                              expiresAt:
                                type: string
                                description: The date and time when the token is due to expire.
                                format: date-time
        '412':
          description: 'Precondition Failed:'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: "Use this method to authorize a client from the Android app to the Trader's Room using a temporary token."
      tags:
        - Auth
      operationId: magic-link-exchange-token
    parameters: []
  '/api/v2/my/helpdesk/zendesk/auth/web':
    post:
      summary: Get the Zendesk JWT
      parameters: []
      responses:
        '200':
          description: Successful JWT generation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: The generated JWT token.
                      baseUrl:
                        type: string
                        description: The URL of the Zendesk interface to which a client will be redirected.
                      redirectUrl:
                        type: string
                        description: The URL to which a client will be redirected after the SSO journey.
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: "Use this method to generate the JSON Web Token (JWT) for single sign-on (SSO) authorization in Zendesk from the Trader's Room.\r\n\r\nThis enables a client to access the Zendesk functionality without any additional authorization."
      tags:
        - Zendesk
      operationId: zendesk-get-web-token
    parameters: []
  '/api/v2/my/helpdesk/zendesk/auth/mobile':
    post:
      summary: Get the Zendesk JWT for the mobile app
      deprecated: true
      parameters: []
      responses:
        '200':
          description: Successful JWT generation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: The generated JWT token.
                      baseUrl:
                        type: string
                        description: The URL of the Zendesk interface to which a client will be redirected.
                      appId:
                        type: string
                        description: The mobile app identifier.
                      clientId:
                        type: string
                        description: The client identifier.
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: "**Deprecated:** Use `/api/v2/my/helpdesk/zendesk/auth/messaging` instead.\r\n\r\nUse this method to generate the JSON Web Token (JWT) for single sign-on (SSO) authorization in Zendesk from the mobile app.\r\n\r\nThis enables a client to access the Zendesk functionality without any additional authorization."
      tags:
        - Zendesk
      operationId: zendesk-get-mobile-token
    parameters: []

  '/api/v2/my/helpdesk/zendesk/auth/messaging':
    post:
      summary: Get the Zendesk JWT for the messaging channel — web widget or mobile apps
      parameters: []
      responses:
        '200':
          description: Successful JWT generation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: The generated JWT token for widget authentication.
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: "Use this method to generate the JSON Web Token (JWT) for authenticating users with the Zendesk Messaging.\r\n\r\nThis enables a client to access the Zendesk Messaging functionality with authenticated user context."
      tags:
        - Zendesk
      operationId: zendesk-get-messaging-token
    parameters: []

  '/api/v2/my/helpdesk/intercom/auth':
    post:
      summary: Get the Intercom identity verification JWT
      parameters: []
      responses:
        '200':
          description: Successful JWT generation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntercomAuthTokenResponse'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      description: >-
        Generate a signed JWT for Intercom identity verification.
        The client uses this token to securely initialize the Intercom Messenger
        on any platform (web, iOS, Android).
      tags:
        - Intercom
      operationId: intercom-get-auth-token
    parameters: []

  /api/v2/my/b2copy/auth/token:
    get :
      tags :
        - B2Copy
      summary : Get the B2Copy JWT
      description : "Use this method to generate a JSON Web Token (JWT) for a client to access the B2Copy investment platform functionality in the Trader's Room. This token is used for making gRPC requests."
      operationId : generateB2CopyJWT
      parameters :
        - name : investment_platform_id
          in : path
          required : true
          schema :
            type : integer
            description : The identifier of the investment platform instance.
      responses :
        '200' :
          description : OK
          content :
            application/json :
              schema :
                type : object
                properties :
                  host :
                    type : string
                    description : The host for sending gRPC requests.
                  token :
                    type : string
                    description : The generated JWT.
        '400' :
          $ref : '#/components/responses/BadRequest'
        '401' :
          $ref : '#/components/responses/Unauthorized'
        '503' :
          $ref : '#/components/responses/ServiceUnavailable'
      security :
        - bearerAuth : [ ]
  /api/v2/my/b2copy/challenges/buy:
    post :
      tags :
        - B2Copy
      summary : Buy a personal Prop Trade Challenge
      description : Use this method to buy a personal Prop Trade Challenge.
      operationId : buyPersonalChallenge
      parameters :
        - name : plan_id
          in : path
          required : true
          schema :
            type : integer
            description : ID of plan.
        - name : account_id
          in : path
          required : true
          schema :
            type : integer
            description : ID of B2Core account.
        - name : challenge_id
          in : path
          required : true
          schema :
            type : integer
            description : ID of Prop Trade Challenge.
        - name : investment_platform_id
          in : path
          required : true
          schema :
            type : integer
            description : ID of Investment Platform(B2Copy instance).
      responses :
        '200' :
          description : OK
          content :
            application/json :
              schema :
                type : object
                properties :
                  personal_challenge_id :
                    type : integer
                    description : ID of personal challenge.
        '400' :
          $ref : '#/components/responses/BadRequest'
        '401' :
          $ref : '#/components/responses/Unauthorized'
        '503' :
          $ref : '#/components/responses/ServiceUnavailable'
      security :
        - bearerAuth : [ ]
  '/api/v2/my/client-settings':
    get:
      parameters:
        - name: filter
          in: query
          description: Filter
          required: false
          schema:
            type: object
            properties:
              scope:
                type: string
                description: 'Comma-separated list of scopes'
                example:
                  - mobile
                  - mobile,global
              key:
                type: string
                description: 'Comma-separated list of keys'
                example:
                  - locale
                  - locale,theme
      responses:
        '200':
          description: Client settings list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ClientSettingsItem'
        '500':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Settings storage
      operationId: Settings list
  '/api/v2/my/client-settings/{scope}':
    patch:
      parameters:
        - name: scope
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSettingsUpdateRequest'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '500':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Settings storage
      operationId: Reset settings scope
      description: Replace settings in scope
    post:
      parameters:
        - name: scope
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSettingsUpdateRequest'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '500':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Settings storage
      operationId: Update settings scope
      description: Create settings or update if exists
    delete:
      parameters:
        - name: scope
          in: path
          required: true
          schema:
            type: string
        - name: key
          in: query
          required: true
          schema:
            type: string
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '500':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Settings storage
      operationId: Delete settings
      description: Delete settings by key
  '/api/v2/my/notifications':
    get:
      summary: Get a list of notifications
      description: "Use this method to get a list of all notifications"
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/order'
        - name: sort_by
          in: query
          description: Sorts the items by a specified value
          required: false
          schema:
            type: string
            enum:
              - createdAt
            default: createdAt
        - name: filter
          in: query
          description: Filters the items by a specified value
          required: false
          style: deepObject
          schema:
            type: object
            properties:
              isRead:
                type: boolean
                example: true
              category:
                type: string
                enum:
                  - transaction
                  - system
                description: Notification category
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    minItems: 0
                    items:
                      $ref: '#/components/schemas/Notification'
                  total:
                    type: integer
                    description: Num of notifications returned
                    example: 10
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Notifications
      operationId: notifications-list
  '/api/v2/my/notifications/mark-read':
    post:
      summary: Read a batch of notifications
      description: Use this method to mark multiple notifications as read
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                'type':
                  type: string
                  description: Notification type
                  enum:
                    - 'transaction_status_changed'
                    - 'successful_auth'
                    - 'auth_attempt'
      responses:
        '204':
          description: Marked as read
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: 'Precondition Failed:'
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Account is no longer available
              examples:
                Account is archived:
                  value:
                    error:
                      message: Account is archived
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Notifications
      operationId: notification-mark-read-batch
  '/api/v2/my/notifications/{notification_id}/mark-read':
    post:
      summary: Read a notification
      description: Use this method to mark notification as read
      parameters:
        - name: notification_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The identifier (UUID) of a notifiction
      responses:
        '204':
          description: Marked as read
        '401':
          $ref: '#/components/responses/Unauthorized'
        '412':
          description: 'Precondition Failed:'
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                x-examples:
                  Example 1:
                    error:
                      message: Account is no longer available
              examples:
                Account is archived:
                  value:
                    error:
                      message: Account is archived
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      tags:
        - Notifications
      operationId: notification-mark-read
  /api/v2/my/acuity/config:
    get:
      tags:
        - Acuity Trading
      summary: Get Acuity Trading configuration
      description: Retrieves the Acuity Trading widget configuration including API key, script source, and widget settings.
      operationId: getAcuityConfig
      parameters:
        - $ref: '#/components/parameters/language'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AcuityTradingConfig'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          description: Acuity Trading integration not configured
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Acuity Trading integration is not configured
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /api/v2/my/acuity/trade-token:
    post:
      tags:
        - Acuity Trading
      summary: Create trade authorization token
      description: Creates a trade authorization token for accessing Acuity Trading web trading functionality within widgets.
      operationId: createAcuityTradeToken
      parameters:
        - $ref: '#/components/parameters/language'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accountId
              properties:
                accountId:
                  type: integer
                  description: The trading account ID
                  example: 12345
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AcuityTradingTradeToken'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
              examples:
                Account not found:
                  value:
                    error:
                      message: Account not found
                Unsupported platform:
                  value:
                    error:
                      message: Unsupported platform
                Integration not configured:
                  value:
                    error:
                      message: Acuity Trading integration is not configured
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /api/v2/my/side-auth/token:
    post:
      tags:
        - SideAuth
      summary: Get a JWT token for side authentication
      description: Returns a short-lived JWT (ES256) for authenticating with external services embedded in iframes.
      operationId: createSideAuthToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SideAuthToken'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearerAuth: []
components:
  parameters:
    limit:
      name: limit
      in: query
      description: Sets the limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 10
        examples:
          - 10
      examples:
        default:
          value: 10
    offset:
      name: offset
      in: query
      description: Sets the offset
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
        examples:
          - 0
      examples:
        default:
          value: 0
    order:
      name: sort_order
      in: query
      description: Sorts the items in ascending or descending order
      required: false
      schema:
        type: string
        enum:
          - asc
          - desc
        default: desc
        examples:
          - desc
      examples:
        default:
          value: desc
    typeFilter:
      name: filter
      in: query
      description: Filter
      required: false
      schema:
        type: object
        properties:
          type:
            $ref: '#/components/schemas/TransactionType'
    language:
      name: accept-language
      in: header
      required: false
      schema:
        type: string
        examples:
          - ja
      examples:
        default:
          value: ja
    accountIdPath:
      name: accountId
      in: path
      required: true
      schema:
        type: integer
      description: Trading account ID
    analyticsLimit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 25
      description: Maximum number of items to return
    analyticsOffset:
      name: offset
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Number of items to skip
    analyticsDateFrom:
      name: filters[from]
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: Start date-time filter (RFC 3339). If omitted, no lower bound is applied.
      example: '2026-01-01T00:00:00+00:00'
    analyticsDateTo:
      name: filters[to]
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: End date-time filter (RFC 3339). Must be greater than or equal to filters[from] if both are provided. If omitted, no upper bound is applied.
      example: '2026-03-01T23:59:59+00:00'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Bad Request
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        issue:
                          type: string
                          example: The selected value is invalid.
                        field:
                          type: string
                          example: parameter
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Forbidden
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Internal Server Error
    MethodNotAllowed:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Method Not Allowed
    NotAcceptable:
      description: Not Acceptable
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Not Acceptable
    NoContent:
      description: No Content
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Not Found
    PayloadTooLarge:
      description: Payload Too Large
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Payload Too Large
    ServiceUnavailable:
      description: Service Unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Service Unavailable
    Conflict:
      content:
        application/json:
          schema:
            properties:
              error:
                properties:
                  message:
                    example: Conflict
                    type: string
                  code:
                    example: 0
                    type: integer
                type: object
      description: Conflict
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Too Many Requests
      headers:
        X-RateLimit-Retry-After:
          schema:
            type: string
            format: date-time
          required: false
          examples:
            __default:
              value: '2022-01-01T00:00:00+00:00'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Unauthorized
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Unprocessable Entity
    UnsupportedMediaType:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Unsupported Media Type
    PreconditionFailed:
      description: 'Precondition Failed'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
    StartWithdrawalUnprocessableEntity:
      description: 'Start withdrawal unprocessable entity'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Preliminary withdrawal check error.'
              violations:
                type: object
                properties:
                  fieldViolations:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        field:
                          type: string
                          description: 'Field name from payment form'
                          example: 'Address'
                        violation:
                          type: string
                          description: 'Violation name for a translation system'
                          example: 'Violation name'
                        description:
                          type: string
                          description: 'Default descriptive text in English'
                          example: 'Description'
                  generalViolations:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        violation:
                          type: string
                          description: 'Violation name for a translation system'
                          example: 'Violation name'
                        description:
                          type: string
                          description: 'Default descriptive text in English'
                          example: 'Description'
  examples:
    default:
      value: example.csv
  schemas:
    SignupContextPayload:
      type: object
      required:
        - sessionId
        - firstSeenAt
        - attributes
        - touches
      properties:
        sessionId:
          $ref: '#/components/schemas/uuid'
          description: Client-generated UUID identifying the attribution session. Used by the backend to deduplicate repeated submissions from the same browser.
        firstSeenAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the very first page load in this attribution session.
          example: '2026-05-18T10:11:12+00:00'
        attributes:
          type: object
          description: Session-level context captured once at first visit (device, locale, first touch URL, etc.). Keys are camelCase, values are strings.
          additionalProperties:
            type: string
          example:
            firstTouchUrl: 'https://b2prime.com/?utm_source=google'
            registrationDeviceType: desktop
            websiteLastPageUrl: 'https://b2prime.com/pricing'
            referrerDomain: google.com
            userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)'
            platform: macOS
            language: en-US
            timezone: Europe/Moscow
            screenResolution: 2560x1440
            hardwareConcurrency: '10'
        touches:
          type: array
          description: Ordered list of marketing touches recorded during the journey. Each touch holds a captured timestamp and its own attribute map.
          items:
            $ref: '#/components/schemas/SignupContextTouch'
    SignupContextTouch:
      type: object
      required:
        - capturedAt
        - attributes
      properties:
        capturedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp when this touch was captured.
          example: '2026-05-18T10:11:12+00:00'
        attributes:
          type: object
          description: Per-touch attributes (UTM parameters, click IDs, landing URL, etc.). Keys are camelCase, values are strings.
          additionalProperties:
            type: string
          example:
            landingUrl: 'https://b2prime.com/?utm_source=google&utm_campaign=brand'
            utmSource: google
            utmMedium: cpc
            utmCampaign: brand
            gclid: Cj0KCQ...
            gaClientId: GA1.2.123456789.1715000000
            referrerUrl: 'https://www.google.com/'
            referrerDomain: google.com
    IntercomAuthTokenResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            jwt:
              type: string
              description: The signed JWT for Intercom identity verification
            expiresAt:
              type: string
              format: date-time
              description: Token expiration time in ISO 8601 format
              example: '2026-04-11T22:42:44+00:00'
            userId:
              type: string
              description: The B2CORE client ID
              example: '123456'
            email:
              type: string
              description: The client email address
              example: 'user@example.com'
            name:
              type: string
              description: The client full name
              example: 'John Doe'
    RegistrationAuthResponse:
      type: object
      properties:
        auth:
          oneOf:
            - $ref: '#/components/schemas/RegistrationAuth'
            - type: 'null'
          description: Authentication data returned after successful registration. May be null if auto-login failed.
    RegistrationAuth:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: |
            The authentication type:
            - `native` — b2core-issued access/refresh tokens (returned under `native`).
            - `ory` — Ory Kratos session re-encoded as a signed JWT (returned under `ory`). Use the JWT as a Bearer token for b2core APIs.
          enum:
            - native
            - ory
          example: native
        native:
          type: object
          description: Native authentication tokens. Present when type is "native".
          properties:
            accessToken:
              $ref: '#/components/schemas/RegistrationToken'
            refreshToken:
              $ref: '#/components/schemas/RegistrationToken'
        ory:
          type: object
          description: Ory Kratos session bootstrap data. Present when type is "ory".
          properties:
            token:
              type: string
              description: 'A signed JWT minted from a Kratos native login flow. Use as `Authorization: Bearer <token>` for b2core APIs (validated by KratosTokenStrategy). Short-lived (matches the tokenizer template TTL).'
            expiresAt:
              $ref: '#/components/schemas/dateTime'
              description: The date and time when the Ory Kratos session expires.
            sessionToken:
              type: string
              description: 'Opaque Kratos session token. Use as `X-Session-Token: <sessionToken>` for direct calls to Kratos public endpoints (whoami, logout, etc.). Web SPAs that need a browser cookie must perform their own `/self-service/login/browser` flow with the user''s credentials — this opaque token cannot be converted server-side into `ory_kratos_session` cookie.'
    RegistrationToken:
      type: object
      properties:
        token:
          type: string
          description: The JWT token string.
        expiresAt:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when the token expires.
    integer:
      type: integer
      example: 1
    TFAProvider:
      type: object
      description: 'The details about a 2FA method:'
      properties:
        caption:
          type: string
          description: The name of a 2FA method.
          example: SMS Confirmation
        isEnabled:
          type: boolean
          description: 'If *true*, 2FA with a given method is enabled for a client; otherwise, *false*.'
          example: true
        name:
          type: string
          description: "The method used to deliver 2FA codes to a client. Possible values:\r\n\r\n- google — codes from the Google Authenticator app are used for confirmation\r\n\r\n- sms — codes are delivered to a client phone number via SMS"
          example: sms
    uuid:
      type: string
      format: uuid
      example: 36f59381-5b54-48bd-a0c7-3b908c476732
    TFAHistoryItem:
      type: object
      description: 'The details about a 2FA-related change made for a client:'
      properties:
        id:
          type: integer
          description: The identifier of a change record.
          example: 1
        provider:
          type: string
          description: "The method used to deliver 2FA codes to a client. Possible values:\r\n\r\n- google — codes from the Google Authenticator app are used for confirmation\r\n\r\n- sms — codes are delivered to a client phone number via SMS"
          example: sms
        isEnabled:
          type: boolean
          description: 'If *true*, 2FA with a given method is enabled for a client; otherwise, *false*.'
          example: false
        time:
          $ref: '#/components/schemas/nullableDateTime'
          decsription: The date and time when a change was made.
    nullableDateTime:
      type:
        - string
        - 'null'
      format: date-time
      example: '2022-01-01T00:00:00+00:00'
    dateTime:
      type: string
      format: date-time
      example: '2022-01-01T00:00:00+00:00'
    boolean:
      type: boolean
      example: true
    Permission:
      type: string
      enum:
        - deposit
        - exchange
        - trade
        - transferDeposit
        - transferWithdrawal
        - withdrawal
        - enabled
        - visible
      description: The permissions assigned to a client account.
      example: deposit
    Account:
      type: object
      description: 'The details about an account:'
      properties:
        accountId:
          type: integer
          description: The account identifier.
          example: 1
        accountNumber:
          type: string
          description: The account number.
          example: '12345678'
        displayNumber:
          type: string
          description: The human-readable account number displayed to the user. For B2Trader accounts this may differ from accountNumber.
          example: '12345678'
        archive:
          type: boolean
          description: 'If *true*, an account is archived; otherwise, *false*.'
          default: false
        caption:
          type: string
          description: The account name displayed in the Trader's Room.
          example: USD
        currency:
          $ref: '#/components/schemas/Currency'
        favourite:
          type: boolean
          description: 'If *true*, an account is marked as favorite; otherwise, *false*.'
        group:
          $ref: '#/components/schemas/ProductGroupSimplified'
        platform:
          $ref: '#/components/schemas/Platform'
        priority:
          type: integer
          description: The priority index assigned to an account.
          example: 1
        statement:
          $ref: '#/components/schemas/Statement'
        type:
          type: string
          enum:
            - personal
            - trade
            - demo
            - partner
            - liquidity
            - exchange
            - external
            - system
            - 'null'
          description: The account type.
          example: trade
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when an account was created.
        permissions:
          $ref: '#/components/schemas/Permissions'
          description: An array of string values specifying account permissions.
        productId:
          type: integer
          description: The identifier of a product based on which an account was created.
          example: 1
        leverage:
          type:
            - integer
            - 'null'
          description: "*Applicable only for trading accounts and platforms that support leverage (MT4, MT5, CTrader, MatchTrader).*\r\n\r\nThe leverage ratio assigned to a trading account. Returns `null` for platforms that don't support leverage."
          example: 100
        productCurrency:
          $ref: '#/components/schemas/ProductCurrency'
        credentials:
          description: Platform credentials for a newly created account. `null` for platforms without dedicated credentials.
          oneOf:
            - $ref: '#/components/schemas/AccountCredentials'
            - type: 'null'
    AccountCredentials:
      type: object
      properties:
        type:
          type: string
          enum:
            - MetaTrader4
            - MetaTrader5
          example: MetaTrader4
        data:
          type: object
          properties:
            login:
              type: string
              example: '12345678'
            masterPassword:
              type: string
              example: 'Aa1!secret'
            investorPassword:
              type: string
              example: 'Aa1!invest'
          required:
            - login
            - masterPassword
            - investorPassword
      required:
        - type
        - data
    Currency:
      type: object
      description: 'The details about a currency:'
      properties:
        alphabeticCode:
          type: string
          description: The alphabetic code of a currency.
          example: USD
        minorUnit:
          type: integer
          description: The number of decimal places displayed when representing amounts in a currency.
          example: 2
        name:
          type: string
          description: The localized currency name.
          example: US Dollar
        numericCode:
          type: integer
          description: The numeric code of a currency.
          example: 840
    ProductGroup:
      type: object
      description: 'The details about a product group:'
      properties:
        id:
          type: integer
          description: The product group identifier.
          example: 1
        caption:
          type: string
          description: The product group name.
          maxLength: 30
          example: Fiat
        description:
          type: string
          description: The product group description.
          example: Fiat
        type:
          $ref: '#/components/schemas/ProductGroupType'
        priority:
          type: integer
          description: The priority index assigned to a product group.
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a product group was created.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a product group was last updated.
    ProductGroupSimplified:
      type: object
      description: 'The details about a product group:'
      properties:
        id:
          type: integer
          description: The product group identifier.
          example: 1
        name:
          type: string
          description: The product group name.
          maxLength: 30
          example: Fiat
        type:
          $ref: '#/components/schemas/ProductGroupType'
        priority:
          type: integer
          description: The priority index assigned to a product group.
    ProductGroupType:
      type: string
      enum:
        - default
        - payment
        - investment
        - master
      description: The product group type.
      example: default
    Platform:
      type: object
      description: 'The details about a platform:'
      properties:
        id:
          $ref: '#/components/schemas/integer'
          description: The platform identifier.
        name:
          type: string
          description: The name assigned to a platform in the Back Office.
          example: MetaTrader 5
        caption:
          type: string
          description: The platform caption used in the Back Office.
          example: MetaTrader5 Live
        type:
          $ref: '#/components/schemas/PlatformType'
        isDemo:
          $ref: '#/components/schemas/boolean'
          deprecated: true
        terminalUrl:
          type: string
          description: Trading terminal URL
          example: 'https://example.com'
    PlatformType:
      type: string
      enum:
        - personal
        - wrapper
        - B2TraderBrokeragePlatform
        - cTrader
        - Centroid
        - MatchTrader
        - MetaTraderStandalone
        - MetaTrader5
        - MetaTrader4
        - TradeLocker
        - OneZero
        - PrimeXM
        - DXtrade
      description: The platform type.
      example: MetaTrader5
    Statement:
      type:
        - object
        - 'null'
      description: 'The account statement:'
      properties:
        availableBalance:
          $ref: '#/components/schemas/nullableDecimal'
        currentBalance:
          $ref: '#/components/schemas/nullableDecimal'
        credit:
          $ref: '#/components/schemas/nullableDecimal'
        equity:
          $ref: '#/components/schemas/nullableDecimal'
        freeMargin:
          $ref: '#/components/schemas/nullableDecimal'
        hold:
          $ref: '#/components/schemas/nullableDecimal'
        margin:
          $ref: '#/components/schemas/nullableDecimal'
        marginLevel:
          $ref: '#/components/schemas/nullableDecimal'
        pnl:
          $ref: '#/components/schemas/nullableDecimal'
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
    nullableDecimal:
      type:
        - string
        - 'null'
      format: double
      example: '1.000000000000000000'
    Permissions:
      type: array
      description: An array of string values specifying permissions applied to a product.
      items:
        $ref: '#/components/schemas/Permission'
    ProductCurrency:
      type: object
      description: 'The details about a product currency:'
      properties:
        id:
          type: integer
          description: The identifier of a product currency.
          example: 1
        caption:
          type: string
          description: The name specified for a product currency.
          example: USD
        product:
          type: object
          description: 'The details about a product to which a currency is added:'
          properties:
            id:
              type: integer
              description: The product identifier.
              example: 1
            type:
              $ref: '#/components/schemas/AccountType'
            name:
              type: string
              description: The product name.
              example: 'MT5 Live'
            caption:
              type: string
              description: The product caption.
              example: 'MT5 Live'
            group:
              $ref: '#/components/schemas/ProductGroup'
            platform:
              $ref: '#/components/schemas/ProductPlatform'
        currency:
          $ref: '#/components/schemas/Currency'
        factory:
          type: integer
          description: 'This parameter is set to *100* if product-associated accounts are denominated in currency subunits (for example, cents); otherwise, set to *1*.'
          example: 1
        variants:
          type: object
          description: The options that can be selected by a client when opening an account denominated in a product currency.
          properties:
            startAmounts:
              type: array
              description: "*Applicable only for demo accounts.*\r\n\r\nAn array of string values specifying the initial amounts to be deposited to demo accounts denominated in a product currency."
              items:
                type: string
                example: '100.00'
            leverages:
              type: array
              description: An array of values specifying optional leverage ratios available to accounts denominated in a product currency.
              items:
                anyOf:
                  - type: integer
                  - type: string
        platformGroups:
          type:
            - array
            - 'null'
          description: An array of string values specifying platform group names.
          items:
            type: string
        isHedgingEnabled:
          type: boolean
          description: 'If *true*, exchange operations in a product currency are hedged; otherwise, *false*.'
        maxAccounts:
          type: integer
          description: The maximum number of accounts denominated in a product currency that can be created for a client.
          example: 1
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        priority:
          type: integer
          description: The priority index assigned to a product currency.
          example: 1
        linkInfo:
          type:
            - string
            - 'null'
          description: A link to a resource providing additional information about a product.
          example: 'https://example.com'
        agreementLink:
          type:
            - string
            - 'null'
          description: A link to a document to which a client must consent in order to open an account in a product currency.
          example: 'https://example.com'
        minDepositAmount:
          type: string
          description: 'The minimum deposit amount required for opening an account. A client can deposit the entire amount at once or can make several deposits to add the required amount to the account. After the minimum deposit requirement is met, the account becomes available to the client.'
          example: '100.00'
    AccountType:
      type: string
      enum:
        - personal
        - trade
        - demo
        - partner
        - liquidity
        - exchange
        - external
        - system
      description: The account type.
      example: personal
    ProductPlatform:
      type: object
      description: 'The details about a platform to which a protuct belongs:'
      properties:
        id:
          type: integer
          description: The platform identifier.
          example: 1
        caption:
          type: string
          description: The platfrom caption used in the Back Office.
          example: MetaTrader5 Live
        shortCaption:
          type: string
          description: The short platform caption used in the Back Office.
          example: MT5
        name:
          type: string
          description: The platform name displayed in the Back Office.
          example: mt5
        class:
          type: string
          description: The name of the platform to which the connection is configured.
          example: MetaTrader5
        isDemo:
          type: boolean
          deprecated: true
          description: 'If *true*, clients can open demo accounts using the products that are created based on the platform; otherwise, *false*.'
    Announcement:
      type: object
      description: 'The details about an announcement:'
      properties:
        id:
          type: integer
          description: The announcement identifier.
          example: 1
        title:
          type: string
          description: The announcement title.
          example: New Release!
        text:
          type: string
          description: The text of an announcement.
          example: The new version is up and running.
        buttonText:
          type: string
          description: The text displayed on the button in an announcement.
          example: Click for more details
        type:
          type: object
          description: The details about the announcement type. The announcement type identifies whether an announcement requires clients to take an action.
          properties:
            caption:
              type:
                - string
                - 'null'
              description: The type name.
              example: Required
            value:
              type: integer
              enum:
                - 0
                - 1
              description: "The identifier assigned to an announcement type. Possible values:\r\n\r\n- 0 — required. The announcement contains a button and blocks further interaction with the Trader's Room until a client clicks this button.\r\n- 1 — optional. The announcement doesn’t require any actions from a client and is displayed as a notification."
              example: 0
        createTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when an announcement was created.
        updateTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when an announcement was last updated.
        buttonLink:
          type:
            - string
            - 'null'
          description: The link to a resource that is opened upon clicking a button displayed in an announcement.
          example: 'https://example.com'
    AuthorizationHistory:
      type: object
      description: 'The details about a client sign-in attempt:'
      properties:
        id:
          type: integer
          description: The identifier of a sign-in attempt.
          example: 1
        ip:
          type: string
          description: The IP address from which a client signed in to the Trader's Room.
          example: 192.168.1.1
        authDateTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a client signed in to the Trader's Room
        status:
          type: string
          enum:
            - success
            - failure
          description: The result of a sign-in attempt.
          example: success
    Banner:
      type: object
      description: 'The details about a banner:'
      properties:
        id:
          type: integer
          description: The banner identifier.
          example: 1
        backgroundLinkLight:
          type:
            - string
            - 'null'
          description: The link to a background image set for the light theme of a desktop banner.
          maxLength: 255
          example: 'https://example.com/image_light.png'
        backgroundLinkDark:
          type:
            - string
            - 'null'
          description: The link to a background image set for the dark theme of a desktop banner.
          maxLength: 255
          example: 'https://example.com/image_dark.png'
        buttonLight:
          type:
            - string
            - 'null'
          description: The button caption specified for the light theme of a desktop banner.
          maxLength: 255
          example: 'https://example.com/main-room/'
        buttonDark:
          type:
            - string
            - 'null'
          description: The button caption specified for the dark theme of a desktop banner.
          maxLength: 255
          example: 'https://example.com/main-room/'
        buttonLink:
          type:
            - string
            - 'null'
          description: The link to a resource that is opened upon clicking a button displayed on a banner.
          maxLength: 255
          example: 'https://example.com'
        captionLight:
          type:
            - string
            - 'null'
          description: 'The title of a desktop banner, specified for the light theme.'
          maxLength: 255
          example: <b>Key Features</b>
        captionDark:
          type:
            - string
            - 'null'
          description: 'The title of a desktop banner, specified for the dark theme.'
          maxLength: 255
          example: <b>Key Features</b>
        data:
          $ref: '#/components/schemas/BannerData'
        enabled:
          type: boolean
          description: 'If *true*, a banner is displayed to clients in the Tradere''s Room or mobile app; otherwise, *false*.'
        mobileText:
          type:
            - string
            - 'null'
          description: The text of a mobile banner.
          maxLength: 255
          example: Mobile Text
        mobileTitle:
          type:
            - string
            - 'null'
          description: The title of a mobile banner.
          maxLength: 255
          example: Mobile Title
        mobileSubTitle:
          type:
            - string
            - 'null'
          description: The subtitle of a mobile banner.
          maxLength: 255
          example: Mobile Subtitle
        mobileButtonTitle:
          type:
            - string
            - 'null'
          description: The button caption specified for a mobile banner.
          maxLength: 255
          example: Mobile Button Caption
        priority:
          type: integer
          description: The order in which banners are displayed in the Trader's Room or mobile app if more than one banner is configured.
          minimum: 1
          default: 1
          example: 1
        textLight:
          type:
            - string
            - 'null'
          description: 'The text of a desktop banner, specified for the light theme.'
          maxLength: 255
          example: Text Light
        textDark:
          type:
            - string
            - 'null'
          description: 'The text of a desktop banner, specified for the dark theme.'
          maxLength: 255
          example: Text Dark
        type:
          type: string
          description: "The banner type. Possible values:\r\n\r\n- desktop — banners of this type are displayed only in the Trader's Room.\r\n- mobile — banners of this type are displayed only in the mobile app."
          maxLength: 255
          example: desktop
        url:
          type:
            - string
            - 'null'
          description: The URL of a page on which a banner is displayed in the Trader's Room.
          maxLength: 255
          example: 'https://example.com/dashboard'
        resources:
          type: array
          description: 'An array of resource objects, specifying localized strings for user interface pages displayed to clients.'
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a banner was created.
        createdBy:
          type: string
          description: The email of a Back Office user who created a banner.
          example: username@example.com
    BannerData:
      type: object
      description: 'The settings specific to mobile banners:'
      properties:
        vertical_align:
          type: string
          enum:
            - null
            - middle
            - top
            - bottom
          description: The vertical alignment of a title and subtitle.
          example: middle
        horizontal_align:
          type: string
          enum:
            - null
            - left
            - center
            - right
          description: The horizontal alignment of a title and subtitle.
          example: left
        padding:
          type:
            - string
            - 'null'
          description: 'The number of points, defining the padding area for all four sides of a text block.'
          example: '0.1'
        image_url_light:
          type:
            - string
            - 'null'
          description: The link of a background image set for the light theme of a mobile banner.
          maxLength: 255
          example: 'https://example.com/banner_light.png'
        image_url_dark:
          type:
            - string
            - 'null'
          description: The link of a background image set for the dark theme of a mobile banner.
          maxLength: 255
          example: 'https://example.com/banner_dark.png'
        preview_enabled:
          type:
            - boolean
            - 'null'
          description: 'If *true*, a banner preview is available in the mobile app; otherwise, *false*.'
    BonusStatus:
      type: string
      enum:
        - queued
        - active
        - pending
        - processing
        - completed
        - onCompleting
        - expired
        - error
        - hold
      description: The bonus status.
      example: active
    Bonus:
      type: object
      description: 'The details about a bonus:'
      properties:
        id:
          type: integer
          description: The bonus identifier.
          example: 1
        caption:
          example: "Bonus caption"
          type: string
          nullable: true
        clientId:
          type: integer
          description: The identifier of a client.
          example: 1
        clientName:
          type: string
          description: The name of a client.
          example: Mary Smith
        clientEmail:
          type: string
          description: The email address of a client.
          example: username@example.com
        accountId:
          type: integer
          description: The identifier of a client trading account to which a bonus is credited.
          example: 1
        accountNumber:
          type: string
          description: The number of a client trading account to which a bonus is credited.
          example: '2100242175'
        amount:
          type: string
          description: The bonus amount that can be awarded to a client.
          example: '100.00'
        initialAmount:
          type: string
          description: The original bonus amount at the time of creation.
          example: '100.00'
        volumeComplete:
          type: string
          description: The volume traded by a client by the moment of the bonus expiration.
          example: '0.060'
        temporaryBonus:
          type:
            - string
            - 'null'
          description: The name of a temporary bonus program.
          example: Bonus
        currency:
          $ref: '#/components/schemas/Currency'
        currencyExp:
          $ref: '#/components/schemas/integer'
        fictiveVolumeComplete:
          type: string
          description: The updated volume that was traded by a client. The volume change reactivates the expired bonus.
          example: '1.11'
        volumeThreshold:
          type: string
          description: The volume that must be traded for bonus crediting.
          example: '1.11'
        lifetime:
          type: integer
          description: The number of days after which an activated bonus expires.
        enableAutoCredit:
          type: boolean
          description: "If *true*, bonuses from all bonus programs (if more than one is enabled for a client at the same time) are credited to the client’s trading account immediately.\r\n\r\nIf *false*, bonuses from different bonus programs (if more than one is enabled for a client at the same time) are credited to the client’s trading accounts one after another. Only after a bonus from the first bonus program is processed and credited, a bonus from the second bonus program is credited to a client."
        scalpingThreshold:
          type: string
          description: 'The minimum time interval, in seconds, during which a client must keep a position open so that the position volume is counted as traded volume.'
          example: '1'
        enableTrade:
          type: boolean
          description: 'If *true*, trading with bonus funds is immediately allowed after depositing funds to a trading account; otherwise, *false*.'
        disabledGroups:
          type: array
          description: An array of string values specifying the instruments for which bonuses aren’t awarded.
          example:
            - EURJPY
          items:
            type: string
        dynamicLots:
          type: string
          description: The ratio applied to the bonus amount to determine the volume that must be traded by clients.
          example: '1.000'
        status:
          type: string
          description: The bonus status.
          example: Expired
        createdAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a bonus was allocated.
        updatedAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a bonus was last updated.
    BonusTemporary:
      type: object
      description: 'The details about a temporary bonus program:'
      properties:
        id:
          type: integer
          description: The identifier of a temporary bonus.
          example: 1
        amount:
          type: object
          description: The bonus amount that can be awarded to clients.
          properties:
            value:
              type: string
              description: The decimal value of the amount.
              example: '100.00'
            scale:
              type: integer
              description: The number of decimal places.
              example: 16
        name:
          type: string
          description: The name of a bonus program displayed to clients in the Trader's Room.
          example: MT5
        default:
          type: number
          description: The default bonus amount as a float value.
          example: 100.0
        currency:
          $ref: '#/components/schemas/Currency'
        dynamicLots:
          type: object
          description: The ratio applied to the bonus amount to determine the volume that must be traded by clients.
          properties:
            value:
              type: string
              example: '1.00'
            scale:
              type: integer
              example: 16
        claimed:
          type: boolean
          description: 'If *true*, a temporary bonus was claimed by a client; otherwise, *false*.'
          example: false
        volumeToComplete:
          type: object
          description: The volume, in lots, that must be traded for bonus crediting.
          properties:
            value:
              type: string
              example: '1.00'
            scale:
              type: integer
              example: 2
        platform:
          $ref: '#/components/schemas/Platform'
        platformGroups:
          type: array
          description: An array of string values specifying the platform groups. Only trading accounts included in the specified groups can be awarded bonuses under a bonus program.
          items:
            type: string
          example:
            - USDCZK
        lifetime:
          type: integer
          description: The number of days after which an activated bonus expires.
          example: 30
        enableAutoCredit:
          type: boolean
          description: "If *true*, bonuses from all bonus programs (if more than one is enabled for a client at the same time) are credited to the client’s trading account immediately.\r\n\r\nIf *false*, bonuses from different bonus programs (if more than one is enabled for a client at the same time) are credited to the client’s trading accounts one after another. Only after a bonus from the first bonus program is processed and credited, a bonus from the second bonus program is credited to a client."
        scalpingThreshold:
          type: integer
          description: 'The minimum time interval, in seconds, during which a position must be opened so that the position volume is counted as traded volume.'
          example: 120
        disabledGroups:
          type: string
          description: A comma-separated list of instruments for which bonuses aren’t awarded.
          example: ‘EURJPY, USDJPY’
        enableTrade:
          type: boolean
          description: 'If *true*, trading with bonus funds is immediately allowed after depositing funds to a trading account; otherwise, *false*.'
        expiredAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a bonus program expires.
        createdAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a bonus program was created.
        updatedAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a bonus program was last updated.
    Chart:
      type: object
      description: 'The data for creating the Equity chart:'
      properties:
        accountId:
          type: integer
          description: The account identifier.
          example: 1
        data:
          type: array
          description: An array of chart data points.
    Country:
      type: object
      description: 'The details about a country:'
      properties:
        countryId:
          type: integer
          description: The country identifier.
          example: 840
        alpha2Code:
          type: string
          description: A two-letter country code (as per ISO 3166-2).
          example: US
        alpha3Code:
          type: string
          description: A three-letter country code (as per ISO 3166-3).
          example: USA
        countryName:
          type:
            - string
            - 'null'
          description: The localized country name.
          example: United States
        numericCode:
          type: string
          description: A numeric country code (as per ISO 3166).
          example: '840'
        enabled:
          type: boolean
          description: 'If *true*, a country is available for selection when clients sign up to the Trader''s Room; otherwise, *false*.'
          example: true
    Deposit:
      type: object
      description: 'The details about a deposit is included:'
      properties:
        invoice:
          $ref: '#/components/schemas/uuid'
          description: The invoice identifier.
        type:
          type: string
          enum:
            - legacy
            - paymentSystems
        status:
          description: Supported for the “paymentSystems” type
          oneOf:
            - type: "null"
            - type: string
              enum:
                - inProgress
                - action
                - failed
        action:
          description: Supported for the "paymentSystems" type and "action" status.
          oneOf:
            - type: "null"
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - redirect
                    - sendRequest
                    - showRequisites
                  description: 'The action type.'
                redirect:
                  type: object
                  description: 'The details about a redirect is included:'
                  properties:
                    url:
                      type: string
                      description: 'Redirect URL. If the action type "redirect" is a non-empty string, otherwise the empty string.'
                      example: 'https://example.com'
                sendRequest:
                  type: object
                  description: 'The details about a sendRequest is included. Object property keys will always be.'
                  properties:
                    type:
                      type: string
                      enum:
                        - urlEncoded
                        - formData
                      description: 'Request type. If the action type "sendRequest" is a non-empty string, otherwise the empty string.'
                      example: urlEncoded
                    method:
                      type: string
                      enum:
                        - POST
                      description: 'Request method. If the action type "sendRequest" is a non-empty string, otherwise the empty string.'
                      example: POST
                    url:
                      type: string
                      description: 'Request URL. If the action type "sendRequest" is a non-empty string, otherwise the empty string.'
                      example: 'https://example.com'
                    requestParams:
                      type: array
                      description: 'Request parameters. May filled if sendRequest type is urlEncoded or formData, otherwise the empty array.'
                      items:
                        type: object
                        description: 'Request parameter item:'
                        properties:
                          name:
                            type: string
                            description: 'Request parameter name. For an array, use a repeating name. Example: "foo", "foo[]", "foo[0]"'
                            example: 'foo'
                          type:
                            type: string
                            enum:
                              - plain
                            description: 'Request parameter type.'
                            example: plain
                          value:
                            type: string
                            description: 'Request parameter value.'
                            example: 'bar'
                showRequisites:
                  type: object
                  description: 'The details about a showRequisites is included. Object property keys will always be.'
                  properties:
                    requisites:
                      type: array
                      description: 'List of requisites. If the action type "showRequisites" is a non-empty array, otherwise the empty array'
                      items:
                        type: object
                        description: 'Requisites item:'
                        properties:
                          name:
                            type: string
                            description: 'Code for translation system.'
                            example: 'bankAccountNumber'
                          label:
                            type: string
                            description: 'Default descriptive text in English.'
                            example: 'Bank account number'
                          type:
                            type: string
                            enum:
                              - qrCodeContent
                              - imageURL
                              - text
                              - dateTime
                              - countdown
                            description: 'Default descriptive text in English.'
                            example: text
                          value:
                            type: string
                            description: 'Requisite value. Depends of requisites type.'
                            example: '123456789'
                    expiresAt:
                      $ref: '#/components/schemas/dateTime'
                      description: 'Expiry time of requisites'
        legacyAction:
          type:
            - object
            - 'null'
          description: Supported for the "legacy" type. Legacy implementation deposit action contracts.
          properties:
            action:
              type: string
              enum:
                - SUCCESSFUL
                - FAILED
                - OPEN
                - PENDING
                - PRETEND
                - TABLE
                - PAGE
              example: SUCCESSFUL
            params:
              type: object
    DepositMethodGroup:
      type: object
      description: 'The details about a group in which a deposit method is included:'
      properties:
        id:
          type: integer
          description: The identifier of a deposit group.
          example: 1
        description:
          type: string
          description: The deposit group description.
          example: Crypto deposits
        caption:
          type: string
          description: The deposit group name displayed in the Trader's Room.
          example: Crypto
        name:
          type: string
          description: The deposit group name used in the Back Office.
          example: Cryptocurrencies
        icon:
          type: string
          description: The name of an icon that is displayed for a deposit group in the Trader's Room.
    DepositMethod:
      type: object
      description: 'The details about a deposit method:'
      properties:
        id:
          type: integer
          description: The identifier of a deposit method.
          example: 1
        name:
          type: string
          description: The deposit method name displayed in the Trader's Room.
          example: B2BinPay
        icon:
          type:
            - string
            - 'null'
          description: "The method icon displayed in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#supported-payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-crypto-payment-methods)."
          example: paymethod-b2binpay
        fields:
          type:
            - array
            - 'null'
          description: An array of objects providing data about additional fields that clients should fill in when making deposits using a given method.
          items:
            type: object
        libraryTimeToFund:
          type: string
          description: A hint displayed in the Trader's Room about the period during which deposit transactions are processed.
          example: Depending on the blockchain
        caption:
          type: string
          description: The deposit method name used in the Back Office.
          example: B2BinPay
        pretend:
          $ref: '#/components/schemas/boolean'
        provider:
          type: string
          description: The name of a payment system used to make deposits.
          example: B2BinPay
        data:
          type: array
          items:
            type: object
        priority:
          type: integer
          description: The deposit method priority.
          example: 1
        tradersRoomCurrencies:
          type: array
          description: An array of objects providing data about each transaction currency added to a deposit method.
          items:
            $ref: '#/components/schemas/DepositMethodCurrency'
        paymentSystemCurrencies:
          type: array
          description: An array of objects providing data about each payment currency added to a deposit method.
          items:
            $ref: '#/components/schemas/DepositMethodCurrency'
        vendorCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a broker.
          items:
            $ref: '#/components/schemas/DepositMethodCommission'
        providerCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a payment system.
          items:
            $ref: '#/components/schemas/DepositMethodCommission'
        hideAmount:
          type:
            - boolean
            - 'null'
          description: 'If *true*, the **Amount** field is not displayed in the Trader''s Room when clients deposit funds using a given method; otherwise, *false*.'
        hideProceed:
          type:
            - boolean
            - 'null'
          description: 'If *true*, the **Proceed** button is not displayed in the Trader''s Room when clients deposit funds using a given method; otherwise, *false*.'
        description:
          type: string
          description: The deposit method description.
        groups:
          type: array
          description: An array of objects providing data about deposit groups in which a deposit method is included.
          items:
            $ref: '#/components/schemas/DepositMethodGroup'
    DepositMethodItem:
      type: object
      description: 'The details about a deposit method:'
      properties:
        id:
          type: integer
          description: The identifier of a deposit method.
          example: 1
        type:
          type: string
          enum:
            - legacy
            - paymentForm
            - staticDeposit
        name:
          type: string
          description: The deposit method name displayed in the Trader's Room.
          example: B2BinPay
        icon:
          type:
            - string
            - 'null'
          description: "The method icon displayed in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#supported-payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-crypto-payment-methods)."
          example: paymethod-b2binpay
        libraryTimeToFund:
          type: string
          description: A hint displayed in the Trader's Room about the period during which deposit transactions are processed.
          example: Depending on the blockchain
        caption:
          type: string
          description: The deposit method name used in the Back Office.
          example: B2BinPay
        pretend:
          $ref: '#/components/schemas/boolean'
        provider:
          type: string
          description: The name of a payment system used to make deposits.
          example: B2BinPay
        data:
          type: array
          items:
            type: object
        priority:
          type: integer
          description: The deposit method priority.
          example: 1
        tradersRoomCurrencies:
          type: array
          description: An array of objects providing data about each transaction currency added to a deposit method.
          items:
            $ref: '#/components/schemas/DepositMethodCurrency'
        paymentSystemCurrencies:
          type: array
          description: An array of objects providing data about each payment currency added to a deposit method.
          items:
            $ref: '#/components/schemas/DepositMethodCurrency'
        vendorCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a broker.
          items:
            type: object
            description: 'The commission details:'
            properties:
              type:
                type: string
                enum:
                  - default
                  - internal
                  - external
                description: The commission type.
                example: default
              alphaCode:
                type: string
                description: The alpha code of a currency in which a commission is charged.
                example: USD
              percent:
                type: number
                description: The percentage of a deposit amount charged as a commission.
                example: 1
              fix:
                type: number
                description: The fixed commission amount.
                example: 1
              min:
                type: number
                description: The minimum charged commission amount.
                example: 1
              max:
                type: number
                description: The maximum charged commission amount.
                example: 1
        groups:
          type: array
          description: An array of objects providing data about deposit groups in which a deposit method is included.
          items:
            $ref: '#/components/schemas/DepositMethodGroup'
        driver:
          description: The PSS driver associated with the deposit method. Available only for PSS methods (paymentForm, staticDeposit).
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                  description: The PSS driver identifier.
                  example: 550e8400-e29b-41d4-a716-446655440000
                name:
                  type: string
                  description: The PSS driver name.
                  example: b2binpay
                label:
                  type: string
                  description: The PSS driver display label.
                  example: B2BinPay
              required:
                - id
                - name
                - label
            - type: 'null'
        blockchainConfigurations:
          type: array
          description: 'Per-currency blockchain configurations (limits and service commission) for static-deposit methods configured per blockchain. Empty array for methods without per-blockchain configuration.'
          items:
            $ref: '#/components/schemas/MethodBlockchainConfiguration'
    MethodBlockchainConfiguration:
      type: object
      additionalProperties: false
      description: 'Blockchain configurations available for a single payment-system currency of a deposit method.'
      properties:
        currency:
          type: string
          description: The alpha code of the payment-system currency.
          example: USDT
        configurations:
          type: array
          description: 'Configurations of the enabled blockchains for this currency, ordered by sort order.'
          items:
            $ref: '#/components/schemas/MethodBlockchainConfigurationItem'
    MethodBlockchainConfigurationItem:
      type: object
      additionalProperties: false
      description: 'The limits and service commission configured for a single blockchain.'
      properties:
        blockchainId:
          type: string
          description: The provider blockchain identifier.
          example: tron-trc20
        blockchainLabel:
          type: string
          description: The blockchain display label.
          example: USDT TRC20
        restrictions:
          type: object
          additionalProperties: false
          description: 'Deposit amount limits for the blockchain. Amounts are rounded to the currency precision and returned with insignificant trailing zeros stripped (for example, "10" rather than "10.00000000"). Values are empty strings when not configured.'
          properties:
            min:
              type: string
              description: Minimum deposit amount, or an empty string when not configured.
              example: '10'
            max:
              type: string
              description: Maximum deposit amount, or an empty string when not configured.
              example: '100000'
        commission:
          description: '"null" when no service commission is configured for the blockchain.'
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MethodBlockchainCommission'
    MethodBlockchainCommission:
      type: object
      additionalProperties: false
      description: 'Service commission for a blockchain. At least one of "percentage" or "fixed" is a non-empty string. Monetary values ("fixed", "min", "max") are rounded to the commission currency precision with insignificant trailing zeros stripped; "percentage" is returned losslessly without trailing zeros.'
      properties:
        percentage:
          type: string
          description: Percentage commission, or an empty string when not set.
          example: '2.5'
        fixed:
          type: string
          description: Fixed commission, or an empty string when not set.
          example: '1.5'
        min:
          type: string
          description: Minimum commission, or an empty string when not set.
          example: '0.5'
        max:
          type: string
          description: Maximum commission, or an empty string when not set.
          example: '10'
        currency:
          type: string
          description: Commission currency alpha code.
          example: USDT
    DepositMethodField:
      type: object
      description: 'The details about a deposit method fields:'
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: The identifier of a deposit. Idempotency key when creating a deposit.
        type:
          type: string
          enum:
            - legacy
            - paymentSystems
          example: legacy
        form:
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/Form'
        driver:
          description: '"null" for the "legacy" type, otherwise non-empty string.'
          oneOf:
            - type: "null"
            - type: string
          example: 'b2binpay'
        amountRestriction:
          type: object
          description: Amount restrictions for rendering a field with an amount. Supported for the “paymentSystems” type
          properties:
            min:
              type: string
              description: If the type "legacy" is empty string, otherwise the empty string or string with value.
              example: '1.5'
            max:
              type: string
              description: If the type "legacy" is empty string, otherwise the empty string or string with value.
              example: '9.0'
            scale:
              description: If the type "legacy" is null, otherwise the integer or null if scale not set.
              oneOf:
                - type: "null"
                - type: integer
        legacyParams:
          type: object
          description: Legacy parameters to support the operation of the old field contract. Supported for the “legacy” type
          properties:
            hideAmount:
              description: 'If *true*, the **Amount** field is not displayed in the Trader''s Room when clients deposit funds using a given method; otherwise, *false*.'
              oneOf:
                - type: "null"
                - type: boolean
            hideProceed:
              description: 'If *true*, the **Proceed** button is not displayed in the Trader''s Room when clients deposit funds using a given method; otherwise, *false*.'
              oneOf:
                - type: "null"
                - type: boolean
            description:
              description: The deposit method description.
              oneOf:
                - type: "null"
                - type: string
        legacyFields:
          description: Object providing data about additional fields that clients should fill in when making deposits using a given method. Supported for the “legacy” type
          oneOf:
            - type: "null"
            - type: object
    StaticDepositIdentityCreationResult:
      type: object
      description: 'The details about a static deposit identity creation result:'
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: The identifier of a static deposit identity.
        name:
          type: string
          description: Non-empty string.
          example: 'USDT TRC20'
        status:
          type: string
          description: Identity creation status.
          enum:
            - active
            - inactive
          example: active
        action:
          description: 'Not "null" for **status** is **active**'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/StaticDepositIdentityAction'
        restrictions:
          type: object
          description: 'Deposit amount limits for the identity blockchain. Amounts are rounded to the currency precision and returned with insignificant trailing zeros stripped (for example, "10" rather than "10.00000000"). Values are empty strings when not configured.'
          additionalProperties: false
          properties:
            min:
              type: string
              description: 'Minimum deposit amount, or an empty string when not configured.'
              example: '10'
            max:
              type: string
              description: 'Maximum deposit amount, or an empty string when not configured.'
              example: '100000'
        commission:
          description: '"null" when no commission is configured for the identity blockchain.'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/StaticDepositIdentityCommission'
    StaticDepositIdentity:
      type: object
      description: 'The details about a static deposit identity:'
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: The identifier of a static deposit identity.
        name:
          type: string
          description: Non-empty string.
          example: 'USDT TRC20'
        status:
          type: string
          description: Identity status.
          enum:
            - created
            - active
            - inactive
          example: active
        action:
          description: 'Not "null" for **status** is **active**'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/StaticDepositIdentityAction'
        restrictions:
          type: object
          description: 'Deposit amount limits for the identity blockchain. Amounts are rounded to the currency precision and returned with insignificant trailing zeros stripped (for example, "10" rather than "10.00000000"). Values are empty strings when not configured.'
          additionalProperties: false
          properties:
            min:
              type: string
              description: 'Minimum deposit amount, or an empty string when not configured.'
              example: '10'
            max:
              type: string
              description: 'Maximum deposit amount, or an empty string when not configured.'
              example: '100000'
        commission:
          description: '"null" when no commission is configured for the identity blockchain.'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/StaticDepositIdentityCommission'
    StaticDepositIdentityCommission:
      type: object
      title: Commission
      description: 'Service commission for the identity blockchain. At least one of "percentage" or "fixed" is a non-empty string. Monetary values ("fixed", "min", "max") are rounded to the commission currency precision with insignificant trailing zeros stripped; "percentage" is returned losslessly without trailing zeros.'
      additionalProperties: false
      properties:
        percentage:
          type: string
          description: 'Percentage commission, or an empty string when not set.'
          example: '2.5'
        fixed:
          type: string
          description: 'Fixed commission, or an empty string when not set.'
          example: '1.5'
        min:
          type: string
          description: 'Minimum commission, or an empty string when not set.'
          example: '0.5'
        max:
          type: string
          description: 'Maximum commission, or an empty string when not set.'
          example: '10'
        currency:
          type: string
          description: 'Commission currency alpha code.'
          example: 'USDT'
    StaticDepositIdentityAction:
      type: object
      title: Action
      description: Static deposit identity action
      properties:
        generationStatus:
          type: string
          description: Identity action status.
          enum:
            - success
            - failed
          example: success
        content:
          description: 'Not "null" for **generationStatus** is **success**'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/StaticDepositIdentityActionContent'
        error:
          description: 'Not "null" for **generationStatus** is **failed**'
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/ErrorBody'
    StaticDepositIdentityActionContent:
      type: object
      title: Content
      description: Static deposit identity action content
      properties:
        headers:
          type: array
          description: Action headers
          items:
            $ref: '#/components/schemas/StaticDepositIdentityActionContentHeader'
        type:
          type: string
          enum:
            - showRequisites
          description: 'The action type.'
        showRequisites:
          type: object
          description: 'The details about a showRequisites is included. Object property keys will always be.'
          properties:
            requisites:
              type: array
              description: 'List of requisites. If the action type "showRequisites" is a non-empty array, otherwise the empty array'
              items:
                type: object
                description: 'Requisites item:'
                properties:
                  name:
                    type: string
                    description: 'Code for translation system.'
                    example: 'bankAccountNumber'
                  label:
                    type: string
                    description: 'Default descriptive text in English.'
                    example: 'Bank account number'
                  type:
                    type: string
                    enum:
                      - text
                    description: 'Default descriptive text in English.'
                    example: text
                  value:
                    type: string
                    description: 'Requisite value. Depends of requisites type.'
                    example: '123456789'
    StaticDepositIdentityActionContentHeader:
      type: object
      description: Header for static deposit identity action
      additionalProperties: false
      properties:
        name:
          type: string
          description: 'Header name for a translation system'
          example: 'Header name'
        label:
          type: string
          description: 'Default descriptive text in English'
          example: 'Header label'
    StaticDepositIdentityForm:
      type: object
      description: 'The details about a static deposit identity form:'
      additionalProperties: false
      properties:
        form:
          $ref: '#/components/schemas/Form'
        driver:
          type: object
          description: Identity driver
          properties:
            id:
              $ref: '#/components/schemas/uuid'
              description: Driver id
            name:
              type: string
              description: Driver name
              example: static_deposit_qa
    DepositMethodCurrency:
      type: object
      description: 'The deposit currency details:'
      properties:
        min:
          $ref: '#/components/schemas/DepositMethodCurrencyLimit'
        max:
          $ref: '#/components/schemas/DepositMethodCurrencyLimit'
        icon:
          type:
            - string
            - 'null'
          description: The currency icon displayed in the Trader's Room.
        caption:
          type:
            - string
            - 'null'
          description: The currency name displayed to clients in the Trader's Room.
        keyCaption:
          type: string
          description: The path to a list of localized strings that can be displayed as a currency caption.
        currency:
          $ref: '#/components/schemas/Currency'
    DepositMethodCurrencyLimit:
      type: object
      description: 'The data about the minimum or maximum amount that can be deposited in a currency:'
      properties:
        value:
          type: string
          description: The minimum or maximum allowed deposit amount.
          example: '0.00'
        scale:
          type: integer
          description: The number of decimal places displayed when representing the minimum or maximum amount in a currency.
          example: 2
    DepositMethodCommission:
      type: object
      description: 'The commission details:'
      properties:
        percent:
          type: number
          description: The percentage of a deposit amount charged as a commission.
          example: 1
        min:
          type: number
          description: The minimum charged commission amount.
          example: 1
        max:
          type: number
          description: The maximum charged commission amount.
          example: 1
        fix:
          type: number
          description: The fixed commission amount.
          example: 1
        type:
          type: string
          enum:
            - default
            - internal
            - external
          description: The commission type.
          example: default
        numericCode:
          type: integer
          description: The numeric code of a currency in which a commission is charged.
          example: 1000
    ClientDevice:
      type: object
      description: 'The details about a client device:'
      properties:
        id:
          type: integer
          description: The device identifier.
          example: 1
        fingerprint:
          type: object
          description: The device fingerprint data.
          properties:
            platform:
              type:
                - string
                - 'null'
              description: The device platform.
              example: macIntel
            userAgent:
              type:
                - string
                - 'null'
              description: The user agent data.
              example: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15'
            webTimezone:
              type:
                - string
                - 'null'
              description: The time zone set in a client browser.
              example: Europe/Moscow
        ipAddress:
          type: string
          description: The client IP address.
          example: 127.0.0.1
        isCurrentDevice:
          type: boolean
          description: 'If *true*, a client is currently signed in to the Trader''s Room from this device; otherwise, *false*.'
          example: true
        lastSignIn:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a client last signed in to the Trader's Room using this device.
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a device was added to a list of client devices.
    DeviceToken:
      type: object
      description: 'The details about a saved Apple device token:'
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: The device identifier.
        token:
          type: string
          description: The Apple device token.
          example: '.inf'
    Document:
      type: object
      description: 'The details about a document submitted by a client for passing a verification procedure:'
      properties:
        id:
          type: integer
          description: The document identifier.
          example: 1
        type:
          $ref: '#/components/schemas/DocumentType'
        status:
          type: string
          enum:
            - new
            - approved
            - rejected
            - null
          description: The status of a client request for document approval.
          example: approved
        applicationId:
          $ref: '#/components/schemas/nullableInteger'
          description: The identifier of a client request for document approval.
        resolution:
          type: 'null'
          description: '*Applicable only if a submitted document was rejected.*'
          allOf:
            - $ref: '#/components/schemas/Resolution'
        comment:
          type:
            - string
            - 'null'
          description: The comment added to a submitted document.
          example: The document comment
        files:
          type: array
          description: 'An array of objects providing details about document files:'
          example:
            - id: 8
              file: y/1662913861_photo_2022-09-08_11-23-06.jpg
          items:
            $ref: '#/components/schemas/Files'
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a document was submitted.
        processTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a document was approved or rejected.
    DocumentType:
      type: object
      description: 'The details about a document type with which a document is associated:'
      properties:
        id:
          type: integer
          description: The identifier of a document type.
          example: 1
        description:
          type: string
          description: The localized description of a document type.
          example: Documents for corporate clients
        enabled:
          type: boolean
          description: 'If *true*, a document type can be used for verification; otherwise, *false*.'
        exаmple:
          type: string
          description: A sample document showing the document that can be uploaded for this document type.
          maxLength: 255
          example: example.png
        group:
          $ref: '#/components/schemas/DocumentGroup'
        maxFiles:
          type: integer
          description: The maximum number of files that can be uploaded for a document type.
          maximum: 255
          example: 10
        name:
          type: string
          description: The name of a document type.
          maxLength: 255
          example: corporate
        priority:
          type: integer
          description: The priority index assigned to a document type.
          minimum: 1
          default: 1
          example: 1
        resources:
          type: array
          description: Array of localizations attributes.
          deprecated: true
          items:
            $ref: '#/components/schemas/Resource'
    DocumentGroup:
      type: object
      description: 'The details about a document group in which a document type is included:'
      properties:
        id:
          type: integer
          description: The identifier of a document group.
          example: 1
        description:
          type: string
          description: The localized description of a document group.
          example: Document groups for corporate clients
        enabled:
          type: boolean
          description: 'If *true*, a document group can be used for verification; otherwise, *false*.'
        name:
          type: string
          description: The name of a document group.
          maxLength: 255
          example: corporate
        priority:
          type: integer
          description: The priority index assigned to a document group.
          minimum: 1
          default: 1
          example: 1
        type:
          type: string
          enum:
            - one
            - all
          description: The document group type.
          example: one
        resources:
          type: array
          description: Array of localizations attributes.
          deprecated: true
          items:
            $ref: '#/components/schemas/Resource'
    nullableInteger:
      type:
        - integer
        - 'null'
      example: 1
    Resolution:
      type:
        - object
        - 'null'
      description: |-
        *Applicable only in the case of a failure.*

        The details about a rejection reason:
      properties:
        id:
          type: integer
          description: The identifier of a rejection reason.
          example: 1
        name:
          type: string
          description: The description of a rejection reason.
          example: Rejected
    Files:
      type: object
      description: 'The details about a submitted document:'
      properties:
        id:
          type: integer
          description: The identifier of a document file.
          example: 8
        file:
          type: string
          description: The name of a document file.
          example: y/1662913861_photo_2022-09-08_11-23-06.jpg
    Localization:
      type: object
      description: 'The details about a localization option:'
      properties:
        id:
          type: integer
          description: The localization option identifier.
          example: 1
        caption:
          type: string
          description: The name of a language for which localization settings are configured.
          example: English
        localizedCaption:
          type: string
          description: The localized name of a language (translated into the current language).
          example: English
        locale:
          type: string
          description: The locale identifier.
          example: en_EN
        languageCode:
          type: string
          description: The language code.
          example: en
        languageTag:
          type: string
          description: The canonical BCP 47 (RFC 5646) language tag.
          example: en-US
        isEnabled:
          type: boolean
          description: 'If *true*, a language can be selected by clients from the list of available languages in the Trader''s Room; otherwise, *false*.'
          example: true
        isDefault:
          type: boolean
          description: 'If *true*, a language and the localization settings specified for it are applied by default in the Trader''s Room; otherwise, *false*.'
          example: true
        isRightToLeft:
          type: boolean
          description: 'If *true*, text strings are displayed in the right-to-left direction; otherwise, *false*.'
          example: true
        priority:
          type:
            - integer
            - 'null'
          description: The priority index assigned to a localization option.
          example: 1
        formats:
          type: object
          description: 'The details about format settings specified for a localization option:'
          properties:
            decimal:
              type:
                - string
                - 'null'
              description: A character used as a decimal separator.
              example: .
            fullDate:
              type:
                - string
                - 'null'
              description: 'The full date format (such as l, F j, Y).'
              example: 'l, F j, Y'
            fullTime:
              type:
                - string
                - 'null'
              description: 'The full time format (such as h:i:s A T).'
              example: 'h:i:s A T'
            longDate:
              type:
                - string
                - 'null'
              description: 'The long date format (such as F j, Y).'
              example: 'F j, Y'
            middleDate:
              type:
                - string
                - 'null'
              description: 'The middle date format starting with the month (such as M j, Y).'
              example: 'M j, Y'
            middleTime:
              type:
                - string
                - 'null'
              description: 'The middle time format (such as h:i:s A).'
              example: 'h:i:s A'
            name:
              type:
                - string
                - 'null'
              description: 'The person name format (such as {title} {givenName} {familyName})'
              example: '{title} {givenName} {familyName}'
            shortDate:
              type:
                - string
                - 'null'
              description: 'The short date format (such as h:i A).'
              example: d.m.Y
            shortTime:
              type:
                - string
                - 'null'
              description: 'The short time format (such as h:i A).'
              example: 'h:i A'
            thousands:
              type:
                - string
                - 'null'
              description: A character used as a thousands separator.
              example: ' ,'
    booleanInt:
      type: integer
      enum:
        - 0
        - 1
      example: 0
    MenuItem:
      type: object
      description: 'An array of objects providing details about menu items displayed in the Trader''s Room:'
      properties:
        id:
          type: integer
          description: The menu item identifier.
          example: 1
        caption:
          type: string
          description: The menu item name displayed in the Trader's Room.
          example: Dashboard
        name:
          type: string
          description: The menu item name used in the Back Office.
          example: dashboard
        new:
          type: boolean
          description: 'If *true*, a menu item is marked as new in the Trader''s Room; otherwise, *false*.'
        priority:
          type: integer
          description: The priority index assigned to a menu item.
          example: 2
        type:
          type: string
          enum:
            - default
            - custom
          description: The type of the menu item.
          example: default
        localizedCaption:
          type:
            - string
            - 'null'
          description: The localized caption of the menu item.
        externalUrl:
          type: string
          description: The external URL for custom menu items.
        icon:
          type: string
          description: The icon for the menu item (SVG format).
        customAware:
          oneOf:
            - type: object
              properties:
                behavior:
                  type: string
                  enum:
                    - same_tab
                    - new_tab
                    - iframe
                  description: How the custom menu item should be opened.
              required:
                - behavior
            - type: 'null'
          description: Custom behavior configuration for custom menu items. Null for default items.
        items:
          type: array
          items:
            description: Array of MenuItem objects
    MenuItemSingle:
      type: object
      description: 'The details about a menu item displayed in the Trader''s Room:'
      properties:
        id:
          type: integer
          description: The menu item identifier.
        caption:
          type: string
          description: The menu item name displayed in the Trader's Room.
          example: Dashboard
        name:
          type: string
          description: The menu item name used in the Back Office.
        new:
          type: boolean
          description: 'If *true*, a menu item is marked as new in the Trader''s Room; otherwise, *false*.'
        priority:
          type: integer
          description: The priority index assigned to a menu item.
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a menu item was added.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a menu item was last updated.
    PasswordChangeRecord:
      type: object
      description: 'The details about a password change record:'
      properties:
        id:
          type: integer
          description: The identifier of a password change record.
          example: 1
        type:
          type: string
          enum:
            - changed
            - restored
          description: "The password change type. Possible values:\r\n\r\n- changed — a client was prompted to change their password by the admin.\r\n- restored — a password was changed by a client."
          example: changed
        createTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a password was changed or restored.
    ClientPermissions:
      type: array
      description: An array of objects providing data about the operations that a client is allowed to make in the Trader's Room
      items:
        type: object
        properties:
          name:
            type: string
            description: "The operation name. Possible values:\r\n\r\n- verification — a client can obtain a higher verification level\r\n\r\n- converter — a client can exchange funds\r\n\r\n- deposits — a client can deposit funds to their wallets or trading accounts\r\n\r\n- withdrawals — a client can withdraw funds from their wallets or trading accounts\r\n\r\n- internal_transfers — a client can transfer funds to the wallets and trading accounts of other clients registered on the same Trader's Room instance"
            example: deposits
          isEnabled:
            type: boolean
            description: 'If *true*, a client is allowed to make an operation; otherwise, *false*.'
            example: true
    ClientProfile:
      type: object
      description: 'The details about a client profile:'
      properties:
        id:
          type: integer
          description: The client profile identifier.
          example: 1
        email:
          type: string
          description: The client’s email address.
          example: username@example.com
        locale:
          type:
            - string
            - 'null'
          description: The localization option applied to a client profile.
          example: en_US
        status:
          $ref: '#/components/schemas/ClientStatus'
        nickname:
          type:
            - string
            - 'null'
          description: The client’s nickname used in the Trader's Room.
        photo:
          type:
            - string
            - 'null'
          description: The filename of an image used as a profile picture.
          example: 7cbd334347af9a25b5d970b3aef618ba.jpeg
        maskedEmail:
          type: string
          description: The masked email address.
          example: u*********@********.com
        clientUiConfig:
          type: object
          description: 'The user interface configuration options specified for a client:'
          properties:
            showId:
              type: boolean
              description: 'If *true*, a client identifier is displayed in the Trader''s Room; otherwise, *false*.'
            allowChangeUserPic:
              type: boolean
              description: 'If *true*, a client can change their profile picture via the Trader''s Room; otherwise, *false*.'
            allowChangeNickname:
              type: boolean
              description: 'If *true*, a client can change their nickname via the Trader''s Room; otherwise, *false*.'
            allowShowNickname:
              type: boolean
              description: 'If *true*, a client can see their nickname in the Trader''s Room; otherwise, *false*.'
            addressUpdating:
              type: string
              enum:
                - address_updating_disabled
                - address_updating_kyc
                - address_updating_request
              description: 'Address updating setting.'
        info:
          $ref: '#/components/schemas/ClientInfo'
        phone:
          $ref: '#/components/schemas/ClientPhone'
        phones:
          type: array
          description: An array of objects providing data about all phone numbers specified in a client profile.
          items:
            $ref: '#/components/schemas/ClientPhone'
        addresses:
          type: array
          description: An array of objects providing data about all addresses specified in a client profile.
          deprecated: true
          items:
            $ref: '#/components/schemas/ClientAddress'
        residentialAddress:
          $ref: '#/components/schemas/ClientAddress'
          description: Client residential address.
        type:
          $ref: '#/components/schemas/TypeClientNullable'
        country:
          $ref: '#/components/schemas/CountryNullable'
        verificationLevel:
          $ref: '#/components/schemas/VerificationLevel'
        lastLoginTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time of when a client was last signed in to the Trader's Room.
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a client profile was registered.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a client profile was last modified.
        limits:
          type: object
          description: 'The details about the limits on the number of accounts that a client can create:'
          properties:
            maxDemoTradingAccounts:
              type:
                - integer
                - 'null'
              description: The maximum allowed number of demo accounts.
              example: 1
            maxLiveTradingAccounts:
              type:
                - integer
                - 'null'
              description: The maximum allowed number of live accounts.
              example: 1
    ClientInfo:
      type: object
      description: 'The client personal data:'
      properties:
        firstName:
          type:
            - string
            - 'null'
          description: The client’s first name.
        lastName:
          type:
            - string
            - 'null'
          description: The client’s last name.
        middleName:
          type:
            - string
            - 'null'
          description: The client’s middle name.
        birthday:
          $ref: '#/components/schemas/nullableDateTime'
    ClientStatus:
      type: string
      enum:
        - active
        - banned
        - deleted
        - inactive
      description: The client profile status.
      example: active
    ClientPhone:
      type:
        - object
        - 'null'
      description: |-
        The details about a client phone number that is marked as the default one.

        The default phone number is always a mobile number that is confirmed by a client. If several mobile numbers are confirmed, the latest confirmed number is marked as the default one.
      properties:
        id:
          type: integer
          description: The identifier assigned to a phone number.
          example: 1
        phone:
          type: string
          description: The phone number.
        ext:
          type: string
          description: The phone number extension.
        type:
          type: string
          description: "The type of a phone number.\r\n\r\nAlways *mobile* for the default phone number."
          example: mobile
        confirm:
          type: boolean
          description: "If *true*, a phone number is confirmed; otherwise, *false*.\r\n\r\nAlways *true* for the default phone number."
        default:
          type: boolean
          description: "If *true*, a phone number is marked as the default one for a client; otherwise, *false*.\r\n\r\nThe default phone number is always a mobile number that is confirmed by a client. If several mobile numbers are confirmed, the latest confirmed number is marked as the default one."
        maskedPhone:
          type: string
          description: The masked phone number.
    ClientAddress:
      type: object
      description: 'The details about a client address:'
      properties:
        type:
          type: integer
          description: The identifier of an address type.
          example: 1
        countryId:
          type:
            - integer
            - 'null'
          description: Address country id.
          example: 1
        countryCode:
          type:
            - integer
            - 'null'
          description: Address country code.
          example: 1
        city:
          type: string
          description: The city.
        state:
          type: string
          description: The state.
        subdivision:
          type: string
          description: The subdivision name.
        postalCode:
          type: string
          description: The postal code.
        street:
          type: string
          description: The street name.
        streetNumber:
          type: string
          description: The street number.
        address:
          type: string
          description: The full address.
        options:
          type: array
          description: An array of string values specifying additional address options.
          items:
            type: string
    TypeClientNullable:
      type:
        - object
        - 'null'
      description: 'The details about a client type:'
      properties:
        id:
          type: integer
          description: The client type identifier.
          example: 1
        default:
          type: boolean
          description: 'If *true*, the client type is the default one and assigned to all newly registered clients; otherwise, *false*.'
        enabled:
          type: boolean
          description: 'If *true*, the type can be assigned to clients; otherwise, *false*.'
        name:
          type: string
          description: The client type name.
          maxLength: 255
          example: Individual
        group:
          type: string
          enum:
            - individual
            - corporative
          description: The group to which a client type is assigned.
          example: individual
        wizard:
          type: boolean
          deprecated: true
          description: 'Always *false*.'
    CountryNullable:
      type:
        - object
        - 'null'
      description: 'The details about a country:'
      properties:
        countryId:
          type: integer
          description: The country identifier.
          example: 840
        alpha2Code:
          type: string
          description: A two-letter country code (as per ISO 3166-2).
          example: US
        alpha3Code:
          type: string
          description: A three-letter country code (as per ISO 3166-3).
          example: USA
        countryName:
          type:
            - string
            - 'null'
          description: The localized country name.
          example: United States
        numericCode:
          type: string
          description: A numeric country code (as per ISO 3166).
          example: '840'
        enabled:
          type: boolean
          description: 'If *true*, a country is available for selection when clients sign up to the Trader''s Room; otherwise, *false*.'
          example: true
    VerificationLevel:
      type: object
      description: 'The details about a verification level:'
      properties:
        id:
          type: integer
          description: The identifier of a verification level.
          example: 1
        index:
          type: integer
          description: The index of a verification level.
          example: 0
        name:
          type: string
          description: Deprecated. Use 'caption' instead.
          example: Level 0
          deprecated: true
        caption:
          type: string
          description: The caption of a verification level.
          example: Level 0
        localizedCaption:
          type: string
          description: The localized caption of a verification level.
          example: 等级 0
        description:
          type: string
          description: The verification level description displayed in the Trader's Room.
          example: The level description
        localizedDescription:
          type: string
          description: The localized description of a verification level displayed in the Trader's Room.
          example: The localized level description
        mailDescription:
          type: string
          description: The email text.
          example: The email text
        mobileDescription:
          type: string
          description: The verification level description displayed in the mobile app.
          example: The level description displayed in the mobile app
        localizedMobileDescription:
          type: string
          description: The localized description of a verification level displayed in the mobile app.
          example: The localized level description displayed in the mobile app
        nextLevel:
          type:
            - integer
            - 'null'
          description: The identifier of a next verification level that clients can be granted after obtaining this verification level.
          example: 2
        roleId:
          type:
            - integer
            - 'null'
          description: The identifier of a permission set specifying which actions clients are allowed to perform in the Trader's Room after obtaining this verification level.
          example: 1
        wizard:
          type:
            - string
            - 'null'
          description: The name of a wizard used to run a verification procedure in the Trader's Room.
          example: DocumentsWizard
        default:
          type: boolean
          description: 'If *true*, a verification level is the default one and assigned to all newly registered clients; otherwise, *false*.'
          default: true
          example: true
        visible:
          type: boolean
          description: 'If *true*, a verification level is displayed to clients in the Trader''s Room; otherwise, *false*.'
          example: true
        limits:
          type: object
          description: 'The details about transaction limits assigned to a verification level:'
          properties:
            total:
              type: integer
              description: The total number of limits.
              example: 10
            data:
              type: array
              description: An array of objects specifying transaction limits related to specific currencies.
              items:
                $ref: '#/components/schemas/VerificationLevelLimit'
        options:
          type:
            - array
            - 'null'
          description: An array of string values specifying the groups which include the documents that must be submitted by clients.
          items:
            type: string
    VerificationLevelLimit:
      type: object
      description: 'The detials about transaction limits assigned to a verification level:'
      properties:
        id:
          type: integer
          description: The limit identifier.
          example: 1
        currencyCode:
          type: integer
          description: 'The numeric currency code, as per ISO 4217.'
          example: 840
        dailyDeposit:
          type: string
          description: The maximum deposit amount per day.
          example: '100.42'
        dailyWithdrawal:
          type: string
          description: The maximum withdrawal amount per day.
          example: '100.42'
        dailyBuy:
          type: string
          description: The maximum buy amount per day.
          example: '100.42'
        dailySell:
          type: string
          description: The maximum sell amount per day.
          example: '100.42'
        dailyInternalTransfer:
          type: string
          description: The maximum amount of internal transfers per day.
          example: '100.42'
        monthlyWithdrawal:
          type: string
          description: The maximum withdrawal amount per month.
          example: '100.42'
        monthlyBuy:
          type: string
          description: The maximum buy amount per month.
          example: '100.42'
        monthlySell:
          type: string
          description: The maximum sell amount per month.
          example: '100.42'
        autoWithdrawal:
          type: string
          description: The amount that can be withdrawn by a client without obtaining the admin approval.
          example: '100.42'
        transferMin:
          type: string
          description: The minimum amount that can be transferred.
          example: '100.42'
    ClientProfileUpdateRequest:
      type: object
      properties:
        nickname:
          type: string
          description: The client’s nickname used in the Trader's Room.
        locale:
          type: string
          description: The localization option applied to a client profile.
          example: en_US
    ClientInfoUpdateRequest:
      type: object
      properties:
        firstName:
          type:
            - string
            - 'null'
          description: The client’s first name.
        lastName:
          type:
            - string
            - 'null'
          description: The client’s last name.
        middleName:
          type:
            - string
            - 'null'
          description: The client’s middle name.
        birthday:
          type:
            - string
            - 'null'
          format: date
          description: The client’s date of birth.
    ClientAddressUpdateRequest:
      type: object
      required:
        - country_id
        - city
        - postal_code
        - address
      properties:
        city:
          type:
            - string
          description: City.
          example: London
        state:
          type:
            - string
          description: State or region.
          example: Greater London
        postal_code:
          type:
            - string
          description: Postal code.
          example: NW9 5NW
        address:
          type:
            - string
          description: Full address.
          example: "Claremont House, Flat 18, 14 Aerodrome Road"
        country_id:
          type:
            - integer
          description: Country id.
          example: 710
        documents:
          type: array
          items:
            type: string
            format: binary
            description: >
              Optional file upload (max size 10 MB).
              Allowed MIME types: image/jpeg, image/png, application/pdf.
    PlatformAccessToken:
      type: object
      properties:
        token:
          type: string
          description: The access token.
          example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
        refreshToken:
          type: string
          description: The refresh token.
          example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjU2MDY3MTU0LCJleHAiOjE2NTYxMDMxNTQsImlzcyI6Imh0dHBzOlwvXC9hcC52ZW5kb3IuY29tIn0.u6HuS_oQ4udk2EEUa-7XutJ0CAKIZty1OcFaqTckLRGYEr3xcWXZEHCfrhDl31N6_t0XP6_m-ESue_NoWx_f1sGMv6XMT0pPg1NQ1XJ1JJ4slaeEWjSuGIl8_Jbj-20zZOvwzUZbed7UQg0jUM11OUt0l1jVVSF19vKJJpVGFDYMIOHkS7tlFeKiypReYRd2af-Pf_au1v6vG3V42SFpZER3eKqALZkoT617B35enJdtUqmyrRgb_rCIOCwAHQdUcOuosyBUk9U-Cz3WEoHx5nqtvFVAeXKqlbn0Cbqk4joFt1FY8nUqlyVZNI9E3-dbjFPzod8Vej6rkAVd312M3w
        ttl:
          type: string
          description: 'The maximum time the tokens are valid, in seconds.'
          example: '60'
        host:
          type: string
          description: The URL to which the request for obtaining a pair of access and refresh tokens was sent.
          example: 'http://example.com'
        header:
          type: string
          example: Authorization
    ProductPreference:
      type: object
      description: 'The details about preferences added to a product:'
      properties:
        id:
          type: integer
          description: The identifier of product preferences.
        title:
          type: string
          description: The title added to product prefernces.
        value:
          type: string
          description: The text of product preferences.
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
    Resource:
      type: object
      description: 'The details about a localized string displayed in the Trader''s Room:'
      properties:
        key:
          type: string
          example: caption
        locale:
          type: string
          example: en_En
        value:
          type: string
          example: value
    QuizShort:
      type: object
      description: 'The details about a client test:'
      properties:
        id:
          $ref: '#/components/schemas/integer'
          description: The identifier of a test.
          example: 1
        caption:
          type: string
          description: The test’s title displayed to clients in the Trader's Room.
          example: Discover Your Trading Style
        details:
          type:
            - string
            - 'null'
          description: The test’s description or any other helpful information that clients should know before they start passing the test.
          example: Takes just a couple of minutes
        completed:
          type: boolean
          description: 'If *true*, for all the test''s question, answers are received; otherwise, *false*.'
          example: false
        approvalStatus:
          type: 'null'
          description: The status assigned to a test.
          allOf:
            - $ref: '#/components/schemas/ApplicationStatus'
        requiredForLevelsId:
          type: array
          description: An array of integer values identifying the verification levels that can be granted to clients only after passing a test.
          items:
            $ref: '#/components/schemas/integer'
    ApplicationStatus:
      type: string
      enum:
        - pending
        - approved
        - rejected
        - inProgress
        - new
      description: The status assigned to a client request.
      example: new
    Quiz:
      type: object
      description: 'The details about a client test:'
      properties:
        id:
          type: integer
          description: The identifier of a test.
          example: 1
        caption:
          type: string
          description: The test’s title displayed in the Trader's Room.
          example: Discover Your Trading Style
        completed:
          type: boolean
          description: 'If *true*, for all the test''s question, answers are received; otherwise, *false*.'
          example: false
        details:
          type:
            - string
            - 'null'
          description: The test’s description or any other helpful information that clients should know before they start passing the test.
          example: Takes just a couple of minutes
        requiredForLevelsId:
          type: array
          description: An array of integer values identifying the verification levels that can be granted to clients only after passing a test.
          items:
            $ref: '#/components/schemas/integer'
        approvalStatus:
          type: 'null'
          description: The status assigned to a test.
          allOf:
            - $ref: '#/components/schemas/ApplicationStatus'
        questions:
          type: array
          description: An array of objects providing the data about questions and answer options included in a test.
          items:
            type: object
            properties:
              id:
                type: integer
                description: The question identifier.
              question:
                type: string
                description: The text of a question.
                example: The text of the 1st question
              answers:
                type: array
                description: An array of objects providing the data about answer options added for a question.
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: The identifier of an answer option.
                    text:
                      type: string
                      description: The text of an answer option.
                      example: The text of the 1st answer option
                    priority:
                      type: integer
                      description: The priority index assigned to an answer option.
              type:
                type: string
                enum:
                  - open
                  - closed
                  - questionnaire
                  - poll
                description: "The question type. Possible values:\r\n\r\n- open — an open-ended question that can be answered in a free form.\r\n\r\n- close — a close-ended question that can be answered by choosing a single or multiple correct answers from a given list of options.\r\n\r\n- questionnaire — a multiple-choice question that can be answered by choosing one or more answers from a given list of options.\r\n\r\n- poll — a multiple-choice question that can be answered by choosing a single answer from a given list of options."
                example: open
              category:
                type: string
                description: The category in which a question is included.
                example: General questions
              priority:
                type: integer
                description: The priority index assigned to a question.
                example: 1
    QuizAttempt:
      type: object
      description: 'The details about a client attempt to pass a test:'
      properties:
        id:
          type: integer
          description: The identifier of an attempt made by a client to pass a test.
          example: 1
        quizId:
          type: integer
          description: The identifier of a test.
          example: 1
        status:
          type: string
          enum:
            - COMPLETED
            - FAILED
            - WAITING_CONFIRMATION
          description: "The test status. Possible values:\r\n\r\n- COMPLETED — a test was successfully passed by a client\r\n\r\n- FAILED — a test was failed\r\n\r\n- WAITING_CONFIRMATION — a test has been completed by a client and its results await approval by the admin"
    Rate:
      type: object
      description: 'The current exchange rate details:'
      properties:
        quoteId:
          $ref: '#/components/schemas/uuid'
          description: The quote identifier.
        currency:
          $ref: '#/components/schemas/Currency'
          description: 'The details about a quote currency:'
        expiredAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when the exchange rate data is due to expire.
        lifetime:
          type: integer
          description: The number of seconds the exchange rate data is valid.
          example: 60
        rate:
          $ref: '#/components/schemas/nullableDecimal'
          description: The exchange rate.
        maxAmount:
          $ref: '#/components/schemas/decimal'
          description: 'The maximum allowed amount per exchange operation, specified for a currency pair.'
        createdAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a quote was created.
        updatedAt:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a quote was last updated.
    decimal:
      type: string
      format: double
      example: '1.000000000000000000'
    RatePairs:
      type: object
      description: 'The details about the current exchnage rates for the requested currency pairs:'
      properties:
        rates:
          description: An array of objects providing the exchange rate data for the requested currency pairs.
          type:
            - array
          items:
            type: object
            required:
              - from
              - to
              - rate
            properties:
              from:
                type: string
                example: 'USD'
                description: "The currency code for the left currency."
              to:
                type: string
                example: 'EUR'
                description: "The currency code for the right currency."
              rate:
                oneOf:
                  - type: string
                    format: double
                    example: '0.587484782872111'
                  - type: 'null'
    ClientSettings:
      type: object
      description: 'The settings applied to a client profile:'
      properties:
        settings:
          type: object
          example:
            applicationColor: '#225577'
    MobileSetting:
      type: object
      description: 'The settings related to mobile apps that clients can download to their iOS and Android devices:'
      properties:
        qrCodeLifetime:
          type: integer
          description: "The number of minutes a QR code for signing in to the Trader's Room is valid. The default value is 2.\r\n\r\nYou can display to your clients QR codes for signing in to the Trader's Room. Instead of entering credentials, clients can scan such QR codes with their phones and sign in to the Trader's Room using the mobile app to which they have already been signed in."
          default: 2
          example: 2
        applications:
          type: array
          description: "An array of objects specifying URLs for downloading the mobile app.\r\n\r\nYou can display to your clients QR codes that they can scan to quickly download the mobile app to their iOS and Android devices."
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - Android
                  - iOS
                description: The mobile app platform.
                example: iOS
              url:
                type:
                  - string
                  - 'null'
                description: A URL for downloading the mobile app.
                example: 'https://example.com'
    Recaptcha:
      type: object
      description: 'The details about reCAPTCHA:'
      properties:
        enabled:
          type: boolean
          description: 'If *true*, reCAPTCHA is added to the Sign In page of the Trader''s Room; otherwise, *false*.'
          example: false
          deprecated: true
    BasicRegisterFormWorkflow:
      type: object
      description: The details about the fields that must be filled in by a cliet in order to register in the Trader's Room.
      properties:
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
    Field:
      type: object
      properties:
        id:
          oneOf:
            - $ref: '#/components/schemas/nullableInteger'
            - $ref: '#/components/schemas/nullableString'
        priority:
          type:
            - integer
            - 'null'
        name:
          type: string
        label:
          $ref: '#/components/schemas/FieldLabel'
        type:
          type: string
        rules:
          type: array
          items:
            type: array
            items:
              allOf:
                - $ref: '#/components/schemas/string'
                - $ref: '#/components/schemas/arrayOfStrings'
        initialValue:
          oneOf:
            - $ref: '#/components/schemas/nullableInteger'
            - $ref: '#/components/schemas/nullableString'
            - $ref: '#/components/schemas/nullableBoolean'
        options:
          type: array
          items:
            $ref: '#/components/schemas/FieldOption'
        description:
          $ref: '#/components/schemas/nullableString'
        hidden:
          $ref: '#/components/schemas/boolean'
        readonly:
          $ref: '#/components/schemas/boolean'
        data:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/integer'
              - $ref: '#/components/schemas/string'
              - $ref: '#/components/schemas/boolean'
        fields:
          type:
            - array
            - 'null'
          items:
            type: object
            description: Array of Field object (Recursive)
        mask:
          $ref: '#/components/schemas/NullableFieldMask'
        optionsType:
          $ref: '#/components/schemas/NullableFieldOptionsType'
        fieldToWatch:
          $ref: '#/components/schemas/nullableString'
        change:
          $ref: '#/components/schemas/boolean'
        autocompleteSuggestions:
          $ref: '#/components/schemas/NullableFieldAutocompleteSuggestions'
        related_field_id:
          oneOf:
            - $ref: '#/components/schemas/integer'
            - $ref: '#/components/schemas/string'
        related_option_id:
          oneOf:
            - $ref: '#/components/schemas/integer'
            - $ref: '#/components/schemas/string'
        depends_on_field_id:
          oneOf:
            - $ref: '#/components/schemas/nullableInteger'
            - $ref: '#/components/schemas/nullableString'
    nullableString:
      type:
        - string
        - 'null'
      example: example
    FieldLabel:
      type: object
      properties:
        value:
          type: string
        raw:
          type: boolean
        hint:
          $ref: '#/components/schemas/NullableFieldHint'
    NullableFieldHint:
      type:
        - object
        - 'null'
      properties:
        value:
          type: string
        position:
          $ref: '#/components/schemas/NullableFieldHintPosition'
    NullableFieldHintPosition:
      type: string
      enum:
        - start
        - end
        - null
    string:
      type: string
      example: example
    arrayOfStrings:
      type: array
      items:
        $ref: '#/components/schemas/string'
    nullableBoolean:
      type:
        - boolean
        - 'null'
      example: true
    FieldOption:
      type: object
      properties:
        name:
          type: string
        value:
          oneOf:
            - $ref: '#/components/schemas/integer'
            - $ref: '#/components/schemas/string'
        disabled:
          type: boolean
          default: false
        hint:
          type: string
        related_fields:
          type: array
          items:
            $ref: '#/components/schemas/string'
        related_fields_id:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/integer'
              - $ref: '#/components/schemas/string'
      required:
        - name
        - value
        - disabled
        - hint
    NullableFieldMask:
      type:
        - object
        - 'null'
      properties:
        key:
          $ref: '#/components/schemas/string'
        value:
          oneOf:
            - $ref: '#/components/schemas/string'
            - $ref: '#/components/schemas/integer'
        enabledIf:
          $ref: '#/components/schemas/arrayOfStrings'
    NullableFieldOptionsType:
      type:
        - object
        - 'null'
      properties:
        type:
          $ref: '#/components/schemas/string'
        endpoint:
          $ref: '#/components/schemas/string'
    NullableFieldAutocompleteSuggestions:
      type:
        - object
        - 'null'
      properties:
        endpoint:
          $ref: '#/components/schemas/string'
        source_type:
          $ref: '#/components/schemas/string'
        autocomplete_fields:
          $ref: '#/components/schemas/arrayOfStrings'
    RegistrationListWorkflow:
      type: array
      description: An array of objects providing details about all Registration wizards (if there is more than one wizard can be used for registration).
      items:
        $ref: '#/components/schemas/Registration'
    Registration:
      type: object
      properties:
        id:
          type: integer
          description: The Registration wizard identifier.
        created_at:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a wizard was created.
        updated_at:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a wizard was last updated.
        name:
          type: string
          description: The wizard name.
          example: Individual
        type:
          const: registration
          description: The wizard type.
        default:
          type: boolean
          description: 'If *true*, the wizard is the default Registration wizard; otherwise, *false*.'
    TerminateWorkflow:
      type: array
      items:
        description: Empty array
    KeyStorageValue:
      type: object
      description: 'The details about a defined key-value pair:'
      properties:
        id:
          type: integer
          description: The identifier of a key-value pair.
          example: 1
        isEnabled:
          type: boolean
          description: 'If *true*, a key-value pair is enabled; otherwise, *false*.'
          example: true
        tags:
          type: array
          description: An array of objects providing information about the tags assigned to a key-value pair.
          items:
            $ref: '#/components/schemas/KeyStorageTag'
        type:
          type: string
          enum:
            - string
            - html
            - mail
            - url
          description: The value type.
        key:
          type: string
          description: The name of a key.
          example: support_email
        value:
          type: string
          description: The value assigned to a key.
          example: support@example.com
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a key-value pair was created.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a key-value pair was last updated.
    KeyStorageTag:
      type: object
      description: The details about a tag assigned to a key-value pair.
      properties:
        id:
          type: integer
          description: The tag identifier.
          example: 1
        caption:
          type: string
          description: The tag name.
          example: email_config
        isEnabled:
          type: boolean
          description: 'If *true*, a tag is enabled; otherwise, *false*.'
          example: true
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
    Ticket:
      type: object
      description: 'The details about a ticket submitted to a help desk system:'
      properties:
        id:
          type: integer
          description: The ticket identifier.
          example: 1
        number:
          type: string
          description: 'The number assigned to a ticket in [SupportPal](https://docs.b2core.b2broker.com/en/integrations-other-systems.html#other-supported-systems).'
          example: '222333'
        status:
          type: object
          description: 'The details about the ticket status:'
          properties:
            id:
              type: integer
              description: The status identifier.
              example: 1
            name:
              type: string
              description: "The status assigned to a ticket in SupportPal. Possible values:\r\n\r\n- 1 — Opened\r\n\r\n- 2 — Closed\r\n\r\n- 3 — Awaiting\r\n\r\n- 4 — In-Progress\r\n\r\n- 5 — Pending\r\n\r\n- 6 — Resolved\r\n\r\n- 7 — Duplicate"
              example: Opened
        subject:
          type: string
          description: The ticket subject.
          example: Bug
        lastReply:
          $ref: '#/components/schemas/TicketMessage'
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
    TicketMessage:
      type: object
      description: 'The details about the latest ticket-related message that was sent to the support chat:'
      properties:
        id:
          type: integer
          description: The message identifier.
          example: 1
        text:
          type: string
          description: The message text.
          example: Lorem ipsum
        attachments:
          type: array
          description: An array of objects specifying the attachments added to a message.
          items:
            type: object
            properties:
              id:
                type: integer
                description: The attachment identifier.
                example: 1
              createTime:
                $ref: '#/components/schemas/nullableDateTime'
              updateTime:
                $ref: '#/components/schemas/nullableDateTime'
              directFrontendUrl:
                type: string
                description: The URL of a Trader's Room instance from which a ticket was submitted.
                example: 'http://example.com/main-room/'
              originalName:
                type: string
                description: The name of the attached file.
                example: Test.png
              feature:
                type: object
                description: 'The attachment details:'
                properties:
                  id:
                    type: integer
                    example: 1
                  createTime:
                    $ref: '#/components/schemas/nullableDateTime'
                  updateTime:
                    $ref: '#/components/schemas/nullableDateTime'
                  filename:
                    type: string
                    example: filename.png
                  mime:
                    type: string
                    example: png
                  size:
                    type: string
                    example: 2kb
        ticketId:
          type: integer
          description: The identifier of the ticket to which a message relates.
          example: 1
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a message was sent to the support chat.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a message was last updated.
        isSentByUser:
          type: boolean
          description: 'If *true*, a message was sent by a client; otherwise, *fasle*.'
          example: true
    TransactionStatus:
      type: string
      enum:
        - cancelled
        - done
        - failed
        - hold
        - holdFailed
        - inProgress
        - partial
        - pending
        - rejected
        - refund
        - refundFailed
        - trade
      description: 'The current transaction status. '
      example: done
    TransactionType:
      type: string
      enum:
        - deposit
        - exchange
        - partner
        - transfer
        - withdrawal
        - internal
        - null
      description: The transaction type.
      example: deposit
    Transaction:
      type: object
      description: 'The details about a transaction:'
      properties:
        transactionId:
          type:
            - integer
            - 'null'
          description: The transaction identifier.
          example: 1
        creditDetails:
          type:
            - object
            - 'null'
          description: 'The details about the credit side of a transaction:'
          properties:
            account:
              $ref: '#/components/schemas/Account'
            amount:
              type: string
              description: The amount credited.
              example: '100.000000000000000000'
            commission:
              type: string
              description: The transaction fee amount.
              example: '0.000000000000000000'
            currency:
              $ref: '#/components/schemas/Currency'
        debitDetails:
          type:
            - object
            - 'null'
          description: The details about the debit side of a transaction.
          properties:
            account:
              $ref: '#/components/schemas/Account'
            amount:
              type: string
              description: The amount debited.
              example: '100.000000000000000000'
            commission:
              type: string
              description: The transaction fee amount.
              example: '0.000000000000000000'
            currency:
              $ref: '#/components/schemas/Currency'
        foreignExchangeRate:
          type:
            - string
            - 'null'
          description: The exchange rate at which a transaction was made.
          example: '1.000000000000000000'
        method:
          $ref: '#/components/schemas/MethodNullable'
        blockchainTransactionAddress:
          description: The blockchain transaction address (if applicable).
          type:
            - string
            - 'null'
          example: '0x8a1b3dbe6301650442bfa765d4de23775fc9a4ec4329ebb5995ec7f1e3777dc4'
        blockExplorerUrl:
          description: The transaction URL on the blockchain block explorer (if applicable).
          type:
            - string
            - 'null'
          example: https://etherscan.io/tx/0x8a1b3dbe6301650442bfa765d4de23775fc9a4ec4329ebb5995ec7f1e3777dc4
        resolution:
          $ref: '#/components/schemas/Resolution'
        status:
          $ref: '#/components/schemas/TransactionStatus'
        type:
          $ref: '#/components/schemas/TransactionType'
        wallet:
          type:
            - object
            - 'null'
          description: "*Applicable only for deposit-type transactions made with B2BinPay.*\r\n\r\nThe details about the wallet. "
          properties:
            address:
              type: string
              description: The blockchain address of the wallet from which funds were deposited.
              example: 2MvY3VWMEK3JM41a6gzuUGRMd2AQqp4AJrn
            message:
              type: string
              description: The Destination Tag or Memo of the crypto wallet (if applicable).
              example: 12345678
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a transaction was created.
        updateTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a transaction was last updated.
    MethodNullable:
      type:
        - object
        - 'null'
      description: 'The details about a method by which the transaction was made:'
      properties:
        id:
          type: integer
          description: The method identifier.
          example: 1
        name:
          type: string
          description: The method name.
          example: B2BinPay
    TotalBalanceResponse:
      type: object
      description: 'The total balance information across all client accounts:'
      properties:
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the balance calculations were performed.
          example: '2025-01-15T12:30:45+00:00'
        calculations:
          type:
            - array
            - 'null'
          description: |-
            An array of balance calculations for each requested target currency.

            Returns null if the client has no active accounts.
          items:
            $ref: '#/components/schemas/TotalBalanceCurrencyCalculation'
      required:
        - updatedAt
        - calculations
    TotalBalanceCurrencyCalculation:
      type: object
      description: 'Balance calculations for a specific target currency:'
      properties:
        totalAvailableBalance:
          type:
            - string
            - 'null'
          description: |-
            The sum of available balances (free funds) across all accounts, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this currency.
          example: '15234.567800000000000000'
        totalCurrentBalance:
          type:
            - string
            - 'null'
          description: |-
            The sum of current balances across all accounts, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this currency.
          example: '15500.123400000000000000'
        totalEquity:
          type:
            - string
            - 'null'
          description: |-
            The sum of equity across all accounts, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this currency.
          example: '15450.987600000000000000'
        alphabeticCurrencyCode:
          type: string
          description: The alphabetic code of the target currency for this calculation.
          example: USD
        data:
          type: array
          description: An array of account groups, where each group is identified by account number and contains all related accounts.
          items:
            $ref: '#/components/schemas/TotalBalanceAccountGroup'
      required:
        - alphabeticCurrencyCode
        - data
    TotalBalanceAccountGroup:
      type: object
      description: 'A group of accounts sharing the same account number:'
      properties:
        accountNumber:
          type: string
          description: The account number shared by all accounts in this group.
          example: '12345678'
        calculatedAvailableBalance:
          type:
            - string
            - 'null'
          description: |-
            The sum of available balances (free funds) for all accounts in this group, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this group.
          example: '10000.000000000000000000'
        calculatedCurrentBalance:
          type:
            - string
            - 'null'
          description: |-
            The sum of current balances for all accounts in this group, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this group.
          example: '10200.500000000000000000'
        calculatedEquity:
          type:
            - string
            - 'null'
          description: |-
            The sum of equity for all accounts in this group, converted to the target currency.
            Returns null if exchange rates are unavailable for any account in this group.
          example: '10180.250000000000000000'
        accounts:
          type: array
          description: An array of individual accounts within this group.
          items:
            $ref: '#/components/schemas/TotalBalanceAccount'
      required:
        - accountNumber
        - accounts
    TotalBalanceAccount:
      type: object
      description: 'An individual account with balance details converted to the target currency:'
      properties:
        accountId:
          type: integer
          description: The unique identifier of the account.
          example: 101
        calculatedAvailableBalance:
          type:
            - string
            - 'null'
          description: |-
            The available balance (free funds) converted to the target currency.
          example: '5000.000000000000000000'
        calculatedCurrentBalance:
          type:
            - string
            - 'null'
          description: |-
            The current balance converted to the target currency.
          example: '5100.250000000000000000'
        calculatedCredit:
          type:
            - string
            - 'null'
          description: |-
            The credit amount converted to the target currency.
          example: '0.000000000000000000'
        calculatedEquity:
          type:
            - string
            - 'null'
          description: |-
            The equity converted to the target currency.
          example: '5090.125000000000000000'
        calculatedFreMargin:
          type:
            - string
            - 'null'
          description: |-
            The free margin converted to the target currency.
          example: '4850.000000000000000000'
        calculatedHold:
          type:
            - string
            - 'null'
          description: |-
            The hold amount converted to the target currency.
          example: '150.000000000000000000'
        calculatedMargin:
          type:
            - string
            - 'null'
          description: |-
            The margin amount converted to the target currency.
          example: '250.250000000000000000'
        calculatedMarginLevel:
          type:
            - number
            - 'null'
          description: |-
            The margin level percentage.

            This value is not converted and is displayed as-is from the source account.

            Returns null if not available.
          example: 2034.55
        calculatedPnl:
          type:
            - string
            - 'null'
          description: |-
            The profit/loss (P&L) converted to the target currency.
          example: '100.250000000000000000'
      required:
        - accountId
        - calculatedAvailableBalance
        - calculatedCurrentBalance
        - calculatedCredit
        - calculatedEquity
        - calculatedFreMargin
        - calculatedHold
        - calculatedMargin
        - calculatedMarginLevel
        - calculatedPnl
    TypeClient:
      type: object
      description: 'The details about a client type:'
      properties:
        id:
          type: integer
          description: The client type identifier.
          example: 1
        default:
          type: boolean
          description: 'If *true*, the client type is the default one and assigned to all newly registered clients; otherwise, *false*.'
        enabled:
          type: boolean
          description: 'If *true*, the type can be assigned to clients; otherwise, *false*.'
        name:
          type: string
          description: The client type name.
          maxLength: 255
          example: Individual
        group:
          type: string
          enum:
            - individual
            - corporative
          description: The group to which a client type is assigned.
          example: individual
        wizard:
          type: boolean
          deprecated: true
          description: 'Always *false*.'
    Verification:
      type: object
      description: 'The details about an operation of granting a verification level to a client:'
      properties:
        id:
          type: integer
          description: The identifier of an operation of granting a verification level.
          example: 1
        clientId:
          type: integer
          description: The client identifier.
          example: 1
        currentLevel:
          type: object
          description: 'The details about a client’s current verification level:'
          properties:
            id:
              type: integer
              description: The identifier of a verification level.
              example: 2
            name:
              type: string
              description: The name of a verification level.
              example: 'Level 1'
        previousLevel:
          type:
            - object
            - 'null'
          description: "The details about a client’s previous verification level.\r\n\r\nIf a client is only granted the initial verification level so far, *null* is returned for the previous verification level."
          properties:
            id:
              type: integer
              description: The identifier of a verification level.
              example: 1
            name:
              type: string
              description: The name of a verification level.
              example: 'Level 0'
        reason:
          type: object
          description: 'The details about the reason for granting a verification level:'
          properties:
            name:
              type: string
              description: The reason why a verification level was granted.
              example: created
        userId:
          type:
            - string
            - 'null'
          description: The identifier of an admin who granted a verification level.
          example: '1'
        createTime:
          $ref: '#/components/schemas/nullableDateTime'
          description: The date and time when a verification level was granted to a client.
    VerificationType:
      type: object
      description: 'The details about a document type:'
      properties:
        id:
          type: integer
          description: The identifier of a document type.
          example: 1
        description:
          type: string
          description: The localized description of a document type.
          example: Documents for corporate clients
        enabled:
          type: boolean
          description: 'If *true*, a document type can be used for client verification; otherwise, *false*.'
          example: true
        example:
          type: string
          description: The filename of a sample document that can be uploaded for this document type.
          example: id-card.png
        group:
          $ref: '#/components/schemas/DocumentGroup'
        maxFiles:
          type: integer
          description: The maximum number of files that can be uploaded for a document type.
          example: 2
        name:
          type: string
          description: The localized name of a document type.
          example: corporate
        priority:
          type: integer
          description: The priority index assigned to a document type.
          example: 1
    Widget:
      type: object
      description: 'The details about a widget:'
      properties:
        id:
          type: integer
          description: The widget identifier.
          example: 1
        caption:
          type: string
          description: The widget name displayed in the Trader's Room.
          example: Ticker Widget MT5
        name:
          type: string
          description: The widget name used in the Back Office.
          example: tickerWidgetMt5
        sort:
          type: integer
          description: The index indicating a sorting order for widgets in the Trader's Room.
          example: 7
        delete:
          type: boolean
          description: 'If *true*, the **Close** button (⨯) is displayed on a widget, enabling clients to hide it from the dashboard in the Trader''s Room; otherwise, *false*.'
        showByDefault:
          type: boolean
          description: 'If *true*, a widget is displayed on the dashboard in the Trader''s Room by default; otherwise, *false*.'
        width:
          type:
            - integer
            - 'null'
          description: 'The widget width, in points.'
          example: 1
        height:
          type:
            - integer
            - 'null'
          description: 'The widget height, in points.'
          example: 1
        positionX:
          type:
            - integer
            - 'null'
          description: 'The X coordinate of the upper-right corner of a widget, which is used to define the widget location on the dashboard.'
          example: 1
        positionY:
          type:
            - integer
            - 'null'
          description: 'The Y coordinate of the upper-right corner of a widget, which is used to define the widget location on the dashboard.'
          example: 1
        entity:
          type: object
          oneOf:
            - type: object
              description: 'The details about tickers added to a widget:'
              properties:
                id:
                  type: integer
                  description: The ticker identifier.
                  example: 1
                platform:
                  type: string
                  description: The trading platform for which data is displayed.
                  example: mt5
                source:
                  type: string
                  description: The URL of a data source streaming data for updating tickers.
                  example: 'https://data-stream.flexdns.org'
                symbols:
                  type: array
                  description: An array of objects providing data about ticker symbols.
                  items:
                    type: object
                    example:
                      id: 1
                      show: true
                      symbol: EURUSD
            - type: object
              properties:
                id:
                  $ref: '#/components/schemas/integer'
                currencies:
                  type: string
                  example: EUR
    WithdrawalMethodGroup:
      type: object
      description: 'The details about a group in which a withdrawal method is included:'
      properties:
        id:
          type: integer
          description: The identifier of a withdrawal group.
          example: 1
        description:
          type:
            - string
            - 'null'
          description: The withdrawal group description.
          example: Crypto withdrawals
        caption:
          type: string
          description: The withdrawal group name displayed in the Trader's Room.
          example: Crypto
        name:
          type: string
          description: The withdrawal group name used in the Back Office.
          example: Cryptocurrencies
        icon:
          type:
            - string
            - 'null'
          description: The name of an icon that is displayed for a withdrawal group in the Trader's Room.
    WithdrawalMethod:
      type: object
      description: 'The details about a withdrawal method:'
      properties:
        id:
          type: integer
          description: The identifier of a withdrawal method.
          example: 1
        name:
          type: string
          description: The withdrawal method name displayed in the Trader's Room.
          example: B2BinPay
        icon:
          type:
            - string
            - 'null'
          description: "The method icon displayed in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#supported-payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-crypto-payment-methods)."
          example: paymethod-b2binpay
        fields:
          type:
            - array
            - 'null'
          description: An array of objects providing data about additional fields that clients should fill in when making withdrawalas using a given method.
          items:
            type: object
        libraryTimeToFund:
          type: string
          description: A hint displayed in the Trader's Room about the period during which withdrawal transactions are processed.
          example: Depending on the blockchain
        caption:
          type: string
          description: The withdrawal method name used in the Back Office.
          example: b2binpay
        pretend:
          $ref: '#/components/schemas/boolean'
        provider:
          type: string
          description: The name of a payment system used to make withdrawals.
          example: B2BinPay
        data:
          type: array
          items:
            type: object
        priority:
          type: integer
          description: The withdrawal method priority.
          example: 1
        tradersRoomCurrencies:
          type: array
          description: An array of objects providing data about each transaction currency added to a withdrawal method.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCurrency'
        paymentSystemCurrencies:
          type: array
          description: An array of objects providing data about each payment currency added to a withdrawal method.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCurrency'
        vendorCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a broker.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCommission'
        providerCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a payment system.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCommission'
        hideAmount:
          type:
            - boolean
            - 'null'
          description: 'If *true*, the **Amount** field is not displayed in the Trader''s Room when clients withdraw funds using a given method; otherwise, *false*.'
        hideProceed:
          type:
            - boolean
            - 'null'
          description: 'If *true*, the **Proceed** button is not displayed in the Trader''s Room when clients withdraw funds using a given method; otherwise, *false*.'
        description:
          type:
            - string
            - 'null'
          description: The withdrawal method description.
        groups:
          type: array
          description: An array of objects providing data about withdrawal groups in which a withdrawal method is included.
          items:
            $ref: '#/components/schemas/WithdrawalMethodGroup'
    WithdrawalMethodItem:
      type: object
      description: 'The details about a withdrawal method:'
      properties:
        id:
          type: integer
          description: The identifier of a withdrawal method.
          example: 1
        name:
          type: string
          description: The withdrawal method name displayed in the Trader's Room.
          example: B2BinPay
        icon:
          type:
            - string
            - 'null'
          description: "The method icon displayed in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#supported-payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-crypto-payment-methods)."
          example: paymethod-b2binpay
        libraryTimeToFund:
          type: string
          description: A hint displayed in the Trader's Room about the period during which withdrawal transactions are processed.
          example: Depending on the blockchain
        caption:
          type: string
          description: The withdrawal method name used in the Back Office.
          example: b2binpay
        pretend:
          $ref: '#/components/schemas/boolean'
        provider:
          type: string
          description: The name of a payment system used to make withdrawals.
          example: B2BinPay
        data:
          type: array
          items:
            type: object
        priority:
          type: integer
          description: The withdrawal method priority.
          example: 1
        tradersRoomCurrencies:
          type: array
          description: An array of objects providing data about each transaction currency added to a withdrawal method.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCurrency'
        paymentSystemCurrencies:
          type: array
          description: An array of objects providing data about each payment currency added to a withdrawal method.
          items:
            $ref: '#/components/schemas/WithdrawalMethodCurrency'
        vendorCommissions:
          type: array
          description: An array of objects providing data about commissions charged by a broker.
          items:
            type: object
            description: 'The commission details:'
            properties:
              type:
                type: string
                enum:
                  - default
                  - internal
                  - external
                description: The commission type.
                example: default
              alphaCode:
                type: string
                description: The alpha code of a currency in which a commission is charged.
                example: USD
              percent:
                type: integer
                description: The percentage of a withdrawal amount charged as a commission.
                example: 1
              fix:
                type: integer
                description: The fixed commission amount.
                example: 1
              min:
                type: integer
                description: The minimum charged commission amount.
                example: 1
              max:
                type: integer
                description: The maximum charged commission amount.
                example: 1
        groups:
          type: array
          description: An array of objects providing data about withdrawal groups in which a withdrawal method is included.
          items:
            $ref: '#/components/schemas/WithdrawalMethodGroup'
        driver:
          description: The PSS driver associated with the withdrawal method. Available only for PSS methods.
          oneOf:
            - type: object
              properties:
                id:
                  type: string
                  description: The PSS driver identifier.
                  example: 550e8400-e29b-41d4-a716-446655440000
                name:
                  type: string
                  description: The PSS driver name.
                  example: b2binpay
                label:
                  type: string
                  description: The PSS driver display label.
                  example: B2BinPay
              required:
                - id
                - name
                - label
            - type: 'null'
    WithdrawalMethodField:
      type: object
      description: 'The details about a withdrawal method fields:'
      additionalProperties: false
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: The identifier of a withdrawal. Idempotency key when creating a withdrawal.
        type:
          type: string
          enum:
            - legacy
            - paymentSystems
          example: legacy
        form:
          oneOf:
            - type: "null"
            - $ref: '#/components/schemas/Form'
        driver:
          type:
            - string
            - 'null'
          description: '"null" for the "legacy" type, otherwise non-empty string.'
          example: 'praxis'
        amountRestriction:
          type: object
          description: Amount restrictions for rendering a field with an amount. Supported for the “paymentSystems” type
          properties:
            min:
              type: string
              description: If the type "legacy" is empty string, otherwise the empty string or string with value.
              example: '1.5'
            max:
              type: string
              description: If the type "legacy" is empty string, otherwise the empty string or string with value.
              example: '9.0'
            scale:
              type:
                - integer
                - 'null'
              description: If the type "legacy" is null, otherwise the integer or null if scale not set.
        legacyParams:
          type: object
          description: Legacy parameters to support the operation of the old field contract. Supported for the “legacy” type
          properties:
            hideAmount:
              type:
                - boolean
                - 'null'
              description: 'If *true*, the **Amount** field is not displayed in the Trader''s Room when clients withdrawal funds using a given method; otherwise, *false*.'
            hideProceed:
              type:
                - boolean
                - 'null'
              description: 'If *true*, the **Proceed** button is not displayed in the Trader''s Room when clients withdrawal funds using a given method; otherwise, *false*.'
            description:
              type:
                - string
                - 'null'
              description: The withdrawal method description.
        legacyFields:
          description: Object providing data about additional fields that clients should fill in when making withdrawal using a given method. Supported for the “legacy” type
          oneOf:
            - type: "null"
            - type: object
    WithdrawalMethodCurrency:
      type: object
      description: 'The withdrawal currency details:'
      properties:
        min:
          $ref: '#/components/schemas/WithdrawalMethodCurrencyLimit'
        max:
          $ref: '#/components/schemas/WithdrawalMethodCurrencyLimit'
        currency:
          $ref: '#/components/schemas/Currency'
    WithdrawalMethodCurrencyLimit:
      type: object
      description: 'The data about the minimum or maximum amount that can be withdrawn in a currency:'
      properties:
        value:
          type: string
          description: The minimum or maximum allowed withdrawal amount.
          example: '0.00'
        scale:
          type: integer
          description: The number of decimal places displayed when representing the minimum or maximum amount in a currency.
          example: 2
    WithdrawalMethodCommission:
      type: object
      description: 'The commission details:'
      properties:
        percent:
          type: integer
          description: The percentage of a withdrawal amount charged as a commission.
          example: 1
        min:
          type: integer
          description: The minimum charged commission amount.
          example: 1
        max:
          type: integer
          description: The maximum charged commission amount.
          example: 1
        fix:
          type: integer
          description: The fixed commission amount.
          example: 1
        type:
          type: string
          enum:
            - default
            - internal
            - external
          description: The commission type.
          example: default
        numericCode:
          type: integer
          description: The numeric code of a currency in which a commission is charged.
          example: 1000
    NoContent:
      description: No Content
      code: NoContent
      headers: []
    WithdrawalPattern:
      type: object
      description: 'The details about a saved withdrawal preset:'
      properties:
        id:
          type: integer
          description: The identifier of a withdrawal preset.
          example: 1
        name:
          type: string
          description: The name of a withdrawal preset.
          example: My withdrawal preset
        accountId:
          type: integer
          description: The identifier of an account from which funds are to be withdrawn.
          example: 1
        amount:
          type: string
          description: The withdrawal amount.
          example: '200'
        amountTo:
          type:
            - string
            - 'null'
          description: The withdrawal amount converted to the currency in which the wallet for withdrawing funds is denominated.
          example: '200'
        method:
          type:
            - object
            - 'null'
          description: 'The details about a method used to withdraw funds:'
          properties:
            id:
              type: integer
              description: The identifier of a withdrawal method.
              example: 1
            name:
              type: string
              description: The method name used in the Back Office.
              example: b2binpay_fiat
            caption:
              type:
                - string
                - 'null'
              description: The method name displayed to clients in the Trader's Room.
              example: B2BinPay
        currency:
          $ref: '#/components/schemas/Currency'
          description: 'The details about the currency in which a withdrawal transaction is made:'
        group:
          type:
            - object
            - 'null'
          description: 'The details about a group in which a withdrawal method is included:'
          properties:
            id:
              type: integer
              description: The identifier of a withdrawal group.
              example: 1
            caption:
              type:
                - string
                - 'null'
              description: The withdrawal group name displayed to clients in the Trader's Room.
              example: Fiat
            name:
              type: string
              description: The withdrawal group name used in the Back Office.
              example: fiat
            icon:
              type:
                - string
                - 'null'
              description: "The icon displayed for a withdrawal group in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-cryptocurrency-payment-methods)."
        data:
          type: object
          description: The transaction details specific to a withdrawal method.
          example: {}
        isWhitelisted:
          type: boolean
          description: 'If *true*, the withdrawal address saved with a preset is added to a client whitelist; otherwise, *false*.'
          example: true
        clientId:
          type: integer
          description: The client identifier.
          example: 1
        createTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a withdrawal preset was created.
        updateTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a withdrawal preset was last updated.
    WithdrawalTemplate:
      type: object
      description: 'The details about a saved withdrawal template:'
      properties:
        id:
          type: integer
          description: The identifier of a withdrawal template.
          example: 1
        name:
          type: string
          description: The name of a withdrawal template.
          example: My withdrawal preset
        data:
          type: object
          description: The transaction details specific to a withdrawal method.
          example: {}
        group:
          type:
            - object
            - 'null'
          description: 'The details about a group in which a withdrawal method is included:'
          properties:
            id:
              type: integer
              description: The identifier of a withdrawal group.
              example: 1
            name:
              type: string
              description: The withdrawal group name used in the Back Office.
              example: fiat
            icon:
              type:
                - string
                - 'null'
              description: "The icon displayed for a withdrawal group in the Trader's Room.\r\n\r\nTo upload an icon, enter the icon name. For a list of predefined icons and icon names, refer to [Payment systems](https://docs.b2core.b2broker.com/en/integrations-payment-systems.html#payment-systems) and [Supported cryptocurrency payment methods](https://docs.b2core.b2broker.com/en/reference-supported-crypto-methods.html#supported-cryptocurrency-payment-methods)."
            caption:
              type: string
              description: The withdrawal group name displayed to clients in the Trader's Room.
              example: Fiat
        active:
          type: boolean
          description: Is the withdrawal template active?
          example: true
        amount:
          type: string
          description: The withdrawal amount.
          example: '200'
        method:
          type:
            - object
            - 'null'
          description: 'The details about a method used to withdraw funds:'
          properties:
            id:
              type: integer
              description: The identifier of a withdrawal method.
              example: 1
            name:
              type: string
              description: The method name used in the Back Office.
              example: B2BInPay
            fields:
              type: array
              description: An array of objects providing data about additional fields that clients should fill in when making withdrawals using a given method.
              items:
                type: object
            caption:
              type: string
              description: The method name displayed to clients in the Trader's Room.
              example: B2BinPay
        currency:
          $ref: '#/components/schemas/Currency'
          description: 'The details about the currency in which a withdrawal transaction is made:'
        clientId:
          type: integer
          description: The client identifier.
          example: 1
        amountTo:
          type:
            - string
            - 'null'
          description: The withdrawal amount converted to the currency in which the wallet for withdrawing funds is denominated.
          example: '200'
        accountId:
          type:
            - integer
            - 'null'
          description: The identifier of an account from which funds are to be withdrawn.
          example: 1
        createTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a withdrawal template was created.
        updateTime:
          $ref: '#/components/schemas/dateTime'
          description: The date and time when a withdrawal template was last updated.
        isWhitelisted:
          type: boolean
          description: 'If *true*, the withdrawal address saved with a template is added to a client whitelist; otherwise, *false*.'
          example: true
    SavingsPreset:
      type: object
      title: Savings Preset
      description: 'The details about a savings preset:'
      additionalProperties: false
      readOnly: true
      required:
        - id
        - name
        - description
        - strategy
        - currencyAlpha
        - admissionFee
        - estimatedMonthlyProfit
        - status
        - createdAt
        - updatedAt
        - details
      properties:
        id:
          type: string
          format: uuid
          description: The universally unique identifier (UUID) of a preset.
          example: 09d5ce50-5fe8-469f-b6c4-c39698f98c22
          minLength: 36
          maxLength: 36
          readOnly: true
        name:
          type: string
          description: The unique name of a savings program, which is displayed to clients in the Trader's Room.
          example: Fixed Plan 1000 USD
          readOnly: true
        description:
          type: string
          description: The description of a savings program, which is displayed to clients in the Trader's Room.
          example: Get 100 USD in 6 months!
          readOnly: true
        strategy:
          type: string
          description: "The savings strategy. Possible values:\r\n\r\n- fixed — a savings program with a fixed interest rate\r\n\r\n- flexible — a savings program with a flexible interest rate"
          example: fixed
          enum:
            - fixed
            - flexible
          readOnly: true
        currencyAlpha:
          type: string
          example: USD
          minLength: 3
          maxLength: 64
          description: "The alphabetic code of a currency applied to a savings program, as per ISO 4217.\r\n\r\nTo subscribe to the program, clients must have wallets denominated in the program currency."
          readOnly: true
        admissionFee:
          type: number
          minimum: 0
          description: "The fee amount that a client must pay for participation in a savings program. When subscribing to the program, the admission fee along with the investment amount is deducted from a client wallet.\r\n\r\nThe admission fee can be set to 0 (zero) indicating that clients can subscribe to the program for free."
          format: double
          example: 49.5
        estimatedMonthlyProfit:
          type: number
          format: double
          minimum: 0
          exclusiveMinimum: true
          example: 0.5
          description: The estimated monthly profit from a savings program. It's calculated based on 30-day periods, regardless of the actual number of days in a calendar month.
          readOnly: true
        status:
          type: string
          description: "The status of a savings program. Possible values:\r\n\r\n- active — indicates that the card showing details of a savings program is displayed in the Trader's Room, and clients can subscribe to the program.\r\n\r\n- inactive — indicates that the card of a savings program isn’t displayed in the Trader's Room."
          enum:
            - active
            - inactive
          example: active
          readOnly: true
        createdAt:
          type: string
          format: date-time
          description: The date and time when a preset was created.
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          description: The date and time when a preset was last modified.
          example: '2023-11-17T10:30:01Z'
        details:
          oneOf:
            - $ref: '#/components/schemas/SavingsPresetFixedStrategyDetails'
            - $ref: '#/components/schemas/SavingsPresetFlexibleStrategyDetails'
    SavingsPresetCalculation:
      title: Savings Preset Calculation
      description: 'The calculated savings details:'
      type: object
      additionalProperties: false
      required:
        - presetId
        - strategy
        - details
      properties:
        presetId:
          type: string
          format: uuid
          description: The universally unique identifier (UUID) of a savings preset.
          example: 09d5ce50-5fe8-469f-b6c4-c39698f98c22
          minLength: 36
          maxLength: 36
        strategy:
          type: string
          description: "The savings strategy. Possible values:\r\n\r\n- fixed — a savings program with a fixed interest rate\r\n\r\n- flexible — a savings program with a flexible interest rate"
          enum:
            - fixed
            - flexible
          minLength: 1
          example: fixed
        details:
          oneOf:
            - $ref: '#/components/schemas/SavingsPresetFixedStrategyCalculation'
            - $ref: '#/components/schemas/SavingsPresetFlexibleStrategyCalculation'
    SavingsPlan:
      type: object
      title: Savings Plan
      description: 'The savings plan details:'
      additionalProperties: false
      required:
        - id
        - presetId
        - walletId
        - status
        - strategy
        - createdAt
        - updatedAt
        - details
      properties:
        id:
          type: string
          format: uuid
          description: The universally unique identifier (UUID) of a plan.
          example: 49825070-d077-419e-bbec-6b9a65381901
          minLength: 36
          maxLength: 36
        presetId:
          type: string
          format: uuid
          description: The universally unique identifier (UUID) of a savings preset based on which the plan is created.
          minLength: 36
          maxLength: 36
          example: 09d5ce50-5fe8-469f-b6c4-c39698f98c22
        walletId:
          type: string
          description: "The number of a client's wallet."
          example: '4815162342'
          minLength: 1
          maxLength: 36
          readOnly: true
        status:
          type: string
          description: The plan status.
          enum:
            - active
            - awaiting_cancellation
            - cancelled
            - completed
          example: active
          readOnly: true
        strategy:
          type: string
          description: "The savings strategy. Possible values:\r\n\r\n- fixed — a savings program with a fixed interest rate\r\n\r\n- flexible — a savings program with a flexible interest rate"
          example: fixed
          enum:
            - fixed
            - flexible
          readOnly: true
        abilities:
          type: object
          additionalProperties: false
          description: 'Additional plan options:'
          properties:
            cancel:
              type: boolean
              description: 'If *true*, a plan can be canceled; otherwise, *false*. The plan is canceled when a client decides to withdraw the investment amount contributed to a savings program before the end of the plan length.'
              default: true
              readOnly: true
            additionalInvestment:
              type: boolean
              description: 'If *true*, additional deposits are allowed to add funds to a plan; otherwise, *false*.'
              default: false
              readOnly: true
          readOnly: true
        cancelledAt:
          type:
            - string
            - 'null'
          example: '2023-11-17T11:32:01Z'
          format: date-time
          description: If a plan was canceled, the cancelation date and time.
          nullable: true
          readOnly: true
        createdAt:
          type: string
          format: date-time
          description: The date and time when a plan was created.
          example: '2023-11-17T11:30:01Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time when a plan was last modified.
          example: '2023-11-17T11:30:01Z'
          readOnly: true
        details:
          oneOf:
            - $ref: '#/components/schemas/SavingsPlanFixedStrategyDetails'
            - $ref: '#/components/schemas/SavingsPlanFlexibleStrategyDetails'
    SavingsPlanPayment:
      type: object
      title: Savings Payment
      description: 'The details about interest payments included in a savings plan:'
      additionalProperties: false
      required:
        - id
        - planId
        - amount
        - status
        - currencyAlpha
        - dueAt
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: The payment identifier.
          example: fb10d982-c922-4ecf-9f0f-61527c29d0ac
          minLength: 36
          maxLength: 36
          readOnly: true
        planId:
          type: string
          format: uuid
          description: The universally unique identifier of a savings plan.
          example: 49825070-d077-419e-bbec-6b9a65381901
          readOnly: true
        currencyAlpha:
          type: string
          example: USD
          minLength: 3
          maxLength: 64
          description: The alphabetic code of a currency applied to a savings program, as per ISO 4217.
          readOnly: true
        amount:
          type: number
          format: double
          description: The interest amount.
          minimum: 0
          exclusiveMinimum: true
          example: 2.5
          readOnly: true
        status:
          type: string
          description: "The payment status. Possible statuses:\r\n\r\n- scheduled — indicates that a payment is scheduled but hasn’t yet been made\r\n\r\n- paid — indicates that a payment has been made to a client\r\n\r\n- cancelled — indicates that a payment was cancelled because the savings plan was cancelled\r\n\r\n- failed — indicates that a payment failed"
          minLength: 1
          example: scheduled
          enum:
            - scheduled
            - paid
            - cancelled
            - failed
          readOnly: true
        dueAt:
          type: string
          format: date-time
          description: The date and time when an interest payment is scheduled to be made.
          readOnly: true
        paidAt:
          format: date-time
          type:
            - string
            - 'null'
          pattern: '2023-12-17T11:30:00Z'
          description: For interest payments to which the *paid* status is assigned, the actual date and time when a payment was made to a client.
          nullable: true
          readOnly: true
        createdAt:
          type: string
          format: date-time
          example: '2023-11-17T11:30:01Z'
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          example: '2023-11-17T11:30:01Z'
          readOnly: true
    SavingsFlexibleStrategyTier:
      type: object
      title: Savings Plan Tier
      description: 'The details about the tiers used to apply flexible interest rates:'
      additionalProperties: false
      required:
        - from
        - interestRate
      properties:
        from:
          type: number
          format: double
          description: The minimum amount that clients must invest to get an interest rate assigned to the tier.
          example: 100.5
          minimum: 0
          readOnly: true
        interestRate:
          type: number
          format: double
          description: The annual interest rate, in percentage, assigned to the tier.
          example: 3
          minimum: 0
          readOnly: true
    SavingsPresetFixedStrategyDetails:
      type: object
      description: 'The details of a savings program with the *fixed* strategy:'
      additionalProperties: false
      required:
        - planLengthDays
        - paymentPeriodDays
        - interestRate
        - investmentAmount
        - cancellationPenalty
        - cancellationPenaltyType
      properties:
        planLengthDays:
          type: integer
          format: int32
          minimum: 30
          example: 360
          description: "The plan length, in days, during which the investment amount contributed to a savings program must be held. The plan length can be specified with an interval of 30 days, such as 30, 60, 90, and so on.\r\n\r\nAt the end of the plan length, the investment amount is refunded to the client wallet."
          multipleOf: 30
          readOnly: true
        paymentPeriodDays:
          type: integer
          format: int32
          exclusiveMinimum: false
          minimum: 30
          description: 'The payment period, in days, indicating how often interest is paid to a client wallet. The payment period can be specified with an interval of 30 days, such as 30, 60, 90, and so on.'
          multipleOf: 30
          readOnly: true
        interestRate:
          type: number
          minimum: 0
          exclusiveMinimum: true
          format: double
          example: 7.5
          description: The percentage of the investment amount, which is used to calculate interest earned at the end of each payment period.
          readOnly: true
        investmentAmount:
          type: number
          description: 'The amount that must be contributed to a savings program. When subscribing to the program, the investment amount is deducted from a client wallet denominated in the currency of the savings program. If a client has more than one wallet denominated in the program currency, the client can select a wallet from which the investment amount should be deducted.'
          minimum: 1
          example: 1000
          format: double
          readOnly: true
        cancellationPenalty:
          type: number
          minimum: 0
          example: 800
          format: double
          description: "The penalty amount charged to a client if the client wants to withdraw the amount invested to a savings program before the end of the plan length.\r\n\r\nThe penalty amount can't exceed the investment amount, but it can be set to 0 (zero) indicating that no penalty is charged for early withdrawal."
        cancellationPenaltyType:
          type: string
          enum:
            - 'fixed'
            - 'percentage'
          description: "Cancellation Penalty calculation type"
    SavingsPresetFlexibleStrategyDetails:
      type: object
      description: 'The details of a savings program with the *flexible* strategy:'
      additionalProperties: false
      readOnly: true
      required:
        - paymentPeriod
        - penaltyPeriodDays
        - minInvestmentAmount
        - minAdditionalInvestmentAmount
        - cancellationPenalty
        - cancellationPenaltyType
        - tiers
      properties:
        paymentPeriod:
          type: string
          example: 'The first day each month'
          description: "The frequency of interest payments to a client wallet. Always, *The first day of each month* and can't be changed."
          readOnly: true
        penaltyPeriodDays:
          type: integer
          format: int32
          example: 360
          description: "The period, in days, during which a client can't withdraw their invested funds without a penalty."
          readOnly: true
        minInvestmentAmount:
          type: number
          description: 'The minimum amount of the initial investment. When subscribing to a program, clients must invest the specified minimum or more.'
          minimum: 1
          example: 1000
          format: double
          readOnly: true
        minAdditionalInvestmentAmount:
          type: number
          description: 'The minimum amount that clients can add to the initial investment.'
          minimum: 1
          example: 1000
          format: double
          readOnly: true
        cancellationPenalty:
          type: number
          minimum: 0
          example: 800
          format: double
          description: "The penalty amount charged to a client if the client withdraws their invested funds before the end of the penalty period.\r\n\r\nThe penalty amount can't exceed the minimum investment amount, but it can be set to 0 (zero) indicating that no penalty is charged for early withdrawal."
        cancellationPenaltyType:
          type: string
          enum:
            - 'fixed'
            - 'percentage'
          description: "Cancellation Penalty calculation type"
        tiers:
          type: array
          items:
            $ref: '#/components/schemas/SavingsFlexibleStrategyTier'
    SavingsPresetFixedStrategyCalculation:
      type: object
      description: 'The calculated details for the *fixed* strategy:'
      additionalProperties: false
      minProperties: 1
      properties:
        startAt:
          type: string
          format: date-time
          description: The start date and time of a savings program.
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        maturityAt:
          type: string
          format: date-time
          description: The end date and time of a savings program.
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        currencyAlpha:
          type: string
          example: USD
          minLength: 3
          maxLength: 64
          description: The alphabetic code of a currency applied to a savings program, as per ISO 4217.
          readOnly: true
        payments:
          type: array
          minItems: 1
          uniqueItems: true
          description: 'The details of interest payments:'
          items:
            type: object
            additionalProperties: false
            properties:
              dueAt:
                type: string
                format: date-time
                example: '2023-11-17T10:30:01Z'
                description: The date and time when an interest payment is scheduled to be made.
              amount:
                type: number
                format: double
                description: The interest amount.
                example: 5.5
                minimum: 0
                exclusiveMinimum: true
                readOnly: true
    SavingsPresetFlexibleStrategyCalculation:
      type: object
      description: 'The calculated details for the *flexible* strategy:'
      additionalProperties: false
      minProperties: 1
      properties:
        startAt:
          type: string
          format: date-time
          description: The start date and time of a savings program.
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        cancellationPenaltyPeriodEndAt:
          type: string
          format: date-time
          description: "The end date and time of the penalty period. After this period, clients are free to withdraw their invested funds without a penalty."
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        currencyAlpha:
          type: string
          example: USD
          minLength: 3
          maxLength: 64
          description: The alphabetic code of a currency applied to a savings program, as per ISO 4217.
          readOnly: true
    SavingsPlanFixedStrategyDetails:
      type: object
      description: 'The details of a savings program with the *fixed* strategy:'
      additionalProperties: false
      required:
        - startAt
        - maturityAt
        - currencyAlpha
        - investmentAmount
      properties:
        currencyAlpha:
          type: string
          description: The alphabetic code of a currency applied to a savings program, as per ISO 4217.
          example: USD
          readOnly: true
        investmentAmount:
          type: number
          format: double
          description: The amount that must be contributed to a savings program.
          example: 1000.5
          minimum: 0
          exclusiveMinimum: true
          readOnly: true
        admissionFee:
          type: number
          format: double
          description: "The fee amount that a client must pay for participation in a savings program. When subscribing to the program, the admission fee along with the investment amount is deducted from a client wallet.\r\n\r\nThe admission fee can be set to 0 (zero) indicating that clients can subscribe to the program for free."
          example: 50
          minimum: 0
          readOnly: true
        cancellationPenalty:
          type: number
          format: double
          description: "The penalty amount charged to a client if the client wants to withdraw the amount invested to a savings program before the end of the plan length.\r\n\r\nThe penalty amount can't exceed the investment amount, but it can be set to 0 (zero) indicating that no penalty is charged for early withdrawal."
          example: 100
          minimum: 0
          readOnly: true
        startAt:
          type: string
          format: date-time
          description: The start date and time of a savings program.
          example: '2023-11-17T11:30:01Z'
          readOnly: true
        maturityAt:
          type: string
          format: date-time
          description: The end date and time of a savings program.
          example: '2023-11-17T10:30:01Z'
          readOnly: true
    SavingsPlanFlexibleStrategyDetails:
      type: object
      description: 'The details of a savings program with the *flexible* strategy:'
      additionalProperties: false
      required:
        - startAt
        - cancellationPenaltyPeriodEndAt
        - currencyAlpha
        - investmentAmount
        - tiers
      properties :
        currencyAlpha:
          type: string
          description: The alphabetic code of a currency applied to a savings program, as per ISO 4217.
          example: USD
          readOnly: true
        investmentAmount:
          type: number
          format: double
          description: The amount that must be contributed to a savings program.
          example: 1000.5
          minimum: 0
          exclusiveMinimum: true
          readOnly: true
        minAdditionalInvestmentAmount:
          type: number
          description: 'The minimum amount that clients can add to the initial investment.'
          minimum: 1
          example: 500
          format: double
          readOnly: true
        admissionFee:
          type: number
          format: double
          description: "The fee amount that a client must pay for participation in a savings program. When subscribing to the program, the admission fee along with the investment amount is deducted from a client wallet.\r\n\r\nThe admission fee can be set to 0 (zero) indicating that clients can subscribe to the program for free."
          example: 50
          minimum: 0
          readOnly: true
        cancellationPenalty:
          type: number
          format: double
          description: "The penalty amount charged to a client if the client withdraws their invested funds before the end of the penalty period.\r\n\r\nThe penalty amount can't exceed the minimum investment amount, but it can be set to 0 (zero) indicating that no penalty is charged for early withdrawal."
          example: 100
          minimum: 0
          readOnly: true
        cancellationPenaltyType:
          type: string
          enum:
            - 'fixed'
            - 'percentage'
          description: "Cancellation Penalty calculation type"
          readOnly: true
        startAt:
          type: string
          format: date-time
          description: The start date and time of a savings program.
          example: '2023-11-17T11:30:01Z'
          readOnly: true
        cancellationPenaltyPeriodEndAt:
          type: string
          format: date-time
          description: "The end date and time of the penalty period. After this period, clients are free to withdraw their invested funds without a penalty."
          example: '2023-11-17T10:30:01Z'
          readOnly: true
        tiers:
          type: array
          items :
            $ref : '#/components/schemas/SavingsFlexibleStrategyTier'
    VisualCustomizationThemeDetails:
      type:
        - object
        - 'null'
      properties:
        background:
          type: string
          description: 'Background color'
        background-96:
          type: string
          description: 'Background-96 color'
        card:
          type: string
          description: 'Card color'
        field:
          type: string
          description: 'Field color'
        disabled:
          type: string
          description: 'Disabled color'
        overlay:
          type: string
          description: 'Overlay color'
        text-main:
          type: string
          description: 'Main text color'
        text-secondary:
          type: string
          description: 'Secondary text color'
        text-secondary-40:
          type: string
          description: 'Secondary-40 text color'
        divider:
          type: string
          description: 'Divider color'
        accent:
          type: string
          description: 'Accent color'
        accent-hover:
          type: string
          description: 'Accent hover color'
        accent-10:
          type: string
          description: 'Accent-10 color'
        accent-40:
          type: string
          description: 'Accent-40 color'
        demo:
          type: string
          description: 'Demo color'
        negative:
          type: string
          description: 'Negative color'
        negative-20:
          type: string
          description: 'Negative-20 color'
        positive:
          type: string
          description: 'Positive color'
        positive-20:
          type: string
          description: 'Positive-20 color'
        medium:
          type: string
          description: 'Medium color'
        medium-20:
          type: string
          description: 'Medium-20 color'
        text-contrast:
          type: string
          description: 'Contrast text color'
        tooltip:
          type: string
          description: 'Tooltip color'
        logo:
          type:
            - string
            - 'null'
          description: 'Logo file link'
        logoShort:
          type:
            - string
            - 'null'
          description: 'Short logo file link'
        backgroundImg:
          type:
            - string
            - 'null'
          description: 'Background image file link'
    VisualCustomizationSemanticThemeDetails:
      type:
        - object
        - 'null'
      description: 'Semantic theme tokens (new variables)'
      properties:
        brand:
          type: string
          description: 'Brand color for filled containers'
        brandSubtle:
          type: string
          description: 'Brand color for subtle strokes'
        brandMuted:
          type: string
          description: 'Brand color for muted containers'
        alternative:
          type: string
          description: 'Alternative accent color for filled containers'
        alternativeSubtle:
          type: string
          description: 'Alternative accent color for subtle strokes'
        alternativeMuted:
          type: string
          description: 'Alternative accent color for muted containers'
        positive:
          type: string
          description: 'Success color for filled containers'
        positiveSubtle:
          type: string
          description: 'Success color for subtle strokes'
        positiveMuted:
          type: string
          description: 'Success color for muted containers'
        medium:
          type: string
          description: 'Attention color for filled containers'
        mediumSubtle:
          type: string
          description: 'Attention color for subtle strokes'
        mediumMuted:
          type: string
          description: 'Attention color for muted containers'
        negative:
          type: string
          description: 'Error color for filled containers'
        negativeSubtle:
          type: string
          description: 'Error color for subtle strokes'
        negativeMuted:
          type: string
          description: 'Error color for muted containers'
        neutral:
          type: string
          description: 'Neutral accent color for filled containers'
        overlay:
          type: string
          description: 'White color for overlaying filled containers'
        overlaySubtle:
          type: string
          description: 'White color for overlaying subtle strokes'
        overlayMuted:
          type: string
          description: 'White color for muted overlaying containers'
        onSurface:
          type: string
          description: 'Default text and icons'
        onSurfaceSecondary:
          type: string
          description: 'Secondary text and icons'
        onSurfaceInverse:
          type: string
          description: 'Text and icons on Surface Inverse fill'
        onBrand:
          type: string
          description: 'Text and icons on brand fill'
        onAlternative:
          type: string
          description: 'Text and icons on alternative fill'
        onPositive:
          type: string
          description: 'Text and icons on positive fill'
        onMedium:
          type: string
          description: 'Text and icons on medium fill'
        onNegative:
          type: string
          description: 'Text and icons on negative fill'
        onNeutral:
          type: string
          description: 'Text and icons on neutral fill'
        onOverlay:
          type: string
          description: 'Text and icons on overlay fill'
        onSurfaceBrand:
          type: string
          description: 'Brand color text, icons, strokes on any surfaces'
        onSurfaceAlternative:
          type: string
          description: 'Alternative accent color text, icons, strokes on any surfaces'
        onSurfacePositive:
          type: string
          description: 'Success color text, icons, strokes on any surfaces'
        onSurfaceMedium:
          type: string
          description: 'Attention color text, icons, strokes on any surfaces'
        onSurfaceNegative:
          type: string
          description: 'Error color text, icons, strokes on any surfaces'
        onSurfaceOverlay:
          type: string
          description: 'Text, icons, strokes on any overlaying surfaces'
        surfaceLow:
          type: string
          description: 'Default background'
        surface:
          type: string
          description: 'Containers on Surface Low'
        surfaceHigh:
          type: string
          description: 'Interactive containers on any surface'
        surfaceHighest:
          type: string
          description: 'Containers on surface high'
        surfaceInverse:
          type: string
          description: 'Fill for tooltips and other inverted containers'
        backdrop:
          type: string
          description: 'Background for overlaying containers'
        outline:
          type: string
          description: 'Default stroke'
        outlineStrong:
          type: string
          description: 'Emphasized stroke'
        stateHovered:
          type: string
          description: 'State layer for hover effect'
        statePressed:
          type: string
          description: 'State layer for press effect'
        stateHoveredInverse:
          type: string
          description: 'Inverse state layer for hover effect'
        statePressedInverse:
          type: string
          description: 'Inverse state layer for press effect'
        stateDarken:
          type: string
          description: 'State layer which darkens fills in both themes'
        stateDarkenStrong:
          type: string
          description: 'State layer which strongly darkens fills in both themes'
    ClientSettingsItem:
      type: object
      title: Client settings
      required:
        - scope
        - key
        - value
      properties:
        scope:
          type: string
          description: Settings scope
        key:
          type: string
          description: Settings key
        value:
          type: string
          description: Settings value
    ClientSettingsUpdateRequest:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                description: Settings key
              value:
                type: string
                description: Settings value

    Form:
      type: object
      description: See [PSS fields documentation](https://b2btech.atlassian.net/wiki/spaces/TRV/pages/3615260714/How+PSS+send+fields+to+Front)
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Form identifier.
        encryptionData:
          type: object
          description: ''
          properties:
            publicKey:
              type: string
              description: Public key to encrypt the form input
              example: 'MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnx S30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE='
            algorithm:
              type: string
              description: 'Encryption algorithm'
              enum:
                - null
              example: null
        version:
          type: integer
          description: Form version
          example: 1
        groups:
          type: array
          description: Groups of fields for form display
          items:
            $ref: '#/components/schemas/FormGroup'
    FormGroup:
      type: object
      description: Group structure with fields
      properties:
        name:
          type: string
          description: Group name
          example: profile
        label:
          type: string
          description: Default label in English
          example: Profile
        nameDisplayRules:
          type: array
          description: Rules for displaying group name
          items:
            $ref: '#/components/schemas/FormRule'
        fields:
          type: array
          description: List of fields in a group
          items:
            $ref: '#/components/schemas/FormField'
    FormRule:
      type: object
      description: Form rule structure
      properties:
        type:
          type: string
          description: Rule type
          enum:
            - allOf
            - contains
            - email
            - equalToFieldValue
            - excludes
            - float
            - httpURL
            - integer
            - matchByRegex
            - max
            - maxLength
            - min
            - minLength
            - never
            - oneOf
          example: email
        fieldName:
          type: string
          description: The name of the field to use in the rule. Use in **equalToFieldValue** rule.
          example: age
        value:
          type: string
          description: Value for executing the rule
          example: 18
        rules:
          type: array
          description: List of rules for bulk rules. Used in rules **allOf** and **oneOf**
          items:
            $ref: '#/components/schemas/FormRule'
    FormField:
      type: object
      description: Form field structure
      properties:
        name:
          type: string
          description: Field name. Use in input[name]
          example: name
        label:
          type: string
          description: Default label in English
          example: Name
        type:
          type: string
          description: Field type
          enum:
            - bool
            - input
            - secret
            - select
          example: input
        format:
          type: object
          description: Field format
          properties:
            type:
              type: string
              enum:
                - ''
                - float
                - integer
                - phone
              example: float
            value:
              type: string
              description: Special meaning for each format
              example: ''
        params:
          type: array
          description: Special meaning for each field
          items:
            $ref: '#/components/schemas/string'
        initialValues:
          type: array
          description: List of field values
          items:
            $ref: '#/components/schemas/string'
        readOnly:
          type: boolean
          description: Is the field read-only
          example: false
        secretWasFilled:
          type: boolean
          description: Shows whether the secret has been filled and revealed previously. Only for **secret** field type
          example: false
        selectOptions:
          type: array
          description: Elements for **select** field type
          items:
            $ref: '#/components/schemas/FormSelectOption'
        validationRules:
          type: array
          description: List of field validation rules
          items:
            $ref: '#/components/schemas/FormRule'
        mandatoryRules:
          type: array
          description: List of field mandatory rules
          items:
            $ref: '#/components/schemas/FormRule'
        displayRules:
          type: array
          description: List of field display rules
          items:
            $ref: '#/components/schemas/FormRule'
    FormSelectOption:
      type: object
      description: Select option structure for **select** field type
      properties:
        name:
          type: string
          description: Select option name. Can be an empty string
          example: name
        label:
          type: string
          description: Default label in English
          example: Name
        value:
          type: string
          description: Select option value
          example: name
        displayRules:
          type: array
          description: List of select option display rules
          items:
            $ref: '#/components/schemas/FormRule'
    DepositFormSubmitRequest:
      type: object
      title: PaymentSystems
      description: Submission Form structure
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Deposit identifier.
        formId:
          $ref: '#/components/schemas/uuid'
          description: Form identifier.
        encryptedInput:
          type: string
          description: Encrypted values of filled fields from the form in string list format.
          example: '{"name": ["Eric"], "email": ["eric@gmail.com"]}'
    WithdrawalFormSubmitRequest:
      type: object
      title: PaymentSystems
      description: Submission Form structure
      properties:
        formId:
          $ref: '#/components/schemas/uuid'
          description: Form identifier.
        encryptedInput:
          type: string
          description: Encrypted values of filled fields from the form in string list format.
          example: '{"name": ["Eric"], "email": ["eric@gmail.com"]}'
    PaymentSystemsViolations:
      type: object
      title: Violations
      properties:
        violations:
          type: object
          properties:
            missingFields:
              type: array
              items:
                oneOf:
                  - type: object
                    title: New format
                    properties:
                      fieldName:
                        type: string
                        example: first_name
                      fieldLabel:
                        type: string
                        example: First name
                  - type: object
                    title: Old format
                    properties:
                      field:
                        type: string
                        example: first_name
            unsuitableFields:
              type: array
              items:
                oneOf:
                  - type: object
                    title: New format
                    properties:
                      field:
                        type: string
                        example: first_name
                      fieldName:
                        type: string
                        example: first_name
                      fieldLabel:
                        type: string
                        example: First name
                      reason:
                        type: string
                        example: min_length_1
                      description:
                        type: string
                        description: 'Default descriptive text in English'
                        example: 'Should be at least {{min}} characters long'
                      args:
                        type: object
                        description: 'Array of string keys and values to substitute for error description arguments'
                  - type: object
                    title: Old format
                    properties:
                      field:
                        type: string
                        example: first_name
                      reason:
                        type: string
                        example: 'User name cannot be empty.'
            unsupportedCurrency:
              type: array
              items:
                type: object
                additionalProperties: false
                properties:
                  currencyCode:
                    type: string
                    example: USD
    OldError:
      type: object
      title: Deprecated error
      properties:
        error:
          title: Error
          type: object
          properties:
            message:
              type: string
              examples:
                - Unprocessable Entity
    Error:
      type: object
      title: Error
      properties:
        errors:
          type: array
          items:
            "$ref": '#/components/schemas/ErrorBody'
    ErrorBody:
      type: object
      title: Error
      properties:
        name:
          type: string
          description: 'Error name for a translation system'
          example: 'Error name'
        description:
          type: string
          description: 'Default descriptive text in English'
          example: 'Description'
        args:
          type: object
          description: 'Map to substitute for error description arguments'
    Notification:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Notification identifier
        type:
          type: string
          description: Notification type
          enum:
            - 'transaction_status_changed'
            - 'successful_auth'
            - 'auth_attempt'
            - 'required_announcement'
            - 'optional_announcement'
            - 'supportpal_ticket_status_changed'
            - 'supportpal_msg_sent_success'
        category:
          type: [string, 'null']
          description: Notification category
          enum:
            - 'transaction'
            - 'announcement'
            - 'security'
            - 'helpdesk'
        readAt:
          type: [string, 'null']
          format: date-time
          description: Notification read date and time
          example: '2025-01-31T15:35:17Z'
        createdAt:
          type: string
          format: date-time
          description: Notification creation date and time
          example: '2025-01-31T15:35:17Z'
        details:
          oneOf:
            - $ref: '#/components/schemas/NotificationAuthDetails'
            - $ref: '#/components/schemas/NotificationTransactionDetails'
    NotificationAuthDetails:
      type: object
      properties:
        device:
          type: string
          nullable: true
          description: Device UserAgent info
          example: 'Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/121.0.0.0 Safari\/537.36'
        ip:
          type: string
          nullable: true
          description: Device IP info
          example: '127.0.0.1'
        location:
          type: string
          nullable: true
          description: Location info
          example: 'Country, City'
        createTime:
          type: string
          format: date-time
          description: Login attempt date and time
          example: '2025-01-31T15:35:17Z'
    NotificationTransactionDetails:
      type: object
      properties:
        transactionId:
          type: int
          description: Transaction Identifier
          example: 254965
        status:
          $ref: '#/components/schemas/TransactionStatus'
        type:
          $ref: '#/components/schemas/TransactionType'
        createTime:
          type: string
          format: date-time
          description: Transaction creation date and time
          example: '2025-01-31T15:35:17Z'
        updateTime:
          type: string
          format: date-time
          description: Transaction update date and time
          example: '2025-01-31T15:35:17Z'
        creditDetails:
          $ref: '#/components/schemas/NotificationTransactionDetailsOperationDetails'
          description: 'The details about the credit side of a transaction'
        debitDetails:
          $ref: '#/components/schemas/NotificationTransactionDetailsOperationDetails'
          description: 'The details about the debit side of a transaction'
    NotificationTransactionDetailsCurrency:
      type: object
      description: 'The details about a currency'
      properties:
        alphabeticCode:
          type: string
          description: The alphabetic code of a currency
          example: USD
        numericCode:
          type: integer
          description: The numeric code of a currency
          example: 840
        name:
          type: string
          description: The localized currency name
          example: US Dollar
    NotificationTransactionDetailsOperationDetails:
      type:
        - object
        - 'null'
      properties:
        currency:
          $ref: '#/components/schemas/NotificationTransactionDetailsCurrency'
        amount:
          type: number
          description: Transaction amount
    AcuityTradingConfig:
      type: object
      description: Acuity Trading widget configuration
      properties:
        apiKey:
          type: string
          description: Acuity Trading API key for widget authentication
          example: 'abc123def456'
        scriptSrc:
          type: string
          description: URL to the Acuity Trading widget core JavaScript library
          example: 'https://prodstorage.azureedge.net/Widgets/lib/@1.0.0/widget-core.js'
        widgets:
          type: object
          description: Configuration for each Acuity Trading widget
          properties:
            researchTerminal:
              oneOf:
                - $ref: '#/components/schemas/AcuityTradingWidget'
                - type: 'null'
            analysisIq:
              oneOf:
                - $ref: '#/components/schemas/AcuityTradingWidget'
                - type: 'null'
            assetIq:
              oneOf:
                - $ref: '#/components/schemas/AcuityTradingWidget'
                - type: 'null'
            economicCorporateCalendars:
              oneOf:
                - $ref: '#/components/schemas/AcuityTradingWidget'
                - type: 'null'
            newsIqDynamicEmails:
              oneOf:
                - $ref: '#/components/schemas/AcuityTradingWidget'
                - type: 'null'
    AcuityTradingWidget:
      type: object
      description: Individual widget configuration
      properties:
        settingId:
          type: integer
          description: Acuity Dashboard setting ID for this widget configuration
          example: 9682
    AcuityTradingTradeToken:
      type: object
      description: Trade authorization token for Acuity Trading web trading
      properties:
        tradeToken:
          type: string
          description: Authorization token for web trading functionality
          example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
        symbolsId:
          type: integer
          description: Symbols configuration identifier
          example: 12345
        allSymbols:
          type: string
          description: All available symbols for trading
          example: '["EURUSD","GBPUSD","USDJPY"]'
    Application:
      type: object
      description: An active (non-resolved) application of a given type.
      properties:
        id:
          type: integer
          description: The unique identifier of the application.
          example: 123
        type:
          type: string
          description: The application type.
          example: deleting_account
        status:
          type: string
          description: |-
            The current status of the application. Possible values:

            - `new` — newly created application
            - `pending` — awaiting processing
            - `in_progress` — currently being processed
          enum:
            - new
            - pending
            - in_progress
          example: pending
        createdAt:
          $ref: '#/components/schemas/dateTime'
        updatedAt:
          $ref: '#/components/schemas/dateTime'
    AnalyticsOrder:
      type: object
      properties:
        accountId:
          type: string
          description: Trading account identifier
          example: '12345'
        orderId:
          type: integer
          description: Unique order identifier
          example: 67890
        symbol:
          type: string
          description: Trading instrument symbol
          example: EURUSD
        side:
          type: string
          enum: [BUY_LIMIT, SELL_LIMIT, BUY_STOP, SELL_STOP]
          description: Order type and direction
          example: BUY_LIMIT
        openTime:
          type: string
          description: Time when the order was placed (RFC 3339)
          example: '2026-03-01T10:00:00+00:00'
        openPrice:
          type: string
          description: Requested order execution price
          example: '1.12345'
        currentPrice:
          oneOf:
            - type: string
            - type: 'null'
          description: Current market price for the instrument, null if unavailable
          example: '1.12400'
        volume:
          type: string
          description: Order volume in lots
          example: '1.00'
        stopLoss:
          oneOf:
            - type: string
            - type: 'null'
          description: Stop loss price level, null if not set
          example: '1.10000'
        takeProfit:
          oneOf:
            - type: string
            - type: 'null'
          description: Take profit price level, null if not set
          example: '1.15000'
    AnalyticsPosition:
      type: object
      properties:
        accountId:
          type: string
          description: Trading account identifier
          example: '12345'
        positionId:
          type: integer
          description: Unique position identifier
          example: 98765
        openTime:
          type: string
          description: Time when the position was opened (RFC 3339)
          example: '2026-03-01T10:00:00+00:00'
        symbol:
          type: string
          description: Trading instrument symbol
          example: GBPUSD
        side:
          type: string
          enum: [BUY, SELL]
          description: Position direction
          example: BUY
        volume:
          type: string
          description: Position volume in lots
          example: '2.50'
        openPrice:
          type: string
          description: Price at which the position was opened
          example: '1.27500'
        stopLoss:
          oneOf:
            - type: string
            - type: 'null'
          description: Stop loss price level, null if not set
          example: '1.27000'
        takeProfit:
          oneOf:
            - type: string
            - type: 'null'
          description: Take profit price level, null if not set
          example: '1.28000'
        currentPrice:
          oneOf:
            - type: string
            - type: 'null'
          description: Current market price for the instrument, null if unavailable
          example: '1.27650'
        swap:
          type: string
          description: Accumulated swap charges
          example: '-0.50'
        profit:
          oneOf:
            - type: string
            - type: 'null'
          description: Unrealized profit/loss, null if unavailable
          example: '37.50'
    AnalyticsDeal:
      type: object
      properties:
        accountId:
          type: string
          description: Trading account identifier
          example: '12345'
        ticketId:
          type: integer
          description: Unique deal/ticket identifier
          example: 11223
        symbol:
          type: string
          description: Trading instrument symbol
          example: USDJPY
        side:
          type: string
          enum: [BUY, SELL]
          description: Deal direction
          example: SELL
        volume:
          type: string
          description: Deal volume in lots
          example: '1.00'
        openTime:
          type: string
          description: Deal execution time (RFC 3339)
          example: '2026-03-01T10:00:00+00:00'
        openPrice:
          type: string
          description: Execution price
          example: '149.50000'
        closeTime:
          oneOf:
            - type: string
            - type: 'null'
          description: Position close time (RFC 3339), null for open deals
          example: '2026-03-01T15:30:00+00:00'
        closePrice:
          oneOf:
            - type: string
            - type: 'null'
          description: Position close price, null for open deals
          example: '148.90000'
        stopLoss:
          oneOf:
            - type: string
            - type: 'null'
          description: Stop loss price level, null if not set or unavailable
          example: '150.00000'
        takeProfit:
          oneOf:
            - type: string
            - type: 'null'
          description: Take profit price level, null if not set or unavailable
          example: '148.00000'
        commission:
          type: string
          description: Trading commission charged
          example: '-5.00'
        swap:
          type: string
          description: Accumulated swap charges
          example: '0.00'
        profit:
          type: string
          description: Realized profit/loss
          example: '100.00'
    SideAuthToken:
      type: object
      required:
        - token
        - expiresAt
      properties:
        token:
          type: string
          description: Compact JWT (ES256) for side authentication
          example: eyJhbGciOiJFUzI1NiIsImtpZCI6InNpZGUtYXV0aC0yMDI2LTA0LTE1IiwidHlwIjoiSldUIn0.eyJpc3MiOiJiMmNvcmUiLCJzdWIiOiI0MiIsImlhdCI6MTcxMzE4MDAwMCwiZXhwIjoxNzEzMTgwMzAwLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJ2ZXJpZmljYXRpb25fbGV2ZWxfaWQiOjF9.signature
        expiresAt:
          type: string
          format: date-time
          description: Token expiration time in RFC 3339 / ISO 8601 format
          example: '2026-04-15T12:05:00+00:00'
