> ## Documentation Index
> Fetch the complete documentation index at: https://hoalulab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lấy cấu hình cắt lỗ

> Lấy cấu hình mặc định cắt lỗ (cut loss config).



## OpenAPI

````yaml /vi/openapi/entrade-v1.yaml get /risk_configs
openapi: 3.1.0
info:
  title: Entrade Open API
  version: 1.0.0
  description: Đặc tả được trích xuất từ các request Bruno trong `collections/Entrade`.
servers:
  - url: https://services.entrade.com.vn/entrade-api
    description: Môi trường production
  - url: https://services-staging.entrade.com.vn/papertrade-entrade-api
    description: Môi trường staging
security:
  - BearerAuth: []
tags:
  - name: authentication
    description: API đăng nhập và cấp JWT token.
    x-group: Xác thực
  - name: account
    description: Thông tin tài khoản, tài sản và cấu hình rủi ro.
    x-group: Tài khoản
  - name: derivatives
    description: Giao dịch, sức mua, gói vay và vị thế phái sinh.
    x-group: Phái sinh
  - name: smart-order
    description: Lệnh điều kiện trên dịch vụ Smart Order.
    x-group: Smart Order
paths:
  /risk_configs:
    get:
      tags:
        - account
      summary: Lấy cấu hình cắt lỗ
      description: Lấy cấu hình mặc định cắt lỗ (cut loss config).
      operationId: listRiskConfigs
      parameters:
        - name: investorAccountId
          in: query
          description: Mã tài khoản của khách hàng
          schema:
            type: number
      responses:
        '200':
          description: Thành công - trả về cấu hình cắt lỗ
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/RiskConfigPage'
                  - $ref: '#/components/schemas/RiskConfigV1Page'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    RiskConfigPage:
      type: object
      properties:
        total:
          type: number
        data:
          type: array
          items:
            $ref: '#/components/schemas/RiskConfig'
    RiskConfigV1Page:
      type: object
      properties:
        total:
          type: number
        data:
          type: array
          items:
            $ref: '#/components/schemas/RiskConfigV1'
    RiskConfig:
      type: object
      properties:
        investorId:
          type: number
          description: Mã khách hàng
        investorAccountId:
          type: number
          description: Mã tài khoản
        cutLossRate:
          type: number
          description: Mức cắt lỗ hiện tại
        trailingEnabled:
          type: boolean
          description: Có đang bật lệnh cắt lỗ hay không
        createdDate:
          type: string
          description: >-
            Thời điểm (ngày giờ) đặt lệnh, theo định dạng ISO UTC 8601 format
            datetime. Ví dụ: 2022-07-15T10:00:00.111+07:00
        modifiedDate:
          type: string
          description: Thời điểm (ngày giờ) thay đổi cuối cùng của lệnh
        maxCutLossRate:
          type: number
          description: Mức cắt lỗ tối đa
        autoIncreaseDealRate:
          type: boolean
        enableAutoDealDepositNoti:
          type: boolean
          description: Bật tắt tự động nộp cọc vào deal
        defaultTakeProfitRate:
          type: number
        defaultTakeProfitPriceDelta:
          type: number
        defaultTakeProfitEnabled:
          type: boolean
        defaultTakeProfitType:
          type: string
        defaultTakeProfitOrderDelta:
          type: number
        defaultTakeProfitOrderStrategy:
          type: string
    RiskConfigV1:
      type: object
      properties:
        investorId:
          type: string
          description: Mã khách hàng
        investorAccountId:
          type: number
          description: Mã tài khoản
        cutLossRate:
          type: number
          description: Mức cắt lỗ hiện tại
        trailingEnabled:
          type: boolean
          description: Có đang bật lệnh cắt lỗ hay không
        createdDate:
          type: string
        modifiedDate:
          type: string
        maxCutLossRate:
          type: number
          description: Mức cắt lỗ tối đa
        status:
          type: string
          description: “ACTIVE” nghĩa là deal đang mở
        takeProfitRate:
          type: number
          description: Tỷ lệ lãi
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        status:
          type: number
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Lỗi máy chủ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token lấy từ API đăng nhập.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.