4.18. Tra cứu gói lãi suất margin

GET/hydros/v1/account/{accountNo}/pricing-policy
Lấy danh sách pricing policy khả dụng cho tài khoản margin. Bao gồm policy đang active, policy pending (chờ apply), và các policy mà group của account có quyền đăng ký.

Header

TênKiểuBắt buộcMô tả
AuthorizationstringBearer <access token>.
Content-Typestringapplication/json.

Path variable

TênKiểuBắt buộcMô tả
accountNostringSố tài khoản margin.

Query parameters

TênKiểuBắt buộcMô tả
productIdint64ID sản phẩm. Nếu không truyền, hệ thống tự resolve từ account.
GET /hydros/v1/account/0001170730/pricing-policy
curl -X GET "https://openapi.tcbs.com.vn/hydros/v1/account/0001170730/pricing-policy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Response

Trả về danh sách pricing policy. Mỗi policy có thể chứa danh sách states là các thay đổi đang chờ apply.

PricingPolicy

TênKiểuBắt buộcMô tả
idint64ID pricing policy.
namestringTên policy.
statusenumTrạng thái: ACTIVE (đang dùng), INACTIVE (chưa đăng ký), PENDING (chờ apply).
pricingPolicyTypeenumLoại: DEFAULT, T_PLUS, DYNAMIC_MARGIN, TRIFORCE, G1, G2, G3.
undueInterestTypeenumLoại lãi suất trong hạn: FIXED hoặc LADDER.
undueFixedValuenumberLãi suất cố định trong hạn (% năm), khi type = FIXED.
undueLadderValuearrayBậc thang lãi suất (khi type = LADDER). Xem bảng LadderInterest.
leastMassRatenumberLãi suất mass thấp nhất.
greatestMassRatenumberLãi suất mass cao nhất.
overdueInterestnumberLãi suất quá hạn (% năm).
extensionInterestnumberLãi suất gia hạn.
interestCalculationBasisint64Cơ sở tính lãi: 365 hoặc 360.
validFromdateNgày bắt đầu hiệu lực (yyyy-MM-dd).
validTodateNgày kết thúc hiệu lực.
descriptionstringMô tả policy.
labelsarrayNhãn phân loại.
discountablebooleanCó thể chiết khấu lãi suất.
statesarrayDanh sách state thay đổi đang chờ apply.

LadderInterest

TênKiểuBắt buộcMô tả
idint64ID bậc lãi suất.
ratenumberLãi suất (% năm).
startDateint64Ngày bắt đầu (ngày thứ n kể từ ngày vay).
dueDateint64Ngày đáo hạn (ngày thứ n).
Lưu ý: Response chỉ chứa các field có giá trị (null fields bị loại bỏ). Timezone mặc định: Asia/Ho_Chi_Minh (+07:00).
{
"data": [
  {
    "id": 1,
    "name": "Standard Policy",
    "status": "ACTIVE",
    "pricingPolicyType": "DEFAULT",
    "undueInterestType": "FIXED",
    "undueFixedValue": 12.5,
    "leastMassRate": 10.0,
    "greatestMassRate": 15.0,
    "overdueInterest": 18.0,
    "extensionInterest": 14.0,
    "interestCalculationBasis": 365,
    "description": "Gói lãi suất tiêu chuẩn",
    "labels": ["standard", "default"],
    "validFrom": "2024-01-01",
    "validTo": "2025-12-31",
    "discountable": true,
    "states": [
      {
        "stateId": 10,
        "name": "State Jan 2025",
        "status": "WAIT_FOR_APPLY",
        "isAppliedForExisting": true,
        "undueInterestType": "LADDER",
        "undueLadderValue": [
          { "id": 5, "rate": 11.0, "startDate": 1, "dueDate": 15 }
        ],
        "overdueInterest": 17.0,
        "extensionInterest": 13.5,
        "validFrom": "2025-02-01",
        "validTo": "2025-12-31"
      }
    ]
  }
]
}

Mã lỗi

TênKiểuBắt buộcMô tả
200stringKhông tìm thấy sản phẩm cho account.
202stringKhông tìm thấy pricing policy hiện tại.
203stringAccount chưa đăng ký sản phẩm với productId chỉ định.