{
  "openapi": "3.0.3",
  "info": {
    "title": "Vero OMS REST API",
    "version": "1.0.24",
    "description": "Tài liệu REST API cho Vero OMS. Path được đối chiếu với KrakenD config hiện tại trong k8s-dev-gitops/vero-algo/tools/krakend và schema response được bổ sung từ source backend/frontend."
  },
  "servers": [
    {
      "url": "https://api-gw.verolabs.co",
      "description": "API gateway"
    }
  ],
  "tags": [
    {
      "name": "Xác thực",
      "description": "Luồng xác thực và đăng xuất",
      "x-original-name": "Auth"
    },
    {
      "name": "Đăng ký",
      "description": "API hỗ trợ luồng đăng ký tài khoản"
    },
    {
      "name": "Tài khoản",
      "description": "Tài khoản người dùng, số dư, vị thế, nạp và rút tiền",
      "x-original-name": "Accounts"
    },
    {
      "name": "Tài khoản ngân hàng",
      "description": "Quản lý tài khoản ngân hàng đã lưu",
      "x-original-name": "Bank Accounts"
    },
    {
      "name": "Lệnh",
      "description": "Đặt lệnh, hủy lệnh, sửa lệnh và lịch sử lệnh",
      "x-original-name": "Orders"
    },
    {
      "name": "Lịch sử",
      "description": "Lệnh, khớp lệnh và giao dịch tiền của tài khoản.",
      "x-original-name": "History"
    },
    {
      "name": "Dữ liệu thị trường",
      "description": "Watchlist, tìm kiếm mã, dữ liệu sản phẩm và lịch sử OHLCV",
      "x-original-name": "Market Data"
    },
    {
      "name": "Thông báo",
      "description": "Thông báo trong ứng dụng",
      "x-original-name": "Notifications"
    },
    {
      "name": "Giới thiệu",
      "description": "Mã giới thiệu, rebate và tổng hợp hoa hồng",
      "x-original-name": "Referral"
    },
    {
      "name": "Chẩn đoán",
      "description": "Endpoint kiểm tra sức khỏe và chẩn đoán hệ thống",
      "x-original-name": "Diagnostics"
    }
  ],
  "paths": {
    "/api/authen/self-service/login/api": {
      "get": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "createLoginFlow",
        "summary": "Tạo luồng đăng nhập",
        "security": [],
        "responses": {
          "200": {
            "description": "self-service flow object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo luồng đăng nhập",
            "sidebarTitle": "Tạo luồng đăng nhập",
            "description": "GET /api/authen/self-service/login/api"
          }
        }
      }
    },
    "/api/authen/self-service/login": {
      "post": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "submitLoginFlow",
        "summary": "Gửi thông tin đăng nhập vào luồng login",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginFlowUpdateRequest"
              }
            }
          },
          "description": "Payload cap nhat self-service flow. Truyen ma flow tren query string va gui cac field bat buoc cua method dang dung."
        },
        "responses": {
          "200": {
            "description": "Dang nhap thanh cong. Ung dung doc session_token trong payload nay va dung no lam token phien dang nhap.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AuthFlowError",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Gửi thông tin đăng nhập vào luồng login",
            "sidebarTitle": "Gửi thông tin đăng nhập vào luồng login",
            "description": "POST /api/authen/self-service/login"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Flow"
          }
        ]
      }
    },
    "/api/authen/sessions/whoami": {
      "get": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "getWhoamiSession",
        "summary": "Lấy phiên xác thực hiện tại",
        "description": "Tra ve session va identity hien tai cho session token truyen trong header X-Session-Token. Bearer JWT don le khong duoc endpoint nay chap nhan tren dev.",
        "security": [
          {
            "sessionToken": []
          }
        ],
        "parameters": [
          {
            "name": "tokenize_as",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "jwt_template_1"
            },
            "description": "Ten tokenizer template de yeu cau response dang tokenized (JWT). Template hien tai tren moi truong nay la jwt_template_1. Khi truyen gia tri nay, response se kem bearer token (JWT) trong field tokenized."
          }
        ],
        "responses": {
          "200": {
            "description": "Current session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy phiên xác thực hiện tại",
            "sidebarTitle": "Lấy phiên xác thực hiện tại",
            "description": "GET /api/authen/sessions/whoami"
          }
        }
      }
    },
    "/api/authen/self-service/registration/api": {
      "get": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "createRegistrationFlow",
        "summary": "Tạo luồng đăng ký",
        "security": [],
        "responses": {
          "200": {
            "description": "self-service flow object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo luồng đăng ký",
            "sidebarTitle": "Tạo luồng đăng ký",
            "description": "GET /api/authen/self-service/registration/api"
          }
        }
      }
    },
    "/api/authen/self-service/registration": {
      "post": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "submitRegistrationFlow",
        "summary": "Gửi dữ liệu đăng ký vào luồng registration",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegistrationFlowUpdateRequest"
              }
            }
          },
          "description": "Payload cap nhat self-service flow. Truyen ma flow tren query string va gui cac field bat buoc cua method dang dung."
        },
        "responses": {
          "200": {
            "description": "Registration flow da duoc xu ly. Response la registration flow moi nhat va co the kem session field neu he thong cho phep tao session ngay.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AuthFlowError",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Gửi dữ liệu đăng ký vào luồng registration",
            "sidebarTitle": "Gửi dữ liệu đăng ký vào luồng registration",
            "description": "POST /api/authen/self-service/registration"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Flow"
          }
        ]
      }
    },
    "/api/authen/self-service/recovery/api": {
      "get": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "createRecoveryFlow",
        "summary": "Tạo luồng khôi phục tài khoản",
        "security": [],
        "responses": {
          "200": {
            "description": "self-service flow object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo luồng khôi phục tài khoản",
            "sidebarTitle": "Tạo luồng khôi phục tài khoản",
            "description": "GET /api/authen/self-service/recovery/api"
          }
        }
      }
    },
    "/api/authen/self-service/recovery": {
      "post": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "updateRecoveryFlow",
        "summary": "Gửi hoặc xác thực mã khôi phục",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RecoveryCodeRequest"
                  },
                  {
                    "$ref": "#/components/schemas/RecoveryVerifyRequest"
                  }
                ]
              }
            }
          },
          "description": "Payload cap nhat self-service flow. Truyen ma flow tren query string va gui cac field bat buoc cua method dang dung."
        },
        "responses": {
          "200": {
            "description": "Recovery flow da duoc cap nhat. Khi challenge thanh cong, response co the tra session_token truc tiep hoac continue_with chua set_session_token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AuthFlowError",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Gửi hoặc xác thực mã khôi phục",
            "sidebarTitle": "Gửi hoặc xác thực mã khôi phục",
            "description": "POST /api/authen/self-service/recovery"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Flow"
          }
        ]
      }
    },
    "/api/authen/self-service/settings/api": {
      "get": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "createSettingsFlow",
        "summary": "Tạo luồng cài đặt để đổi mật khẩu",
        "security": [
          {
            "sessionToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "self-service flow object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo luồng cài đặt để đổi mật khẩu",
            "sidebarTitle": "Tạo luồng cài đặt để đổi mật khẩu",
            "description": "GET /api/authen/self-service/settings/api"
          }
        }
      }
    },
    "/api/authen/self-service/settings": {
      "post": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "updateSettingsFlow",
        "summary": "Cập nhật mật khẩu trong luồng settings",
        "security": [
          {
            "sessionToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsPasswordRequest"
              }
            }
          },
          "description": "Payload cap nhat self-service flow. Truyen ma flow tren query string va gui cac field bat buoc cua method dang dung."
        },
        "responses": {
          "200": {
            "description": "Settings flow da duoc cap nhat. Doi mat khau tra ve settings flow moi nhat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthFlow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/AuthFlowError",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Cập nhật mật khẩu trong luồng settings",
            "sidebarTitle": "Cập nhật mật khẩu trong luồng settings",
            "description": "POST /api/authen/self-service/settings"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Flow"
          }
        ]
      }
    },
    "/api/authen/self-service/logout/api": {
      "delete": {
        "tags": [
          "Xác thực"
        ],
        "operationId": "logout",
        "summary": "Đăng xuất session ứng dụng hiện tại",
        "security": [
          {
            "sessionToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoutRequest"
              }
            }
          },
          "description": "JSON body chua session token can huy."
        },
        "responses": {
          "204": {
            "description": "Session da duoc huy thanh cong. Khong tra ve body."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đăng xuất session ứng dụng hiện tại",
            "sidebarTitle": "Đăng xuất session ứng dụng hiện tại",
            "description": "DELETE /api/authen/self-service/logout/api"
          }
        },
        "description": "Dang xuat session hien tai duoc dinh danh bang header X-Session-Token. Khi test nen dung token sai hoac request sai de verify route ma khong invalidate session that."
      }
    },
    "/api/v1/users/accounts": {
      "get": {
        "tags": [
          "Tài khoản"
        ],
        "operationId": "listAccounts",
        "summary": "Lấy danh sách tài khoản của người dùng hiện tại",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Accounts returned by the account service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Account"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách tài khoản của người dùng hiện tại",
            "sidebarTitle": "Lấy danh sách tài khoản của người dùng hiện tại",
            "description": "GET /api/v1/users/accounts"
          }
        },
        "description": "List accounts for current user."
      }
    },
    "/api/v1/users/accounts/{accountID}/orders/{start_time}/{end_time}": {
      "get": {
        "tags": [
          "Lịch sử",
          "Tài khoản"
        ],
        "operationId": "listAccountOrders",
        "summary": "Lấy danh sách lệnh của tài khoản theo khoảng thời gian",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản giao dịch. Người dùng đang đăng nhập phải có quyền truy cập tài khoản này."
          },
          {
            "name": "start_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "end_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          }
        ],
        "responses": {
          "200": {
            "description": "Order records matching the account and time range.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách lệnh của tài khoản theo khoảng thời gian",
            "sidebarTitle": "Lấy danh sách lệnh của tài khoản theo khoảng thời gian",
            "description": "GET /api/v1/users/accounts/{accountID}/orders/{start_time}/{end_time}"
          }
        },
        "description": "Get account orders in time range."
      }
    },
    "/api/v1/users/accounts/{accountID}/trades/{start_time}/{end_time}": {
      "get": {
        "tags": [
          "Lịch sử",
          "Tài khoản"
        ],
        "operationId": "listAccountTrades",
        "summary": "Lấy danh sách khớp lệnh của tài khoản theo khoảng thời gian",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản giao dịch. Người dùng đang đăng nhập phải có quyền truy cập tài khoản này."
          },
          {
            "name": "start_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "end_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          }
        ],
        "responses": {
          "200": {
            "description": "Trade records matching the account and time range.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Trade"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách khớp lệnh của tài khoản theo khoảng thời gian",
            "sidebarTitle": "Lấy danh sách khớp lệnh của tài khoản theo khoảng thời gian",
            "description": "GET /api/v1/users/accounts/{accountID}/trades/{start_time}/{end_time}"
          }
        },
        "description": "Get account trades in time range."
      }
    },
    "/api/v1/users/accounts/{accountID}/transactions/{start_time}/{end_time}": {
      "get": {
        "tags": [
          "Lịch sử",
          "Tài khoản"
        ],
        "operationId": "listAccountTransactions",
        "summary": "Lấy giao dịch tài khoản theo khoảng thời gian",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản giao dịch. Người dùng đang đăng nhập phải có quyền truy cập tài khoản này."
          },
          {
            "name": "start_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "end_time",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction records matching the account and time range.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Transaction"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy giao dịch tài khoản theo khoảng thời gian",
            "sidebarTitle": "Lấy giao dịch tài khoản theo khoảng thời gian",
            "description": "GET /api/v1/users/accounts/{accountID}/transactions/{start_time}/{end_time}"
          }
        },
        "description": "Get account transactions in time range."
      }
    },
    "/api/v1/users/accounts/{accountID}/equity/withdraw": {
      "post": {
        "tags": [
          "Tài khoản"
        ],
        "operationId": "withdrawEquity",
        "summary": "Rút tiền từ tài khoản",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản giao dịch. Người dùng đang đăng nhập phải có quyền truy cập tài khoản này."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawEquityRequest"
              }
            }
          },
          "description": "Withdrawal payload. amount must be greater than zero and bankId must reference a saved bank account owned by the user."
        },
        "responses": {
          "200": {
            "description": "Withdrawal result and updated account balances.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawEquityResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Rút tiền từ tài khoản",
            "sidebarTitle": "Rút tiền từ tài khoản",
            "description": "POST /api/v1/users/accounts/{accountID}/equity/withdraw"
          }
        },
        "description": "Withdraw account equity."
      }
    },
    "/api/v1/bank-accounts": {
      "get": {
        "tags": [
          "Tài khoản ngân hàng"
        ],
        "operationId": "listBankAccounts",
        "summary": "Lấy danh sách tài khoản ngân hàng đã lưu",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Saved bank accounts for the current user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BankAccount"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách tài khoản ngân hàng đã lưu",
            "sidebarTitle": "Lấy danh sách tài khoản ngân hàng đã lưu",
            "description": "GET /api/v1/bank-accounts"
          }
        },
        "description": "List bank accounts for current user."
      },
      "post": {
        "tags": [
          "Tài khoản ngân hàng"
        ],
        "operationId": "createBankAccount",
        "summary": "Tạo tài khoản ngân hàng",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBankAccountRequest"
              }
            }
          },
          "description": "Bank account creation payload. bankAccountName, bankAccountNumber, and bankCode are required."
        },
        "responses": {
          "200": {
            "description": "Created bank account wrapped in a status envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo tài khoản ngân hàng",
            "sidebarTitle": "Tạo tài khoản ngân hàng",
            "description": "POST /api/v1/bank-accounts"
          }
        },
        "description": "Create a bank account for current user."
      }
    },
    "/api/v1/orders/new/{refOrderID}/{accountID}/{symbol}/{orderSide}/{price}/{qty}/{orderType}": {
      "post": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "placeOrder",
        "summary": "Đặt lệnh mới",
        "description": "Place a normal order. KrakenD forwards the authenticated user from JWT and sends all order fields as path parameters; there is no JSON request body.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "refOrderID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Client-generated order reference used for tracking and duplicate detection."
          },
          {
            "name": "accountID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản giao dịch. Người dùng đang đăng nhập phải có quyền truy cập tài khoản này."
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          },
          {
            "name": "orderSide",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Order side. Accepted values: B for buy, S for sell."
          },
          {
            "name": "price",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Order price. For market-style orders, backend interpretation depends on orderType."
          },
          {
            "name": "qty",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Order quantity in shares/contracts/lots accepted by the broker."
          },
          {
            "name": "orderType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Order type. Common accepted values include LO, MTL, ATO, and ATC."
          }
        ],
        "responses": {
          "200": {
            "description": "Kết quả đặt lệnh thường.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceOrderResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Response thành công",
                    "value": {
                      "isSuccess": true,
                      "detail": "Order placed successfully",
                      "data": "ORDER-V1StGXR8_Z5jdHi6B-myT"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đặt lệnh mới",
            "sidebarTitle": "Đặt lệnh mới",
            "description": "POST /api/v1/orders/new/{refOrderID}/{accountID}/{symbol}/{orderSide}/{price}/{qty}/{orderType}"
          }
        }
      }
    },
    "/api/v1/orders/cancel/{orderID}": {
      "post": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "cancelOrder",
        "summary": "Hủy lệnh",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã lệnh do hệ thống order service trả về."
          }
        ],
        "responses": {
          "200": {
            "description": "Kết quả hủy lệnh.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelOrderResponse"
                },
                "examples": {
                  "normalOrder": {
                    "summary": "Hủy lệnh thường",
                    "value": {
                      "isSuccess": true,
                      "detail": "Order cancelled successfully",
                      "data": "ORDER-V1StGXR8_Z5jdHi6B-myT"
                    }
                  },
                  "stopOrder": {
                    "summary": "Hủy stop-order qua route này",
                    "value": {
                      "isSuccess": true,
                      "detail": "Stop order cancelled successfully",
                      "data": "{\"orderId\":\"STOP-V1StGXR8_Z5jdHi6B-myT\",\"status\":\"CANCELLED\"}"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Hủy lệnh",
            "sidebarTitle": "Hủy lệnh",
            "description": "POST /api/v1/orders/cancel/{orderID}"
          }
        },
        "description": "Hủy một lệnh theo mã định danh. Dùng endpoint này cho lệnh thường, lệnh stop-loss hoặc bracket order khi có mã lệnh tương ứng."
      }
    },
    "/api/v1/orders/execution-reports": {
      "get": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "listExecutionReports",
        "summary": "Lấy báo cáo thực thi lệnh của người dùng hiện tại",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Order execution reports for accounts available to the current user.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy báo cáo thực thi lệnh của người dùng hiện tại",
            "sidebarTitle": "Lấy báo cáo thực thi lệnh của người dùng hiện tại",
            "description": "GET /api/v1/orders/execution-reports"
          }
        },
        "description": "Get execution reports for current user."
      }
    },
    "/api/v1/MarketData/GetWatchList/{watchlist_id}": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getWatchList",
        "summary": "Lấy watchlist theo id",
        "security": [],
        "parameters": [
          {
            "name": "watchlist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Watchlist identifier used by the market-data service."
          }
        ],
        "responses": {
          "200": {
            "description": "Response watchlist với payload data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Định danh watchlist."
                        },
                        "name": {
                          "type": "string",
                          "description": "Tên hiển thị của watchlist."
                        },
                        "symbols": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "symbol": {
                                "type": "string",
                                "description": "Mã giao dịch."
                              },
                              "companyName": {
                                "type": "string",
                                "description": "Tên công ty hoặc tên công cụ giao dịch."
                              },
                              "sectorLvl1": {
                                "type": "string",
                                "description": "Phân ngành cấp 1."
                              },
                              "sectorLvl2": {
                                "type": "string",
                                "description": "Phân ngành cấp 2."
                              },
                              "sectorLvl3": {
                                "type": "string",
                                "description": "Phân ngành cấp 3."
                              },
                              "industryName": {
                                "type": "string",
                                "description": "Tên ngành do market-data trả về."
                              },
                              "logoId": {
                                "type": "string",
                                "description": "Định danh logo dùng bởi client."
                              },
                              "news": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true,
                                  "description": "Tin tức liên quan đến mã khi market-data service trả về news."
                                },
                                "description": "Các tin tức liên quan đến mã."
                              },
                              "sentiment": {
                                "type": "object",
                                "properties": {
                                  "bullish": {
                                    "type": "number",
                                    "description": "Điểm/số lượng sentiment bullish."
                                  },
                                  "bullishPercent": {
                                    "type": "number",
                                    "description": "Tỷ lệ phần trăm sentiment bullish."
                                  },
                                  "bullishTime": {
                                    "type": "number",
                                    "description": "Timestamp hoặc thời điểm tổng hợp sentiment bullish."
                                  },
                                  "bearish": {
                                    "type": "number",
                                    "description": "Điểm/số lượng sentiment bearish."
                                  },
                                  "bearishPercent": {
                                    "type": "number",
                                    "description": "Tỷ lệ phần trăm sentiment bearish."
                                  },
                                  "bearishTime": {
                                    "type": "number",
                                    "description": "Timestamp hoặc thời điểm tổng hợp sentiment bearish."
                                  }
                                },
                                "additionalProperties": true,
                                "nullable": true
                              },
                              "info": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Định danh công cụ trong market-data."
                                  },
                                  "seq": {
                                    "type": "number",
                                    "description": "Số sequence của quote."
                                  },
                                  "time": {
                                    "type": "number",
                                    "description": "Timestamp quote dạng Unix milliseconds."
                                  },
                                  "symbol": {
                                    "type": "string",
                                    "description": "Mã giao dịch."
                                  },
                                  "boardID": {
                                    "type": "string",
                                    "description": "Mã bảng giao dịch."
                                  },
                                  "nomiPrc": {
                                    "type": "number",
                                    "description": "Giá tham chiếu hoặc giá nominal."
                                  },
                                  "ceilPrc": {
                                    "type": "number",
                                    "description": "Giá trần trong phiên."
                                  },
                                  "floorPrc": {
                                    "type": "number",
                                    "description": "Giá sàn trong phiên."
                                  },
                                  "lsPrc": {
                                    "type": "number",
                                    "description": "Giá khớp cuối."
                                  },
                                  "lsVol": {
                                    "type": "number",
                                    "description": "Khối lượng khớp cuối."
                                  },
                                  "openPrc": {
                                    "type": "number",
                                    "description": "Giá mở cửa."
                                  },
                                  "closePrc": {
                                    "type": "number",
                                    "description": "Giá đóng cửa khi có."
                                  },
                                  "highPrc": {
                                    "type": "number",
                                    "description": "Giá cao nhất trong phiên."
                                  },
                                  "lowPrc": {
                                    "type": "number",
                                    "description": "Giá thấp nhất trong phiên."
                                  },
                                  "vWAP": {
                                    "type": "number",
                                    "description": "Giá trung bình gia quyền theo khối lượng."
                                  },
                                  "totVol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng giao dịch."
                                  },
                                  "totVal": {
                                    "type": "number",
                                    "description": "Tổng giá trị giao dịch."
                                  },
                                  "tradingSession": {
                                    "type": "string",
                                    "description": "Mã phiên giao dịch."
                                  },
                                  "openInterest": {
                                    "type": "number",
                                    "description": "Open interest cho phái sinh khi có."
                                  }
                                },
                                "additionalProperties": true,
                                "nullable": true
                              },
                              "stat": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Định danh static của công cụ."
                                  },
                                  "symbol": {
                                    "type": "string",
                                    "description": "Mã giao dịch."
                                  },
                                  "type": {
                                    "type": "string",
                                    "description": "Loại chứng khoán/công cụ."
                                  },
                                  "lot": {
                                    "type": "number",
                                    "description": "Lô giao dịch chuẩn."
                                  },
                                  "minQty": {
                                    "type": "number",
                                    "description": "Khối lượng đặt lệnh tối thiểu."
                                  },
                                  "maxQty": {
                                    "type": "number",
                                    "description": "Khối lượng đặt lệnh tối đa."
                                  },
                                  "prcStep": {
                                    "type": "number",
                                    "description": "Bước giá tối thiểu."
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Tên ngắn của công cụ."
                                  },
                                  "productGroupID": {
                                    "type": "string",
                                    "description": "Mã nhóm sản phẩm từ sở giao dịch."
                                  },
                                  "tickerCode": {
                                    "type": "string",
                                    "description": "Ticker code do sở giao dịch sử dụng."
                                  },
                                  "symbolName": {
                                    "type": "string",
                                    "description": "Tên đầy đủ của mã khi có."
                                  },
                                  "underlyingSymbolCode": {
                                    "type": "string",
                                    "description": "Mã tài sản cơ sở cho phái sinh hoặc sản phẩm cấu trúc."
                                  },
                                  "expirationDate": {
                                    "type": "string",
                                    "description": "Ngày đáo hạn cho phái sinh khi có."
                                  },
                                  "contractSize": {
                                    "type": "number",
                                    "description": "Quy mô hợp đồng cho phái sinh khi có."
                                  }
                                },
                                "additionalProperties": true,
                                "nullable": true
                              },
                              "depth": {
                                "type": "object",
                                "properties": {
                                  "seq": {
                                    "type": "number",
                                    "description": "Số sequence của sổ lệnh."
                                  },
                                  "time": {
                                    "type": "number",
                                    "description": "Timestamp sổ lệnh dạng Unix milliseconds."
                                  },
                                  "symbol": {
                                    "type": "string",
                                    "description": "Mã giao dịch."
                                  },
                                  "boardID": {
                                    "type": "string",
                                    "description": "Mã bảng giao dịch."
                                  },
                                  "bidPriceDepth": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "prc": {
                                          "type": "number",
                                          "description": "Mức giá."
                                        },
                                        "vol": {
                                          "type": "number",
                                          "description": "Tổng khối lượng tại mức giá."
                                        }
                                      },
                                      "additionalProperties": true
                                    },
                                    "description": "Các mức giá mua tốt nhất."
                                  },
                                  "askPriceDepth": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "prc": {
                                          "type": "number",
                                          "description": "Mức giá."
                                        },
                                        "vol": {
                                          "type": "number",
                                          "description": "Tổng khối lượng tại mức giá."
                                        }
                                      },
                                      "additionalProperties": true
                                    },
                                    "description": "Các mức giá bán tốt nhất."
                                  }
                                },
                                "additionalProperties": true,
                                "nullable": true
                              },
                              "trend": {
                                "type": "object",
                                "properties": {
                                  "buyUp": {
                                    "type": "object",
                                    "properties": {
                                      "symbol": {
                                        "type": "string",
                                        "description": "Mã giao dịch."
                                      },
                                      "way": {
                                        "type": "number",
                                        "description": "Mã chiều giao dịch."
                                      },
                                      "vwapPrice": {
                                        "type": "number",
                                        "description": "VWAP của chiều giao dịch này."
                                      },
                                      "totalValue": {
                                        "type": "number",
                                        "description": "Tổng giá trị giao dịch của chiều này."
                                      },
                                      "totalVol": {
                                        "type": "number",
                                        "description": "Tổng khối lượng giao dịch của chiều này."
                                      },
                                      "tradeCount": {
                                        "type": "number",
                                        "description": "Số lượng giao dịch của chiều này."
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "sellDown": {
                                    "type": "object",
                                    "properties": {
                                      "symbol": {
                                        "type": "string",
                                        "description": "Mã giao dịch."
                                      },
                                      "way": {
                                        "type": "number",
                                        "description": "Mã chiều giao dịch."
                                      },
                                      "vwapPrice": {
                                        "type": "number",
                                        "description": "VWAP của chiều giao dịch này."
                                      },
                                      "totalValue": {
                                        "type": "number",
                                        "description": "Tổng giá trị giao dịch của chiều này."
                                      },
                                      "totalVol": {
                                        "type": "number",
                                        "description": "Tổng khối lượng giao dịch của chiều này."
                                      },
                                      "tradeCount": {
                                        "type": "number",
                                        "description": "Số lượng giao dịch của chiều này."
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "buyUpPct": {
                                    "type": "number",
                                    "description": "Tỷ lệ volume/value thuộc nhóm buy-up."
                                  },
                                  "sellDownPct": {
                                    "type": "number",
                                    "description": "Tỷ lệ volume/value thuộc nhóm sell-down."
                                  },
                                  "gapValue": {
                                    "type": "number",
                                    "description": "Chênh lệch giá trị giao dịch giữa buy-up và sell-down."
                                  }
                                },
                                "additionalProperties": true,
                                "nullable": true
                              }
                            },
                            "additionalProperties": true
                          },
                          "description": "Danh sách mã trong watchlist."
                        }
                      },
                      "additionalProperties": true,
                      "description": "Object watchlist gồm id, name và danh sách symbols."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy watchlist theo id",
            "sidebarTitle": "Lấy watchlist theo id",
            "description": "GET /api/v1/MarketData/GetWatchList/{watchlist_id}"
          }
        },
        "description": "Get market-data watchlist by id/filter."
      }
    },
    "/api/v1/MarketData/GetVN30Spot": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getVN30Spot",
        "summary": "Lấy mã VN30 spot mặc định",
        "security": [],
        "responses": {
          "200": {
            "description": "Response dữ liệu mã với payload data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "string",
                          "description": "Mã giao dịch."
                        },
                        "companyName": {
                          "type": "string",
                          "description": "Tên công ty hoặc tên công cụ giao dịch."
                        },
                        "sectorLvl1": {
                          "type": "string",
                          "description": "Phân ngành cấp 1."
                        },
                        "sectorLvl2": {
                          "type": "string",
                          "description": "Phân ngành cấp 2."
                        },
                        "sectorLvl3": {
                          "type": "string",
                          "description": "Phân ngành cấp 3."
                        },
                        "industryName": {
                          "type": "string",
                          "description": "Tên ngành do market-data trả về."
                        },
                        "logoId": {
                          "type": "string",
                          "description": "Định danh logo dùng bởi client."
                        },
                        "news": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Tin tức liên quan đến mã khi market-data service trả về news."
                          },
                          "description": "Các tin tức liên quan đến mã."
                        },
                        "sentiment": {
                          "type": "object",
                          "properties": {
                            "bullish": {
                              "type": "number",
                              "description": "Điểm/số lượng sentiment bullish."
                            },
                            "bullishPercent": {
                              "type": "number",
                              "description": "Tỷ lệ phần trăm sentiment bullish."
                            },
                            "bullishTime": {
                              "type": "number",
                              "description": "Timestamp hoặc thời điểm tổng hợp sentiment bullish."
                            },
                            "bearish": {
                              "type": "number",
                              "description": "Điểm/số lượng sentiment bearish."
                            },
                            "bearishPercent": {
                              "type": "number",
                              "description": "Tỷ lệ phần trăm sentiment bearish."
                            },
                            "bearishTime": {
                              "type": "number",
                              "description": "Timestamp hoặc thời điểm tổng hợp sentiment bearish."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "info": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Định danh công cụ trong market-data."
                            },
                            "seq": {
                              "type": "number",
                              "description": "Số sequence của quote."
                            },
                            "time": {
                              "type": "number",
                              "description": "Timestamp quote dạng Unix milliseconds."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "boardID": {
                              "type": "string",
                              "description": "Mã bảng giao dịch."
                            },
                            "nomiPrc": {
                              "type": "number",
                              "description": "Giá tham chiếu hoặc giá nominal."
                            },
                            "ceilPrc": {
                              "type": "number",
                              "description": "Giá trần trong phiên."
                            },
                            "floorPrc": {
                              "type": "number",
                              "description": "Giá sàn trong phiên."
                            },
                            "lsPrc": {
                              "type": "number",
                              "description": "Giá khớp cuối."
                            },
                            "lsVol": {
                              "type": "number",
                              "description": "Khối lượng khớp cuối."
                            },
                            "openPrc": {
                              "type": "number",
                              "description": "Giá mở cửa."
                            },
                            "closePrc": {
                              "type": "number",
                              "description": "Giá đóng cửa khi có."
                            },
                            "highPrc": {
                              "type": "number",
                              "description": "Giá cao nhất trong phiên."
                            },
                            "lowPrc": {
                              "type": "number",
                              "description": "Giá thấp nhất trong phiên."
                            },
                            "vWAP": {
                              "type": "number",
                              "description": "Giá trung bình gia quyền theo khối lượng."
                            },
                            "totVol": {
                              "type": "number",
                              "description": "Tổng khối lượng giao dịch."
                            },
                            "totVal": {
                              "type": "number",
                              "description": "Tổng giá trị giao dịch."
                            },
                            "tradingSession": {
                              "type": "string",
                              "description": "Mã phiên giao dịch."
                            },
                            "openInterest": {
                              "type": "number",
                              "description": "Open interest cho phái sinh khi có."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "stat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Định danh static của công cụ."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "type": {
                              "type": "string",
                              "description": "Loại chứng khoán/công cụ."
                            },
                            "lot": {
                              "type": "number",
                              "description": "Lô giao dịch chuẩn."
                            },
                            "minQty": {
                              "type": "number",
                              "description": "Khối lượng đặt lệnh tối thiểu."
                            },
                            "maxQty": {
                              "type": "number",
                              "description": "Khối lượng đặt lệnh tối đa."
                            },
                            "prcStep": {
                              "type": "number",
                              "description": "Bước giá tối thiểu."
                            },
                            "name": {
                              "type": "string",
                              "description": "Tên ngắn của công cụ."
                            },
                            "productGroupID": {
                              "type": "string",
                              "description": "Mã nhóm sản phẩm từ sở giao dịch."
                            },
                            "tickerCode": {
                              "type": "string",
                              "description": "Ticker code do sở giao dịch sử dụng."
                            },
                            "symbolName": {
                              "type": "string",
                              "description": "Tên đầy đủ của mã khi có."
                            },
                            "underlyingSymbolCode": {
                              "type": "string",
                              "description": "Mã tài sản cơ sở cho phái sinh hoặc sản phẩm cấu trúc."
                            },
                            "expirationDate": {
                              "type": "string",
                              "description": "Ngày đáo hạn cho phái sinh khi có."
                            },
                            "contractSize": {
                              "type": "number",
                              "description": "Quy mô hợp đồng cho phái sinh khi có."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "depth": {
                          "type": "object",
                          "properties": {
                            "seq": {
                              "type": "number",
                              "description": "Số sequence của sổ lệnh."
                            },
                            "time": {
                              "type": "number",
                              "description": "Timestamp sổ lệnh dạng Unix milliseconds."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "boardID": {
                              "type": "string",
                              "description": "Mã bảng giao dịch."
                            },
                            "bidPriceDepth": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "prc": {
                                    "type": "number",
                                    "description": "Mức giá."
                                  },
                                  "vol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng tại mức giá."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "description": "Các mức giá mua tốt nhất."
                            },
                            "askPriceDepth": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "prc": {
                                    "type": "number",
                                    "description": "Mức giá."
                                  },
                                  "vol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng tại mức giá."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "description": "Các mức giá bán tốt nhất."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "trend": {
                          "type": "object",
                          "properties": {
                            "buyUp": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string",
                                  "description": "Mã giao dịch."
                                },
                                "way": {
                                  "type": "number",
                                  "description": "Mã chiều giao dịch."
                                },
                                "vwapPrice": {
                                  "type": "number",
                                  "description": "VWAP của chiều giao dịch này."
                                },
                                "totalValue": {
                                  "type": "number",
                                  "description": "Tổng giá trị giao dịch của chiều này."
                                },
                                "totalVol": {
                                  "type": "number",
                                  "description": "Tổng khối lượng giao dịch của chiều này."
                                },
                                "tradeCount": {
                                  "type": "number",
                                  "description": "Số lượng giao dịch của chiều này."
                                }
                              },
                              "additionalProperties": true
                            },
                            "sellDown": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string",
                                  "description": "Mã giao dịch."
                                },
                                "way": {
                                  "type": "number",
                                  "description": "Mã chiều giao dịch."
                                },
                                "vwapPrice": {
                                  "type": "number",
                                  "description": "VWAP của chiều giao dịch này."
                                },
                                "totalValue": {
                                  "type": "number",
                                  "description": "Tổng giá trị giao dịch của chiều này."
                                },
                                "totalVol": {
                                  "type": "number",
                                  "description": "Tổng khối lượng giao dịch của chiều này."
                                },
                                "tradeCount": {
                                  "type": "number",
                                  "description": "Số lượng giao dịch của chiều này."
                                }
                              },
                              "additionalProperties": true
                            },
                            "buyUpPct": {
                              "type": "number",
                              "description": "Tỷ lệ volume/value thuộc nhóm buy-up."
                            },
                            "sellDownPct": {
                              "type": "number",
                              "description": "Tỷ lệ volume/value thuộc nhóm sell-down."
                            },
                            "gapValue": {
                              "type": "number",
                              "description": "Chênh lệch giá trị giao dịch giữa buy-up và sell-down."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        }
                      },
                      "additionalProperties": true,
                      "description": "Snapshot mã gồm thông tin master, quote, depth và trend."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy mã VN30 spot mặc định",
            "sidebarTitle": "Lấy mã VN30 spot mặc định",
            "description": "GET /api/v1/MarketData/GetVN30Spot"
          }
        },
        "description": "Get VN30 spot data."
      }
    },
    "/api/v1/MarketData/GetSymbolSearch/{search}": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "searchSymbols",
        "summary": "Tìm kiếm mã giao dịch",
        "security": [],
        "parameters": [
          {
            "name": "search",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search term used to match symbol, ticker, or company name."
          }
        ],
        "responses": {
          "200": {
            "description": "Response tìm kiếm mã với mảng data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string",
                            "description": "Mã giao dịch."
                          },
                          "companyName": {
                            "type": "string",
                            "description": "Tên công ty hoặc tên công cụ giao dịch."
                          },
                          "sectorLvl1": {
                            "type": "string",
                            "description": "Phân ngành cấp 1."
                          },
                          "sectorLvl2": {
                            "type": "string",
                            "description": "Phân ngành cấp 2."
                          },
                          "sectorLvl3": {
                            "type": "string",
                            "description": "Phân ngành cấp 3."
                          },
                          "industryName": {
                            "type": "string",
                            "description": "Tên ngành do market-data trả về."
                          },
                          "logoId": {
                            "type": "string",
                            "description": "Định danh logo dùng bởi client."
                          },
                          "news": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "Tin tức liên quan đến mã khi market-data service trả về news."
                            },
                            "description": "Các tin tức liên quan đến mã."
                          },
                          "sentiment": {
                            "type": "object",
                            "properties": {
                              "bullish": {
                                "type": "number",
                                "description": "Điểm/số lượng sentiment bullish."
                              },
                              "bullishPercent": {
                                "type": "number",
                                "description": "Tỷ lệ phần trăm sentiment bullish."
                              },
                              "bullishTime": {
                                "type": "number",
                                "description": "Timestamp hoặc thời điểm tổng hợp sentiment bullish."
                              },
                              "bearish": {
                                "type": "number",
                                "description": "Điểm/số lượng sentiment bearish."
                              },
                              "bearishPercent": {
                                "type": "number",
                                "description": "Tỷ lệ phần trăm sentiment bearish."
                              },
                              "bearishTime": {
                                "type": "number",
                                "description": "Timestamp hoặc thời điểm tổng hợp sentiment bearish."
                              }
                            },
                            "additionalProperties": true,
                            "nullable": true
                          },
                          "info": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Định danh công cụ trong market-data."
                              },
                              "seq": {
                                "type": "number",
                                "description": "Số sequence của quote."
                              },
                              "time": {
                                "type": "number",
                                "description": "Timestamp quote dạng Unix milliseconds."
                              },
                              "symbol": {
                                "type": "string",
                                "description": "Mã giao dịch."
                              },
                              "boardID": {
                                "type": "string",
                                "description": "Mã bảng giao dịch."
                              },
                              "nomiPrc": {
                                "type": "number",
                                "description": "Giá tham chiếu hoặc giá nominal."
                              },
                              "ceilPrc": {
                                "type": "number",
                                "description": "Giá trần trong phiên."
                              },
                              "floorPrc": {
                                "type": "number",
                                "description": "Giá sàn trong phiên."
                              },
                              "lsPrc": {
                                "type": "number",
                                "description": "Giá khớp cuối."
                              },
                              "lsVol": {
                                "type": "number",
                                "description": "Khối lượng khớp cuối."
                              },
                              "openPrc": {
                                "type": "number",
                                "description": "Giá mở cửa."
                              },
                              "closePrc": {
                                "type": "number",
                                "description": "Giá đóng cửa khi có."
                              },
                              "highPrc": {
                                "type": "number",
                                "description": "Giá cao nhất trong phiên."
                              },
                              "lowPrc": {
                                "type": "number",
                                "description": "Giá thấp nhất trong phiên."
                              },
                              "vWAP": {
                                "type": "number",
                                "description": "Giá trung bình gia quyền theo khối lượng."
                              },
                              "totVol": {
                                "type": "number",
                                "description": "Tổng khối lượng giao dịch."
                              },
                              "totVal": {
                                "type": "number",
                                "description": "Tổng giá trị giao dịch."
                              },
                              "tradingSession": {
                                "type": "string",
                                "description": "Mã phiên giao dịch."
                              },
                              "openInterest": {
                                "type": "number",
                                "description": "Open interest cho phái sinh khi có."
                              }
                            },
                            "additionalProperties": true,
                            "nullable": true
                          },
                          "stat": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Định danh static của công cụ."
                              },
                              "symbol": {
                                "type": "string",
                                "description": "Mã giao dịch."
                              },
                              "type": {
                                "type": "string",
                                "description": "Loại chứng khoán/công cụ."
                              },
                              "lot": {
                                "type": "number",
                                "description": "Lô giao dịch chuẩn."
                              },
                              "minQty": {
                                "type": "number",
                                "description": "Khối lượng đặt lệnh tối thiểu."
                              },
                              "maxQty": {
                                "type": "number",
                                "description": "Khối lượng đặt lệnh tối đa."
                              },
                              "prcStep": {
                                "type": "number",
                                "description": "Bước giá tối thiểu."
                              },
                              "name": {
                                "type": "string",
                                "description": "Tên ngắn của công cụ."
                              },
                              "productGroupID": {
                                "type": "string",
                                "description": "Mã nhóm sản phẩm từ sở giao dịch."
                              },
                              "tickerCode": {
                                "type": "string",
                                "description": "Ticker code do sở giao dịch sử dụng."
                              },
                              "symbolName": {
                                "type": "string",
                                "description": "Tên đầy đủ của mã khi có."
                              },
                              "underlyingSymbolCode": {
                                "type": "string",
                                "description": "Mã tài sản cơ sở cho phái sinh hoặc sản phẩm cấu trúc."
                              },
                              "expirationDate": {
                                "type": "string",
                                "description": "Ngày đáo hạn cho phái sinh khi có."
                              },
                              "contractSize": {
                                "type": "number",
                                "description": "Quy mô hợp đồng cho phái sinh khi có."
                              }
                            },
                            "additionalProperties": true,
                            "nullable": true
                          },
                          "depth": {
                            "type": "object",
                            "properties": {
                              "seq": {
                                "type": "number",
                                "description": "Số sequence của sổ lệnh."
                              },
                              "time": {
                                "type": "number",
                                "description": "Timestamp sổ lệnh dạng Unix milliseconds."
                              },
                              "symbol": {
                                "type": "string",
                                "description": "Mã giao dịch."
                              },
                              "boardID": {
                                "type": "string",
                                "description": "Mã bảng giao dịch."
                              },
                              "bidPriceDepth": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "prc": {
                                      "type": "number",
                                      "description": "Mức giá."
                                    },
                                    "vol": {
                                      "type": "number",
                                      "description": "Tổng khối lượng tại mức giá."
                                    }
                                  },
                                  "additionalProperties": true
                                },
                                "description": "Các mức giá mua tốt nhất."
                              },
                              "askPriceDepth": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "prc": {
                                      "type": "number",
                                      "description": "Mức giá."
                                    },
                                    "vol": {
                                      "type": "number",
                                      "description": "Tổng khối lượng tại mức giá."
                                    }
                                  },
                                  "additionalProperties": true
                                },
                                "description": "Các mức giá bán tốt nhất."
                              }
                            },
                            "additionalProperties": true,
                            "nullable": true
                          },
                          "trend": {
                            "type": "object",
                            "properties": {
                              "buyUp": {
                                "type": "object",
                                "properties": {
                                  "symbol": {
                                    "type": "string",
                                    "description": "Mã giao dịch."
                                  },
                                  "way": {
                                    "type": "number",
                                    "description": "Mã chiều giao dịch."
                                  },
                                  "vwapPrice": {
                                    "type": "number",
                                    "description": "VWAP của chiều giao dịch này."
                                  },
                                  "totalValue": {
                                    "type": "number",
                                    "description": "Tổng giá trị giao dịch của chiều này."
                                  },
                                  "totalVol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng giao dịch của chiều này."
                                  },
                                  "tradeCount": {
                                    "type": "number",
                                    "description": "Số lượng giao dịch của chiều này."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "sellDown": {
                                "type": "object",
                                "properties": {
                                  "symbol": {
                                    "type": "string",
                                    "description": "Mã giao dịch."
                                  },
                                  "way": {
                                    "type": "number",
                                    "description": "Mã chiều giao dịch."
                                  },
                                  "vwapPrice": {
                                    "type": "number",
                                    "description": "VWAP của chiều giao dịch này."
                                  },
                                  "totalValue": {
                                    "type": "number",
                                    "description": "Tổng giá trị giao dịch của chiều này."
                                  },
                                  "totalVol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng giao dịch của chiều này."
                                  },
                                  "tradeCount": {
                                    "type": "number",
                                    "description": "Số lượng giao dịch của chiều này."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "buyUpPct": {
                                "type": "number",
                                "description": "Tỷ lệ volume/value thuộc nhóm buy-up."
                              },
                              "sellDownPct": {
                                "type": "number",
                                "description": "Tỷ lệ volume/value thuộc nhóm sell-down."
                              },
                              "gapValue": {
                                "type": "number",
                                "description": "Chênh lệch giá trị giao dịch giữa buy-up và sell-down."
                              }
                            },
                            "additionalProperties": true,
                            "nullable": true
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách mã khớp từ khóa tìm kiếm."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tìm kiếm mã giao dịch",
            "sidebarTitle": "Tìm kiếm mã giao dịch",
            "description": "GET /api/v1/MarketData/GetSymbolSearch/{search}"
          }
        },
        "description": "Search symbols."
      }
    },
    "/api/v1/MarketData/GetProductMaster/{symbol}": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getProductMaster",
        "summary": "Lấy dữ liệu product master theo mã",
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          }
        ],
        "responses": {
          "200": {
            "description": "Response dữ liệu mã với payload data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "string",
                          "description": "Mã giao dịch."
                        },
                        "companyName": {
                          "type": "string",
                          "description": "Tên công ty hoặc tên công cụ giao dịch."
                        },
                        "sectorLvl1": {
                          "type": "string",
                          "description": "Phân ngành cấp 1."
                        },
                        "sectorLvl2": {
                          "type": "string",
                          "description": "Phân ngành cấp 2."
                        },
                        "sectorLvl3": {
                          "type": "string",
                          "description": "Phân ngành cấp 3."
                        },
                        "industryName": {
                          "type": "string",
                          "description": "Tên ngành do market-data trả về."
                        },
                        "logoId": {
                          "type": "string",
                          "description": "Định danh logo dùng bởi client."
                        },
                        "news": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Tin tức liên quan đến mã khi market-data service trả về news."
                          },
                          "description": "Các tin tức liên quan đến mã."
                        },
                        "sentiment": {
                          "type": "object",
                          "properties": {
                            "bullish": {
                              "type": "number",
                              "description": "Điểm/số lượng sentiment bullish."
                            },
                            "bullishPercent": {
                              "type": "number",
                              "description": "Tỷ lệ phần trăm sentiment bullish."
                            },
                            "bullishTime": {
                              "type": "number",
                              "description": "Timestamp hoặc thời điểm tổng hợp sentiment bullish."
                            },
                            "bearish": {
                              "type": "number",
                              "description": "Điểm/số lượng sentiment bearish."
                            },
                            "bearishPercent": {
                              "type": "number",
                              "description": "Tỷ lệ phần trăm sentiment bearish."
                            },
                            "bearishTime": {
                              "type": "number",
                              "description": "Timestamp hoặc thời điểm tổng hợp sentiment bearish."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "info": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Định danh công cụ trong market-data."
                            },
                            "seq": {
                              "type": "number",
                              "description": "Số sequence của quote."
                            },
                            "time": {
                              "type": "number",
                              "description": "Timestamp quote dạng Unix milliseconds."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "boardID": {
                              "type": "string",
                              "description": "Mã bảng giao dịch."
                            },
                            "nomiPrc": {
                              "type": "number",
                              "description": "Giá tham chiếu hoặc giá nominal."
                            },
                            "ceilPrc": {
                              "type": "number",
                              "description": "Giá trần trong phiên."
                            },
                            "floorPrc": {
                              "type": "number",
                              "description": "Giá sàn trong phiên."
                            },
                            "lsPrc": {
                              "type": "number",
                              "description": "Giá khớp cuối."
                            },
                            "lsVol": {
                              "type": "number",
                              "description": "Khối lượng khớp cuối."
                            },
                            "openPrc": {
                              "type": "number",
                              "description": "Giá mở cửa."
                            },
                            "closePrc": {
                              "type": "number",
                              "description": "Giá đóng cửa khi có."
                            },
                            "highPrc": {
                              "type": "number",
                              "description": "Giá cao nhất trong phiên."
                            },
                            "lowPrc": {
                              "type": "number",
                              "description": "Giá thấp nhất trong phiên."
                            },
                            "vWAP": {
                              "type": "number",
                              "description": "Giá trung bình gia quyền theo khối lượng."
                            },
                            "totVol": {
                              "type": "number",
                              "description": "Tổng khối lượng giao dịch."
                            },
                            "totVal": {
                              "type": "number",
                              "description": "Tổng giá trị giao dịch."
                            },
                            "tradingSession": {
                              "type": "string",
                              "description": "Mã phiên giao dịch."
                            },
                            "openInterest": {
                              "type": "number",
                              "description": "Open interest cho phái sinh khi có."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "stat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Định danh static của công cụ."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "type": {
                              "type": "string",
                              "description": "Loại chứng khoán/công cụ."
                            },
                            "lot": {
                              "type": "number",
                              "description": "Lô giao dịch chuẩn."
                            },
                            "minQty": {
                              "type": "number",
                              "description": "Khối lượng đặt lệnh tối thiểu."
                            },
                            "maxQty": {
                              "type": "number",
                              "description": "Khối lượng đặt lệnh tối đa."
                            },
                            "prcStep": {
                              "type": "number",
                              "description": "Bước giá tối thiểu."
                            },
                            "name": {
                              "type": "string",
                              "description": "Tên ngắn của công cụ."
                            },
                            "productGroupID": {
                              "type": "string",
                              "description": "Mã nhóm sản phẩm từ sở giao dịch."
                            },
                            "tickerCode": {
                              "type": "string",
                              "description": "Ticker code do sở giao dịch sử dụng."
                            },
                            "symbolName": {
                              "type": "string",
                              "description": "Tên đầy đủ của mã khi có."
                            },
                            "underlyingSymbolCode": {
                              "type": "string",
                              "description": "Mã tài sản cơ sở cho phái sinh hoặc sản phẩm cấu trúc."
                            },
                            "expirationDate": {
                              "type": "string",
                              "description": "Ngày đáo hạn cho phái sinh khi có."
                            },
                            "contractSize": {
                              "type": "number",
                              "description": "Quy mô hợp đồng cho phái sinh khi có."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "depth": {
                          "type": "object",
                          "properties": {
                            "seq": {
                              "type": "number",
                              "description": "Số sequence của sổ lệnh."
                            },
                            "time": {
                              "type": "number",
                              "description": "Timestamp sổ lệnh dạng Unix milliseconds."
                            },
                            "symbol": {
                              "type": "string",
                              "description": "Mã giao dịch."
                            },
                            "boardID": {
                              "type": "string",
                              "description": "Mã bảng giao dịch."
                            },
                            "bidPriceDepth": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "prc": {
                                    "type": "number",
                                    "description": "Mức giá."
                                  },
                                  "vol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng tại mức giá."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "description": "Các mức giá mua tốt nhất."
                            },
                            "askPriceDepth": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "prc": {
                                    "type": "number",
                                    "description": "Mức giá."
                                  },
                                  "vol": {
                                    "type": "number",
                                    "description": "Tổng khối lượng tại mức giá."
                                  }
                                },
                                "additionalProperties": true
                              },
                              "description": "Các mức giá bán tốt nhất."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "trend": {
                          "type": "object",
                          "properties": {
                            "buyUp": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string",
                                  "description": "Mã giao dịch."
                                },
                                "way": {
                                  "type": "number",
                                  "description": "Mã chiều giao dịch."
                                },
                                "vwapPrice": {
                                  "type": "number",
                                  "description": "VWAP của chiều giao dịch này."
                                },
                                "totalValue": {
                                  "type": "number",
                                  "description": "Tổng giá trị giao dịch của chiều này."
                                },
                                "totalVol": {
                                  "type": "number",
                                  "description": "Tổng khối lượng giao dịch của chiều này."
                                },
                                "tradeCount": {
                                  "type": "number",
                                  "description": "Số lượng giao dịch của chiều này."
                                }
                              },
                              "additionalProperties": true
                            },
                            "sellDown": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string",
                                  "description": "Mã giao dịch."
                                },
                                "way": {
                                  "type": "number",
                                  "description": "Mã chiều giao dịch."
                                },
                                "vwapPrice": {
                                  "type": "number",
                                  "description": "VWAP của chiều giao dịch này."
                                },
                                "totalValue": {
                                  "type": "number",
                                  "description": "Tổng giá trị giao dịch của chiều này."
                                },
                                "totalVol": {
                                  "type": "number",
                                  "description": "Tổng khối lượng giao dịch của chiều này."
                                },
                                "tradeCount": {
                                  "type": "number",
                                  "description": "Số lượng giao dịch của chiều này."
                                }
                              },
                              "additionalProperties": true
                            },
                            "buyUpPct": {
                              "type": "number",
                              "description": "Tỷ lệ volume/value thuộc nhóm buy-up."
                            },
                            "sellDownPct": {
                              "type": "number",
                              "description": "Tỷ lệ volume/value thuộc nhóm sell-down."
                            },
                            "gapValue": {
                              "type": "number",
                              "description": "Chênh lệch giá trị giao dịch giữa buy-up và sell-down."
                            }
                          },
                          "additionalProperties": true,
                          "nullable": true
                        }
                      },
                      "additionalProperties": true,
                      "description": "Snapshot mã gồm thông tin master, quote, depth và trend."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy dữ liệu product master theo mã",
            "sidebarTitle": "Lấy dữ liệu product master theo mã",
            "description": "GET /api/v1/MarketData/GetProductMaster/{symbol}"
          }
        },
        "description": "Get product master."
      }
    },
    "/GetOhlcvHis/{symbol}/{resolution}/{from}/{to}": {
      "servers": [
        {
          "url": "https://openapi.verolabs.co",
          "description": "Market micro API"
        }
      ],
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getOhlcvHistory",
        "summary": "Lấy lịch sử OHLCV",
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          },
          {
            "name": "resolution",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Candle resolution in seconds. Native values are 60 and 86400; other values are aggregated from those bases."
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          }
        ],
        "responses": {
          "200": {
            "description": "OHLCV candles sorted by unixTime ascending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OhlcvBar"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy lịch sử OHLCV",
            "sidebarTitle": "Lấy lịch sử OHLCV",
            "description": "GET /GetOhlcvHis/{symbol}/{resolution}/{from}/{to}"
          }
        }
      }
    },
    "/GetOhlcvHis/{symbol}/{resolution}/{from}/{to}/{countBack}": {
      "servers": [
        {
          "url": "https://openapi.verolabs.co",
          "description": "Market micro API"
        }
      ],
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getOhlcvHistoryCountBack",
        "summary": "Lấy lịch sử OHLCV với countBack",
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          },
          {
            "name": "resolution",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Candle resolution in seconds. Native values are 60 and 86400; other values are aggregated from those bases."
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          },
          {
            "name": "countBack",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Maximum number of candles to return counting backward from the end timestamp."
          }
        ],
        "responses": {
          "200": {
            "description": "OHLCV candles sorted by unixTime ascending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OhlcvBar"
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy lịch sử OHLCV với countBack",
            "sidebarTitle": "Lấy lịch sử OHLCV với countBack",
            "description": "GET /GetOhlcvHis/{symbol}/{resolution}/{from}/{to}/{countBack}"
          }
        }
      }
    },
    "/api/v1/diagnostics/margin-ratios/{symbol}": {
      "get": {
        "tags": [
          "Chẩn đoán",
          "Dữ liệu thị trường"
        ],
        "operationId": "getMarginRatio",
        "summary": "Lấy tỷ lệ ký quỹ theo mã",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          }
        ],
        "responses": {
          "200": {
            "description": "Effective margin-ratio diagnostics for the symbol.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarginRatioDiagnostics"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy tỷ lệ ký quỹ theo mã",
            "sidebarTitle": "Lấy tỷ lệ ký quỹ theo mã",
            "description": "GET /api/v1/diagnostics/margin-ratios/{symbol}"
          }
        },
        "description": "Get effective margin ratio diagnostics for a symbol."
      }
    },
    "/api/v1/notifications": {
      "get": {
        "tags": [
          "Thông báo"
        ],
        "operationId": "listNotifications",
        "summary": "Lấy danh sách thông báo của người dùng hiện tại",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 50
            },
            "description": "Số bản ghi tối đa cần trả về. Notifications nhận 1-100, mặc định 50."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 0
            },
            "description": "Số bản ghi bỏ qua trước khi trả về trang dữ liệu. Mặc định 0."
          }
        ],
        "responses": {
          "200": {
            "description": "Notifications page for the current user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách thông báo của người dùng hiện tại",
            "sidebarTitle": "Lấy danh sách thông báo của người dùng hiện tại",
            "description": "GET /api/v1/notifications"
          }
        },
        "description": "Get notifications for current user."
      }
    },
    "/api/v1/notifications/{notify_id}/read": {
      "put": {
        "tags": [
          "Thông báo"
        ],
        "operationId": "markNotificationAsRead",
        "summary": "Đánh dấu thông báo là đã đọc",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "notify_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Notification identifier returned by the list notifications endpoint."
          }
        ],
        "responses": {
          "200": {
            "description": "Mark-read result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đánh dấu thông báo là đã đọc",
            "sidebarTitle": "Đánh dấu thông báo là đã đọc",
            "description": "PUT /api/v1/notifications/{notify_id}/read"
          }
        },
        "description": "Mark notification as read."
      }
    },
    "/api/v1/referral/stats": {
      "get": {
        "tags": [
          "Giới thiệu"
        ],
        "operationId": "getReferralStats",
        "summary": "Lấy thống kê giới thiệu",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Referral summary for the current account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy thống kê giới thiệu",
            "sidebarTitle": "Lấy thống kê giới thiệu",
            "description": "GET /api/v1/referral/stats"
          }
        },
        "description": "Get referral statistics."
      }
    },
    "/api/v1/referral/refcode/{ref_code}": {
      "get": {
        "tags": [
          "Giới thiệu"
        ],
        "operationId": "getReferralCodeInfo",
        "summary": "Lấy thông tin mã giới thiệu",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ref_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referral code to look up."
          }
        ],
        "responses": {
          "200": {
            "description": "Referral code details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy thông tin mã giới thiệu",
            "sidebarTitle": "Lấy thông tin mã giới thiệu",
            "description": "GET /api/v1/referral/refcode/{ref_code}"
          }
        },
        "description": "Get referral code information."
      }
    },
    "/api/v1/referral/history": {
      "get": {
        "tags": [
          "Giới thiệu"
        ],
        "operationId": "getReferralHistory",
        "summary": "Lấy lịch sử giới thiệu",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 100
            },
            "description": "Số bản ghi tối đa cần trả về. Notifications nhận 1-100, mặc định 50."
          }
        ],
        "responses": {
          "200": {
            "description": "Referral history entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReferralHistoryItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy lịch sử giới thiệu",
            "sidebarTitle": "Lấy lịch sử giới thiệu",
            "description": "GET /api/v1/referral/history"
          }
        },
        "description": "Get referral history."
      }
    },
    "/api/v1/referral/refcode": {
      "post": {
        "tags": [
          "Giới thiệu"
        ],
        "operationId": "setReferralCode",
        "summary": "Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRefCodeRebateRateRequest"
              }
            }
          },
          "description": "Referral code payload. refCode is required and rebateRate must be between 0 and 1."
        },
        "responses": {
          "200": {
            "description": "Referral code update result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetRefCodeRebateRateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate",
            "sidebarTitle": "Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate",
            "description": "POST /api/v1/referral/refcode"
          }
        },
        "description": "Set or update referral code rebate rate."
      }
    },
    "/api/v1/bank-accounts/{bankID}": {
      "get": {
        "tags": [
          "Tài khoản ngân hàng"
        ],
        "operationId": "getBankAccount",
        "summary": "Lấy tài khoản ngân hàng theo ID",
        "description": "Get bank account by ID.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bankID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã tài khoản ngân hàng đã lưu."
          }
        ],
        "responses": {
          "200": {
            "description": "Saved bank account details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccount"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy tài khoản ngân hàng theo ID",
            "sidebarTitle": "Lấy tài khoản ngân hàng theo ID",
            "description": "GET /api/v1/bank-accounts/{bankID}"
          }
        }
      }
    },
    "/api/v1/users/right-subscriptions": {
      "get": {
        "tags": [
          "Tài khoản"
        ],
        "operationId": "listUserRightSubscriptions",
        "summary": "Lấy danh sách yêu cầu đăng ký quyền mua",
        "description": "List current user right subscription requests.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Right subscription entitlements and requests for the current user/account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserRightSubscription"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy danh sách yêu cầu đăng ký quyền mua",
            "sidebarTitle": "Lấy danh sách yêu cầu đăng ký quyền mua",
            "description": "GET /api/v1/users/right-subscriptions"
          }
        }
      },
      "post": {
        "tags": [
          "Tài khoản"
        ],
        "operationId": "subscribeRight",
        "summary": "Đăng ký quyền mua",
        "description": "Subscribe to a right offering.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeRightRequest"
              }
            }
          },
          "description": "Right subscription request payload. symbol and shares are required."
        },
        "responses": {
          "200": {
            "description": "Submitted right subscription request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeRightResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đăng ký quyền mua",
            "sidebarTitle": "Đăng ký quyền mua",
            "description": "POST /api/v1/users/right-subscriptions"
          }
        }
      }
    },
    "/api/v1/users/covered-margin-call": {
      "patch": {
        "tags": [
          "Tài khoản"
        ],
        "operationId": "adjustCoveredMargin",
        "summary": "Điều chỉnh số tiền covered margin call",
        "description": "Adjust covered margin call amount.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustCoveredMarginRequest"
              }
            }
          },
          "description": "Covered margin-call payload. accountId, symbol, and amount are required."
        },
        "responses": {
          "200": {
            "description": "Covered margin-call update result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoveredMarginCallResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Điều chỉnh số tiền covered margin call",
            "sidebarTitle": "Điều chỉnh số tiền covered margin call",
            "description": "PATCH /api/v1/users/covered-margin-call"
          }
        }
      }
    },
    "/api/v2/chat/api/id-card": {
      "post": {
        "tags": [
          "Đăng ký"
        ],
        "summary": "Trích xuất thông tin CCCD khi đăng ký",
        "operationId": "parseSignupIdCard",
        "security": [],
        "description": "Phân tích ảnh mặt trước CCCD/CMND và các ảnh mặt sau hoặc chân dung nếu có trong bước đăng ký. Gửi nội dung ảnh dạng base64 trong JSON, không gửi tiền tố data URL. Endpoint này không yêu cầu xác thực.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdCardParseRequest"
              }
            }
          },
          "description": "Base64 image payload used by the signup ID-card scan flow."
        },
        "responses": {
          "200": {
            "description": "Parsed ID-card data and uploaded image URLs when available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdCardParseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api-gw.verolabs.co/api/v2/chat",
            "description": "Signup API"
          }
        ],
        "x-mint": {
          "metadata": {
            "title": "Trích xuất thông tin CCCD khi đăng ký",
            "sidebarTitle": "Trích xuất thông tin CCCD",
            "description": "POST /api/v2/chat/api/id-card"
          }
        }
      }
    },
    "/api/v1/MarketData/GetProductTradeLog/{symbol}/{from}/{to}": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getProductTradeLog",
        "summary": "Lấy trade log của mã theo khoảng thời gian",
        "description": "Lấy trade log của một mã giao dịch trong khoảng thời gian Unix milliseconds.",
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm bắt đầu dạng Unix timestamp milliseconds."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Thời điểm kết thúc dạng Unix timestamp milliseconds."
          }
        ],
        "responses": {
          "200": {
            "description": "Response trade-log với mảng data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Một bản ghi trade log do GetProductTradeLog trả về.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID bản ghi trade log khi có."
                          },
                          "seq": {
                            "type": "number",
                            "description": "Số sequence của market-data."
                          },
                          "symbol": {
                            "type": "string",
                            "description": "Mã giao dịch."
                          },
                          "unixTime": {
                            "type": "number",
                            "description": "Thời điểm giao dịch dạng Unix milliseconds."
                          },
                          "price": {
                            "type": "number",
                            "description": "Giá khớp."
                          },
                          "volume": {
                            "type": "number",
                            "description": "Khối lượng khớp."
                          },
                          "change": {
                            "type": "number",
                            "description": "Mức thay đổi giá so với giá tham chiếu/trước đó."
                          },
                          "way": {
                            "type": "number",
                            "description": "Mã chiều giao dịch do market-data service trả về."
                          },
                          "boardID": {
                            "type": "string",
                            "description": "Mã bảng giao dịch."
                          }
                        }
                      },
                      "description": "Các bản ghi trade log theo mã/khoảng thời gian."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy trade log của mã theo khoảng thời gian",
            "sidebarTitle": "Lấy trade log của mã theo khoảng thời gian",
            "description": "GET /api/v1/MarketData/GetProductTradeLog/{symbol}/{from}/{to}"
          }
        }
      }
    },
    "/api/v1/MarketData/GetVNIndex/{index}": {
      "get": {
        "tags": [
          "Dữ liệu thị trường"
        ],
        "operationId": "getVNIndex",
        "summary": "Lấy dữ liệu VN index",
        "description": "Lấy dữ liệu của một chỉ số thị trường Việt Nam.",
        "security": [],
        "parameters": [
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Index code such as VNINDEX, VN30, HNXINDEX, or UPCOMINDEX."
          }
        ],
        "responses": {
          "200": {
            "description": "Response chỉ số VN với payload data có schema cụ thể.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "isSuccess",
                    "data"
                  ],
                  "properties": {
                    "isSuccess": {
                      "type": "boolean",
                      "description": "Cờ thành công do backend trả về."
                    },
                    "returnCode": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "Mã trả về của backend; response thành công thường trả 0."
                    },
                    "serviceInstance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "serviceType": {
                            "type": "string",
                            "description": "Loại backend service xử lý request."
                          },
                          "instanceID": {
                            "type": "string",
                            "description": "Định danh instance backend service."
                          },
                          "lastUnixTime": {
                            "type": "number",
                            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
                          }
                        },
                        "additionalProperties": true
                      },
                      "description": "Danh sách instance market-data xử lý request."
                    },
                    "requestID": {
                      "type": "string",
                      "description": "Request id do market-data service sinh ra."
                    },
                    "algoID": {
                      "type": "string",
                      "description": "Algo id được echo lại khi request có truyền."
                    },
                    "positionID": {
                      "type": "string",
                      "description": "Position id được echo lại khi request có truyền."
                    },
                    "requestType": {
                      "type": "string",
                      "description": "Nhãn loại request do backend trả về."
                    },
                    "detail": {
                      "type": "string",
                      "description": "Thông điệp chi tiết từ backend."
                    },
                    "dataType": {
                      "type": "string",
                      "description": "Nhãn loại payload từ backend."
                    },
                    "executionTime": {
                      "type": "number",
                      "description": "Thời gian xử lý của backend tính bằng milliseconds khi có."
                    },
                    "lastTime": {
                      "type": "number",
                      "description": "Timestamp dữ liệu mới nhất do service trả về."
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Payload snapshot chỉ số.",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Mã chỉ số, ví dụ VNINDEX."
                        },
                        "name": {
                          "type": "string",
                          "description": "Tên hiển thị của chỉ số."
                        },
                        "unixTime": {
                          "type": "number",
                          "description": "Timestamp snapshot dạng Unix milliseconds."
                        },
                        "chg": {
                          "type": "number",
                          "description": "Mức thay đổi của chỉ số so với tham chiếu."
                        },
                        "value": {
                          "type": "number",
                          "description": "Giá trị hiện tại của chỉ số."
                        },
                        "high": {
                          "type": "number",
                          "description": "Giá trị cao nhất trong phiên."
                        },
                        "low": {
                          "type": "number",
                          "description": "Giá trị thấp nhất trong phiên."
                        },
                        "totQty": {
                          "type": "number",
                          "description": "Tổng khối lượng giao dịch."
                        },
                        "totVal": {
                          "type": "number",
                          "description": "Tổng giá trị giao dịch."
                        },
                        "totStock": {
                          "type": "number",
                          "description": "Số lượng mã thành phần."
                        },
                        "type": {
                          "type": "string",
                          "description": "Nhãn loại chỉ số."
                        },
                        "up": {
                          "type": "number",
                          "description": "Số mã tăng."
                        },
                        "down": {
                          "type": "number",
                          "description": "Số mã giảm."
                        },
                        "noChange": {
                          "type": "number",
                          "description": "Số mã đứng giá."
                        },
                        "ceil": {
                          "type": "number",
                          "description": "Số mã trần."
                        },
                        "floor": {
                          "type": "number",
                          "description": "Số mã sàn."
                        },
                        "UpQty": {
                          "type": "number",
                          "description": "Tổng khối lượng của nhóm tăng."
                        },
                        "downQty": {
                          "type": "number",
                          "description": "Tổng khối lượng của nhóm giảm."
                        },
                        "noChangeQty": {
                          "type": "number",
                          "description": "Tổng khối lượng của nhóm đứng giá."
                        },
                        "upVal": {
                          "type": "number",
                          "description": "Tổng giá trị của nhóm tăng."
                        },
                        "downVal": {
                          "type": "number",
                          "description": "Tổng giá trị của nhóm giảm."
                        },
                        "noChangeVal": {
                          "type": "number",
                          "description": "Tổng giá trị của nhóm đứng giá."
                        },
                        "seq": {
                          "type": "number",
                          "description": "Sequence/timestamp của market-data."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy dữ liệu VN index",
            "sidebarTitle": "Lấy dữ liệu VN index",
            "description": "GET /api/v1/MarketData/GetVNIndex/{index}"
          }
        }
      }
    },
    "/api/v1/orders/stop-orders": {
      "get": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "getStopOrders",
        "summary": "Danh sách lệnh stop-loss",
        "description": "Liệt kê lệnh stop-loss với các bộ lọc trạng thái, tài khoản và mã giao dịch tùy chọn.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stop orders matching optional filters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StopOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Danh sách lệnh stop-loss",
            "sidebarTitle": "Danh sách lệnh stop-loss",
            "description": "GET /api/v1/orders/stop-orders"
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional status filter. Values are backend order statuses such as PENDING, COMPLETE, CANCELLED, 0, 1, 2, 4, 7, or 8 depending on order type."
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional trading account filter."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          }
        ]
      }
    },
    "/api/v1/orders/stop-order": {
      "post": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "placeStopOrder",
        "summary": "Đặt lệnh stop-loss",
        "description": "Tạo lệnh stop-loss để gửi lệnh sau khi điều kiện kích hoạt được thỏa mãn.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Kết quả tạo stop-order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StopOrderCreateResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Response thành công",
                    "value": {
                      "isSuccess": true,
                      "detail": "Stop order placed successfully",
                      "data": "STOP-V1StGXR8_Z5jdHi6B-myT"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đặt lệnh stop-loss",
            "sidebarTitle": "Đặt lệnh stop-loss",
            "description": "POST /api/v1/orders/stop-order"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewStopOrderRequest"
              }
            }
          },
          "description": "Stop-order creation payload. All required fields are validated by service.orderapi."
        }
      }
    },
    "/api/v1/orders/stop-order/{orderId}": {
      "get": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "getStopOrder",
        "summary": "Lấy lệnh stop-loss theo ID",
        "description": "Lấy thông tin lệnh stop-loss theo mã định danh lệnh.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stop-order details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StopOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy lệnh stop-loss theo ID",
            "sidebarTitle": "Lấy lệnh stop-loss theo ID",
            "description": "GET /api/v1/orders/stop-order/{orderId}"
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã lệnh do stop-order service trả về."
          }
        ]
      }
    },
    "/api/v1/orders/modify-stop-order/{orderId}": {
      "put": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "modifyStopOrder",
        "summary": "Sửa lệnh stop-loss",
        "description": "Sửa thông tin một lệnh stop-loss hiện có.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response sửa stop-order, data là stop-order đã cập nhật.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StopOrderModifyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Sửa lệnh stop-loss",
            "sidebarTitle": "Sửa lệnh stop-loss",
            "description": "PUT /api/v1/orders/modify-stop-order/{orderId}"
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Mã lệnh do stop-order service trả về."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyStopOrderRequest"
              }
            }
          },
          "description": "Stop-order replacement payload. orderId is supplied in the path."
        }
      }
    },
    "/api/v1/orders/bracket-orders": {
      "get": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "getBracketOrders",
        "summary": "Danh sách bracket order",
        "description": "Liệt kê bracket order với các bộ lọc trạng thái, tài khoản và mã giao dịch tùy chọn.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bracket orders matching optional filters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BracketOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Danh sách bracket order",
            "sidebarTitle": "Danh sách bracket order",
            "description": "GET /api/v1/orders/bracket-orders"
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional status filter. Values are backend order statuses such as PENDING, COMPLETE, CANCELLED, 0, 1, 2, 4, 7, or 8 depending on order type."
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional trading account filter."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Mã chứng khoán/sản phẩm, ví dụ FPT hoặc VN30F1M."
          }
        ]
      }
    },
    "/api/v1/orders/bracket-order": {
      "post": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "placeBracketOrder",
        "summary": "Đặt bracket order",
        "description": "Tạo bracket order với nhánh chốt lời và cắt lỗ tùy chọn.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Kết quả tạo bracket order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BracketOrderCreateResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Response thành công",
                    "value": {
                      "isSuccess": true,
                      "detail": "Bracket order placed successfully",
                      "data": "BRACKET-V1StGXR8_Z5jdHi6B-myT"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Đặt bracket order",
            "sidebarTitle": "Đặt bracket order",
            "description": "POST /api/v1/orders/bracket-order"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBracketOrderRequest"
              }
            }
          },
          "description": "Bracket-order creation payload. takeProfitPrice and stopLossPrice are optional but at least one should be supplied for a useful bracket order."
        }
      }
    },
    "/api/v1/orders/bracket-order/{bracketOrderId}": {
      "get": {
        "tags": [
          "Lệnh"
        ],
        "operationId": "getBracketOrder",
        "summary": "Lấy bracket order theo ID",
        "description": "Lấy thông tin bracket order theo mã định danh.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bracket-order details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BracketOrder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ErrorResponse",
            "description": "Response lỗi.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnyErrorBody"
                }
              },
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "Thông điệp lỗi dạng text do backend hoặc gateway trả về."
                }
              }
            }
          }
        },
        "x-mint": {
          "metadata": {
            "title": "Lấy bracket order theo ID",
            "sidebarTitle": "Lấy bracket order theo ID",
            "description": "GET /api/v1/orders/bracket-order/{bracketOrderId}"
          }
        },
        "parameters": [
          {
            "name": "bracketOrderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "System bracket order identifier returned when the bracket order is created."
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token used for protected REST API requests."
      },
      "sessionToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Session-Token",
        "description": "Session token returned by authentication flows."
      }
    },
    "parameters": {
      "Flow": {
        "name": "flow",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Ma flow duoc tra ve tu endpoint tao flow tuong ung. Khi submit/update flow phai truyen dung ma nay trong query flow."
      },
      "AccountId": {
        "name": "accountId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "StartTime": {
        "name": "startTime",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Unix timestamp in milliseconds."
      },
      "EndTime": {
        "name": "endTime",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Unix timestamp in milliseconds."
      },
      "StartTimeQuery": {
        "name": "start_time",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Unix timestamp in milliseconds."
      },
      "EndTimeQuery": {
        "name": "end_time",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Unix timestamp in milliseconds."
      },
      "OrderID": {
        "name": "orderID",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "Symbol": {
        "name": "symbol",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "VN30F1M"
        }
      },
      "Resolution": {
        "name": "resolution",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "example": 60
        },
        "description": "Candle resolution in seconds. The app uses 60 for 1 minute and 86400 for daily."
      },
      "FromMs": {
        "name": "fromMs",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Start time in Unix milliseconds."
      },
      "ToMs": {
        "name": "toMs",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "End time in Unix milliseconds."
      }
    },
    "responses": {
      "GenericSuccess": {
        "description": "Request completed successfully.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GenericObject"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, expired or invalid token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Error": {
        "description": "Error response. The app reads detail or message when available.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "AuthFlowError": {
        "description": "Authentication flow validation error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AuthFlow"
            }
          }
        }
      },
      "ErrorResponse": {
        "description": "Error response containing an error code, message, detail, or plain text.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "GenericObject": {
        "type": "object",
        "additionalProperties": true,
        "description": "Payload object động. Cấu trúc có thể thay đổi theo từng endpoint backend."
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Body loi do gateway hoac backend tra ve. Backend co the tra JSON object hoac loi dang plain text.",
        "properties": {
          "error": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Ma loi gateway khi co."
                  },
                  "code": {
                    "type": "integer",
                    "description": "Ma loi tuong duong HTTP."
                  },
                  "status": {
                    "type": "string",
                    "description": "Text trang thai HTTP, vi du Unauthorized."
                  },
                  "reason": {
                    "type": "string",
                    "description": "Ly do chi tiet do he thong hoac gateway tra ve."
                  },
                  "message": {
                    "type": "string",
                    "description": "Thong diep loi de doc."
                  }
                }
              }
            ],
            "description": "Chuoi ma/thong diep loi hoac object loi nested cua gateway."
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "detail": {
            "type": "string",
            "description": "Detailed backend error message when available."
          },
          "details": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            ],
            "description": "Chi tiết validation hoặc backend bổ sung.",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code when included by the backend."
          }
        }
      },
      "AuthFlow": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "description": "Ma flow. Dung gia tri nay lam query parameter flow khi submit hoac update flow."
          },
          "type": {
            "type": "string",
            "description": "Loai flow do he thong tra ve, vi du browser hoac api."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Thoi diem flow het han. Can submit flow truoc thoi diem nay."
          },
          "issued_at": {
            "type": "string",
            "format": "date-time",
            "description": "Thoi diem he thong tao flow."
          },
          "ui": {
            "type": "object",
            "additionalProperties": true,
            "description": "Payload UI cua gom action URL, method, nodes, messages va CSRF node khi can."
          },
          "state": {
            "type": "string",
            "description": "Trang thai hien tai cua flow, vi du choose_method, sent_email, passed_challenge hoac success."
          },
          "request_url": {
            "type": "string",
            "description": "URL request goc dung de tao flow."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "description": "Ma organization cho flow theo organization, khi co."
          },
          "created_at": {
            "type": "string",
            "description": "Thoi diem tao flow.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Thoi diem cap nhat flow.",
            "format": "date-time"
          },
          "refresh": {
            "type": "boolean",
            "description": "Cho biet flow co phai refresh flow hay khong."
          },
          "requested_aal": {
            "type": "string",
            "description": "Muc dam bao xac thuc duoc yeu cau cho flow."
          },
          "identity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AuthSession/properties/identity"
              }
            ],
            "description": "Identity gan voi settings flow khi tra ve."
          }
        },
        "description": "self-service flow object duoc tra ve boi cac endpoint tao/cap nhat login, registration, recovery va settings flow."
      },
      "LoginFlowUpdateRequest": {
        "type": "object",
        "required": [
          "method",
          "csrf_token",
          "password_identifier",
          "password"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "password"
            ],
            "description": "Phuong thuc xac thuc. Client gui password khi dang nhap bang mat khau."
          },
          "csrf_token": {
            "type": "string",
            "description": "CSRF token lay tu UI node cua login flow khi he thong yeu cau."
          },
          "password_identifier": {
            "type": "string",
            "format": "email",
            "description": "Dinh danh dang nhap cua user. Ung dung gui email tai khoan."
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "Mat khau dang plain text do user nhap. Chi gui qua HTTPS."
          }
        },
        "description": "JSON payload dung de submit thong tin dang nhap bang mat khau vao login flow."
      },
      "LoginResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "session_token": {
            "type": "string",
            "description": "Bearer/session token client dung cho cac API can dang nhap."
          },
          "session": {
            "$ref": "#/components/schemas/AuthSession",
            "description": "session object cua identity da dang nhap."
          },
          "identity": {
            "type": "object",
            "additionalProperties": true,
            "description": "identity object, gom identity id va traits khi tra ve."
          }
        },
        "description": "Response tra ve sau khi API login flow thanh cong."
      },
      "AuthSession": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "description": "Ma session."
          },
          "active": {
            "type": "boolean",
            "description": "Cho biet session hien co dang active hay khong."
          },
          "identity": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "string",
                "description": "Ma identity cua user da dang nhap."
              },
              "traits": {
                "type": "object",
                "additionalProperties": true,
                "description": "Thuoc tinh ho so identity luu tren he thong, vi du email va name."
              },
              "schema_id": {
                "type": "string",
                "description": "Ma identity schema."
              },
              "schema_url": {
                "type": "string",
                "description": "URL cua identity schema."
              },
              "state": {
                "type": "string",
                "description": "Trang thai identity, vi du active."
              },
              "state_changed_at": {
                "type": "string",
                "description": "Thoi diem trang thai identity thay doi lan cuoi.",
                "format": "date-time"
              },
              "recovery_addresses": {
                "type": "array",
                "description": "Danh sach recovery address cau hinh tren identity.",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "metadata_public": {
                "nullable": true,
                "description": "Metadata public cua identity do he thong tra ve; co the null.",
                "type": "object",
                "additionalProperties": true
              },
              "created_at": {
                "type": "string",
                "description": "Thoi diem tao identity.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "description": "Thoi diem cap nhat identity.",
                "format": "date-time"
              },
              "organization_id": {
                "type": "string",
                "nullable": true,
                "description": "Ma organization neu identity thuoc organization; null neu khong co."
              }
            },
            "description": "identity da dang nhap, gom id, schema metadata, state, traits, recovery addresses va timestamps."
          },
          "tokenized": {
            "type": "string",
            "description": "Bearer token tra ve khi truyen tokenize_as va tra tokenized session."
          },
          "expires_at": {
            "type": "string",
            "description": "Thoi diem session het han.",
            "format": "date-time"
          },
          "authenticated_at": {
            "type": "string",
            "description": "Thoi diem user xac thuc cho session nay.",
            "format": "date-time"
          },
          "authenticator_assurance_level": {
            "type": "string",
            "description": "Muc dam bao xac thuc cua session, vi du aal1."
          },
          "authentication_methods": {
            "type": "array",
            "description": "Cac phuong thuc xac thuc da hoan tat cho session.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "method": {
                  "type": "string",
                  "description": "Ten phuong thuc xac thuc, vi du password."
                },
                "aal": {
                  "type": "string",
                  "description": "Muc dam bao xac thuc cua phuong thuc nay."
                },
                "completed_at": {
                  "type": "string",
                  "description": "Thoi diem phuong thuc nay hoan tat.",
                  "format": "date-time"
                }
              }
            }
          },
          "issued_at": {
            "type": "string",
            "description": "Thoi diem he thong phat hanh session.",
            "format": "date-time"
          },
          "devices": {
            "type": "array",
            "description": "Metadata thiet bi/session do he thong tra ve, gom device id, IP address, user agent va location.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Ma thiet bi."
                },
                "ip_address": {
                  "type": "string",
                  "description": "Dia chi IP cua session/thiet bi."
                },
                "user_agent": {
                  "type": "string",
                  "description": "User agent cua session/thiet bi."
                },
                "location": {
                  "type": "string",
                  "description": "Chuoi location do he thong tra ve khi co."
                }
              }
            }
          }
        },
        "description": "session tra ve boi whoami va login response."
      },
      "RegistrationFlowUpdateRequest": {
        "type": "object",
        "required": [
          "method",
          "traits",
          "password"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "password"
            ],
            "description": "Phuong thuc dang ky. Client gui password cho dang ky dua tren mat khau."
          },
          "traits": {
            "$ref": "#/components/schemas/RegistrationTraits",
            "description": "Cac identity traits se duoc tao tren identity."
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "Mat khau gan cho identity moi. Ung dung mobile co the tu sinh mat khau an toan cho onboarding bang OTP."
          },
          "csrf_token": {
            "type": "string",
            "description": "CSRF token lay tu UI node cua registration flow khi he thong yeu cau."
          }
        },
        "description": "JSON payload dung de submit dang ky user moi vao registration flow."
      },
      "RegistrationTraits": {
        "type": "object",
        "required": [
          "email",
          "name",
          "documentNumber"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email cua khach hang. Gia tri nay phai unique tren identity."
          },
          "name": {
            "type": "object",
            "required": [
              "first",
              "last"
            ],
            "properties": {
              "first": {
                "type": "string",
                "description": "Ten hoac phan dau cua ho ten khach hang."
              },
              "last": {
                "type": "string",
                "description": "Ho hoac phan cuoi cua ho ten khach hang."
              }
            },
            "description": "Ho ten hop phap cua khach hang, tach thanh first va last."
          },
          "phone": {
            "type": "string",
            "description": "So dien thoai khach hang theo format ung dung thu thap."
          },
          "refer_code": {
            "type": "string",
            "description": "Ma gioi thieu tuy chon nhap luc dang ky."
          },
          "address": {
            "type": "string",
            "description": "Dia chi cu tru/lien he cua khach hang."
          },
          "documentNumber": {
            "type": "string",
            "description": "So giay to dinh danh do nha nuoc cap, thu thap trong onboarding."
          }
        },
        "description": "Identity traits thu thap trong qua trinh dang ky khach hang."
      },
      "RecoveryCodeRequest": {
        "type": "object",
        "required": [
          "method",
          "email"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "code"
            ],
            "description": "Phuong thuc recovery. Dung code cho recovery bang ma gui qua email."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email se nhan ma recovery."
          }
        },
        "description": "Payload dung de yeu cau ma recovery cho email tren recovery flow."
      },
      "RecoveryVerifyRequest": {
        "type": "object",
        "required": [
          "method",
          "code"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "code"
            ],
            "description": "Phuong thuc recovery. Dung code cho recovery bang ma gui qua email."
          },
          "code": {
            "type": "string",
            "description": "Ma recovery mot lan user nhan duoc."
          }
        },
        "description": "Payload dung de xac minh ma recovery tren recovery flow."
      },
      "RecoveryResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AuthFlow"
          },
          {
            "type": "object",
            "properties": {
              "session_token": {
                "type": "string",
                "description": "Session token tra ve sau khi xac minh recovery thanh cong, neu he thong phat truc tiep."
              },
              "continue_with": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                },
                "description": "Cac hanh dong tiep theo do he thong tra ve, vi du instruction set_session_token."
              }
            }
          }
        ],
        "description": "Recovery flow sau khi cap nhat. Xac minh thanh cong co the kem session_token hoac continue_with."
      },
      "SettingsPasswordRequest": {
        "type": "object",
        "required": [
          "method",
          "password"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "password"
            ],
            "description": "Phuong thuc settings. Dung password khi doi mat khau."
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "Mat khau moi se gan cho identity dang dang nhap."
          }
        },
        "description": "Payload dung de cap nhat mat khau cua user dang dang nhap trong settings flow."
      },
      "Account": {
        "type": "object",
        "additionalProperties": true,
        "description": "Thông tin tài khoản giao dịch gồm equity, margin, PnL và danh mục vị thế.",
        "required": [
          "id",
          "accountId",
          "totalEquity",
          "credit",
          "maintenanceMargin",
          "tempMaintenanceMargin",
          "totalRealizedPnl",
          "totalUnrealizedPnl",
          "tradingPower",
          "crossMargin",
          "positions",
          "tempPositions"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Internal account document identifier."
          },
          "accountId": {
            "type": "string",
            "description": "Trading account identifier used by order and portfolio APIs."
          },
          "userId": {
            "type": "string",
            "description": "Owner user identity id or email propagated by the gateway."
          },
          "connectionType": {
            "type": "string",
            "description": "Account connection type such as DEMO or REAL."
          },
          "totalEquity": {
            "type": "number",
            "description": "Total account equity."
          },
          "credit": {
            "type": "number",
            "description": "Available credit or cash balance maintained by the account service."
          },
          "maintenanceMargin": {
            "type": "number",
            "description": "Current maintenance margin requirement."
          },
          "tempMaintenanceMargin": {
            "type": "number",
            "description": "Temporary maintenance margin for pending orders/positions."
          },
          "totalRealizedPnl": {
            "type": "number",
            "description": "Total realized profit and loss."
          },
          "totalUnrealizedPnl": {
            "type": "number",
            "description": "Total unrealized profit and loss."
          },
          "tradingPower": {
            "type": "number",
            "description": "Available trading power after margin and holds."
          },
          "crossMargin": {
            "type": "boolean",
            "description": "Whether cross-margin mode is enabled for this account."
          },
          "refCode": {
            "type": "string",
            "description": "Referral code linked to the account, if any."
          },
          "identityId": {
            "type": "string",
            "description": "Hệ thống xác thực identity id when present."
          },
          "positions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Position"
            },
            "description": "Open positions keyed by symbol."
          },
          "tempPositions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TempPosition"
            },
            "description": "Temporary or pending positions keyed by symbol."
          }
        }
      },
      "Position": {
        "type": "object",
        "additionalProperties": true,
        "description": "Open portfolio position for one symbol.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Position identifier."
          },
          "accountId": {
            "type": "string",
            "description": "Owning trading account."
          },
          "symbol": {
            "type": "string",
            "description": "Position symbol."
          },
          "avgPrice": {
            "type": "number",
            "description": "Average entry price."
          },
          "qty": {
            "type": "number",
            "description": "Net quantity. Positive is long, negative is short."
          },
          "marketPrice": {
            "type": "number",
            "description": "Latest market price used for valuation."
          },
          "marketValue": {
            "type": "number",
            "description": "Current market value."
          },
          "portPercent": {
            "type": "number",
            "description": "Portfolio weight percentage."
          },
          "realizePnl": {
            "type": "number",
            "description": "Realized PnL for the position."
          },
          "unrealizePnl": {
            "type": "number",
            "description": "Unrealized PnL for the position."
          },
          "coveredMarginCall": {
            "type": "number",
            "description": "Covered margin-call amount set by the user."
          },
          "marginRatio": {
            "$ref": "#/components/schemas/MarginRatio"
          },
          "forceClosePrice": {
            "type": "number",
            "description": "Estimated force-close price."
          },
          "forceCloseStatus": {
            "type": "string",
            "description": "Current force-close status."
          },
          "marginCallPrice": {
            "type": "number",
            "description": "Estimated margin-call price."
          },
          "marginCallStatus": {
            "type": "string",
            "description": "Current margin-call status."
          }
        }
      },
      "TempPosition": {
        "type": "object",
        "additionalProperties": true,
        "description": "Aggregated pending order position for one symbol.",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol."
          },
          "netQty": {
            "type": "number",
            "description": "Net pending quantity."
          },
          "avgPrice": {
            "type": "number",
            "description": "Average pending price."
          },
          "orderCount": {
            "type": "integer",
            "description": "Number of pending orders contributing to this temp position."
          },
          "marketPrice": {
            "type": "number",
            "description": "Latest market price."
          }
        }
      },
      "MarginRatio": {
        "type": "object",
        "additionalProperties": true,
        "description": "Margin, fee, tax, and risk-ratio configuration.",
        "properties": {
          "marginRatio": {
            "type": "number",
            "description": "Initial/maintenance margin ratio requirement."
          },
          "marginCallRate": {
            "type": "number",
            "description": "Margin-call threshold rate."
          },
          "forceCloseRate": {
            "type": "number",
            "description": "Force-close threshold rate."
          },
          "tradingFee": {
            "type": "number",
            "description": "Trading fee rate, for example 0.001 for 0.1%."
          },
          "productCommission": {
            "type": "number",
            "description": "Product commission rate."
          },
          "tax": {
            "type": "number",
            "description": "Tax rate."
          },
          "overnightFee": {
            "type": "number",
            "description": "Overnight fee rate."
          },
          "shortSellFee": {
            "type": "number",
            "description": "Short-sell fee rate."
          }
        }
      },
      "WithdrawEquityRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for withdrawing account equity to a saved bank account.",
        "required": [
          "amount",
          "bankId"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "description": "Withdrawal amount. Must be greater than zero and not exceed tradingPower."
          },
          "bankId": {
            "type": "string",
            "description": "Saved bank account id to receive the withdrawal."
          }
        }
      },
      "BankAccount": {
        "type": "object",
        "additionalProperties": true,
        "description": "Bank account saved by the current user for withdrawals.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Bank account identifier."
          },
          "userId": {
            "type": "string",
            "description": "Owner user identifier."
          },
          "bankAccountName": {
            "type": "string",
            "description": "Beneficiary name on the bank account."
          },
          "bankAccountNumber": {
            "type": "string",
            "description": "Bank account number."
          },
          "bankCode": {
            "type": "string",
            "description": "Bank identifier code selected by the user."
          },
          "createdAt": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in Unix milliseconds."
          }
        }
      },
      "CreateBankAccountRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for creating a saved bank account.",
        "required": [
          "bankAccountName",
          "bankAccountNumber",
          "bankCode"
        ],
        "properties": {
          "bankAccountName": {
            "type": "string",
            "description": "Beneficiary name exactly as registered at the bank."
          },
          "bankAccountNumber": {
            "type": "string",
            "description": "Bank account number. Backend rejects duplicate account numbers."
          },
          "bankCode": {
            "type": "string",
            "description": "Bank identifier code."
          }
        }
      },
      "BankAccountEnvelope": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Bank account saved by the current user for withdrawals.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Bank account identifier."
              },
              "userId": {
                "type": "string",
                "description": "Owner user identifier."
              },
              "bankAccountName": {
                "type": "string",
                "description": "Beneficiary name on the bank account."
              },
              "bankAccountNumber": {
                "type": "string",
                "description": "Bank account number."
              },
              "bankCode": {
                "type": "string",
                "description": "Bank identifier code selected by the user."
              },
              "createdAt": {
                "type": "integer",
                "format": "int64",
                "description": "Creation timestamp in Unix milliseconds."
              }
            }
          }
        },
        "additionalProperties": true
      },
      "OrderSide": {
        "type": "string",
        "enum": [
          "B",
          "S"
        ],
        "description": "B = Buy, S = Sell."
      },
      "OrderType": {
        "type": "string",
        "enum": [
          "LO",
          "MO",
          "ATO",
          "ATC",
          "MTL"
        ]
      },
      "Order": {
        "type": "object",
        "additionalProperties": true,
        "description": "Order execution report returned by service.orderapi.",
        "properties": {
          "orderID": {
            "type": "string",
            "description": "System-generated order identifier used for internal tracking and cancel/modify operations."
          },
          "refOrderID": {
            "type": "string",
            "description": "Client-provided reference order id."
          },
          "externalOrderID": {
            "type": "string",
            "description": "Order id returned by the external broker or exchange gateway."
          },
          "externalSecondOrderID": {
            "type": "string",
            "description": "Secondary broker order id when available."
          },
          "accountID": {
            "type": "string",
            "description": "Trading account used by the order."
          },
          "symbol": {
            "type": "string",
            "description": "Order symbol."
          },
          "orderSide": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "orderStatus": {
            "type": "string",
            "description": "Order status. Broker numeric values may include 0 New, 1 Partially Filled, 2 Filled, 4 Cancelled, 7 Stopped, 8 Rejected; special order values may be PENDING, COMPLETE, CANCELLED, MODIFIED."
          },
          "orderType": {
            "type": "string",
            "description": "Order type such as LO, MTL, ATO, or ATC."
          },
          "orderEntryPrice": {
            "type": "number",
            "description": "Original submitted price."
          },
          "orderEntryQty": {
            "type": "integer",
            "description": "Original submitted quantity."
          },
          "orderCurrentPrice": {
            "type": "number",
            "description": "Current active price after broker updates or modifications."
          },
          "orderCurrentQty": {
            "type": "integer",
            "description": "Current active quantity after fills/cancellations."
          },
          "filledQty": {
            "type": "number",
            "description": "Filled quantity."
          },
          "avgFillPrice": {
            "type": "number",
            "description": "Average fill price."
          },
          "cancelledQty": {
            "type": "number",
            "description": "Cancelled quantity."
          },
          "orderText": {
            "type": "string",
            "description": "Broker or backend explanatory text."
          },
          "unixUTCTimeMs": {
            "type": "number",
            "description": "Last order event time in Unix milliseconds UTC."
          },
          "createunixUTCTimeMs": {
            "type": "number",
            "description": "Order creation time in Unix milliseconds UTC."
          },
          "persisState": {
            "type": "string",
            "description": "Serialized persistence state used by algo/special orders."
          },
          "algoID": {
            "type": "string",
            "description": "Algo identifier when order originated from an algo."
          },
          "positionID": {
            "type": "string",
            "description": "Position identifier associated with the order."
          },
          "toHedge": {
            "type": "boolean",
            "description": "Whether this order is marked for hedging."
          },
          "parentOrderId": {
            "type": "string",
            "description": "Parent stop or bracket order id for child orders."
          },
          "partnerCode": {
            "type": "string",
            "description": "Partner code for partner-originated orders."
          },
          "partnerBrokerUsed": {
            "type": "string",
            "description": "Underlying partner broker account used for partner orders."
          }
        }
      },
      "Trade": {
        "type": "object",
        "additionalProperties": true,
        "description": "Trade execution report returned by service.orderapi or account history APIs.",
        "properties": {
          "persisState": {
            "type": "string",
            "description": "Serialized persistence state associated with the trade."
          },
          "orderID": {
            "type": "string",
            "description": "System order identifier."
          },
          "refOrderID": {
            "type": "string",
            "description": "Client reference order identifier."
          },
          "externalOrderID": {
            "type": "string",
            "description": "External broker order identifier."
          },
          "tradeID": {
            "type": "string",
            "description": "Unique trade execution identifier."
          },
          "accountID": {
            "type": "string",
            "description": "Trading account identifier."
          },
          "symbol": {
            "type": "string",
            "description": "Traded symbol."
          },
          "orderSide": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "tradedPrice": {
            "type": "number",
            "description": "Execution price."
          },
          "tradedQty": {
            "type": "number",
            "description": "Executed quantity."
          },
          "unixUTCTimeMs": {
            "type": "number",
            "description": "Execution timestamp in Unix milliseconds UTC."
          },
          "algoID": {
            "type": "string",
            "description": "Algo identifier associated with the trade, if any."
          },
          "positionID": {
            "type": "string",
            "description": "Position identifier associated with the trade, if any."
          },
          "toHedge": {
            "type": "boolean",
            "description": "Whether the trade belongs to a hedge flow."
          }
        }
      },
      "Transaction": {
        "type": "object",
        "additionalProperties": true,
        "description": "Cash, PnL, fee, tax, dividend, deposit, withdrawal, or referral transaction record.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique transaction identifier."
          },
          "accountId": {
            "type": "string",
            "description": "Account affected by the transaction."
          },
          "transactionType": {
            "type": "string",
            "description": "Business transaction type such as credit_update, deposit, withdraw, trading_fee, referral_commission, referral_rebate, realized_pnl, or tax."
          },
          "amount": {
            "type": "number",
            "description": "Transaction amount. Negative values represent debits/holds where applicable."
          },
          "status": {
            "type": "string",
            "description": "Processing status such as pending, processing, or complete."
          },
          "network": {
            "type": "string",
            "description": "Payment or transfer network, if applicable."
          },
          "tx": {
            "type": "string",
            "description": "Transaction hash or external transaction reference."
          },
          "recvAddress": {
            "type": "string",
            "description": "Receiving address for external transfer flows."
          },
          "senderAddress": {
            "type": "string",
            "description": "Sender address for external transfer flows."
          },
          "processedTime": {
            "type": "integer",
            "format": "int64",
            "description": "Processing timestamp in Unix milliseconds."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Transaction-specific metadata, for example symbol, trade_id, position_id, bank account metadata, or right-subscription data."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          }
        }
      },
      "CommissionSummary": {
        "type": "object",
        "additionalProperties": true,
        "description": "Aggregated referral statistics for the current user/account.",
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Referral code owned by the current account."
          },
          "referredCode": {
            "type": "string",
            "description": "Referral code that referred the current account."
          },
          "totalVolume": {
            "type": "number",
            "description": "Total referred trading volume."
          },
          "referralRewards": {
            "type": "number",
            "description": "Total commission/rewards earned by the referrer."
          },
          "referredFriends": {
            "type": "integer",
            "description": "Count of unique referred accounts."
          },
          "friendsWhoTraded": {
            "type": "integer",
            "description": "Count of referred accounts with trading activity."
          },
          "totalRebatesGiven": {
            "type": "number",
            "description": "Total rebates paid to referred accounts."
          }
        }
      },
      "CommissionInfo": {
        "type": "object",
        "additionalProperties": true,
        "description": "Referral code ownership and rebate-rate configuration.",
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Referral code."
          },
          "ownerAccountId": {
            "type": "string",
            "description": "Account that owns this referral code."
          },
          "rebateRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Rebate rate in decimal form, for example 0.1 means 10%."
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp when available."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp when available."
          }
        }
      },
      "CommissionHistoryItem": {
        "type": "object",
        "additionalProperties": true,
        "description": "Referral contribution from one referred account.",
        "properties": {
          "friendAddress": {
            "type": "string",
            "description": "Referred account identifier."
          },
          "dateJoined": {
            "type": "string",
            "description": "First trade/join date used by referral history."
          },
          "totalVolume": {
            "type": "number",
            "description": "Total trading volume from this referred account."
          },
          "feesPaid": {
            "type": "number",
            "description": "Total fees paid by this referred account."
          },
          "yourRewards": {
            "type": "number",
            "description": "Commission reward earned from this referred account."
          }
        }
      },
      "SetReferralCodeRequest": {
        "type": "object",
        "required": [
          "refCode",
          "rebateRate"
        ],
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Mã giới thiệu cần đặt cho tài khoản."
          },
          "rebateRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Tỷ lệ rebate từ 0 đến 1."
          }
        }
      },
      "NotificationData": {
        "type": "object",
        "additionalProperties": true,
        "description": "Notification-specific payload. Margin/deposit/withdraw notifications usually include accountId plus optional symbol, amount, position, and account snapshots.",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Related account id."
          },
          "symbol": {
            "type": "string",
            "description": "Related symbol for position/risk notifications."
          },
          "amount": {
            "type": "number",
            "description": "Related cash amount for deposit/withdraw notifications."
          },
          "position": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Snapshot vị thế cho thông báo margin/force-close."
          },
          "account": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Snapshot tài khoản cho thông báo cấp tài khoản."
          }
        }
      },
      "Notification": {
        "type": "object",
        "additionalProperties": true,
        "description": "Notification record stored by vero-notify-service. Raw API field names are snake_case; frontend transforms them to camelCase.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Notification identifier."
          },
          "user_id": {
            "type": "string",
            "description": "User that owns the notification."
          },
          "userId": {
            "type": "string",
            "description": "CamelCase frontend alias for user_id."
          },
          "account_id": {
            "type": "string",
            "description": "Related account id."
          },
          "accountId": {
            "type": "string",
            "description": "CamelCase frontend alias for account_id."
          },
          "type": {
            "type": "string",
            "enum": [
              "MarginCall",
              "ForceClose",
              "Deposit",
              "Withdraw"
            ],
            "description": "Notification business type."
          },
          "topic": {
            "type": "string",
            "description": "Notification topic/channel."
          },
          "message_id": {
            "type": "string",
            "description": "Unique backend message identifier."
          },
          "messageID": {
            "type": "string",
            "description": "CamelCase frontend alias for message_id."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Notification-specific payload. Margin/deposit/withdraw notifications usually include accountId plus optional symbol, amount, position, and account snapshots.",
            "properties": {
              "accountId": {
                "type": "string",
                "description": "Related account id."
              },
              "symbol": {
                "type": "string",
                "description": "Related symbol for position/risk notifications."
              },
              "amount": {
                "type": "number",
                "description": "Related cash amount for deposit/withdraw notifications."
              },
              "position": {
                "type": "object",
                "additionalProperties": true,
                "nullable": true,
                "description": "Snapshot vị thế cho thông báo margin/force-close."
              },
              "account": {
                "type": "object",
                "additionalProperties": true,
                "nullable": true,
                "description": "Snapshot tài khoản cho thông báo cấp tài khoản."
              }
            }
          },
          "read": {
            "type": "boolean",
            "description": "Whether the notification has been marked as read."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in Unix milliseconds."
          },
          "createdAt": {
            "type": "integer",
            "format": "int64",
            "description": "CamelCase frontend alias for created_at."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp in Unix milliseconds."
          },
          "updatedAt": {
            "type": "integer",
            "format": "int64",
            "description": "CamelCase frontend alias for updated_at."
          }
        }
      },
      "NotificationType": {
        "type": "string",
        "enum": [
          "MarginCall",
          "ForceClose",
          "Deposit",
          "Withdraw"
        ]
      },
      "GetNotificationsResponse": {
        "type": "object",
        "required": [
          "notifications",
          "limit",
          "offset"
        ],
        "properties": {
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "description": "Danh sách thông báo của trang hiện tại."
          },
          "limit": {
            "type": "integer",
            "description": "Số lượng thông báo tối đa được yêu cầu."
          },
          "offset": {
            "type": "integer",
            "description": "Offset phân trang của request."
          }
        }
      },
      "ServiceInstance": {
        "type": "object",
        "properties": {
          "serviceType": {
            "type": "string",
            "description": "Loại backend service xử lý request."
          },
          "instanceID": {
            "type": "string",
            "description": "Định danh instance backend service."
          },
          "lastUnixTime": {
            "type": "number",
            "description": "Timestamp mới nhất của service dạng Unix milliseconds."
          }
        },
        "additionalProperties": true
      },
      "WatchListData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Định danh watchlist."
          },
          "name": {
            "type": "string",
            "description": "Tên hiển thị của watchlist."
          },
          "symbols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SymbolData"
            },
            "description": "Danh sách mã trong watchlist."
          }
        },
        "additionalProperties": true
      },
      "SymbolData": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "companyName": {
            "type": "string",
            "description": "Tên công ty hoặc tên công cụ giao dịch."
          },
          "sectorLvl1": {
            "type": "string",
            "description": "Phân ngành cấp 1."
          },
          "sectorLvl2": {
            "type": "string",
            "description": "Phân ngành cấp 2."
          },
          "sectorLvl3": {
            "type": "string",
            "description": "Phân ngành cấp 3."
          },
          "industryName": {
            "type": "string",
            "description": "Tên ngành do market-data trả về."
          },
          "logoId": {
            "type": "string",
            "description": "Định danh logo dùng bởi client."
          },
          "news": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "Tin tức liên quan đến mã khi market-data service trả về news."
            },
            "description": "Các tin tức liên quan đến mã."
          },
          "sentiment": {
            "$ref": "#/components/schemas/Sentiment",
            "nullable": true
          },
          "info": {
            "$ref": "#/components/schemas/SymbolInfo",
            "nullable": true
          },
          "stat": {
            "$ref": "#/components/schemas/SymbolStat",
            "nullable": true
          },
          "depth": {
            "$ref": "#/components/schemas/PriceDepth",
            "nullable": true
          },
          "trend": {
            "$ref": "#/components/schemas/Trend",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "Sentiment": {
        "type": "object",
        "properties": {
          "bullish": {
            "type": "number",
            "description": "Điểm/số lượng sentiment bullish."
          },
          "bullishPercent": {
            "type": "number",
            "description": "Tỷ lệ phần trăm sentiment bullish."
          },
          "bullishTime": {
            "type": "number",
            "description": "Timestamp hoặc thời điểm tổng hợp sentiment bullish."
          },
          "bearish": {
            "type": "number",
            "description": "Điểm/số lượng sentiment bearish."
          },
          "bearishPercent": {
            "type": "number",
            "description": "Tỷ lệ phần trăm sentiment bearish."
          },
          "bearishTime": {
            "type": "number",
            "description": "Timestamp hoặc thời điểm tổng hợp sentiment bearish."
          }
        },
        "additionalProperties": true
      },
      "SymbolInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Định danh công cụ trong market-data."
          },
          "seq": {
            "type": "number",
            "description": "Số sequence của quote."
          },
          "time": {
            "type": "number",
            "description": "Timestamp quote dạng Unix milliseconds."
          },
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "boardID": {
            "type": "string",
            "description": "Mã bảng giao dịch."
          },
          "nomiPrc": {
            "type": "number",
            "description": "Giá tham chiếu hoặc giá nominal."
          },
          "ceilPrc": {
            "type": "number",
            "description": "Giá trần trong phiên."
          },
          "floorPrc": {
            "type": "number",
            "description": "Giá sàn trong phiên."
          },
          "lsPrc": {
            "type": "number",
            "description": "Giá khớp cuối."
          },
          "lsVol": {
            "type": "number",
            "description": "Khối lượng khớp cuối."
          },
          "openPrc": {
            "type": "number",
            "description": "Giá mở cửa."
          },
          "closePrc": {
            "type": "number",
            "description": "Giá đóng cửa khi có."
          },
          "highPrc": {
            "type": "number",
            "description": "Giá cao nhất trong phiên."
          },
          "lowPrc": {
            "type": "number",
            "description": "Giá thấp nhất trong phiên."
          },
          "vWAP": {
            "type": "number",
            "description": "Giá trung bình gia quyền theo khối lượng."
          },
          "totVol": {
            "type": "number",
            "description": "Tổng khối lượng giao dịch."
          },
          "totVal": {
            "type": "number",
            "description": "Tổng giá trị giao dịch."
          },
          "tradingSession": {
            "type": "string",
            "description": "Mã phiên giao dịch."
          },
          "openInterest": {
            "type": "number",
            "description": "Open interest cho phái sinh khi có."
          }
        },
        "additionalProperties": true
      },
      "SymbolStat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Định danh static của công cụ."
          },
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "type": {
            "type": "string",
            "description": "Loại chứng khoán/công cụ."
          },
          "lot": {
            "type": "number",
            "description": "Lô giao dịch chuẩn."
          },
          "minQty": {
            "type": "number",
            "description": "Khối lượng đặt lệnh tối thiểu."
          },
          "maxQty": {
            "type": "number",
            "description": "Khối lượng đặt lệnh tối đa."
          },
          "prcStep": {
            "type": "number",
            "description": "Bước giá tối thiểu."
          },
          "name": {
            "type": "string",
            "description": "Tên ngắn của công cụ."
          },
          "productGroupID": {
            "type": "string",
            "description": "Mã nhóm sản phẩm từ sở giao dịch."
          },
          "tickerCode": {
            "type": "string",
            "description": "Ticker code do sở giao dịch sử dụng."
          },
          "symbolName": {
            "type": "string",
            "description": "Tên đầy đủ của mã khi có."
          },
          "underlyingSymbolCode": {
            "type": "string",
            "description": "Mã tài sản cơ sở cho phái sinh hoặc sản phẩm cấu trúc."
          },
          "expirationDate": {
            "type": "string",
            "description": "Ngày đáo hạn cho phái sinh khi có."
          },
          "contractSize": {
            "type": "number",
            "description": "Quy mô hợp đồng cho phái sinh khi có."
          }
        },
        "additionalProperties": true
      },
      "PriceDepth": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "number",
            "description": "Số sequence của sổ lệnh."
          },
          "time": {
            "type": "number",
            "description": "Timestamp sổ lệnh dạng Unix milliseconds."
          },
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "boardID": {
            "type": "string",
            "description": "Mã bảng giao dịch."
          },
          "bidPriceDepth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLevel"
            },
            "description": "Các mức giá mua tốt nhất."
          },
          "askPriceDepth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLevel"
            },
            "description": "Các mức giá bán tốt nhất."
          }
        },
        "additionalProperties": true
      },
      "PriceLevel": {
        "type": "object",
        "properties": {
          "prc": {
            "type": "number",
            "description": "Mức giá."
          },
          "vol": {
            "type": "number",
            "description": "Tổng khối lượng tại mức giá."
          }
        },
        "additionalProperties": true
      },
      "Trend": {
        "type": "object",
        "properties": {
          "buyUp": {
            "$ref": "#/components/schemas/TrendDirection"
          },
          "sellDown": {
            "$ref": "#/components/schemas/TrendDirection"
          },
          "buyUpPct": {
            "type": "number",
            "description": "Tỷ lệ volume/value thuộc nhóm buy-up."
          },
          "sellDownPct": {
            "type": "number",
            "description": "Tỷ lệ volume/value thuộc nhóm sell-down."
          },
          "gapValue": {
            "type": "number",
            "description": "Chênh lệch giá trị giao dịch giữa buy-up và sell-down."
          }
        },
        "additionalProperties": true
      },
      "TrendDirection": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "way": {
            "type": "number",
            "description": "Mã chiều giao dịch."
          },
          "vwapPrice": {
            "type": "number",
            "description": "VWAP của chiều giao dịch này."
          },
          "totalValue": {
            "type": "number",
            "description": "Tổng giá trị giao dịch của chiều này."
          },
          "totalVol": {
            "type": "number",
            "description": "Tổng khối lượng giao dịch của chiều này."
          },
          "tradeCount": {
            "type": "number",
            "description": "Số lượng giao dịch của chiều này."
          }
        },
        "additionalProperties": true
      },
      "OhlcvBar": {
        "type": "object",
        "additionalProperties": true,
        "description": "OHLCV candle returned by tick-api-go.",
        "properties": {
          "docId": {
            "type": "string",
            "description": "Database document id."
          },
          "symbol": {
            "type": "string",
            "description": "Candle symbol. Futures may be normalized to the requested future type."
          },
          "unixTime": {
            "type": "integer",
            "format": "int64",
            "description": "Candle timestamp in Unix milliseconds."
          },
          "open": {
            "type": "number",
            "description": "Open price."
          },
          "high": {
            "type": "number",
            "description": "High price."
          },
          "low": {
            "type": "number",
            "description": "Low price."
          },
          "close": {
            "type": "number",
            "description": "Close price."
          },
          "closeAdj": {
            "type": "number",
            "description": "Adjusted close price."
          },
          "volume": {
            "type": "number",
            "description": "Traded volume."
          },
          "type": {
            "type": "integer",
            "description": "Stored resolution/type in seconds."
          },
          "isSpotProduct": {
            "type": "boolean",
            "description": "Whether this candle belongs to a spot product."
          },
          "isFinished": {
            "type": "boolean",
            "description": "Whether the candle is finalized."
          }
        }
      },
      "MarginRatioDiagnostics": {
        "type": "object",
        "additionalProperties": true,
        "description": "Effective margin-ratio diagnostics returned by account service.",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Requested symbol."
          },
          "marginRatio": {
            "type": "number",
            "description": "Effective margin ratio."
          },
          "forceCloseRate": {
            "type": "number",
            "description": "Effective force-close rate."
          },
          "marginCallRate": {
            "type": "number",
            "description": "Effective margin-call rate."
          },
          "productGroup": {
            "type": "string",
            "description": "Product group matched for the symbol."
          }
        }
      },
      "RightSubscription": {
        "type": "object",
        "additionalProperties": true,
        "description": "Admin-created right subscription rule.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Rule identifier."
          },
          "symbol": {
            "type": "string",
            "description": "Stock symbol for the right subscription."
          },
          "ratio": {
            "type": "string",
            "description": "Subscription ratio in X:Y form, for example 100:20."
          },
          "price": {
            "type": "number",
            "description": "Subscription price."
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "Start date in YYYY-MM-DD format."
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "End date in YYYY-MM-DD format."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "cancelled"
            ],
            "description": "Rule status."
          },
          "note": {
            "type": "string",
            "description": "Optional admin note."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          }
        }
      },
      "SubscribeRightRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for submitting a right subscription request.",
        "required": [
          "symbol",
          "shares"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol to subscribe."
          },
          "shares": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of new shares to subscribe."
          }
        }
      },
      "StatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "success",
            "description": "Status string returned by the API."
          },
          "message": {
            "type": "string",
            "example": "Success",
            "description": "Human-readable status message."
          }
        },
        "additionalProperties": true,
        "description": "Generic status response for mutation endpoints."
      },
      "AdjustCoveredMarginRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for setting covered margin call amount for an open position.",
        "required": [
          "accountId",
          "symbol",
          "amount"
        ],
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Trading account containing the position."
          },
          "symbol": {
            "type": "string",
            "description": "Position symbol."
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "New covered margin-call amount. Must be zero or greater."
          }
        }
      },
      "NotificationsResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Paginated notification list response.",
        "properties": {
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "description": "Notifications in descending backend order."
          },
          "limit": {
            "type": "integer",
            "description": "Limit used for this request."
          },
          "offset": {
            "type": "integer",
            "description": "Offset used for this request."
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Simple success/error message response.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable result message."
          },
          "status": {
            "type": "string",
            "description": "Optional textual status such as success or failed."
          }
        }
      },
      "LogoutRequest": {
        "type": "object",
        "required": [
          "session_token"
        ],
        "properties": {
          "session_token": {
            "type": "string",
            "description": "session token (st_...) can huy."
          }
        },
        "description": "JSON payload chua session token de huy khi dang xuat."
      },
      "ReferralSummary": {
        "type": "object",
        "additionalProperties": true,
        "description": "Aggregated referral statistics for the current user/account.",
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Referral code owned by the current account."
          },
          "referredCode": {
            "type": "string",
            "description": "Referral code that referred the current account."
          },
          "totalVolume": {
            "type": "number",
            "description": "Total referred trading volume."
          },
          "referralRewards": {
            "type": "number",
            "description": "Total commission/rewards earned by the referrer."
          },
          "referredFriends": {
            "type": "integer",
            "description": "Count of unique referred accounts."
          },
          "friendsWhoTraded": {
            "type": "integer",
            "description": "Count of referred accounts with trading activity."
          },
          "totalRebatesGiven": {
            "type": "number",
            "description": "Total rebates paid to referred accounts."
          }
        }
      },
      "ReferralInfo": {
        "type": "object",
        "additionalProperties": true,
        "description": "Referral code ownership and rebate-rate configuration.",
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Referral code."
          },
          "ownerAccountId": {
            "type": "string",
            "description": "Account that owns this referral code."
          },
          "rebateRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Rebate rate in decimal form, for example 0.1 means 10%."
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp when available."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp when available."
          }
        }
      },
      "SetRefCodeRebateRateRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for setting or updating a referral code rebate rate.",
        "required": [
          "refCode",
          "rebateRate"
        ],
        "properties": {
          "refCode": {
            "type": "string",
            "description": "Referral code to create or update."
          },
          "rebateRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Rebate rate from 0 to 1. Example: 0.1 means 10%."
          }
        }
      },
      "IdCardParseRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Base64-encoded ID-card images captured or uploaded in the signup flow. frontImage is required; backImage and portraitImage are optional.",
        "required": [
          "frontImage"
        ],
        "properties": {
          "frontImage": {
            "type": "string",
            "format": "byte",
            "description": "Base64 image content for the front side of the Vietnamese ID card. Do not include the data URL prefix."
          },
          "backImage": {
            "type": "string",
            "format": "byte",
            "description": "Optional base64 image content for the back side of the ID card."
          },
          "portraitImage": {
            "type": "string",
            "format": "byte",
            "description": "Optional base64 portrait/selfie image."
          }
        }
      },
      "IdCardParseResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "ID-card parsing response returned by the chat/ekyc route.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether parsing succeeded."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Parsed Vietnamese ID card fields.",
            "properties": {
              "idNumber": {
                "type": "string",
                "description": "Citizen ID number."
              },
              "fullName": {
                "type": "string",
                "description": "Full name on the ID card."
              },
              "dateOfBirth": {
                "type": "string",
                "description": "Date of birth as parsed from the document."
              },
              "sex": {
                "type": "string",
                "description": "Sex/gender value on the document."
              },
              "nationality": {
                "type": "string",
                "description": "Nationality."
              },
              "placeOfOrigin": {
                "type": "string",
                "description": "Place of origin."
              },
              "placeOfResidence": {
                "type": "string",
                "description": "Place of residence."
              },
              "dateOfExpiry": {
                "type": "string",
                "description": "Expiry date."
              },
              "dateOfIssue": {
                "type": "string",
                "description": "Issue date when available."
              },
              "issuedBy": {
                "type": "string",
                "description": "Issuing authority when available."
              },
              "address": {
                "type": "string",
                "description": "Parsed address when returned by backend."
              }
            }
          },
          "imageUrls": {
            "$ref": "#/components/schemas/IdCardImageUrls"
          },
          "error": {
            "type": "string",
            "description": "Error message when parsing fails."
          }
        }
      },
      "IdCardData": {
        "type": "object",
        "additionalProperties": true,
        "description": "Parsed Vietnamese ID card fields.",
        "properties": {
          "idNumber": {
            "type": "string",
            "description": "Citizen ID number."
          },
          "fullName": {
            "type": "string",
            "description": "Full name on the ID card."
          },
          "dateOfBirth": {
            "type": "string",
            "description": "Date of birth as parsed from the document."
          },
          "sex": {
            "type": "string",
            "description": "Sex/gender value on the document."
          },
          "nationality": {
            "type": "string",
            "description": "Nationality."
          },
          "placeOfOrigin": {
            "type": "string",
            "description": "Place of origin."
          },
          "placeOfResidence": {
            "type": "string",
            "description": "Place of residence."
          },
          "dateOfExpiry": {
            "type": "string",
            "description": "Expiry date."
          },
          "dateOfIssue": {
            "type": "string",
            "description": "Issue date when available."
          },
          "issuedBy": {
            "type": "string",
            "description": "Issuing authority when available."
          },
          "address": {
            "type": "string",
            "description": "Parsed address when returned by backend."
          }
        }
      },
      "IdCardImageUrls": {
        "type": "object",
        "additionalProperties": true,
        "description": "Stored image URLs returned by the ID-card service.",
        "properties": {
          "front": {
            "type": "string",
            "description": "Stored front image URL."
          },
          "back": {
            "type": "string",
            "description": "Stored back image URL."
          },
          "portrait": {
            "type": "string",
            "description": "Stored portrait image URL."
          }
        }
      },
      "NewStopOrderRequest": {
        "type": "object",
        "additionalProperties": true,
        "description": "Payload for creating a stop order.",
        "required": [
          "symbol",
          "side",
          "stopPrice",
          "stopCondition",
          "orderType",
          "price",
          "quantity",
          "account"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "example": "FPT",
            "description": "Symbol to trade."
          },
          "side": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "stopPrice": {
            "type": "number",
            "description": "Trigger price."
          },
          "stopCondition": {
            "type": "string",
            "enum": [
              ">=",
              "<="
            ],
            "description": "Trigger condition comparing market price to stopPrice."
          },
          "orderType": {
            "type": "string",
            "enum": [
              "LO",
              "MTL",
              "MOK",
              "MAK",
              "ATC",
              "ATO",
              "BEST",
              "OPPOSITE",
              "LAST"
            ],
            "description": "Order type sent when the trigger fires. Frontend currently uses LO or MTL."
          },
          "price": {
            "type": "number",
            "description": "Limit price for LO orders; ignored or optional for market-style order types."
          },
          "quantity": {
            "type": "integer",
            "description": "Order quantity sent after the trigger."
          },
          "account": {
            "type": "string",
            "description": "Trading account used for the order."
          }
        }
      },
      "ModifyStopOrderRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NewStopOrderRequest"
          }
        ],
        "description": "Payload for replacing the fields of an existing stop order. The order id is supplied in the path."
      },
      "NewBracketOrderRequest": {
        "type": "object",
        "additionalProperties": true,
        "description": "Payload for creating a bracket order with optional take-profit and stop-loss legs.",
        "required": [
          "symbol",
          "side",
          "conditionPrice",
          "conditionType",
          "orderType",
          "quantity",
          "account"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "example": "FPT",
            "description": "Symbol to trade."
          },
          "side": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "conditionPrice": {
            "type": "number",
            "description": "Entry trigger price."
          },
          "conditionType": {
            "type": "string",
            "enum": [
              ">=",
              "<="
            ],
            "description": "Entry trigger condition comparing market price to conditionPrice."
          },
          "orderType": {
            "type": "string",
            "enum": [
              "LO",
              "MTL"
            ],
            "description": "Entry order type sent after the trigger."
          },
          "quantity": {
            "type": "integer",
            "description": "Entry order quantity."
          },
          "account": {
            "type": "string",
            "description": "Trading account used for the bracket order."
          },
          "takeProfitPrice": {
            "type": "number",
            "description": "Optional take-profit target price."
          },
          "stopLossPrice": {
            "type": "number",
            "description": "Optional stop-loss price."
          }
        }
      },
      "OrderData": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          }
        ],
        "description": "Alias for the order execution report payload."
      },
      "StopOrder": {
        "type": "object",
        "additionalProperties": true,
        "description": "Stored stop order state returned by the order service.",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "System stop order id. JSON serialization may also return OrderId depending on backend settings."
          },
          "symbol": {
            "type": "string",
            "description": "Trading symbol."
          },
          "side": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "stopPrice": {
            "type": "number",
            "description": "Trigger price."
          },
          "stopCondition": {
            "type": "string",
            "enum": [
              ">=",
              "<="
            ],
            "description": "Trigger condition comparing current market price against stopPrice."
          },
          "orderType": {
            "type": "string",
            "description": "Child order type sent when the trigger fires."
          },
          "price": {
            "type": "number",
            "nullable": true,
            "description": "Limit price for LO orders; null or ignored for market-style orders."
          },
          "quantity": {
            "type": "integer",
            "description": "Requested quantity."
          },
          "account": {
            "type": "string",
            "description": "Trading account."
          },
          "createdTime": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time."
          },
          "status": {
            "type": "string",
            "description": "Stop order status, for example PENDING, COMPLETE, CANCELLED, or MODIFIED."
          },
          "bracketOrderId": {
            "type": "string",
            "description": "Ma bracket order cha khi stop order la mot leg cua bracket; null voi stop order doc lap.",
            "nullable": true
          },
          "specialOrderType": {
            "type": "string",
            "description": "Loai leg dac biet nhu ENTRY, TAKE_PROFIT hoac STOP_LOSS; null voi stop order doc lap.",
            "nullable": true
          },
          "remainingQty": {
            "type": "integer",
            "description": "Remaining quantity for sliced execution."
          },
          "lastCheckTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last trigger check time."
          },
          "lastSliceTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last time a child slice order was sent."
          },
          "minSliceIntervalMs": {
            "type": "integer",
            "format": "int64",
            "description": "Minimum interval between child slices in milliseconds."
          },
          "childOrderIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "System order ids of child broker orders."
          },
          "filledQty": {
            "type": "number",
            "description": "Filled quantity."
          },
          "filledAvgPrice": {
            "type": "number",
            "description": "Average filled price."
          }
        }
      },
      "BracketOrder": {
        "type": "object",
        "additionalProperties": true,
        "description": "Stored bracket order state returned by the order service.",
        "properties": {
          "bracketOrderId": {
            "type": "string",
            "description": "System bracket order id."
          },
          "entryStopOrderId": {
            "type": "string",
            "description": "Entry stop order id generated for the bracket entry condition."
          },
          "takeProfitOrderId": {
            "type": "string",
            "nullable": true,
            "description": "Take-profit stop order id generated after entry is active/fillable."
          },
          "stopLossOrderId": {
            "type": "string",
            "nullable": true,
            "description": "Stop-loss stop order id generated after entry is active/fillable."
          },
          "symbol": {
            "type": "string",
            "description": "Trading symbol."
          },
          "side": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "conditionPrice": {
            "type": "number",
            "description": "Entry trigger price."
          },
          "conditionType": {
            "type": "string",
            "enum": [
              ">=",
              "<="
            ],
            "description": "Entry trigger condition."
          },
          "orderType": {
            "type": "string",
            "description": "Entry order type."
          },
          "quantity": {
            "type": "integer",
            "description": "Entry order quantity."
          },
          "account": {
            "type": "string",
            "description": "Trading account."
          },
          "takeProfitPrice": {
            "type": "number",
            "nullable": true,
            "description": "Optional take-profit trigger/target price."
          },
          "takeProfitStatus": {
            "type": "string",
            "description": "Take-profit leg status."
          },
          "stopLossPrice": {
            "type": "number",
            "nullable": true,
            "description": "Optional stop-loss trigger price."
          },
          "stopLossStatus": {
            "type": "string",
            "description": "Stop-loss leg status."
          },
          "status": {
            "type": "string",
            "description": "Overall bracket status, for example PENDING, COMPLETE, or CANCELLED."
          },
          "createdTime": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time."
          },
          "filledTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Entry fill time."
          },
          "completedTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Completion time."
          },
          "cancelledTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Cancellation time."
          },
          "lastCheckTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last trigger check time."
          }
        }
      },
      "NewOrderRequest": {
        "type": "object",
        "additionalProperties": true,
        "description": "Logical payload represented by the normal-order path parameters. This endpoint sends all required fields as path segments and has no JSON body.",
        "required": [
          "refOrderID",
          "accountID",
          "symbol",
          "orderSide",
          "price",
          "qty",
          "orderType"
        ],
        "properties": {
          "refOrderID": {
            "type": "string",
            "description": "Client-generated reference order id for idempotency and tracking."
          },
          "accountID": {
            "type": "string",
            "description": "Trading account used to place the order."
          },
          "symbol": {
            "type": "string",
            "example": "FPT",
            "description": "Symbol to trade."
          },
          "orderSide": {
            "type": "string",
            "enum": [
              "B",
              "S"
            ],
            "description": "B for buy, S for sell."
          },
          "price": {
            "type": "number",
            "description": "Order price."
          },
          "qty": {
            "type": "integer",
            "description": "Order quantity."
          },
          "orderType": {
            "type": "string",
            "enum": [
              "LO",
              "MTL",
              "ATO",
              "ATC"
            ],
            "description": "Order type: LO limit, MTL market-to-limit, ATO at-the-open, ATC at-the-close."
          }
        }
      },
      "BankAccountResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response returned by bank-account create operations.",
        "properties": {
          "status": {
            "type": "string",
            "description": "success or failed."
          },
          "message": {
            "type": "string",
            "description": "Human-readable result."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Bank account saved by the current user for withdrawals.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Bank account identifier."
              },
              "userId": {
                "type": "string",
                "description": "Owner user identifier."
              },
              "bankAccountName": {
                "type": "string",
                "description": "Beneficiary name on the bank account."
              },
              "bankAccountNumber": {
                "type": "string",
                "description": "Bank account number."
              },
              "bankCode": {
                "type": "string",
                "description": "Bank identifier code selected by the user."
              },
              "createdAt": {
                "type": "integer",
                "format": "int64",
                "description": "Creation timestamp in Unix milliseconds."
              }
            }
          }
        }
      },
      "WithdrawEquityResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response returned after a successful equity withdrawal.",
        "properties": {
          "status": {
            "type": "string",
            "description": "success or failed."
          },
          "account_id": {
            "type": "string",
            "description": "Account that was debited."
          },
          "amount": {
            "type": "number",
            "description": "Withdrawal amount."
          },
          "new_credit": {
            "type": "number",
            "description": "Credit balance after withdrawal."
          },
          "new_equity": {
            "type": "number",
            "description": "Total equity after withdrawal."
          },
          "trading_power": {
            "type": "number",
            "description": "Trading power after withdrawal."
          },
          "message": {
            "type": "string",
            "description": "Human-readable result."
          }
        }
      },
      "CoveredMarginCallResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response returned after covered margin call is changed.",
        "properties": {
          "status": {
            "type": "string",
            "description": "success or failed."
          },
          "message": {
            "type": "string",
            "description": "Human-readable result."
          },
          "accountId": {
            "type": "string",
            "description": "Trading account id."
          },
          "symbol": {
            "type": "string",
            "description": "Position symbol."
          },
          "amount": {
            "type": "number",
            "description": "Requested covered margin amount."
          },
          "newCoveredMarginCall": {
            "type": "number",
            "description": "Covered margin call value after update."
          },
          "maintenanceMargin": {
            "type": "number",
            "description": "Maintenance margin after recalculation."
          },
          "tradingPower": {
            "type": "number",
            "description": "Trading power after recalculation."
          }
        }
      },
      "FcmTokenRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "Payload for registering a Firebase Cloud Messaging token.",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "FCM registration token."
          },
          "device_type": {
            "type": "string",
            "enum": [
              "web",
              "android",
              "ios"
            ],
            "description": "Device type accepted by vero-notify-service."
          },
          "device_id": {
            "type": "string",
            "description": "Frontend-supplied device identifier. Current backend stores token and device_type; this field may be ignored by older deployments."
          },
          "platform": {
            "type": "string",
            "enum": [
              "web",
              "android",
              "ios"
            ],
            "description": "Frontend alias for device_type used by web clients."
          }
        }
      },
      "ReferralHistoryItem": {
        "type": "object",
        "additionalProperties": true,
        "description": "Referral contribution from one referred account.",
        "properties": {
          "friendAddress": {
            "type": "string",
            "description": "Referred account identifier."
          },
          "dateJoined": {
            "type": "string",
            "description": "First trade/join date used by referral history."
          },
          "totalVolume": {
            "type": "number",
            "description": "Total trading volume from this referred account."
          },
          "feesPaid": {
            "type": "number",
            "description": "Total fees paid by this referred account."
          },
          "yourRewards": {
            "type": "number",
            "description": "Commission reward earned from this referred account."
          }
        }
      },
      "SetRefCodeRebateRateResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response returned after setting a referral code rebate rate.",
        "properties": {
          "status": {
            "type": "string",
            "description": "success or failed."
          },
          "message": {
            "type": "string",
            "description": "Human-readable result."
          },
          "refCode": {
            "type": "string",
            "description": "Referral code."
          },
          "ownerAccountId": {
            "type": "string",
            "description": "Owner account id."
          },
          "rebateRate": {
            "type": "number",
            "description": "Configured rebate rate."
          }
        }
      },
      "UserRightSubscription": {
        "type": "object",
        "additionalProperties": true,
        "description": "Right subscription request/entitlement for one account.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "User subscription id."
          },
          "accountId": {
            "type": "string",
            "description": "Account eligible for the right subscription."
          },
          "ruleId": {
            "type": "integer",
            "format": "int64",
            "description": "Source right subscription rule id."
          },
          "symbol": {
            "type": "string",
            "description": "Subscribed symbol."
          },
          "eligibleShares": {
            "type": "integer",
            "format": "int64",
            "description": "Shares held or eligible for the entitlement."
          },
          "maxNewShares": {
            "type": "integer",
            "format": "int64",
            "description": "Maximum new shares that can be subscribed."
          },
          "subscribedShares": {
            "type": "integer",
            "format": "int64",
            "description": "Shares requested by the user."
          },
          "remainingShares": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining shares that can still be subscribed."
          },
          "price": {
            "type": "number",
            "description": "Subscription price per share."
          },
          "heldAmount": {
            "type": "number",
            "description": "Credit amount held for pending subscription."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "expired"
            ],
            "description": "Subscription request status."
          },
          "rejectReason": {
            "type": "string",
            "description": "Reason when rejected."
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "Subscription end date."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last update timestamp."
          }
        }
      },
      "SubscribeRightResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response returned after submitting a right subscription request.",
        "properties": {
          "status": {
            "type": "string",
            "description": "success or failed."
          },
          "message": {
            "type": "string",
            "description": "Human-readable result."
          },
          "subscription": {
            "$ref": "#/components/schemas/UserRightSubscription"
          },
          "heldAmount": {
            "type": "number",
            "description": "Credit amount held by the backend."
          }
        }
      },
      "ProductTradeLogItem": {
        "type": "object",
        "additionalProperties": true,
        "description": "Một bản ghi trade log do GetProductTradeLog trả về.",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID bản ghi trade log khi có."
          },
          "seq": {
            "type": "number",
            "description": "Số sequence của market-data."
          },
          "symbol": {
            "type": "string",
            "description": "Mã giao dịch."
          },
          "unixTime": {
            "type": "number",
            "description": "Thời điểm giao dịch dạng Unix milliseconds."
          },
          "price": {
            "type": "number",
            "description": "Giá khớp."
          },
          "volume": {
            "type": "number",
            "description": "Khối lượng khớp."
          },
          "change": {
            "type": "number",
            "description": "Mức thay đổi giá so với giá tham chiếu/trước đó."
          },
          "way": {
            "type": "number",
            "description": "Mã chiều giao dịch do market-data service trả về."
          },
          "boardID": {
            "type": "string",
            "description": "Mã bảng giao dịch."
          }
        }
      },
      "VNIndexData": {
        "type": "object",
        "additionalProperties": true,
        "description": "Snapshot chỉ số thị trường Việt Nam do GetVNIndex trả về.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Mã chỉ số, ví dụ VNINDEX."
          },
          "name": {
            "type": "string",
            "description": "Tên hiển thị của chỉ số."
          },
          "unixTime": {
            "type": "number",
            "description": "Timestamp snapshot dạng Unix milliseconds."
          },
          "chg": {
            "type": "number",
            "description": "Mức thay đổi của chỉ số so với tham chiếu."
          },
          "value": {
            "type": "number",
            "description": "Giá trị hiện tại của chỉ số."
          },
          "high": {
            "type": "number",
            "description": "Giá trị cao nhất trong phiên."
          },
          "low": {
            "type": "number",
            "description": "Giá trị thấp nhất trong phiên."
          },
          "totQty": {
            "type": "number",
            "description": "Tổng khối lượng giao dịch."
          },
          "totVal": {
            "type": "number",
            "description": "Tổng giá trị giao dịch."
          },
          "totStock": {
            "type": "number",
            "description": "Số lượng mã thành phần."
          },
          "type": {
            "type": "string",
            "description": "Nhãn loại chỉ số."
          },
          "up": {
            "type": "number",
            "description": "Số mã tăng."
          },
          "down": {
            "type": "number",
            "description": "Số mã giảm."
          },
          "noChange": {
            "type": "number",
            "description": "Số mã đứng giá."
          },
          "ceil": {
            "type": "number",
            "description": "Số mã trần."
          },
          "floor": {
            "type": "number",
            "description": "Số mã sàn."
          },
          "UpQty": {
            "type": "number",
            "description": "Tổng khối lượng của nhóm tăng."
          },
          "downQty": {
            "type": "number",
            "description": "Tổng khối lượng của nhóm giảm."
          },
          "noChangeQty": {
            "type": "number",
            "description": "Tổng khối lượng của nhóm đứng giá."
          },
          "upVal": {
            "type": "number",
            "description": "Tổng giá trị của nhóm tăng."
          },
          "downVal": {
            "type": "number",
            "description": "Tổng giá trị của nhóm giảm."
          },
          "noChangeVal": {
            "type": "number",
            "description": "Tổng giá trị của nhóm đứng giá."
          },
          "seq": {
            "type": "number",
            "description": "Sequence/timestamp của market-data."
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response lỗi kiểu RFC 7807 do ASP.NET/gateway trả về.",
        "properties": {
          "type": {
            "type": "string",
            "description": "URI loại lỗi."
          },
          "title": {
            "type": "string",
            "description": "Tiêu đề lỗi ngắn."
          },
          "status": {
            "type": "integer",
            "description": "Mã HTTP status."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp lỗi chi tiết."
          },
          "traceId": {
            "type": "string",
            "description": "Trace id để tra cứu lỗi backend."
          }
        }
      },
      "ValidationProblemDetails": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "errors": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Lỗi validation theo từng field request."
              }
            }
          }
        ],
        "description": "Response lỗi validation khi param hoặc body field không hợp lệ."
      },
      "AnyErrorBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ErrorResponse"
          },
          {
            "$ref": "#/components/schemas/ValidationProblemDetails"
          },
          {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          {
            "$ref": "#/components/schemas/AuthFlow"
          }
        ],
        "description": "Body lỗi có cấu trúc do gateway, ASP.NET service hoặc validation handler backend trả về."
      },
      "StopOrderModifyResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response sửa stop-order, trong đó data là stop order sau khi cập nhật.",
        "required": [
          "isSuccess",
          "detail",
          "data"
        ],
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "Backend đã chấp nhận và xử lý thao tác sửa hay chưa."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp thành công hoặc lỗi do service.orderapi trả về."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Object stop-order sau khi cập nhật.",
            "properties": {
              "orderId": {
                "type": "string",
                "description": "System stop order id. JSON serialization may also return OrderId depending on backend settings."
              },
              "symbol": {
                "type": "string",
                "description": "Trading symbol."
              },
              "side": {
                "type": "string",
                "enum": [
                  "B",
                  "S"
                ],
                "description": "B for buy, S for sell."
              },
              "stopPrice": {
                "type": "number",
                "description": "Trigger price."
              },
              "stopCondition": {
                "type": "string",
                "enum": [
                  ">=",
                  "<="
                ],
                "description": "Trigger condition comparing current market price against stopPrice."
              },
              "orderType": {
                "type": "string",
                "description": "Child order type sent when the trigger fires."
              },
              "price": {
                "type": "number",
                "nullable": true,
                "description": "Limit price for LO orders; null or ignored for market-style orders."
              },
              "quantity": {
                "type": "integer",
                "description": "Requested quantity."
              },
              "account": {
                "type": "string",
                "description": "Trading account."
              },
              "createdTime": {
                "type": "string",
                "format": "date-time",
                "description": "Creation time."
              },
              "status": {
                "type": "string",
                "description": "Stop order status, for example PENDING, COMPLETE, CANCELLED, or MODIFIED."
              },
              "bracketOrderId": {
                "type": "string",
                "description": "Ma bracket order cha khi stop order la mot leg cua bracket; null voi stop order doc lap.",
                "nullable": true
              },
              "specialOrderType": {
                "type": "string",
                "description": "Loai leg dac biet nhu ENTRY, TAKE_PROFIT hoac STOP_LOSS; null voi stop order doc lap.",
                "nullable": true
              },
              "remainingQty": {
                "type": "integer",
                "description": "Remaining quantity for sliced execution."
              },
              "lastCheckTime": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Last trigger check time."
              },
              "lastSliceTime": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Last time a child slice order was sent."
              },
              "minSliceIntervalMs": {
                "type": "integer",
                "format": "int64",
                "description": "Minimum interval between child slices in milliseconds."
              },
              "childOrderIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "System order ids of child broker orders."
              },
              "filledQty": {
                "type": "number",
                "description": "Filled quantity."
              },
              "filledAvgPrice": {
                "type": "number",
                "description": "Average filled price."
              }
            }
          }
        }
      },
      "PlaceOrderResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response đặt lệnh thường.",
        "required": [
          "isSuccess",
          "detail",
          "data"
        ],
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "Backend đã chấp nhận và gửi lệnh tới broker hay chưa."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp kết quả. Thành công thường là \"Order placed successfully\"; lỗi chứa lý do reject/validation."
          },
          "data": {
            "type": "string",
            "pattern": "^ORDER-",
            "example": "ORDER-V1StGXR8_Z5jdHi6B-myT",
            "description": "System order id do service.orderapi sinh cho lệnh mới. Dùng id này cho API cancel, execution reports và đối chiếu order stream. Đây không phải external broker order id và cũng không phải refOrderID client gửi vào request."
          }
        }
      },
      "CancelOrderResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response hủy lệnh.",
        "required": [
          "isSuccess",
          "detail",
          "data"
        ],
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "Backend đã chấp nhận yêu cầu hủy hay chưa."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp kết quả. Normal order thành công thường là \"Order cancelled successfully\"; stop/bracket order có thông điệp tương ứng."
          },
          "data": {
            "type": "string",
            "example": "ORDER-V1StGXR8_Z5jdHi6B-myT",
            "description": "Với normal order, đây là system order id đã hủy và thường trùng path param orderID. Nếu orderID bắt đầu bằng STOP- hoặc BRACKET-, controller route sang handler stop/bracket và data là chuỗi JSON đã serialize của StopOrder hoặc BracketOrder sau khi hủy."
          }
        }
      },
      "StopOrderCreateResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response tạo stop-order.",
        "required": [
          "isSuccess",
          "detail",
          "data"
        ],
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "Stop order đã được validate, lưu và publish execution report NEW hay chưa."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp kết quả. Thành công thường là \"Stop order placed successfully\"."
          },
          "data": {
            "type": "string",
            "pattern": "^STOP-",
            "example": "STOP-V1StGXR8_Z5jdHi6B-myT",
            "description": "System stop-order id do service.orderapi sinh. Dùng id này để get/modify/cancel stop order và đối chiếu stop-order execution report. Object stop order chi tiết được trả bởi API get stop-order."
          }
        }
      },
      "BracketOrderCreateResponse": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response tạo bracket order.",
        "required": [
          "isSuccess",
          "detail",
          "data"
        ],
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "description": "Bracket order đã được validate, lưu, tạo entry stop order và publish event NEW hay chưa."
          },
          "detail": {
            "type": "string",
            "description": "Thông điệp kết quả. Thành công thường là \"Bracket order placed successfully\"."
          },
          "data": {
            "type": "string",
            "pattern": "^BRACKET-",
            "example": "BRACKET-V1StGXR8_Z5jdHi6B-myT",
            "description": "System bracket order id do service.orderapi sinh. Dùng id này để get/cancel bracket order. Các id con như entryStopOrderId, takeProfitOrderId và stopLossOrderId nằm trong object BracketOrder trả bởi API get bracket order."
          }
        }
      }
    }
  }
}