{
  "openapi": "3.0.0",
  "info": {
    "description": "Back-office / B2B API for brokers and prop firms: provision and manage clients, configure groups and prop risk, fund accounts, and authenticate from your CRM.",
    "title": "OnlyTrade Brand API",
    "version": "1.0"
  },
  "paths": {
    "/api/v1/accounts": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Accounts",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetAllAccounts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/v1.ViewAccount"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "CreateAccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.CrtAccount"
              }
            }
          },
          "description": "Account Request Body",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ViewAccount"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/favourites": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Favourite Accounts",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetFavouriteAccounts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Account"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetMyProfile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ViewAccount"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/change-password": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Change Account's Password",
        "tags": [
          "Accounts"
        ],
        "operationId": "ChangeMyPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.ChangeMyPassword"
              }
            }
          },
          "description": "Change Password Request Body",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/client-secret": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Generate client secret for the client account",
        "tags": [
          "Accounts"
        ],
        "operationId": "GenerateClientSecret",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ClientSecret"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Revoke client secret for the client account",
        "tags": [
          "Accounts"
        ],
        "operationId": "RevokeClientSecret",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/investor-password": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Change Account's Investor Password",
        "tags": [
          "Accounts"
        ],
        "operationId": "ChangeMyInvestorPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.ChangeInvestorPassword"
              }
            }
          },
          "description": "Change Investor Password Request Body",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/journal": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get My Journal",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetMyJournal",
        "parameters": [
          {
            "description": "page number",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "limit number",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "from date",
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "to date",
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "sort by",
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/v1.Journal"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/notifications": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get my email notification preferences",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetMyNotificationPrefs",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.NotificationPref"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create or update my email notification preferences",
        "tags": [
          "Accounts"
        ],
        "operationId": "SaveMyNotificationPrefs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/model.NotificationPref"
              }
            }
          },
          "description": "Notification preferences",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.NotificationPref"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/policies/ui": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get My Policies in a Map belongs to a Role For UI usage",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetMyPolicies",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/request-change-password": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Request To Change Account's Password",
        "tags": [
          "Accounts"
        ],
        "operationId": "RequestToChangeMyPassword",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/transactions": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get my balance-affecting transactions (deposits, withdrawals, credit, adjustments)",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetMyTransactions",
        "parameters": [
          {
            "description": "comma-separated origin filter, e.g. 0,2,3,6,7 (deposit, adjust, withdraw, credit_in, credit_out)",
            "name": "origin",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Transaction"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/me/verify-change-password-code": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Verify Change Password Code",
        "tags": [
          "Accounts"
        ],
        "operationId": "VerifyChangePasswordCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          },
          "description": "verify change password body request",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetAccount",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ViewAccount"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "UpdateAccount",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.UptAccount"
              }
            }
          },
          "description": "Account Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ViewAccount"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "DeleteAccount",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/approve": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Approve  Account Request",
        "tags": [
          "Accounts"
        ],
        "operationId": "ApproveAccount",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/change-password": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Change Account Password",
        "tags": [
          "Accounts"
        ],
        "operationId": "ChangeAccountPassword",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Password type (0 - user, 1 - investor)",
            "name": "password_type",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.ChangePassword"
              }
            }
          },
          "description": "Account Request Body",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/decline": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Decline Account Request",
        "tags": [
          "Accounts"
        ],
        "operationId": "DeclineAccount",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/favourites": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Add account to favourties",
        "tags": [
          "Accounts"
        ],
        "operationId": "AddAccountToFavourite",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Remove account from favourties",
        "tags": [
          "Accounts"
        ],
        "operationId": "RemoveAccountFromFavourite",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/groups/{group_id}": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Move account to another group",
        "tags": [
          "Accounts"
        ],
        "operationId": "MoveAccountGroup",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/journal": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Account Journal",
        "tags": [
          "Accounts"
        ],
        "operationId": "GetAccountJournal",
        "parameters": [
          {
            "description": "page number",
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "limit number",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "from date",
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "to date",
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "sort by",
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/v1.Journal"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/money/adjust": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Adjust trader's account balance",
        "tags": [
          "Money"
        ],
        "operationId": "AdjustAccountMoney",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.MoneyRequest"
              }
            }
          },
          "description": "Adjust Money Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/money/credit-in": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Credit In  trader's account credit",
        "tags": [
          "Money"
        ],
        "operationId": "CreditInAccountMoney",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.MoneyRequest"
              }
            }
          },
          "description": "Credit In Money Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/money/credit-out": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Credit Out  trader's account credit",
        "tags": [
          "Money"
        ],
        "operationId": "CreditOutAccountMoney",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.MoneyRequest"
              }
            }
          },
          "description": "Credit Out Money Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/money/deposit": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Deposit money into trader's account balance",
        "tags": [
          "Money"
        ],
        "operationId": "DepositAccountMoney",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.MoneyRequest"
              }
            }
          },
          "description": "Deposit Money Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account_id}/money/withdrawal": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "withdrawal money from trader's account balance",
        "tags": [
          "Money"
        ],
        "operationId": "WithdrawalAccountMoney",
        "parameters": [
          {
            "description": "Account ID",
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.MoneyRequest"
              }
            }
          },
          "description": "Withdrawal Money Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Account"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/broker/navigation": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Broker navigation tree for UI navigation",
        "tags": [
          "Broker"
        ],
        "operationId": "GetBrokerNavigationTree",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.BrokerNavigationTree"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/brokers": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Broker information",
        "tags": [
          "Broker"
        ],
        "operationId": "GetBroker",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Broker"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Broker information",
        "tags": [
          "Broker"
        ],
        "operationId": "UpdateBroker",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.UptBroker"
              }
            }
          },
          "description": "Broker information",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Broker"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Commissions",
        "tags": [
          "Commissions"
        ],
        "operationId": "GetAllCommissions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Commission"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions/groups/{group_id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Group Commissions",
        "tags": [
          "Commissions"
        ],
        "operationId": "GetGroupCommissions",
        "parameters": [
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Commission"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create Commission",
        "tags": [
          "Commissions"
        ],
        "operationId": "CreateCommission",
        "parameters": [
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtCommission"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Commission"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions/{commission_id}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Commission",
        "tags": [
          "Commissions"
        ],
        "operationId": "UpdateCommission",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtCommission"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Commission"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete Commission",
        "tags": [
          "Commissions"
        ],
        "operationId": "DeleteCommission",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions/{commission_id}/groups/{group_id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Group Commission",
        "tags": [
          "Commissions"
        ],
        "operationId": "GetGroupCommission",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Commission"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions/{commission_id}/tiers": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create Commission Tier",
        "tags": [
          "Commissions"
        ],
        "operationId": "CreateCommissionTier",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtCommissionTier"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.CommissionTier"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commissions/{commission_id}/tiers/{tier_id}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Commission Tier",
        "tags": [
          "Commissions"
        ],
        "operationId": "UpdateCommissionTier",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tier ID",
            "name": "tier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtCommissionTier"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.CommissionTier"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete Commission Tier",
        "tags": [
          "Commissions"
        ],
        "operationId": "DeleteCommissionTier",
        "parameters": [
          {
            "description": "Commission ID",
            "name": "commission_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Tier ID",
            "name": "tier_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configs": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Configs",
        "tags": [
          "Config"
        ],
        "operationId": "GetAllConfigs",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Config"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configs/groups/{group_id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get Configs belongs to Group",
        "tags": [
          "Config"
        ],
        "operationId": "GetConfigsBelongToGroup",
        "parameters": [
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Config"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configs/{config_id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Configs",
        "tags": [
          "Config"
        ],
        "operationId": "GetConfig",
        "parameters": [
          {
            "description": "Config ID",
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Config"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Config List value only",
        "tags": [
          "Config"
        ],
        "operationId": "UpdateConfig",
        "parameters": [
          {
            "description": "Config ID",
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.UptConfig"
              }
            }
          },
          "description": "config value",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Config"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/groups": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get All Groups",
        "tags": [
          "Groups"
        ],
        "operationId": "GetAllGroups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.Group"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create Group",
        "tags": [
          "Groups"
        ],
        "operationId": "CreateGroup",
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtGroup"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Group"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/groups/{group_id}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update Group",
        "tags": [
          "Groups"
        ],
        "operationId": "UpdateGroup",
        "parameters": [
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.CrtGroup"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Group"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete Group",
        "tags": [
          "Groups"
        ],
        "operationId": "DeleteGroup",
        "parameters": [
          {
            "description": "GroupID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/groups/{group_id}/copy/{copy_group_id}": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Copy Group Parameters",
        "tags": [
          "Groups"
        ],
        "operationId": "CopyGroupParameters",
        "parameters": [
          {
            "description": "Group ID",
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Copy Group ID",
            "name": "copy_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.CopyGroupParameters"
              }
            }
          },
          "description": "Copy Group Parameters",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.CopyGroup"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/import_export/import": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Import configuration data using a file upload and form fields (override, config_type).",
        "tags": [
          "Config"
        ],
        "summary": "Import configuration",
        "operationId": "ImportConfigs",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "override": {
                    "description": "Whether to override existing config",
                    "type": "boolean"
                  },
                  "config_type": {
                    "description": "Type of configuration",
                    "type": "integer"
                  },
                  "file": {
                    "description": "The configuration file to import",
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "override",
                  "config_type",
                  "file"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/import_export/import/:group_id": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Import configuration for a specific group",
        "tags": [
          "Config"
        ],
        "summary": "Import group symbol configuration",
        "operationId": "ImportGroupSymbolConfigs",
        "responses": {
          "200": {
            "description": "Import successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/account": {
      "post": {
        "description": "Open Account",
        "tags": [
          "Accounts"
        ],
        "operationId": "OpenAccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.NewAccount"
              }
            }
          },
          "description": "Open Account Request Body",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.NewAccount"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/broker": {
      "get": {
        "description": "Get Broker information",
        "tags": [
          "Public"
        ],
        "operationId": "GetBrokerInfo",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.ViewBroker"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/forgot-password": {
      "post": {
        "description": "Requst Forgot Password",
        "tags": [
          "Public"
        ],
        "operationId": "RequestForgotMyPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.ForgotPassword"
              }
            }
          },
          "description": "forgot password body request",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/reset-password": {
      "post": {
        "description": "Reset Password",
        "tags": [
          "Public"
        ],
        "operationId": "ResetPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.ResetPassword"
              }
            }
          },
          "description": "reset my password body request",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/verify-forgot-password-code": {
      "post": {
        "description": "Verify Forgot Password Code",
        "tags": [
          "Public"
        ],
        "operationId": "VerifyForgotPasswordCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.VerifyForgotPasswordCode"
              }
            }
          },
          "description": "verify forgot password body request",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/spread-schedules": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List dynamic-spread schedules, optionally filtered by group",
        "tags": [
          "SpreadSchedules"
        ],
        "operationId": "ListSpreadSchedules",
        "parameters": [
          {
            "description": "Group ID filter",
            "name": "group_id",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/model.SpreadSchedule"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a dynamic-spread schedule",
        "tags": [
          "SpreadSchedules"
        ],
        "operationId": "CreateSpreadSchedule",
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.SpreadScheduleRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.SpreadSchedule"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/spread-schedules/{id}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update a dynamic-spread schedule",
        "tags": [
          "SpreadSchedules"
        ],
        "operationId": "UpdateSpreadSchedule",
        "parameters": [
          {
            "description": "Spread Schedule ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/v1.SpreadScheduleRequest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.SpreadSchedule"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete a dynamic-spread schedule",
        "tags": [
          "SpreadSchedules"
        ],
        "operationId": "DeleteSpreadSchedule",
        "parameters": [
          {
            "description": "Spread Schedule ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/v1/oauth2/login": {
      "post": {
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "description": "Login using account credentials passed using basic auth method",
        "tags": [
          "Auth"
        ],
        "operationId": "Login",
        "parameters": [
          {
            "description": "remember me",
            "name": "remember_me",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.LoginResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/v1/oauth2/logout": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Logout",
        "tags": [
          "Auth"
        ],
        "operationId": "Logout",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/v1/oauth2/refresh/token": {
      "post": {
        "description": "Refresh account's Token",
        "tags": [
          "Auth"
        ],
        "operationId": "RefreshToken",
        "parameters": [
          {
            "description": "remember me",
            "name": "remember_me",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1.RefreshTokenBody"
              }
            }
          },
          "description": "Refresh Token Request body",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/model.Token"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/v1/oauth2/token": {
      "post": {
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "description": "Login using account client_id and client secret passed using basic auth method",
        "tags": [
          "Auth"
        ],
        "operationId": "Token",
        "parameters": [
          {
            "description": "either client_credentials or password",
            "name": "grant_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "remember me",
            "name": "remember_me",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1.LoginResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/http.HttpResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.onlytradeplatform.com",
      "description": "Production"
    }
  ],
  "components": {
    "requestBodies": {
      "v1.CloseManyPositions": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CloseManyPositions"
            }
          }
        },
        "description": "Bulk Close Request Body",
        "required": true
      },
      "v1.CrtRole": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CrtRole"
            }
          }
        },
        "description": "Role Request Body",
        "required": true
      },
      "v1.InEmail": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.InEmail"
            }
          }
        },
        "description": "InEmail Request Body",
        "required": true
      },
      "v1.Ticket": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.Ticket"
            }
          }
        },
        "description": "Ticket Request Body",
        "required": true
      },
      "v1.CrtCommission": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CrtCommission"
            }
          }
        },
        "description": "Commission",
        "required": true
      },
      "v1.CrtCommissionTier": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CrtCommissionTier"
            }
          }
        },
        "description": "Commission Tier",
        "required": true
      },
      "patchApiV1DataProviders_id_configFile": {
        "content": {
          "multipart/form-data": {
            "schema": {
              "type": "object",
              "properties": {
                "file": {
                  "description": "FIX configuration file (.cfg)",
                  "type": "string",
                  "format": "binary"
                }
              },
              "required": [
                "file"
              ]
            }
          }
        },
        "required": true
      },
      "v1.CrtGroup": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CrtGroup"
            }
          }
        },
        "description": "Group Request Body",
        "required": true
      },
      "v1.UptOrder": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.UptOrder"
            }
          }
        },
        "description": "Order Request Body",
        "required": true
      },
      "v1.SpreadScheduleRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.SpreadScheduleRequest"
            }
          }
        },
        "description": "Spread Schedule Request Body",
        "required": true
      },
      "v1.CrtWorkspaceProfile": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/v1.CrtWorkspaceProfile"
            }
          }
        },
        "description": "Workspace Profile Request Body",
        "required": true
      }
    },
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "BearerAuth": {
        "description": "Type \"BearerAuth\" followed by a space and Access token.",
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "http.HttpResponse": {
        "type": "object",
        "properties": {
          "code": {
            "description": "Http status Code",
            "type": "integer"
          },
          "data": {
            "description": "if the request were successful the data will be saved here"
          },
          "error": {
            "description": "Generic General Error Message defined in the system",
            "type": "string"
          },
          "message": {
            "description": "More detailed error message indicates why the request was unsuccessful",
            "type": "string"
          },
          "success": {
            "description": "Response flag indicates whether the HTTP request was successful or not",
            "type": "boolean"
          }
        }
      },
      "market.DataSourceSymbol": {
        "type": "object",
        "properties": {
          "data_source": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "model.Account": {
        "type": "object",
        "properties": {
          "account_type": {
            "$ref": "#/components/schemas/model.AccountType"
          },
          "assets": {
            "description": "assests = (Long) the current value of purchased financial instruments (of long positions)",
            "type": "number"
          },
          "balance": {
            "description": "balance =  total of deposit + total of relized profit - total of relized losses - total commision - total swap                                                                // balance =  total of deposit + total of relized profit - total of relized losses - total commision - total swap",
            "type": "number"
          },
          "blocked_commission": {
            "description": "profit commitsion",
            "type": "number"
          },
          "blocked_profit": {
            "description": "profit blocked",
            "type": "number"
          },
          "broker": {
            "$ref": "#/components/schemas/model.Broker"
          },
          "broker_id": {
            "type": "integer"
          },
          "change_password_code": {
            "description": "code you need in order to change the password",
            "type": "string"
          },
          "client_id": {
            "description": "api user for this account",
            "type": "string"
          },
          "client_secret": {
            "description": "api user any one can login have this scret",
            "type": "string"
          },
          "code_expiry": {
            "description": "the epxiry password change code time.now() + time",
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "credit": {
            "description": "forward broker credit                                                               // forward broker credit",
            "type": "number"
          },
          "currency": {
            "description": "base currency of balance",
            "type": "string"
          },
          "currency_digits": {
            "description": "the smallest unit of a currency, depending on the number of decimals.",
            "type": "integer"
          },
          "deals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Deal"
            }
          },
          "equity": {
            "description": "equity = balance + credit + relized profit",
            "type": "number"
          },
          "expires_at": {
            "description": "unix nanos; 0 = never; demo trials auto-expire via cron",
            "type": "integer"
          },
          "favourite": {
            "description": "UserId             string           `gorm:\"column:user_id;unique\" json:\"user_id\"`              // username or email",
            "type": "boolean"
          },
          "floating_profit": {
            "description": "current floating profit while positions is moving up/down",
            "type": "number"
          },
          "free_margin": {
            "description": "free_margin = equity - used margin",
            "type": "number"
          },
          "group": {
            "$ref": "#/components/schemas/model.Group"
          },
          "group_id": {
            "description": "this user if part of a group",
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "identity": {
            "$ref": "#/components/schemas/model.Identity"
          },
          "investor_password": {
            "type": "string"
          },
          "kyc_results": {
            "description": "what kyc provider saying.",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.KycStatus"
              }
            ]
          },
          "leverage": {
            "description": "1:x where X = 5000 down to 1 use group level if ZERP",
            "type": "integer"
          },
          "liabilities": {
            "description": "Liabilities = (Sell) Liabilities are obligations on current short positions calculated",
            "type": "number"
          },
          "liqudation": {
            "description": "a flag to indicated type of liquidated or under liquidation",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.LiqudationType"
              }
            ]
          },
          "liqudation_status": {
            "description": "liquidation status",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.LiqudationStatus"
              }
            ]
          },
          "mail": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Mail"
            }
          },
          "margin_initial": {
            "description": "Margin Initial calcuated",
            "type": "number"
          },
          "margin_level": {
            "description": "margin_level = (equity / used margin) x 100%",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "minum margin_maintenance required to maintain positions",
            "type": "number"
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Order"
            }
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Position"
            }
          },
          "profit": {
            "description": "current profit",
            "type": "number"
          },
          "role": {
            "$ref": "#/components/schemas/model.Role"
          },
          "role_id": {
            "type": "integer"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Session"
            }
          },
          "status": {
            "$ref": "#/components/schemas/model.AccountStatus"
          },
          "trade_type": {
            "description": "1-Normal  2-Demo",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeType"
              }
            ]
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Transaction"
            }
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "used_margin": {
            "description": "sum of Required Margin from all open positions",
            "type": "number"
          },
          "user_password": {
            "type": "string"
          }
        }
      },
      "model.AccountStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "x-enum-comments": {
          "AccountStatus_expired": "trial ran out (expires_at passed); login blocked"
        },
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "",
          "",
          "trial ran out (expires_at passed); login blocked"
        ],
        "x-enum-varnames": [
          "AccountStatus_readonly",
          "AccountStatus_pending",
          "AccountStatus_active",
          "AccountStatus_rejected",
          "AccountStatus_Liqudation",
          "AccountStatus_Liqudated",
          "AccountStatus_expired"
        ]
      },
      "model.AccountType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "AccountType_client_account",
          "AccountType_admin_account",
          "AccountType_dealer_account"
        ]
      },
      "model.Action": {
        "type": "object",
        "properties": {
          "checked": {
            "type": "boolean"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "resource_id": {
            "type": "integer"
          }
        }
      },
      "model.ApproveStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "x-enum-varnames": [
          "ApproveStatus_sending_to_broker",
          "ApproveStatus_sent_to_broker",
          "ApproveStatus_sending_to_lp",
          "ApproveStatus_sent_to_lp",
          "ApproveStatus_order_requoted_by_broker",
          "ApproveStatus_order_requoted_by_lp",
          "ApproveStatus_sending_to_trader",
          "ApproveStatus_sent_to_trader",
          "ApproveStatus_broker_accept",
          "ApproveStatus_broker_reject",
          "ApproveStatus_lp_accept",
          "ApproveStatus_lp_reject",
          "ApproveStatus_trader_accept",
          "ApproveStatus_trader_reject",
          "ApproveStatus_auto_broker_accept",
          "ApproveStatus_auto_broker_reject"
        ]
      },
      "model.Broker": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "address": {
            "type": "string"
          },
          "agent_enabled": {
            "type": "string"
          },
          "agreement_pdf": {
            "type": "string"
          },
          "app_gallery": {
            "type": "string"
          },
          "app_store": {
            "type": "string"
          },
          "business_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "current_payment": {
            "type": "number"
          },
          "due_payment": {
            "type": "number"
          },
          "expiry_date": {
            "type": "integer"
          },
          "facebook": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "instagram": {
            "type": "string"
          },
          "label_type": {
            "description": "main or white or gray",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.LabelType"
              }
            ]
          },
          "license_date": {
            "description": "next fields for our own use",
            "type": "integer"
          },
          "license_token": {
            "description": "license token from OT license manager",
            "type": "string"
          },
          "license_total": {
            "type": "number"
          },
          "license_type": {
            "type": "string"
          },
          "license_valid": {
            "type": "boolean"
          },
          "linkedin": {
            "type": "string"
          },
          "next_payment": {
            "type": "integer"
          },
          "payments_type": {
            "type": "string"
          },
          "play_store": {
            "type": "string"
          },
          "privacy": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "tel": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Transaction"
            }
          },
          "twitter": {
            "type": "string"
          },
          "website": {
            "description": "Social Links",
            "type": "string"
          },
          "youtube": {
            "type": "string"
          }
        }
      },
      "model.CalcType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "x-enum-comments": {
          "CalcType_CFD": "CFD no leverage \t\t\t\t\t=> Volume in lots * Contract size * Open market price",
          "CalcType_CFD_Leverage": "CFD with leverage \t\t\t\t=> Volume in lots * Contract size * Open market price / Leverage",
          "CalcType_Forex": "Forex with leverage \t\t\t\t=> Volume in lots * Contract size / Leverage",
          "CalcType_Forex_No_Leverage": "Forex no leverage \t\t\t\t=> Volume in lots * Contract size",
          "CalcType_Futures": "Futures with leverage \t\t\t=> Volume in lots * Initial margin || Volume in lots *Maintenance margin"
        },
        "x-enum-descriptions": [
          "Forex with leverage \t\t\t\t=> Volume in lots * Contract size / Leverage",
          "Forex no leverage \t\t\t\t=> Volume in lots * Contract size",
          "CFD no leverage \t\t\t\t\t=> Volume in lots * Contract size * Open market price",
          "CFD with leverage \t\t\t\t=> Volume in lots * Contract size * Open market price / Leverage",
          "Futures with leverage \t\t\t=> Volume in lots * Initial margin || Volume in lots *Maintenance margin"
        ],
        "x-enum-varnames": [
          "CalcType_Forex",
          "CalcType_Forex_No_Leverage",
          "CalcType_CFD",
          "CalcType_CFD_Leverage",
          "CalcType_Futures"
        ]
      },
      "model.ChannelType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "x-enum-varnames": [
          "ChannelType_mobile",
          "ChannelType_web",
          "ChannelType_desktop",
          "ChannelType_api",
          "ChannelType_script",
          "ChannelType_system",
          "ChannelType_sdk"
        ]
      },
      "model.ChargeMode": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "x-enum-varnames": [
          "ChargeMode_Deposit",
          "ChargeMode_Base",
          "ChargeMode_Profit",
          "ChargeMode_Margin",
          "ChargeMode_Profit_Percent"
        ]
      },
      "model.ChargeType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ChargeType_Trade",
          "ChargeType_Volume",
          "ChargeType_Notional_Value"
        ]
      },
      "model.Commission": {
        "type": "object",
        "properties": {
          "commission_tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.CommissionTier"
            }
          },
          "desc": {
            "description": "Desc of the commission i.e FORX main commission",
            "type": "string"
          },
          "group_id": {
            "description": "Group Id , each commssion must be attached to group",
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "mode": {
            "description": "Mode  0- Standard/normal 1- Agent only 2-Fees",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ModeType"
              }
            ]
          },
          "mode_action": {
            "description": "0= All 1=Sell Buy 2= Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ModeAction"
              }
            ]
          },
          "mode_charge": {
            "description": "0= Instant charge maybe meta change to other we will flow (-^-)",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ModeCharge"
              }
            ]
          },
          "mode_entry": {
            "description": "TurnoverCurrency string            `gorm:\"column:turnover_currency\" json:\"turnover_currency\"` // Turnover currency",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ModeEntry"
              }
            ]
          },
          "mode_profit": {
            "description": "0= Profit 1 = Loss",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ModeProfit"
              }
            ]
          },
          "mode_range": {
            "$ref": "#/components/schemas/model.ModeRange"
          },
          "mode_reason": {
            "description": "0= All 1=Trader 2=Expert 3=Dealer 4=External 5=Mobile 6=Web 7-Signal",
            "type": "integer"
          },
          "name": {
            "description": "Name of the Commision i.e FORX",
            "type": "string"
          },
          "symbol_class_id": {
            "description": "SymbolClassId apply to all symbol class i.e FORx",
            "type": "integer"
          }
        }
      },
      "model.CommissionTier": {
        "type": "object",
        "properties": {
          "commission_id": {
            "type": "integer"
          },
          "currency": {
            "description": "what is the currency to the values are",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "max": {
            "description": "Max Charge value",
            "type": "number"
          },
          "min": {
            "description": "Min charge value",
            "type": "number"
          },
          "mode": {
            "description": "value bellow will be used as per ChargeVaue",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ChargeMode"
              }
            ]
          },
          "range_from": {
            "description": "From when value >= in Value",
            "type": "number"
          },
          "range_to": {
            "description": "To when value <= Value",
            "type": "number"
          },
          "type": {
            "description": "Type on Trade or Volume",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ChargeType"
              }
            ]
          },
          "value": {
            "description": "Value in reference to Charge Value",
            "type": "number"
          }
        }
      },
      "model.Config": {
        "type": "object",
        "properties": {
          "config_class": {
            "$ref": "#/components/schemas/model.ConfigClass"
          },
          "config_group": {
            "$ref": "#/components/schemas/model.ConfigGroup"
          },
          "config_group_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "inherited": {
            "description": "true if inherited from parent, false if overridden",
            "type": "boolean"
          },
          "record_type": {
            "$ref": "#/components/schemas/model.RecordType"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "value": {
            "description": "value to be converted to int32,double, string keep it",
            "type": "string"
          },
          "value_type": {
            "description": "type of value int32, double , string",
            "type": "integer"
          }
        }
      },
      "model.ConfigClass": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-varnames": [
          "ConfigClass_System",
          "ConfigClass_GroupGeneral",
          "ConfigClass_GroupTrades",
          "ConfigClass_GroupDealing"
        ]
      },
      "model.ConfigGroup": {
        "type": "object",
        "properties": {
          "broker_id": {
            "type": "integer"
          },
          "configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Config"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "group_id": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.ConversionType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-comments": {
          "ConversionType_Divide": "Divide conversion",
          "ConversionType_Multiply": "Multiply conversion"
        },
        "x-enum-descriptions": [
          "Multiply conversion",
          "Divide conversion"
        ],
        "x-enum-varnames": [
          "ConversionType_Multiply",
          "ConversionType_Divide"
        ]
      },
      "model.CreationMethod": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "x-enum-comments": {
          "CreationMethod_market_gtc_order_": "market order gtc good tell cancel"
        },
        "x-enum-descriptions": [
          "market order gtc good tell cancel",
          "",
          "",
          "",
          "",
          ""
        ],
        "x-enum-varnames": [
          "CreationMethod_market_gtc_order_",
          "CreationMethod_buy_limit_order",
          "CreationMethod_buy_stop_order",
          "CreationMethod_sell_limit_order",
          "CreationMethod_sell_stop_order",
          "CreationMethod_manual_order"
        ]
      },
      "model.DataProvider": {
        "type": "object",
        "properties": {
          "connection_configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.DataProviderConfig"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "credentials": {
            "description": "Relations",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.DataProviderCredential"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "description": "fix_f4b44, dde, etc",
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "provider_type": {
            "$ref": "#/components/schemas/model.DataProviderType"
          },
          "status": {
            "$ref": "#/components/schemas/model.DataProviderStatus"
          },
          "symbol_count": {
            "type": "integer"
          },
          "symbol_datasource": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.DataProviderSymbol"
            }
          },
          "type": {
            "description": "String version for market compatibility",
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.DataProviderConfig": {
        "type": "object",
        "properties": {
          "category": {
            "description": "DEFAULT, SESSION, etc (FIX config sections)",
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "data_type": {
            "description": "string, int, bool",
            "type": "string"
          },
          "description": {
            "description": "Help text for UI",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          },
          "provider_id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "model.DataProviderCredential": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_encrypted": {
            "type": "boolean"
          },
          "key": {
            "description": "sendercompid, username, host, etc",
            "type": "string"
          },
          "provider_id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "value": {
            "description": "Credential value",
            "type": "string"
          }
        }
      },
      "model.DataProviderStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "DataProviderStatus_inactive",
          "DataProviderStatus_active",
          "DataProviderStatus_error"
        ]
      },
      "model.DataProviderSymbol": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "data_source": {
            "description": "FIX, DDE, etc",
            "type": "string"
          },
          "external_id": {
            "description": "External symbol ID",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          },
          "provider_id": {
            "type": "integer"
          },
          "source": {
            "description": "Provider name (fix_f4b44, dde, etc)",
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.DataProviderType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "x-enum-varnames": [
          "DataProviderType_fix",
          "DataProviderType_dde",
          "DataProviderType_simulator",
          "DataProviderType_ws",
          "DataProviderType_finnhub"
        ]
      },
      "model.Deal": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "type": "integer"
          },
          "cancel_reason": {
            "type": "string"
          },
          "canceled_at": {
            "description": "Soft-delete fields for dealer / admin deal corrections. A\ncanceled deal stays in the table for the audit trail; its row\njust stops contributing to balance/position aggregations.",
            "type": "integer"
          },
          "canceled_by": {
            "type": "integer"
          },
          "channel": {
            "$ref": "#/components/schemas/model.ChannelType"
          },
          "close_price": {
            "description": "close price of deal from close position price",
            "type": "number"
          },
          "closed_volume": {
            "description": "lot which closed partially so we need to get closing_order_ids from the table",
            "type": "number"
          },
          "comment": {
            "type": "string"
          },
          "commission": {
            "type": "number"
          },
          "contract_size": {
            "type": "number"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "creation_method": {
            "$ref": "#/components/schemas/model.CreationMethod"
          },
          "digits": {
            "type": "integer"
          },
          "digits_currency": {
            "type": "number"
          },
          "direction": {
            "$ref": "#/components/schemas/model.DirectionType"
          },
          "external_id": {
            "description": "id of position on LP",
            "type": "string"
          },
          "external_price": {
            "description": "price of position on LP",
            "type": "number"
          },
          "external_volume": {
            "description": "volume of position on LP",
            "type": "number"
          },
          "id": {
            "type": "integer"
          },
          "market_ask": {
            "type": "number"
          },
          "market_bid": {
            "type": "number"
          },
          "market_last": {
            "type": "number"
          },
          "open_price": {
            "description": "open price of deal from open position price",
            "type": "number"
          },
          "order_id": {
            "description": "which order this deal belong to",
            "type": "integer"
          },
          "position_id": {
            "description": "which position deal belong to",
            "type": "integer"
          },
          "profit": {
            "type": "number"
          },
          "reason": {
            "$ref": "#/components/schemas/model.ReasonType"
          },
          "script_id": {
            "type": "integer"
          },
          "side": {
            "$ref": "#/components/schemas/model.SideType"
          },
          "status": {
            "$ref": "#/components/schemas/model.DealStatus"
          },
          "stop_loss": {
            "description": "when to exist the position",
            "type": "number"
          },
          "swap": {
            "description": "swap for this deal from symbol swap",
            "type": "number"
          },
          "symbol": {
            "$ref": "#/components/schemas/model.Symbol"
          },
          "symbol_id": {
            "type": "integer"
          },
          "take_profit": {
            "description": "when to exist the position",
            "type": "number"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "volume": {
            "description": "total lot",
            "type": "number"
          }
        }
      },
      "model.DealStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-comments": {
          "DealStatus_canceled": "soft-deleted by dealer/admin correction"
        },
        "x-enum-descriptions": [
          "",
          "",
          "",
          "soft-deleted by dealer/admin correction"
        ],
        "x-enum-varnames": [
          "DealStatus_active",
          "DealStatus_closing",
          "DealStatus_closed",
          "DealStatus_canceled"
        ]
      },
      "model.DealsCanceledAccountSummary": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "balance_delta": {
            "type": "number"
          },
          "canceled_deal_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "new_balance": {
            "type": "number"
          },
          "voided_position_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "model.DirectionType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-comments": {
          "DirectionType_in": "order int32ent to open a position",
          "DirectionType_out": "order int32ent to close a position"
        },
        "x-enum-descriptions": [
          "order int32ent to open a position",
          "order int32ent to close a position"
        ],
        "x-enum-varnames": [
          "DirectionType_in",
          "DirectionType_out"
        ]
      },
      "model.ExecutionMode": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-comments": {
          "ExecutionMode_Exchange": ", trade operations conducted in the trading platform are sent to an external trading system (exchange).",
          "ExecutionMode_Instant": "default execution mode for the market direct market order if broker accepts it",
          "ExecutionMode_Market": "a broker makes a decision about the order execution price without any additional discussion with a trader.",
          "ExecutionMode_Request": "a market order is executed at the price previously received from a broker."
        },
        "x-enum-descriptions": [
          "default execution mode for the market direct market order if broker accepts it",
          "a market order is executed at the price previously received from a broker.",
          "a broker makes a decision about the order execution price without any additional discussion with a trader.",
          ", trade operations conducted in the trading platform are sent to an external trading system (exchange)."
        ],
        "x-enum-varnames": [
          "ExecutionMode_Instant",
          "ExecutionMode_Request",
          "ExecutionMode_Market",
          "ExecutionMode_Exchange"
        ]
      },
      "model.ExpirationPolicy": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-comments": {
          "ExpirationPolicy_day": "the order will be effective only during the current trading day. When orders are processed on the platform side, int32raday orders are canceled at the end of the day considering the trading server time and the symbol trading sessions. the order will be effective only during the current trading day. When orders are processed on the platform side, int32raday orders are canceled at the end of the day considering the trading server time and the symbol trading sessions.",
          "ExpirationPolicy_good_till_canceled": "the order will stay in the queue until it is manually canceled;",
          "ExpirationPolicy_specified_day": "the order is active till 00:00 of the specified day. If that time appears to be out of a trade session, the expiration will be processed at the nearest trading time.",
          "ExpirationPolicy_specified_time": "the order will be effective till the date specified by the trader;"
        },
        "x-enum-descriptions": [
          "the order will stay in the queue until it is manually canceled;",
          "the order will be effective only during the current trading day. When orders are processed on the platform side, int32raday orders are canceled at the end of the day considering the trading server time and the symbol trading sessions. the order will be effective only during the current trading day. When orders are processed on the platform side, int32raday orders are canceled at the end of the day considering the trading server time and the symbol trading sessions.",
          "the order will be effective till the date specified by the trader;",
          "the order is active till 00:00 of the specified day. If that time appears to be out of a trade session, the expiration will be processed at the nearest trading time."
        ],
        "x-enum-varnames": [
          "ExpirationPolicy_good_till_canceled",
          "ExpirationPolicy_day",
          "ExpirationPolicy_specified_time",
          "ExpirationPolicy_specified_day"
        ]
      },
      "model.FillPolicy": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-comments": {
          "FillPolicy_fill_or_kill": "this fill policy means that a deal can be executed only with the specified volume. If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers available on the market at the moment",
          "FillPolicy_immediate_or_cancel": "in this case a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the order cannot be filled completely, the available volume of the order will be filled, and the remaining volume will be canceled."
        },
        "x-enum-descriptions": [
          "this fill policy means that a deal can be executed only with the specified volume. If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers available on the market at the moment",
          "in this case a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the order cannot be filled completely, the available volume of the order will be filled, and the remaining volume will be canceled."
        ],
        "x-enum-varnames": [
          "FillPolicy_fill_or_kill",
          "FillPolicy_immediate_or_cancel"
        ]
      },
      "model.FillType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-comments": {
          "FillType_full": "the order filled with the full amount",
          "FillType_partial": "the order filled with the a partial amount"
        },
        "x-enum-descriptions": [
          "the order filled with the full amount",
          "the order filled with the a partial amount"
        ],
        "x-enum-varnames": [
          "FillType_full",
          "FillType_partial"
        ]
      },
      "model.Group": {
        "type": "object",
        "required": [
          "desc"
        ],
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Account"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "group_type": {
            "description": "0-client group 1-admin group",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.GroupType"
              }
            ]
          },
          "groups": {
            "description": "only one of group or account can have data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Group"
            }
          },
          "id": {
            "type": "integer"
          },
          "manager_id": {
            "type": "integer"
          },
          "parent_id": {
            "description": "parent group if not root otherwise zero",
            "type": "integer"
          },
          "root": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.GroupType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "GroupType_client_group",
          "GroupType_admin_group"
        ]
      },
      "model.Identity": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "address_line": {
            "type": "string"
          },
          "agreements": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country_of_birth": {
            "type": "string"
          },
          "country_of_citizenship": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "current_country_residence": {
            "type": "string"
          },
          "date_of_birth": {
            "type": "integer",
            "format": "int64"
          },
          "documents": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "family_name": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "funding_source": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "middle_name": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "po_box": {
            "type": "string"
          },
          "recovery_contact": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tel_pw": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.KycStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "KycStatus_accept",
          "KycStatus_reject"
        ]
      },
      "model.LPProvider": {
        "type": "object",
        "properties": {
          "connection_configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.LPProviderConfig"
            }
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.LPProviderCredential"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "description": "lp_fix_provider1, etc",
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "provider_type": {
            "$ref": "#/components/schemas/model.LPProviderType"
          },
          "ssl": {
            "description": "Relations",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.LPStunnel"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/model.LPProviderStatus"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.LPProviderConfig": {
        "type": "object",
        "properties": {
          "category": {
            "description": "DEFAULT, SESSION, etc",
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "data_type": {
            "description": "string, int, bool",
            "type": "string"
          },
          "description": {
            "description": "Help text for UI",
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "key": {
            "description": "e.g., HeartBtInt, SocketConnectHost",
            "type": "string"
          },
          "provider_id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "model.LPProviderCredential": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "is_encrypted": {
            "type": "boolean"
          },
          "key": {
            "description": "sendercompid, username, etc",
            "type": "string"
          },
          "provider_id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "value": {
            "description": "Credential value",
            "type": "string"
          }
        }
      },
      "model.LPProviderStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "LPProviderStatus_inactive",
          "LPProviderStatus_active",
          "LPProviderStatus_error"
        ]
      },
      "model.LPProviderType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0
        ],
        "x-enum-varnames": [
          "LPProviderType_fix"
        ]
      },
      "model.LPStunnel": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "enable": {
            "type": "boolean"
          },
          "id": {
            "type": "integer"
          },
          "local_port": {
            "type": "integer"
          },
          "provider_id": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.LabelType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "LabelType_main",
          "LabelType_white",
          "LabelType_gray"
        ]
      },
      "model.LiqudationStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "LiqudationStatus_Healthy",
          "LiqudationStatus_MarginCallReached",
          "LiqudationStatus_MarginStopOutReached"
        ]
      },
      "model.LiqudationType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          1,
          2,
          3,
          4
        ],
        "x-enum-varnames": [
          "LiqudationType_equity",
          "LiqudationType_marginlevel",
          "LiqudationType_position",
          "LiqudationType_dynamic"
        ]
      },
      "model.Mail": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "description": "in-email & chat",
            "type": "integer"
          },
          "body": {
            "description": "smtp & in-email & chat",
            "type": "string"
          },
          "common_id": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "deleted": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "email_tracking_id": {
            "type": "string"
          },
          "forward_from_id": {
            "type": "string"
          },
          "forwards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Mail"
            }
          },
          "from": {
            "description": "smtp",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "original": {
            "description": "in the admin panel the broker only need to see one version of the email",
            "type": "boolean"
          },
          "owner_id": {
            "type": "integer"
          },
          "read_at": {
            "type": "string"
          },
          "replied_to_id": {
            "type": "string"
          },
          "replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Mail"
            }
          },
          "status": {
            "$ref": "#/components/schemas/model.MailStatus"
          },
          "subject": {
            "description": "smtp & in-email",
            "type": "string"
          },
          "to": {
            "description": "smtp",
            "type": "string"
          },
          "to_account_id": {
            "description": "in-email & chat",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/model.MailType"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.MailStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "x-enum-varnames": [
          "MailStatus_queue",
          "MailStatus_sent",
          "MailStatus_pending",
          "MailStatus_draft",
          "MailStatus_dropped"
        ]
      },
      "model.MailType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "MailType_smtp",
          "MailType_inemail",
          "MailType_chat"
        ]
      },
      "model.ModeAction": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ModeAction_All",
          "ModeAction_Sell",
          "ModeAction_Buy"
        ]
      },
      "model.ModeCharge": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0
        ],
        "x-enum-varnames": [
          "ModeCharge_Instant"
        ]
      },
      "model.ModeEntry": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ModeEntry_All_Deal",
          "ModeEntry_In_Deal",
          "ModeEntry_Out_Deal"
        ]
      },
      "model.ModeProfit": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ModeProfit_All",
          "ModeProfit_Profit",
          "ModeProfit_Loss"
        ]
      },
      "model.ModeRange": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ModeRange_Volume",
          "ModeRange_Notional_Value",
          "ModeRange_Profit"
        ]
      },
      "model.ModeType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0
        ],
        "x-enum-varnames": [
          "ModeType_Standard"
        ]
      },
      "model.MosaicState": {
        "type": "object",
        "properties": {
          "direction": {
            "$ref": "#/components/schemas/model.Mosaic_Direction"
          },
          "first": {},
          "second": {},
          "splitPercentage": {
            "type": "number"
          }
        }
      },
      "model.Mosaic_Direction": {
        "type": "string",
        "enum": [
          "column",
          "row"
        ],
        "x-enum-varnames": [
          "Mosaic_Direction_Column",
          "Mosaic_Direction_Row"
        ]
      },
      "model.NotificationPref": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "breakEven": {
            "type": "boolean"
          },
          "cancelOrder": {
            "type": "boolean"
          },
          "created_at": {
            "type": "integer"
          },
          "dailyStatement": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "monthlyStatement": {
            "type": "boolean"
          },
          "pendingOrderPlaced": {
            "type": "boolean"
          },
          "tradeClose": {
            "type": "boolean"
          },
          "tradeOpen": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "integer"
          }
        }
      },
      "model.OperClass": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "OperClass_journal",
          "OperClass_system"
        ]
      },
      "model.OperType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19
        ],
        "x-enum-comments": {
          "OperType_req_account": "acount change some data",
          "OperType_req_alert": "alert change",
          "OperType_req_asset": "assest change",
          "OperType_req_config": "config change",
          "OperType_req_deals_bulk_cancel": "dealer/admin bulk cancel of deals (correction)",
          "OperType_req_email": "email change",
          "OperType_req_group": "group change",
          "OperType_req_lpprovider": "request to update the swap priority for LP",
          "OperType_req_role": "role change",
          "OperType_req_routing": "request to create routing",
          "OperType_req_support": "email change",
          "OperType_req_symbol": "symbol change",
          "OperType_req_watchlist": "watchlist change"
        },
        "x-enum-descriptions": [
          "",
          "",
          "",
          "",
          "acount change some data",
          "assest change",
          "watchlist change",
          "",
          "",
          "",
          "role change",
          "group change",
          "symbol change",
          "config change",
          "alert change",
          "email change",
          "email change",
          "request to create routing",
          "request to update the swap priority for LP",
          "dealer/admin bulk cancel of deals (correction)"
        ],
        "x-enum-varnames": [
          "OperType_login",
          "OperType_logout",
          "OperType_req_order",
          "OperType_req_position",
          "OperType_req_account",
          "OperType_req_asset",
          "OperType_req_watchlist",
          "OperType_req_report",
          "OperType_req_api",
          "OperType_req_deposit",
          "OperType_req_role",
          "OperType_req_group",
          "OperType_req_symbol",
          "OperType_req_config",
          "OperType_req_alert",
          "OperType_req_email",
          "OperType_req_support",
          "OperType_req_routing",
          "OperType_req_lpprovider",
          "OperType_req_deals_bulk_cancel"
        ]
      },
      "model.OperationsLog": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "broker_id": {
            "description": "owner of system",
            "type": "integer"
          },
          "channel": {
            "description": "1=Mobile 2=Desktop 3-Web 4-API",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ChannelType"
              }
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "description": "who was the user  at that time?   = account_id most of the time",
            "type": "integer"
          },
          "desc": {
            "description": "short desc of this operation most likely for journal",
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "extend": {
            "description": "extened add addtional desc login / url , req_order = order_id , req_api = url requsted... for operational system logs",
            "type": "string"
          },
          "group_id": {
            "description": "what was the group_id",
            "type": "integer"
          },
          "id": {
            "description": "auto increment",
            "type": "integer"
          },
          "ip": {
            "description": "ip address",
            "type": "string"
          },
          "opr_class": {
            "description": "OperClass enum",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.OperClass"
              }
            ]
          },
          "opr_type": {
            "description": "OperType enum",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.OperType"
              }
            ]
          },
          "os": {
            "description": "OS of device",
            "type": "string"
          },
          "role_id": {
            "description": "what was the role_id",
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "model.Order": {
        "type": "object",
        "properties": {
          "accepted_rejected_by_broker_at": {
            "description": "the dealing room accept/reject order at this time",
            "type": "integer",
            "format": "int64"
          },
          "accepted_rejected_by_lp_at": {
            "description": "the LP accept/reject order at this time",
            "type": "integer",
            "format": "int64"
          },
          "accepted_rejected_by_trader_at": {
            "description": "the trader accept/reject order at this time",
            "type": "integer",
            "format": "int64"
          },
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "type": "integer"
          },
          "approve_status": {
            "$ref": "#/components/schemas/model.ApproveStatus"
          },
          "approved_by": {
            "description": "id of the broker/manager account",
            "type": "integer"
          },
          "break_even": {
            "type": "integer"
          },
          "break_even_offset": {
            "type": "integer"
          },
          "channel": {
            "$ref": "#/components/schemas/model.ChannelType"
          },
          "comment": {
            "description": "extra comment from trader",
            "type": "string"
          },
          "contract_size": {
            "type": "number"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "digits": {
            "type": "integer"
          },
          "digits_currency": {
            "type": "number"
          },
          "done_at": {
            "description": "execution done at this time",
            "type": "integer",
            "format": "int64"
          },
          "expiration_policy": {
            "description": "used in limit_stop types,  as soon as the future bid price reaches the stop-level indicated in the order\n(the price field), a sell limit order will be placed at the level, specified in stop limit price field.",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExpirationPolicy"
              }
            ]
          },
          "expiry_at": {
            "description": "will expiry at this time",
            "type": "integer",
            "format": "int64"
          },
          "external_id": {
            "description": "id of position on LP",
            "type": "string"
          },
          "external_price": {
            "description": "price of position on LP",
            "type": "number"
          },
          "external_volume": {
            "description": "volume of position on LP",
            "type": "number"
          },
          "fill_policy": {
            "$ref": "#/components/schemas/model.FillPolicy"
          },
          "fill_type": {
            "$ref": "#/components/schemas/model.FillType"
          },
          "filled_price": {
            "description": "filling price",
            "type": "number"
          },
          "filled_volume": {
            "description": "filling volume",
            "type": "number"
          },
          "id": {
            "type": "integer"
          },
          "lp_account": {
            "description": "our configured lp in our vertex",
            "type": "string"
          },
          "lp_id": {
            "description": "id of the liquidity provider",
            "type": "integer"
          },
          "order_limit_price": {
            "type": "number"
          },
          "order_new_price": {
            "description": "requoted price",
            "type": "number"
          },
          "order_price": {
            "description": "original price",
            "type": "number"
          },
          "position": {
            "$ref": "#/components/schemas/model.Position"
          },
          "position_id": {
            "type": "integer"
          },
          "reason": {
            "$ref": "#/components/schemas/model.ReasonType"
          },
          "received_by_broker_at": {
            "description": "the dealing room received order at this time",
            "type": "integer",
            "format": "int64"
          },
          "received_by_lp_at": {
            "description": "the LP received order at this time",
            "type": "integer",
            "format": "int64"
          },
          "received_by_trader_at": {
            "description": "the trader received order at this time",
            "type": "integer",
            "format": "int64"
          },
          "rejection_msg": {
            "description": "reason of rejection",
            "type": "string"
          },
          "script_id": {
            "type": "integer"
          },
          "sent_to_broker_at": {
            "description": "order sent to dealing room at this time",
            "type": "integer",
            "format": "int64"
          },
          "sent_to_lp_at": {
            "description": "order sent to lp at this time",
            "type": "integer",
            "format": "int64"
          },
          "sent_to_trader_at": {
            "description": "order sent to get trader approval after the lp/dealing room rquote the price (only if the symbol requotable)",
            "type": "integer",
            "format": "int64"
          },
          "side": {
            "$ref": "#/components/schemas/model.SideType"
          },
          "split_count": {
            "type": "integer"
          },
          "split_id": {
            "description": "Split-order metadata. NULL for regular (single-intent) orders.\nEvery leg of a split shares the same SplitId; SplitSeq is the\n1-based ordinal within that split (1..SplitCount). SplitMode is\nkept for journal display so a dealer can see \"this batch was a\nladder\" without joining back to the parent intent.",
            "type": "integer",
            "format": "int64"
          },
          "split_mode": {
            "type": "string"
          },
          "split_seq": {
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/model.OrderStatus"
          },
          "stop_loss": {
            "description": "when to exist the position stop loss",
            "type": "number"
          },
          "symbol": {
            "$ref": "#/components/schemas/model.Symbol"
          },
          "symbol_id": {
            "description": "symbol id",
            "type": "integer"
          },
          "take_profit": {
            "description": "when to exist the position and make profit",
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style) carried onto the position when the order fills. Points.",
            "type": "integer"
          },
          "trigger_at": {
            "description": "execution started at this time",
            "type": "integer",
            "format": "int64"
          },
          "trigger_price": {
            "description": "market price when order executed",
            "type": "number"
          },
          "type": {
            "$ref": "#/components/schemas/model.OrderType"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "volume": {
            "description": "no of lots",
            "type": "number"
          }
        }
      },
      "model.OrderStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "x-enum-comments": {
          "OrderStatus_canceled": "the order is canceled by a trader;",
          "OrderStatus_expired": "the order is canceled by the system due to its expiration.",
          "OrderStatus_filled": "the entire order is filled by lp (A-Book);",
          "OrderStatus_partially_filled": "the order is filled partially by lp (A-Book)",
          "OrderStatus_placed": "a broker/system has accepted an order",
          "OrderStatus_rejected": "the order is rejected by a broker/system/lp;",
          "OrderStatus_started": "the order's correctness was checked, but it has not been accepted yet by the broker/system;"
        },
        "x-enum-descriptions": [
          "the order's correctness was checked, but it has not been accepted yet by the broker/system;",
          "a broker/system has accepted an order",
          "the order is filled partially by lp (A-Book)",
          "the entire order is filled by lp (A-Book);",
          "the order is canceled by a trader;",
          "the order is rejected by a broker/system/lp;",
          "the order is canceled by the system due to its expiration."
        ],
        "x-enum-varnames": [
          "OrderStatus_started",
          "OrderStatus_placed",
          "OrderStatus_partially_filled",
          "OrderStatus_filled",
          "OrderStatus_canceled",
          "OrderStatus_rejected",
          "OrderStatus_expired"
        ]
      },
      "model.OrderType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "x-enum-comments": {
          "OrderType_buy_limit": "a trade request to buy at the ask price that is equal to or less than that specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having fallen to a certain level, will increase.",
          "OrderType_buy_stop": "a trade order to buy at the \"ask\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on increasing.",
          "OrderType_buy_stop_limit": "this type combines the buy_limit & buy_stop types being a stop order for placing buy limit. as soon as the future ask price reaches the stop-level indicated in the order (the price field), a buy limit order will be placed at the level, specified in stop limit price field. a stop level is set above the current ask price, while stop limit price is set below the stop level.",
          "OrderType_market_order": "is an instruction to buy or sell a financial instrument. execution of this order results in committing a deal. a symbol is bought at the ask price and sold at the bid price. the price at which the deal is conducted is determined by the type of execution that depends on the symbol type. generally, a security is bought at the ask price and sold at the bid price.",
          "OrderType_sell_limit": "a trade order to sell at the \"bid\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having increased to a certain level, will fall.",
          "OrderType_sell_stop": "a trade order to sell at the \"bid\" price equal to or less than the one specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on falling.",
          "OrderType_sell_stop_limit": "this type is a stop order for placing sell limit. as soon as the future bid price reaches the stop-level indicated in the order (the price field), a sell limit order will be placed at the level, specified in stop limit price field. a stop level is set below the current bid price, while stop limit price is set above the stop level."
        },
        "x-enum-descriptions": [
          "is an instruction to buy or sell a financial instrument. execution of this order results in committing a deal. a symbol is bought at the ask price and sold at the bid price. the price at which the deal is conducted is determined by the type of execution that depends on the symbol type. generally, a security is bought at the ask price and sold at the bid price.",
          "a trade request to buy at the ask price that is equal to or less than that specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having fallen to a certain level, will increase.",
          "a trade order to buy at the \"ask\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on increasing.",
          "a trade order to sell at the \"bid\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having increased to a certain level, will fall.",
          "a trade order to sell at the \"bid\" price equal to or less than the one specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on falling.",
          "this type combines the buy_limit & buy_stop types being a stop order for placing buy limit. as soon as the future ask price reaches the stop-level indicated in the order (the price field), a buy limit order will be placed at the level, specified in stop limit price field. a stop level is set above the current ask price, while stop limit price is set below the stop level.",
          "this type is a stop order for placing sell limit. as soon as the future bid price reaches the stop-level indicated in the order (the price field), a sell limit order will be placed at the level, specified in stop limit price field. a stop level is set below the current bid price, while stop limit price is set above the stop level."
        ],
        "x-enum-varnames": [
          "OrderType_market_order",
          "OrderType_buy_limit",
          "OrderType_buy_stop",
          "OrderType_sell_limit",
          "OrderType_sell_stop",
          "OrderType_buy_stop_limit",
          "OrderType_sell_stop_limit"
        ]
      },
      "model.OriginClass": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7
        ],
        "x-enum-varnames": [
          "OriginClass_deposit",
          "OriginClass_trade_trx",
          "OriginClass_adjust",
          "OriginClass_widthdraw",
          "OriginClass_commision",
          "OriginClass_interest",
          "OriginClass_credit_in",
          "OriginClass_credit_out"
        ]
      },
      "model.Position": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "type": "integer"
          },
          "break_even": {
            "description": "break-even trigger in points; 0 = off",
            "type": "integer"
          },
          "break_even_done": {
            "description": "one-shot flag",
            "type": "boolean"
          },
          "break_even_offset": {
            "description": "points from entry when BE fires (signed; + locks profit)",
            "type": "integer"
          },
          "close_price": {
            "type": "number"
          },
          "comment": {
            "description": "set by the trader",
            "type": "string"
          },
          "contract_size": {
            "type": "number"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "current_price": {
            "description": "live price the engine values the open position at (running close price); not persisted",
            "type": "number"
          },
          "deals": {
            "$ref": "#/components/schemas/model.Deal"
          },
          "digits": {
            "description": "configured digits to use for this positions",
            "type": "integer"
          },
          "digits_currency": {
            "description": "currency digits",
            "type": "number"
          },
          "id": {
            "type": "integer"
          },
          "open_price": {
            "type": "number"
          },
          "profit": {
            "type": "number"
          },
          "side": {
            "$ref": "#/components/schemas/model.SideType"
          },
          "status": {
            "$ref": "#/components/schemas/model.PositionStatus"
          },
          "stop_loss": {
            "type": "number"
          },
          "swaps": {
            "description": "swap fees",
            "type": "number"
          },
          "symbol": {
            "$ref": "#/components/schemas/model.Symbol"
          },
          "symbol_id": {
            "description": "symbol id",
            "type": "integer"
          },
          "take_profit": {
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style). Distances in POINTS (each = 10^-digits).",
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "volume": {
            "description": "no of lots",
            "type": "number"
          }
        }
      },
      "model.PositionStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-comments": {
          "PositionStatus_open_position": "open or active"
        },
        "x-enum-descriptions": [
          "open or active",
          "",
          ""
        ],
        "x-enum-varnames": [
          "PositionStatus_open_position",
          "PositionStatus_closing_position",
          "PositionStatus_closed_position"
        ]
      },
      "model.ReasonType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19
        ],
        "x-enum-comments": {
          "ReasonType_client": "opened by a client manually through the client terminal.",
          "ReasonType_dealer": "opened by a dealer through the manager terminal.",
          "ReasonType_external_client": "opened by a client from an external trading system.",
          "ReasonType_external_service": "opened from an external trading system for technical reasons (for example, to correct the trade state of a client).",
          "ReasonType_gateway": "opened by a  gateway that had connected to the trading platform.",
          "ReasonType_migration": "position opened as a result of import of clients' trading operations from the metatrader 4 server.",
          "ReasonType_mobile_type": "position opened via the  mobile terminal for android or iphone.",
          "ReasonType_rollover": "opened when reopening a position for charging swaps.",
          "ReasonType_script_type": "opened by a client with using an expert advisor.",
          "ReasonType_settlement": "opened as a result of performing operations connected with the settlement of a futures contract/option. not used at the moment.",
          "ReasonType_signal": "opened as a result of copying a trade signal according to a subscription in the client terminal.",
          "ReasonType_split": "position opened as a result of a symbol split.",
          "ReasonType_stop_loss": "not used for positions.",
          "ReasonType_stop_out": "not used for positions.",
          "ReasonType_synchronization": "opened as a result of synchronization of an account's trade state with an external system.",
          "ReasonType_take_profit": "not used for positions.",
          "ReasonType_take_profit_stop_loss": "not used for positions.",
          "ReasonType_transfer": "opened due to transferring a position at the settlement price to a new symbol with the same underlying asset. not used at the moment.",
          "ReasonType_variation_margin": "not used for positions.",
          "ReasonType_web_type": "position opened via the web terminal."
        },
        "x-enum-descriptions": [
          "opened by a client manually through the client terminal.",
          "opened by a client with using an expert advisor.",
          "opened by a dealer through the manager terminal.",
          "not used for positions.",
          "not used for positions.",
          "not used for positions.",
          "not used for positions.",
          "opened when reopening a position for charging swaps.",
          "opened by a client from an external trading system.",
          "not used for positions.",
          "opened by a  gateway that had connected to the trading platform.",
          "opened as a result of copying a trade signal according to a subscription in the client terminal.",
          "opened as a result of performing operations connected with the settlement of a futures contract/option. not used at the moment.",
          "opened due to transferring a position at the settlement price to a new symbol with the same underlying asset. not used at the moment.",
          "opened as a result of synchronization of an account's trade state with an external system.",
          "opened from an external trading system for technical reasons (for example, to correct the trade state of a client).",
          "position opened via the  mobile terminal for android or iphone.",
          "position opened via the web terminal.",
          "position opened as a result of a symbol split.",
          "position opened as a result of import of clients' trading operations from the metatrader 4 server."
        ],
        "x-enum-varnames": [
          "ReasonType_client",
          "ReasonType_script_type",
          "ReasonType_dealer",
          "ReasonType_stop_loss",
          "ReasonType_take_profit",
          "ReasonType_take_profit_stop_loss",
          "ReasonType_stop_out",
          "ReasonType_rollover",
          "ReasonType_external_client",
          "ReasonType_variation_margin",
          "ReasonType_gateway",
          "ReasonType_signal",
          "ReasonType_settlement",
          "ReasonType_transfer",
          "ReasonType_synchronization",
          "ReasonType_external_service",
          "ReasonType_mobile_type",
          "ReasonType_web_type",
          "ReasonType_split",
          "ReasonType_migration"
        ]
      },
      "model.RecordType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "RecordType_seed",
          "RecordType_normal"
        ]
      },
      "model.ReportStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ReportStatus_pending",
          "ReportStatus_completed",
          "ReportStatus_failed"
        ]
      },
      "model.Resource": {
        "type": "object",
        "required": [
          "desc",
          "type"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Action"
            }
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/model.ResourceType"
          }
        }
      },
      "model.ResourceType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "ResourceType_api",
          "ResourceType_page",
          "ResourceType_screen"
        ]
      },
      "model.Role": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "original": {
            "description": "Default system Roles (can't be changed) or deleted",
            "type": "boolean"
          },
          "role_type": {
            "$ref": "#/components/schemas/model.RoleType"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.RoleType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2
        ],
        "x-enum-varnames": [
          "RoleType_Admin",
          "RoleType_Dealer",
          "RoleType_Trader"
        ]
      },
      "model.Session": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "finished_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "started_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "user_agent": {
            "type": "string"
          }
        }
      },
      "model.SideType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-varnames": [
          "SideType_buy",
          "SideType_sell",
          "SideType_balance",
          "SideType_credit"
        ]
      },
      "model.SpreadSchedule": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "day_mask": {
            "description": "weekday bitmask (bit0=Sun … bit6=Sat); 0 = every day",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "end_utc": {
            "description": "\"HH:MM\" UTC (may wrap past midnight)",
            "type": "string"
          },
          "extra_balance": {
            "description": "flat points added to the (scaled) spread balance/offset",
            "type": "integer"
          },
          "extra_points": {
            "description": "flat points added on top of the (scaled) spread width",
            "type": "integer"
          },
          "group_id": {
            "description": "symbol group this applies to",
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "multiplier": {
            "description": "multiply the base spread (e.g. 3.0); <=0 treated as 1",
            "type": "number"
          },
          "priority": {
            "description": "highest priority wins on overlap",
            "type": "integer"
          },
          "start_utc": {
            "description": "\"HH:MM\" UTC",
            "type": "string"
          },
          "symbol_id": {
            "description": "0 = every symbol in the group",
            "type": "integer"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.Swaptype": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-comments": {
          "SwapType_current_price": "a percentage of current price — the specified percentage of the symbol price at the time of swap calculation.",
          "SwapType_in_money": "in money",
          "SwapType_open_price": "a percentage of the open price — the specified percentage of the position open price.",
          "Swaptype_points": "In points — the specified number of points of the security price."
        },
        "x-enum-descriptions": [
          "In points — the specified number of points of the security price.",
          "in money",
          "a percentage of current price — the specified percentage of the symbol price at the time of swap calculation.",
          "a percentage of the open price — the specified percentage of the position open price."
        ],
        "x-enum-varnames": [
          "Swaptype_points",
          "SwapType_in_money",
          "SwapType_current_price",
          "SwapType_open_price"
        ]
      },
      "model.Symbol": {
        "type": "object",
        "properties": {
          "base_currency": {
            "description": "EUR",
            "type": "string"
          },
          "broker_fee": {
            "description": "Not used",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "Trades",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.CalcType"
              }
            ]
          },
          "chart_mode": {
            "description": "1- By Bid Price",
            "type": "integer"
          },
          "contract_size": {
            "description": "Contract size for this symbol max 100,000",
            "type": "number"
          },
          "conversion_currency": {
            "description": "pointing to another symbol",
            "type": "integer"
          },
          "conversion_type": {
            "description": "0-Multiply 1-Divide",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "data_source": {
            "type": "string"
          },
          "desc": {
            "description": "description",
            "type": "string"
          },
          "digits": {
            "description": "number of digits after the decimal point",
            "type": "integer"
          },
          "enabled": {
            "description": "if the symbol is enabled or not by the broker",
            "type": "boolean"
          },
          "execution": {
            "description": "Exectuion",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExecutionMode"
              }
            ]
          },
          "expiration": {
            "description": "1-All 2-",
            "type": "string"
          },
          "external_symbol": {
            "description": "Data source",
            "type": "string"
          },
          "filling": {
            "description": "0=Fill or Kill 2 = Immidate or Cancel ..others",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.FillPolicy"
              }
            ]
          },
          "gtc": {
            "description": "1= Good Till Cancel 2 ..",
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "isin": {
            "description": "International Securities Identifying Number.",
            "type": "string"
          },
          "larger_leg_enabled": {
            "description": "larger leg enabled",
            "type": "boolean"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "Maintence",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "description": "market maker fee if any > than broker_fee",
            "type": "number"
          },
          "margin_buy": {
            "description": "Margin rates\nInitial",
            "type": "number"
          },
          "margin_flags": {
            "type": "integer"
          },
          "margin_hedged": {
            "description": "margin hedged",
            "type": "number"
          },
          "margin_initial": {
            "description": "Margins",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "margin maintence",
            "type": "number"
          },
          "margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "max_loss_deviation": {
            "description": "max loss deviation",
            "type": "number"
          },
          "max_profit_deviation": {
            "description": "max profit deviation",
            "type": "number"
          },
          "max_time_deviation": {
            "description": "max time deviation",
            "type": "number"
          },
          "max_value": {
            "description": "Max lot value = 0.01",
            "type": "number"
          },
          "min_value": {
            "description": "Min lot value = 0.01",
            "type": "number"
          },
          "orders": {
            "description": "1-All 2-",
            "type": "string"
          },
          "quote_currency": {
            "description": "USD  quote currency (OR futures contract currency)",
            "type": "string"
          },
          "quote_scale": {
            "description": "quote from market scale, quote currency amount multiplier (step size in quote currency units)",
            "type": "number"
          },
          "quote_sessions": {
            "description": "Sessions",
            "type": "string"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "spread": {
            "description": "1- floating 2-value",
            "type": "integer"
          },
          "spread_balance": {
            "description": "spread balance",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/model.SymbolStatus"
          },
          "step": {
            "description": "lot step value = 0.01 , increment of lots",
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swap_auto": {
            "type": "boolean"
          },
          "swap_days": {
            "description": "swap days ex: \"1,2,3,4,5,6,7\"",
            "type": "string"
          },
          "swap_days_year": {
            "description": "swap days per year ex: 360",
            "type": "integer"
          },
          "swap_external_id": {
            "description": "Auto-swap source mapping. swap_external_id encodes the Saxo Uic\n+ AssetType as \"<uic>:<assetType>\" (e.g. \"21:FxSpot\"). When\nswap_auto is true the daily cron overwrites SwapLong/SwapShort\nwith values pulled from Saxo for this instrument; when false the\ncron skips this row and admin-entered values stand. Empty\nswap_external_id always skips, regardless of swap_auto.",
            "type": "string"
          },
          "swap_long": {
            "description": "swap for Buy positions.",
            "type": "number"
          },
          "swap_short": {
            "description": "swap short charge of long swap",
            "type": "number"
          },
          "swap_type": {
            "description": "swap type to calc",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.Swaptype"
              }
            ]
          },
          "swaps_enabled": {
            "description": "swaps",
            "type": "boolean"
          },
          "symbol": {
            "description": "Common",
            "type": "string"
          },
          "symbol_class_id": {
            "type": "integer"
          },
          "symbol_map": {
            "description": "User defined symbol map",
            "type": "string"
          },
          "symbol_scale": {
            "description": "lot scale or  base currency amount multiplier (lot size in base currency units)",
            "type": "number"
          },
          "tick_size": {
            "description": "tick size",
            "type": "number"
          },
          "tick_value": {
            "description": "tick value",
            "type": "number"
          },
          "time_limit": {
            "description": "time limit for the symbol startDate-endDate",
            "type": "string"
          },
          "timeout": {
            "description": "timeout in seconds if it exceeded then the symbol status will be changed to disable",
            "type": "integer"
          },
          "trade_level": {
            "description": "1=Full Access 2= Buy 3-Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeLevel"
              }
            ]
          },
          "trade_sessions": {
            "description": "array [Day,Time]...",
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.SymbolClass": {
        "type": "object",
        "properties": {
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "parent_id": {
            "type": "integer"
          },
          "symbol_classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.SymbolClass"
            }
          },
          "symbols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Symbol"
            }
          }
        }
      },
      "model.SymbolGroup": {
        "type": "object",
        "properties": {
          "broker_fee": {
            "description": "broker fee on asset level other than order fee must be less than maker_fee",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "Trades",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.CalcType"
              }
            ]
          },
          "chart_mode": {
            "description": "1- By Bid Price",
            "type": "integer"
          },
          "contract_size": {
            "description": "Contract size for this symbol max 100,000",
            "type": "number"
          },
          "conversion_currency": {
            "description": "pointing to another symbol",
            "type": "integer"
          },
          "conversion_type": {
            "description": "0-Multiply 1-Divide",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "enabled": {
            "description": "weather this symbol can be shown for the traders belong to this group or not",
            "type": "boolean"
          },
          "execution": {
            "description": "Exectuion",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExecutionMode"
              }
            ]
          },
          "expiration": {
            "description": "1-All 2-",
            "type": "string"
          },
          "filling": {
            "description": "1=Fill or Kill 2 = Immidate or Cancel ..others",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.FillPolicy"
              }
            ]
          },
          "group_id": {
            "description": "Symbol  Groups Id configured with this symbol META5 DB",
            "type": "integer"
          },
          "gtc": {
            "description": "1= Good Till Cancel 2 ..",
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "larger_leg_enabled": {
            "description": "larger leg enabled",
            "type": "boolean"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "maintence",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "description": "market maker fee if any > than broker_fee",
            "type": "number"
          },
          "margin_buy": {
            "description": "margin rates",
            "type": "number"
          },
          "margin_conversion_currency": {
            "description": "Margin specific conversion",
            "type": "integer"
          },
          "margin_conversion_type": {
            "description": "0-Multiply 1-Divide for margin",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "margin_flags": {
            "description": "Not used",
            "type": "integer"
          },
          "margin_hedged": {
            "description": "margin hedged",
            "type": "number"
          },
          "margin_initial": {
            "description": "Margins",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "margin maintence",
            "type": "number"
          },
          "margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "max_loss_deviation": {
            "description": "max loss deviation",
            "type": "number"
          },
          "max_profit_deviation": {
            "description": "max profit deviation",
            "type": "number"
          },
          "max_time_deviation": {
            "description": "max time deviation",
            "type": "number"
          },
          "max_value": {
            "description": "Max lot value = 0.01",
            "type": "number"
          },
          "min_value": {
            "description": "Min lot value = 0.01",
            "type": "number"
          },
          "orders": {
            "description": "1-All 2-",
            "type": "string"
          },
          "quote_scale": {
            "description": "quote from market scale, quote currency amount multiplier (step size in quote currency units)",
            "type": "number"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "spread": {
            "description": "1- floating 2-value",
            "type": "integer"
          },
          "spread_balance": {
            "description": "spread balance",
            "type": "integer"
          },
          "step": {
            "description": "lot step value = 0.01 , increment of lotsp",
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swaps_enabled": {
            "description": "Swap. Rate/type/schedule live on ot_Symbol; group only toggles on/off.",
            "type": "boolean"
          },
          "symbol": {
            "$ref": "#/components/schemas/model.Symbol"
          },
          "symbol_id": {
            "description": "SymbolId",
            "type": "integer"
          },
          "symbol_map": {
            "description": "Common",
            "type": "string"
          },
          "symbol_scale": {
            "description": "lot scale or  base currency amount multiplier (lot size in base currency units)",
            "type": "number"
          },
          "tick_size": {
            "description": "tick size",
            "type": "number"
          },
          "tick_value": {
            "description": "tick value",
            "type": "number"
          },
          "trade_level": {
            "description": "1=Full Access 2= Buy 3-Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeLevel"
              }
            ]
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.SymbolStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "x-enum-comments": {
          "SymbolStatusType_disabled": "symbol is disabled by the admin",
          "SymbolStatusType_enabled": "symbol is enabled and sessions are open",
          "SymbolStatusType_time_limit_expired": "symbol is disabled due to time limit",
          "SymbolStatusType_timeouted": "symbol is disabled due to timeout",
          "SymbolStatusType_trade_closed_quote_closed": "symbol sessions(trade, quote) are closed",
          "SymbolStatusType_trade_closed_quote_open": "trade session is closed and quote session is opened",
          "SymbolStatusType_trade_open_quote_closed": "quote session is closed and trade session is opened"
        },
        "x-enum-descriptions": [
          "symbol is enabled and sessions are open",
          "symbol is disabled by the admin",
          "symbol sessions(trade, quote) are closed",
          "trade session is closed and quote session is opened",
          "quote session is closed and trade session is opened",
          "symbol is disabled due to timeout",
          "symbol is disabled due to time limit"
        ],
        "x-enum-varnames": [
          "SymbolStatusType_enabled",
          "SymbolStatusType_disabled",
          "SymbolStatusType_trade_closed_quote_closed",
          "SymbolStatusType_trade_closed_quote_open",
          "SymbolStatusType_trade_open_quote_closed",
          "SymbolStatusType_timeouted",
          "SymbolStatusType_time_limit_expired"
        ]
      },
      "model.Token": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "expires_in": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "prev_access_token": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.TradeLevel": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "x-enum-comments": {
          "TradeLevel_Buy": "only buy allowed",
          "TradeLevel_Close": "only close allowed",
          "TradeLevel_Disabled": "disabled",
          "TradeLevel_Full": "Full access buy/sell",
          "TradeLevel_Sell": "only sell allowed"
        },
        "x-enum-descriptions": [
          "Full access buy/sell",
          "only buy allowed",
          "only sell allowed",
          "only close allowed",
          "disabled"
        ],
        "x-enum-varnames": [
          "TradeLevel_Full",
          "TradeLevel_Buy",
          "TradeLevel_Sell",
          "TradeLevel_Close",
          "TradeLevel_Disabled"
        ]
      },
      "model.TradeType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "TradeType_normal",
          "TradeType_demo"
        ]
      },
      "model.TransStatus": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "TransStatus_complete_trx",
          "TransStatus_pending_trx"
        ]
      },
      "model.TransType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "TransType_cr",
          "TransType_db"
        ]
      },
      "model.Transaction": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/model.Account"
          },
          "account_id": {
            "type": "integer"
          },
          "amount": {
            "type": "number"
          },
          "broker": {
            "$ref": "#/components/schemas/model.Broker"
          },
          "broker_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "currency_rate": {
            "type": "number"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "origin": {
            "description": "1=trade 2=Adjust 3-commission",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.OriginClass"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/model.TransStatus"
          },
          "type": {
            "description": "cr or db",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TransType"
              }
            ]
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.WorkspaceProfile": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "language": {
            "$ref": "#/components/schemas/model.Workspace_Language"
          },
          "state": {
            "type": "string"
          },
          "theme": {
            "$ref": "#/components/schemas/model.Workspace_Theme"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          }
        }
      },
      "model.Workspace_Language": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "x-enum-comments": {
          "Workspace_Language_AR": "Arabic",
          "Workspace_Language_EN": "English",
          "Workspace_Language_HI": "Hindi",
          "Workspace_Language_UR": "Urdu"
        },
        "x-enum-descriptions": [
          "English",
          "Arabic",
          "Hindi",
          "Urdu"
        ],
        "x-enum-varnames": [
          "Workspace_Language_EN",
          "Workspace_Language_AR",
          "Workspace_Language_HI",
          "Workspace_Language_UR"
        ]
      },
      "model.Workspace_Theme": {
        "type": "integer",
        "format": "int32",
        "enum": [
          0,
          1
        ],
        "x-enum-varnames": [
          "Workspace_Theme_LIGHT",
          "Workspace_Theme_DARK"
        ]
      },
      "news.Item": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "pub_date": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "v1.AddProviderSymbolsReq": {
        "type": "object",
        "required": [
          "data_source"
        ],
        "properties": {
          "data_source": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          }
        }
      },
      "v1.BackfillRequest": {
        "type": "object",
        "required": [
          "from",
          "resolution",
          "symbol_ids",
          "to"
        ],
        "properties": {
          "from": {
            "description": "unix seconds",
            "type": "integer"
          },
          "resolution": {
            "description": "1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mo",
            "type": "string"
          },
          "symbol_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "to": {
            "description": "unix seconds",
            "type": "integer"
          }
        }
      },
      "v1.BrokerNavigationTree": {
        "type": "object",
        "properties": {
          "accounts": {
            "$ref": "#/components/schemas/model.Group"
          },
          "broker": {
            "$ref": "#/components/schemas/model.Broker"
          },
          "dealers": {
            "$ref": "#/components/schemas/model.Group"
          },
          "favourites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Account"
            }
          },
          "groups_config": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/model.Config"
              }
            }
          },
          "groups_symbols": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/model.SymbolGroup"
              }
            }
          },
          "inactive_accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Account"
            }
          },
          "margin_call_accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Account"
            }
          },
          "online_sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.OnlineSession"
            }
          },
          "pending_accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Account"
            }
          },
          "symbols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.SymbolClass"
            }
          },
          "system_config": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/model.Config"
            }
          }
        }
      },
      "v1.BulkCancelDealsReq": {
        "type": "object",
        "required": [
          "deal_ids",
          "reason"
        ],
        "properties": {
          "deal_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "integer"
            }
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "v1.BulkCancelDealsResp": {
        "type": "object",
        "properties": {
          "canceled": {
            "type": "integer"
          },
          "per_account": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.DealsCanceledAccountSummary"
            }
          },
          "rejected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.RejectedDeal"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.RejectedDeal"
            }
          }
        }
      },
      "v1.CancelOrder": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "order_id": {
            "type": "integer"
          }
        }
      },
      "v1.ChangeInvestorPassword": {
        "type": "object",
        "properties": {
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8
          }
        }
      },
      "v1.ChangeMyPassword": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8
          }
        }
      },
      "v1.ChangePassword": {
        "type": "object",
        "properties": {
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8
          }
        }
      },
      "v1.ClientSecret": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "v1.CloseManyPositionItem": {
        "type": "object",
        "required": [
          "position_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "position_id": {
            "type": "integer"
          },
          "volume": {
            "type": "number",
            "minimum": 0
          }
        }
      },
      "v1.CloseManyPositions": {
        "type": "object",
        "required": [
          "positions"
        ],
        "properties": {
          "positions": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/v1.CloseManyPositionItem"
            }
          }
        }
      },
      "v1.CloseManyResponse": {
        "type": "object",
        "properties": {
          "closed": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.CloseManyResult"
            }
          }
        }
      },
      "v1.CloseManyResult": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "position_id": {
            "type": "integer"
          }
        }
      },
      "v1.CloseMyPosition": {
        "type": "object",
        "properties": {
          "position_id": {
            "type": "integer"
          },
          "volume": {
            "type": "number"
          }
        }
      },
      "v1.ClosePosition": {
        "type": "object",
        "required": [
          "account_id",
          "position_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "position_id": {
            "type": "integer"
          },
          "volume": {
            "type": "number",
            "minimum": 0
          }
        }
      },
      "v1.ConfigSymbol": {
        "type": "object",
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "broker_fee": {
            "description": "Fees and Limits",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "Trades",
            "type": "integer"
          },
          "chart_mode": {
            "type": "integer"
          },
          "contract_size": {
            "type": "number"
          },
          "conversion_currency": {
            "type": "integer"
          },
          "conversion_type": {
            "type": "integer"
          },
          "data_source": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "digits": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "execution": {
            "description": "Execution",
            "type": "integer"
          },
          "expiration": {
            "type": "string"
          },
          "external_symbol": {
            "description": "Data source",
            "type": "string"
          },
          "filling": {
            "type": "integer"
          },
          "gtc": {
            "type": "integer"
          },
          "isin": {
            "type": "string"
          },
          "larger_leg_enabled": {
            "type": "boolean"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "Margin Rates - Maintenance",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "type": "number"
          },
          "margin_buy": {
            "description": "Margin Rates - Initial",
            "type": "number"
          },
          "margin_conversion_currency": {
            "description": "Margin specific conversion",
            "type": "integer"
          },
          "margin_conversion_type": {
            "type": "integer"
          },
          "margin_flags": {
            "type": "integer"
          },
          "margin_hedged": {
            "type": "number"
          },
          "margin_initial": {
            "description": "Margins",
            "type": "number"
          },
          "margin_maintenance": {
            "type": "number"
          },
          "margin_sell": {
            "type": "number"
          },
          "max_loss_deviation": {
            "type": "number"
          },
          "max_profit_deviation": {
            "type": "number"
          },
          "max_time_deviation": {
            "type": "number"
          },
          "max_value": {
            "type": "number"
          },
          "min_value": {
            "type": "number"
          },
          "orders": {
            "type": "string"
          },
          "path": {
            "description": "Common",
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          },
          "quote_scale": {
            "type": "number"
          },
          "quote_sessions": {
            "description": "Sessions",
            "type": "string"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "spread": {
            "type": "integer"
          },
          "spread_balance": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          },
          "step": {
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swap_days": {
            "type": "string"
          },
          "swap_days_year": {
            "type": "integer"
          },
          "swap_long": {
            "type": "number"
          },
          "swap_short": {
            "type": "number"
          },
          "swap_type": {
            "type": "integer"
          },
          "swaps_enabled": {
            "description": "Swaps. swaps_enabled belongs to the group; the rest mirrors ot_Symbol.",
            "type": "boolean"
          },
          "symbol": {
            "type": "string"
          },
          "symbol_map": {
            "type": "string"
          },
          "symbol_scale": {
            "type": "number"
          },
          "tick_size": {
            "type": "number"
          },
          "tick_value": {
            "type": "number"
          },
          "time_limit": {
            "type": "string"
          },
          "timeout": {
            "type": "integer"
          },
          "trade_level": {
            "type": "integer"
          },
          "trade_sessions": {
            "type": "string"
          }
        }
      },
      "v1.CopyGroup": {
        "type": "object",
        "properties": {
          "commissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.Commission"
            }
          },
          "configs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/model.Config"
            }
          },
          "group_id": {
            "type": "integer"
          },
          "symbols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.SymbolGroup"
            }
          }
        }
      },
      "v1.CopyGroupParameters": {
        "type": "object",
        "required": [
          "commission_ids",
          "symbol_ids"
        ],
        "properties": {
          "commission_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "dealing": {
            "type": "boolean"
          },
          "general": {
            "type": "boolean"
          },
          "symbol_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "trades": {
            "type": "boolean"
          }
        }
      },
      "v1.CrtAccount": {
        "type": "object",
        "properties": {
          "account_type": {
            "$ref": "#/components/schemas/model.AccountType"
          },
          "address_line": {
            "type": "string"
          },
          "agreements": {
            "type": "string"
          },
          "balance": {
            "type": "number"
          },
          "city": {
            "type": "string"
          },
          "country_of_birth": {
            "type": "string"
          },
          "country_of_citizenship": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "currency_digits": {
            "type": "integer"
          },
          "current_country_residence": {
            "type": "string"
          },
          "date_of_birth": {
            "type": "integer",
            "format": "int64"
          },
          "documents": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "family_name": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "funding_source": {
            "type": "integer"
          },
          "group_id": {
            "description": "this user if part of a group",
            "type": "integer"
          },
          "investor_password": {
            "type": "string"
          },
          "leverage": {
            "type": "integer"
          },
          "liqudation": {
            "$ref": "#/components/schemas/model.LiqudationType"
          },
          "middle_name": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "po_box": {
            "type": "string"
          },
          "recovery_contact": {
            "type": "string"
          },
          "role_id": {
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/model.AccountStatus"
          },
          "tel_pw": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "trade_type": {
            "description": "1-Normal  2-Demo",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeType"
              }
            ]
          },
          "user_password": {
            "type": "string"
          }
        }
      },
      "v1.CrtAction": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "checked": {
            "type": "boolean"
          }
        }
      },
      "v1.CrtCommission": {
        "type": "object",
        "properties": {
          "desc": {
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/model.ModeType"
          },
          "mode_action": {
            "$ref": "#/components/schemas/model.ModeAction"
          },
          "mode_charge": {
            "$ref": "#/components/schemas/model.ModeCharge"
          },
          "mode_entry": {
            "$ref": "#/components/schemas/model.ModeEntry"
          },
          "mode_profit": {
            "$ref": "#/components/schemas/model.ModeProfit"
          },
          "mode_range": {
            "$ref": "#/components/schemas/model.ModeRange"
          },
          "name": {
            "type": "string"
          },
          "symbol_class_id": {
            "type": "integer"
          },
          "turnover_currency": {
            "type": "string"
          }
        }
      },
      "v1.CrtCommissionTier": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "max": {
            "type": "number"
          },
          "min": {
            "type": "number"
          },
          "mode": {
            "$ref": "#/components/schemas/model.ChargeMode"
          },
          "range_from": {
            "type": "number"
          },
          "range_to": {
            "type": "number"
          },
          "type": {
            "$ref": "#/components/schemas/model.ChargeType"
          },
          "value": {
            "type": "number"
          }
        }
      },
      "v1.CrtDataProvider": {
        "type": "object",
        "required": [
          "display_name",
          "name"
        ],
        "properties": {
          "configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.CrtDataProviderCfg"
            }
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.CrtDataProviderCred"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3
          },
          "provider_type": {
            "type": "integer"
          }
        }
      },
      "v1.CrtDataProviderCfg": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "v1.CrtDataProviderCred": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "v1.CrtGroup": {
        "type": "object",
        "required": [
          "desc"
        ],
        "properties": {
          "desc": {
            "type": "string"
          },
          "manager_id": {
            "type": "integer"
          },
          "parent_id": {
            "type": "integer"
          }
        }
      },
      "v1.CrtLPProvider": {
        "type": "object",
        "required": [
          "display_name",
          "name"
        ],
        "properties": {
          "configs": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 3
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3
          },
          "provider_type": {
            "type": "integer"
          },
          "ssl_enabled": {
            "type": "boolean"
          }
        }
      },
      "v1.CrtMyOrder": {
        "type": "object",
        "required": [
          "symbol_id",
          "volume"
        ],
        "properties": {
          "break_even": {
            "type": "integer"
          },
          "break_even_offset": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "expiration_policy": {
            "$ref": "#/components/schemas/model.ExpirationPolicy"
          },
          "expiry_at": {
            "type": "integer"
          },
          "order_price": {
            "description": "market price when order executed",
            "type": "number"
          },
          "side": {
            "$ref": "#/components/schemas/model.SideType"
          },
          "split": {
            "description": "Optional split-order block. When non-nil, the server expands the\nrequest into Count independent legs sharing one split_id; each\nleg flows through the existing makeOrder path. See orders_split.go.",
            "allOf": [
              {
                "$ref": "#/components/schemas/v1.SplitParams"
              }
            ]
          },
          "stop_loss": {
            "type": "number"
          },
          "symbol_id": {
            "description": "symbol id",
            "type": "integer"
          },
          "take_profit": {
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style), points — applied to the position once filled.",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/model.OrderType"
          },
          "volume": {
            "description": "no of lots",
            "type": "number"
          }
        }
      },
      "v1.CrtOrder": {
        "type": "object",
        "required": [
          "account_id",
          "order_price",
          "symbol_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "break_even": {
            "type": "integer"
          },
          "break_even_offset": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "expiration_policy": {
            "$ref": "#/components/schemas/model.ExpirationPolicy"
          },
          "expiry_at": {
            "type": "integer"
          },
          "order_price": {
            "description": "market price when order executed",
            "type": "number"
          },
          "side": {
            "$ref": "#/components/schemas/model.SideType"
          },
          "stop_loss": {
            "type": "number"
          },
          "symbol_id": {
            "description": "symbol id",
            "type": "integer"
          },
          "take_profit": {
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style), points — carried onto the position when filled.",
            "type": "integer"
          },
          "type": {
            "$ref": "#/components/schemas/model.OrderType"
          },
          "volume": {
            "description": "no of lots",
            "type": "number",
            "minimum": 0
          }
        }
      },
      "v1.CrtRole": {
        "type": "object",
        "required": [
          "desc"
        ],
        "properties": {
          "desc": {
            "type": "string",
            "example": "trader"
          },
          "role_type": {
            "$ref": "#/components/schemas/model.RoleType"
          }
        }
      },
      "v1.CrtSymbol": {
        "type": "object",
        "required": [
          "data_source",
          "external_symbol",
          "source",
          "symbol",
          "symbol_class_id",
          "symbol_map"
        ],
        "properties": {
          "base_currency": {
            "description": "EUR",
            "type": "string"
          },
          "broker_fee": {
            "description": "broker fee on asset level other than order fee must be less than maker_fee",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "Trades",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.CalcType"
              }
            ]
          },
          "chart_mode": {
            "description": "1- By Bid Price",
            "type": "integer"
          },
          "contract_size": {
            "description": "Contract size for this symbol max 100,000",
            "type": "number"
          },
          "conversion_currency": {
            "description": "pointing to another symbol",
            "type": "integer"
          },
          "conversion_type": {
            "description": "0-Multiply 1-Divide",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "data_source": {
            "type": "string"
          },
          "desc": {
            "description": "description",
            "type": "string"
          },
          "digits": {
            "description": "number of digits after the decimal point",
            "type": "integer"
          },
          "enabled": {
            "description": "if the symbol is enabled or not by the broker",
            "type": "boolean"
          },
          "execution": {
            "description": "1= Market",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExecutionMode"
              }
            ]
          },
          "expiration": {
            "description": "1-All 2-",
            "type": "string"
          },
          "external_symbol": {
            "description": "Source",
            "type": "string"
          },
          "filling": {
            "description": "1=Fill or Kill 2 = Immidate or Cancel ..others",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.FillPolicy"
              }
            ]
          },
          "gtc": {
            "description": "1= Good Till Cancel 2 ..",
            "type": "integer"
          },
          "isin": {
            "description": "International Securities Identifying Number.",
            "type": "string"
          },
          "larger_leg_enabled": {
            "description": "larger leg enabled",
            "type": "boolean"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "maintence",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "description": "market maker fee if any > than broker_fee",
            "type": "number"
          },
          "margin_buy": {
            "description": "margin for future buy on this assest",
            "type": "number"
          },
          "margin_flags": {
            "description": "margin rate",
            "type": "integer"
          },
          "margin_hedged": {
            "description": "margin hedged",
            "type": "number"
          },
          "margin_initial": {
            "description": "margin initial",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "margin maintence",
            "type": "number"
          },
          "margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "max_loss_deviation": {
            "description": "max loss deviation",
            "type": "number"
          },
          "max_profit_deviation": {
            "description": "max profit deviation",
            "type": "number"
          },
          "max_time_deviation": {
            "description": "Exectuion",
            "type": "number"
          },
          "max_value": {
            "description": "Max lot value = 0.01",
            "type": "number"
          },
          "min_value": {
            "description": "Min lot value = 0.01",
            "type": "number"
          },
          "orders": {
            "description": "1-All 2-",
            "type": "string"
          },
          "quote_currency": {
            "description": "USD  quote currency (OR futures contract currency)",
            "type": "string"
          },
          "quote_scale": {
            "description": "quote from market scale, quote currency amount multiplier (step size in quote currency units)",
            "type": "number"
          },
          "quote_sessions": {
            "description": "Sessions",
            "type": "string"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "spread": {
            "description": "1- floating 2-value",
            "type": "integer"
          },
          "spread_balance": {
            "description": "spread balance",
            "type": "integer"
          },
          "step": {
            "description": "lot step value = 0.01 , increment of lots",
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swap_auto": {
            "type": "boolean"
          },
          "swap_days": {
            "description": "swap days ex: \"1,2,3,4,5,6,7\"",
            "type": "string"
          },
          "swap_days_year": {
            "description": "swap days per year ex: 360",
            "type": "integer"
          },
          "swap_external_id": {
            "description": "Auto-swap mapping. SwapExternalId encodes the Saxo Uic + AssetType\nas \"<uic>:<assetType>\" (e.g. \"21:FxSpot\"). When SwapAuto is true,\nthe daily cron overwrites SwapLong/SwapShort using the Saxo source.",
            "type": "string"
          },
          "swap_long": {
            "description": "swap for Buy positions.",
            "type": "number"
          },
          "swap_short": {
            "description": "swap short charge of long swap",
            "type": "number"
          },
          "swap_type": {
            "description": "swap type to calc",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.Swaptype"
              }
            ]
          },
          "swaps_enabled": {
            "description": "Swap",
            "type": "boolean"
          },
          "symbol": {
            "description": "Common",
            "type": "string"
          },
          "symbol_class_id": {
            "type": "integer"
          },
          "symbol_map": {
            "description": "User defined symbol map",
            "type": "string"
          },
          "symbol_scale": {
            "description": "lot scale or  base currency amount multiplier (lot size in base currency units)",
            "type": "number"
          },
          "tick_size": {
            "description": "tick size",
            "type": "number"
          },
          "tick_value": {
            "description": "tick value",
            "type": "number"
          },
          "time_limit": {
            "description": "time limit for the symbol startDate-endDate",
            "type": "string"
          },
          "timeout": {
            "description": "timeout in seconds if it exceeded then the symbol status will be changed to disable",
            "type": "integer"
          },
          "trade_level": {
            "description": "1=Full Access 2= Buy 3-Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeLevel"
              }
            ]
          },
          "trade_sessions": {
            "description": "array [Day,Time]...",
            "type": "string"
          }
        }
      },
      "v1.CrtSymbolClass": {
        "type": "object",
        "required": [
          "desc"
        ],
        "properties": {
          "desc": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3
          },
          "parent_id": {
            "type": "integer"
          }
        }
      },
      "v1.CrtSymbolResp": {
        "type": "object",
        "properties": {
          "symbol": {
            "$ref": "#/components/schemas/model.Symbol"
          },
          "symbol_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/model.SymbolGroup"
            }
          }
        }
      },
      "v1.CrtWorkspaceProfile": {
        "type": "object",
        "properties": {
          "desc": {
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/model.Workspace_Language"
          },
          "state": {
            "$ref": "#/components/schemas/model.MosaicState"
          },
          "theme": {
            "$ref": "#/components/schemas/model.Workspace_Theme"
          }
        }
      },
      "v1.ExportableSymbols": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string"
          },
          "symbol_config": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.ConfigSymbol"
            }
          }
        }
      },
      "v1.ForgotPassword": {
        "type": "object",
        "required": [
          "account_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          }
        }
      },
      "v1.HistoryTick": {
        "type": "object",
        "properties": {
          "close": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "time": {
            "type": "integer",
            "format": "int64"
          },
          "volume": {
            "type": "number"
          }
        }
      },
      "v1.IconInfo": {
        "type": "object",
        "properties": {
          "base_icon": {
            "type": "string"
          },
          "is_pair": {
            "type": "boolean"
          },
          "quote_icon": {
            "type": "string"
          },
          "single_icon": {
            "type": "string"
          }
        }
      },
      "v1.ImportResponse": {
        "type": "object",
        "properties": {
          "inserted": {
            "type": "integer"
          },
          "processed_lines": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "symbol": {
            "type": "string"
          },
          "time_shift_applied_hours": {
            "type": "integer"
          },
          "updated": {
            "type": "integer"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "v1.InEmail": {
        "type": "object",
        "required": [
          "body",
          "status",
          "subject",
          "to"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "reply_to": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/model.MailStatus"
          },
          "subject": {
            "type": "string"
          },
          "to": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "v1.Journal": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "channel": {
            "description": "1=Mobile 2=Desktop 3-Web 4-API",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ChannelType"
              }
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "desc": {
            "description": "short desc of this operation most likely for journal",
            "type": "string"
          },
          "id": {
            "description": "auto increment",
            "type": "integer"
          },
          "ip": {
            "description": "ip address",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "description": "OperType enum",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.OperType"
              }
            ]
          }
        }
      },
      "v1.LoginResponse": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "account_id": {
            "type": "integer"
          },
          "expires_in": {
            "type": "integer"
          },
          "ip_address": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          }
        }
      },
      "v1.MoneyRequest": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "number"
          },
          "desc": {
            "type": "string"
          }
        }
      },
      "v1.NewAccount": {
        "type": "object",
        "required": [
          "address",
          "country",
          "email",
          "phone"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "deposit": {
            "type": "number"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "description": "Username   string          `json:\"username\" validate:\"required,username\"`",
            "type": "string",
            "maxLength": 30,
            "minLength": 2
          },
          "last_name": {
            "type": "string",
            "maxLength": 30,
            "minLength": 2
          },
          "middle_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "trade_type": {
            "$ref": "#/components/schemas/model.TradeType"
          }
        }
      },
      "v1.OnlineSession": {
        "type": "object",
        "properties": {
          "account_type": {
            "description": "AccountType",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.AccountType"
              }
            ]
          },
          "channel": {
            "description": "Channel",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ChannelType"
              }
            ]
          },
          "client_id": {
            "description": "Account id",
            "type": "integer"
          },
          "full_name": {
            "description": "Full name",
            "type": "string"
          },
          "id": {
            "description": "Id of the session",
            "type": "string"
          },
          "ip_address": {
            "description": "Ip Address",
            "type": "string"
          },
          "session_id": {
            "description": "Client's session_id",
            "type": "string"
          },
          "started_at": {
            "description": "StartedAt",
            "type": "string"
          },
          "user_id": {
            "description": "User Id",
            "type": "string"
          }
        }
      },
      "v1.Policy": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.CrtAction"
            }
          },
          "resource": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "v1.RefreshTokenBody": {
        "type": "object",
        "properties": {
          "refresh_token": {
            "type": "string"
          }
        }
      },
      "v1.RejectedDeal": {
        "type": "object",
        "properties": {
          "deal_id": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "v1.ResetPassword": {
        "type": "object",
        "required": [
          "account_id",
          "code"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8
          }
        }
      },
      "v1.SmartBackfillRequest": {
        "type": "object",
        "required": [
          "symbol_ids"
        ],
        "properties": {
          "symbol_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "v1.SplitParams": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "maximum": 10,
            "minimum": 2
          },
          "mode": {
            "type": "string",
            "enum": [
              "equal",
              "ladder"
            ]
          },
          "step_points": {
            "type": "number",
            "minimum": 0
          }
        }
      },
      "v1.SpreadScheduleRequest": {
        "type": "object",
        "required": [
          "group_id"
        ],
        "properties": {
          "day_mask": {
            "description": "weekday bitmask; 0 = every day",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "end_utc": {
            "description": "\"HH:MM\" UTC (may wrap midnight)",
            "type": "string"
          },
          "extra_balance": {
            "description": "flat points on the scaled spread balance",
            "type": "integer"
          },
          "extra_points": {
            "description": "flat points on the scaled spread width",
            "type": "integer"
          },
          "group_id": {
            "type": "integer"
          },
          "multiplier": {
            "description": "base-spread multiplier; defaults to 1",
            "type": "number"
          },
          "priority": {
            "description": "highest priority wins on overlap",
            "type": "integer"
          },
          "start_utc": {
            "description": "\"HH:MM\" UTC",
            "type": "string"
          },
          "symbol_id": {
            "description": "0 = every symbol in the group",
            "type": "integer"
          }
        }
      },
      "v1.SwapLProviderPriorityPayload": {
        "type": "object",
        "required": [
          "provider_id_1",
          "provider_id_2"
        ],
        "properties": {
          "provider_id_1": {
            "type": "integer"
          },
          "provider_id_2": {
            "type": "integer"
          }
        }
      },
      "v1.SymbolCoverage": {
        "type": "object",
        "properties": {
          "earliest_ts": {
            "type": "integer"
          },
          "eligible": {
            "type": "boolean"
          },
          "gap_days": {
            "type": "integer"
          },
          "latest_ts": {
            "type": "integer"
          },
          "pct_complete": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "symbol_id": {
            "type": "integer"
          },
          "symbol_name": {
            "type": "string"
          },
          "target_from": {
            "type": "integer"
          },
          "target_to": {
            "type": "integer"
          }
        }
      },
      "v1.Ticket": {
        "type": "object",
        "properties": {
          "article_count": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "group_id": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "pirority_id": {
            "type": "integer"
          },
          "state_id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "v1.TicketArticle": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "group_id": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "sender": {
            "type": "string"
          },
          "sender_id": {
            "type": "integer"
          },
          "ticket_id": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "v1.UpdDataProvider": {
        "type": "object",
        "properties": {
          "configs": {
            "description": "For FIX: {\"DEFAULT\": {...}, \"SESSION\": {...}}",
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "v1.UpdLPProvider": {
        "type": "object",
        "properties": {
          "configs": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "ssl_enabled": {
            "type": "boolean"
          }
        }
      },
      "v1.UptAccount": {
        "type": "object",
        "properties": {
          "address_line": {
            "type": "string"
          },
          "agreements": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country_of_birth": {
            "type": "string"
          },
          "country_of_citizenship": {
            "type": "string"
          },
          "current_country_residence": {
            "type": "string"
          },
          "date_of_birth": {
            "type": "integer",
            "format": "int64"
          },
          "documents": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "family_name": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "first_name": {
            "description": "Identity",
            "type": "string"
          },
          "funding_source": {
            "type": "integer"
          },
          "leverage": {
            "type": "integer"
          },
          "liqudation": {
            "$ref": "#/components/schemas/model.LiqudationType"
          },
          "middle_name": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "po_box": {
            "type": "string"
          },
          "recovery_contact": {
            "type": "string"
          },
          "role_id": {
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/model.AccountStatus"
          },
          "tel_pw": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "trade_type": {
            "description": "1-Normal  2-Demo",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeType"
              }
            ]
          }
        }
      },
      "v1.UptBroker": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "agent_enabled": {
            "type": "string"
          },
          "agreement_pdf": {
            "type": "string"
          },
          "app_gallery": {
            "type": "string"
          },
          "app_store": {
            "type": "string"
          },
          "business_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "current_payment": {
            "type": "number"
          },
          "due_payment": {
            "type": "number"
          },
          "expiry_date": {
            "type": "integer"
          },
          "facebook": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "label_type": {
            "$ref": "#/components/schemas/model.LabelType"
          },
          "license_date": {
            "type": "integer"
          },
          "license_token": {
            "type": "string"
          },
          "license_total": {
            "type": "number"
          },
          "license_type": {
            "type": "string"
          },
          "license_valid": {
            "type": "boolean"
          },
          "linkedin": {
            "type": "string"
          },
          "next_payment": {
            "type": "integer"
          },
          "payments_type": {
            "type": "string"
          },
          "play_store": {
            "type": "string"
          },
          "privacy": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "tel": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "youtube": {
            "type": "string"
          }
        }
      },
      "v1.UptConfig": {
        "type": "object",
        "properties": {
          "inherited": {
            "description": "pointer to detect if provided",
            "type": "boolean"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "v1.UptMyPosition": {
        "type": "object",
        "properties": {
          "break_even": {
            "type": "integer"
          },
          "break_even_offset": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "position_id": {
            "type": "integer"
          },
          "stop_loss": {
            "type": "number"
          },
          "take_profit": {
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style), distances in points; nil leaves unchanged.",
            "type": "integer"
          }
        }
      },
      "v1.UptOrder": {
        "type": "object",
        "required": [
          "account_id",
          "order_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "expiration_policy": {
            "$ref": "#/components/schemas/model.ExpirationPolicy"
          },
          "expiry_at": {
            "type": "integer"
          },
          "order_id": {
            "type": "integer"
          },
          "order_limit_price": {
            "type": "number"
          },
          "stop_loss": {
            "description": "when to exist the position stop loss",
            "type": "number"
          },
          "take_profit": {
            "description": "when to exist the position and make profit",
            "type": "number"
          },
          "type": {
            "$ref": "#/components/schemas/v1.UptOrderType"
          },
          "volume": {
            "description": "no of lots",
            "type": "number",
            "minimum": 0
          }
        }
      },
      "v1.UptOrderType": {
        "type": "integer",
        "format": "int32",
        "enum": [
          1,
          2,
          3,
          4
        ],
        "x-enum-comments": {
          "UptOrderType_buy_limit": "a trade request to buy at the ask price that is equal to or less than that specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having fallen to a certain level, will increase.",
          "UptOrderType_buy_stop": "a trade order to buy at the \"ask\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on increasing.",
          "UptOrderType_sell_limit": "a trade order to sell at the \"bid\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having increased to a certain level, will fall.",
          "UptOrderType_sell_stop": "a trade order to sell at the \"bid\" price equal to or less than the one specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on falling."
        },
        "x-enum-descriptions": [
          "a trade request to buy at the ask price that is equal to or less than that specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having fallen to a certain level, will increase.",
          "a trade order to buy at the \"ask\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on increasing.",
          "a trade order to sell at the \"bid\" price equal to or greater than the one specified in the order. the current price level is lower than the value in the order. usually this order is placed in anticipation of that the symbol price, having increased to a certain level, will fall.",
          "a trade order to sell at the \"bid\" price equal to or less than the one specified in the order. the current price level is higher than the value in the order. usually this order is placed in anticipation of that the symbol price, having reached a certain level, will keep on falling."
        ],
        "x-enum-varnames": [
          "UptOrderType_buy_limit",
          "UptOrderType_buy_stop",
          "UptOrderType_sell_limit",
          "UptOrderType_sell_stop"
        ]
      },
      "v1.UptPosition": {
        "type": "object",
        "required": [
          "position_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "break_even": {
            "type": "integer"
          },
          "break_even_offset": {
            "type": "integer"
          },
          "comment": {
            "type": "string",
            "maxLength": 255,
            "minLength": 0
          },
          "position_id": {
            "type": "integer"
          },
          "stop_loss": {
            "type": "number"
          },
          "take_profit": {
            "type": "number"
          },
          "trailing_stop": {
            "description": "Automation (MT5-style), distances in points. Pointers so omitting a\nfield leaves it unchanged; send 0 to switch a feature off.",
            "type": "integer"
          }
        }
      },
      "v1.UptSymbolClass": {
        "type": "object",
        "required": [
          "desc"
        ],
        "properties": {
          "desc": {
            "type": "string",
            "maxLength": 50,
            "minLength": 3
          },
          "parent_id": {
            "type": "integer"
          }
        }
      },
      "v1.UptSymbolGroup": {
        "type": "object",
        "required": [
          "symbol_map"
        ],
        "properties": {
          "broker_fee": {
            "description": "broker fee on asset level other than order fee must be less than maker_fee",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "0-Forx 1- Forx Leverage etc",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.CalcType"
              }
            ]
          },
          "chart_mode": {
            "description": "1- By Bid Price",
            "type": "integer"
          },
          "contract_size": {
            "description": "Trades",
            "type": "number"
          },
          "conversion_currency": {
            "description": "pointing to another symbol",
            "type": "integer"
          },
          "conversion_type": {
            "description": "0-Multiply 1-Divide",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "enabled": {
            "description": "if the symbol is enabled or not by the broker",
            "type": "boolean"
          },
          "execution": {
            "description": "Execution",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExecutionMode"
              }
            ]
          },
          "expiration": {
            "description": "1-All 2-",
            "type": "string"
          },
          "filling": {
            "description": "1=Fill or Kill 2 = Immidate or Cancel ..others",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.FillPolicy"
              }
            ]
          },
          "gtc": {
            "description": "1= Good Till Cancel 2 ..",
            "type": "integer"
          },
          "larger_leg_enabled": {
            "description": "larger leg enabled",
            "type": "boolean"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "Maintenance",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "description": "market maker fee if any > than broker_fee",
            "type": "number"
          },
          "margin_buy": {
            "description": "margin for future buy on this assest",
            "type": "number"
          },
          "margin_conversion_currency": {
            "description": "Margin specific conversion",
            "type": "integer"
          },
          "margin_conversion_type": {
            "description": "0-Multiply 1-Divide for margin",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "margin_flags": {
            "description": "Margin rates",
            "type": "integer"
          },
          "margin_hedged": {
            "description": "margin hedged",
            "type": "number"
          },
          "margin_initial": {
            "description": "margin initial",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "margin maintence",
            "type": "number"
          },
          "margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "max_loss_deviation": {
            "description": "max loss deviation",
            "type": "number"
          },
          "max_profit_deviation": {
            "description": "max profit deviation",
            "type": "number"
          },
          "max_time_deviation": {
            "description": "max time deviation",
            "type": "number"
          },
          "max_value": {
            "description": "Max lot value = 0.01",
            "type": "number"
          },
          "min_value": {
            "description": "Min lot value = 0.01",
            "type": "number"
          },
          "orders": {
            "description": "1-All 2-",
            "type": "string"
          },
          "quote_scale": {
            "description": "quote from market scale, quote currency amount multiplier (step size in quote currency units)",
            "type": "number"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "spread": {
            "description": "1- floating 2-value",
            "type": "integer"
          },
          "spread_balance": {
            "description": "spread balance",
            "type": "integer"
          },
          "step": {
            "description": "lot step value = 0.01 , increment of lots",
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swaps_enabled": {
            "description": "Only the on/off toggle is editable on a group; rate/type/schedule\nlive on ot_Symbol and are read-only here.",
            "type": "boolean"
          },
          "symbol_map": {
            "description": "General ------",
            "type": "string"
          },
          "symbol_scale": {
            "description": "lot scale or  base currency amount multiplier (lot size in base currency units)",
            "type": "number"
          },
          "tick_size": {
            "description": "tick size",
            "type": "number"
          },
          "tick_value": {
            "description": "tick value",
            "type": "number"
          },
          "trade_level": {
            "description": "1=Full Access 2= Buy 3-Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeLevel"
              }
            ]
          }
        }
      },
      "v1.VerifyForgotPasswordCode": {
        "type": "object",
        "required": [
          "account_id",
          "code"
        ],
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "v1.ViewAccount": {
        "type": "object",
        "properties": {
          "account_type": {
            "$ref": "#/components/schemas/model.AccountType"
          },
          "assets": {
            "description": "assests = (Long) the current value of purchased financial instruments (of long positions)",
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "blocked_profit": {
            "type": "number"
          },
          "broker": {
            "$ref": "#/components/schemas/v1.ViewBroker"
          },
          "broker_id": {
            "type": "integer"
          },
          "client_id": {
            "type": "string"
          },
          "client_secret_enabled": {
            "type": "boolean"
          },
          "code_expiry": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_by": {
            "type": "integer"
          },
          "credit": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "currency_digits": {
            "type": "integer"
          },
          "equity": {
            "type": "number"
          },
          "favourite": {
            "type": "boolean"
          },
          "floating_profit": {
            "description": "current floating profit while positions is moving up/down",
            "type": "number"
          },
          "free_margin": {
            "type": "number"
          },
          "id": {
            "type": "integer"
          },
          "identity": {
            "$ref": "#/components/schemas/model.Identity"
          },
          "investor_password": {
            "type": "string"
          },
          "kyc_results": {
            "$ref": "#/components/schemas/model.KycStatus"
          },
          "leverage": {
            "type": "integer"
          },
          "liabilities": {
            "description": "Liabilities = (Sell) Liabilities are obligations on current short positions calculated",
            "type": "number"
          },
          "liqudation_status": {
            "description": "liquidation status",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.LiqudationStatus"
              }
            ]
          },
          "manager_id": {
            "type": "integer"
          },
          "margin_initial": {
            "description": "Margin Initial calcuated",
            "type": "number"
          },
          "margin_level": {
            "type": "number"
          },
          "margin_maintenance": {
            "description": "minum margin_maintenance required to maintain positions",
            "type": "number"
          },
          "profit": {
            "type": "number"
          },
          "prop": {
            "$ref": "#/components/schemas/v1.ViewPropConfig"
          },
          "prop_status": {
            "$ref": "#/components/schemas/v1.ViewPropStatus"
          },
          "relized_profit": {
            "description": "profit blocked",
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/model.AccountStatus"
          },
          "trade_type": {
            "$ref": "#/components/schemas/model.TradeType"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer"
          },
          "used_margin": {
            "type": "number"
          }
        }
      },
      "v1.ViewBroker": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "app_gallery": {
            "type": "string"
          },
          "app_store": {
            "type": "string"
          },
          "business_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "facebook": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "instagram": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "play_store": {
            "type": "string"
          },
          "privacy": {
            "type": "string"
          },
          "tel": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "youtube": {
            "type": "string"
          }
        }
      },
      "v1.ViewPropConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "max_day_loss_pct": {
            "type": "number"
          },
          "max_day_profit_pct": {
            "type": "number"
          },
          "max_total_days_loss_pct": {
            "type": "number"
          }
        }
      },
      "v1.ViewPropProgress": {
        "type": "object",
        "properties": {
          "limit_pct": {
            "type": "number"
          },
          "pct": {
            "type": "number"
          },
          "used_pct": {
            "type": "number"
          }
        }
      },
      "v1.ViewPropStatus": {
        "type": "object",
        "properties": {
          "daily_loss": {
            "$ref": "#/components/schemas/v1.ViewPropProgress"
          },
          "day_profit": {
            "$ref": "#/components/schemas/v1.ViewPropProgress"
          },
          "enabled": {
            "type": "boolean"
          },
          "total_dd": {
            "$ref": "#/components/schemas/v1.ViewPropProgress"
          },
          "warning": {
            "type": "string"
          }
        }
      },
      "v1.ViewReport": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer"
          },
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "mime_type": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/model.ReportStatus"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "v1.ViewSymbol": {
        "type": "object",
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "broker_fee": {
            "description": "broker fee on asset level other than order fee must be less than maker_fee",
            "type": "number"
          },
          "buy_limit": {
            "type": "number"
          },
          "buy_stop": {
            "type": "number"
          },
          "buy_stop_limit": {
            "type": "number"
          },
          "calculation": {
            "description": "0-Forx 1- Forx Leverage etc",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.CalcType"
              }
            ]
          },
          "chart_mode": {
            "description": "1- By Bid Price",
            "type": "integer"
          },
          "close": {
            "description": "close",
            "type": "number"
          },
          "contract_size": {
            "description": "Contract size for this symbol max 100,000",
            "type": "number"
          },
          "conversion_currency": {
            "description": "Conversion",
            "type": "integer"
          },
          "conversion_type": {
            "description": "0-Multiply 1-Divide",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "desc": {
            "description": "description",
            "type": "string"
          },
          "digits": {
            "description": "number of digits after the decimal point",
            "type": "integer"
          },
          "enabled": {
            "description": "Control ------",
            "type": "boolean"
          },
          "execution": {
            "description": "1= Market",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ExecutionMode"
              }
            ]
          },
          "expiration": {
            "description": "1-All 2-",
            "type": "string"
          },
          "filling": {
            "description": "1=Fill or Kill 2 = Immidate or Cancel ..others",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.FillPolicy"
              }
            ]
          },
          "gtc": {
            "description": "1= Good Till Cancel 2 ..",
            "type": "integer"
          },
          "high_ask": {
            "description": "ask high",
            "type": "number"
          },
          "high_bid": {
            "description": "bid high",
            "type": "number"
          },
          "icons": {
            "description": "Icon information",
            "allOf": [
              {
                "$ref": "#/components/schemas/v1.IconInfo"
              }
            ]
          },
          "id": {
            "type": "integer"
          },
          "isin": {
            "description": "International Securities Identifying Number.",
            "type": "string"
          },
          "last_ask": {
            "description": "last ask",
            "type": "number"
          },
          "last_bid": {
            "description": "last Tick Price",
            "type": "number"
          },
          "low_ask": {
            "description": "ask Low",
            "type": "number"
          },
          "low_bid": {
            "description": "biding Low",
            "type": "number"
          },
          "maintenance_buy_limit": {
            "type": "number"
          },
          "maintenance_buy_stop": {
            "type": "number"
          },
          "maintenance_buy_stop_limit": {
            "type": "number"
          },
          "maintenance_margin_buy": {
            "description": "maintence",
            "type": "number"
          },
          "maintenance_margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "maintenance_sell_limit": {
            "type": "number"
          },
          "maintenance_sell_stop": {
            "type": "number"
          },
          "maintenance_sell_stop_limit": {
            "type": "number"
          },
          "maker_fee": {
            "description": "market maker fee if any > than broker_fee",
            "type": "number"
          },
          "margin_buy": {
            "description": "margin for future buy on this assest",
            "type": "number"
          },
          "margin_conversion_currency": {
            "description": "Margin specific conversion",
            "type": "integer"
          },
          "margin_conversion_type": {
            "description": "0-Multiply 1-Divide for margin",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.ConversionType"
              }
            ]
          },
          "margin_flags": {
            "description": "margin rate",
            "type": "integer"
          },
          "margin_initial": {
            "description": "margin initial",
            "type": "number"
          },
          "margin_maintenance": {
            "description": "margin maintence",
            "type": "number"
          },
          "margin_sell": {
            "description": "marging for future sell on this assest",
            "type": "number"
          },
          "max_value": {
            "description": "Max lot value = 0.01",
            "type": "number"
          },
          "min_value": {
            "description": "Min lot value = 0.01",
            "type": "number"
          },
          "open": {
            "description": "open",
            "type": "number"
          },
          "orders": {
            "description": "1-All 2-",
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          },
          "quote_scale": {
            "description": "quote from market scale, quote currency amount multiplier (step size in quote currency units)",
            "type": "number"
          },
          "quote_sessions": {
            "description": "from symbol table",
            "type": "string"
          },
          "sell_limit": {
            "type": "number"
          },
          "sell_stop": {
            "type": "number"
          },
          "sell_stop_limit": {
            "type": "number"
          },
          "spread": {
            "description": "1- floating 2-value",
            "type": "integer"
          },
          "spread_balance": {
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/model.SymbolStatus"
          },
          "step": {
            "description": "lot step value = 0.01 , increment of lots",
            "type": "number"
          },
          "stop_level": {
            "type": "integer"
          },
          "swap_days": {
            "type": "string"
          },
          "swap_days_year": {
            "type": "integer"
          },
          "swap_long": {
            "type": "number"
          },
          "swap_short": {
            "type": "number"
          },
          "swap_type": {
            "$ref": "#/components/schemas/model.Swaptype"
          },
          "swaps_enabled": {
            "description": "swaps_enabled is the group's tier-level toggle; the remaining swap\nfields are inherited (read-only) from ot_Symbol.",
            "type": "boolean"
          },
          "symbol": {
            "type": "string"
          },
          "symbol_class": {
            "$ref": "#/components/schemas/model.SymbolClass"
          },
          "symbol_scale": {
            "description": "lot scale or  base currency amount multiplier (lot size in base currency units)",
            "type": "number"
          },
          "time_limit": {
            "description": "time limit for the symbol startDate-endDate",
            "type": "string"
          },
          "trade_level": {
            "description": "1=Full Access 2= Buy 3-Sell",
            "allOf": [
              {
                "$ref": "#/components/schemas/model.TradeLevel"
              }
            ]
          },
          "trade_sessions": {
            "description": "array [Day,Time]...",
            "type": "string"
          },
          "ts": {
            "type": "integer",
            "format": "int64"
          },
          "volume": {
            "type": "number"
          }
        }
      },
      "v1.ViewSymbolClassTree": {
        "type": "object",
        "properties": {
          "desc": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "parent_id": {
            "type": "integer"
          },
          "symbol_classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.ViewSymbolClassTree"
            }
          },
          "symbols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v1.ViewSymbol"
            }
          }
        }
      },
      "v1.backfillJob": {
        "type": "object",
        "properties": {
          "bars_written": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "finished_at": {
            "type": "integer"
          },
          "from": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "progress": {
            "description": "0..100, derived from windows completed",
            "type": "integer"
          },
          "resolution": {
            "type": "string"
          },
          "started_at": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "symbol_id": {
            "type": "integer"
          },
          "symbol_name": {
            "type": "string"
          },
          "to": {
            "type": "integer"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "OAuth2 login, token refresh and logout."
    },
    {
      "name": "Accounts",
      "description": "Account profile, creation, lifecycle and per-account settings."
    },
    {
      "name": "Money",
      "description": "Deposits, withdrawals, adjustments and credit."
    },
    {
      "name": "Groups",
      "description": "Account groups (leverage, commissions, symbol sets)."
    },
    {
      "name": "Config",
      "description": "System and per-group configuration."
    },
    {
      "name": "Broker",
      "description": "Broker profile and navigation tree."
    },
    {
      "name": "Public",
      "description": "Unauthenticated endpoints: signup, password reset, broker info."
    },
    {
      "name": "Commissions",
      "description": "Commission schedules and tiers."
    },
    {
      "name": "SpreadSchedules",
      "description": "Session-based dynamic spread schedules."
    }
  ]
}