Skip to content
Rate Setups(Package-based)

Add Billing Package

Add Billing Package.

Request parameters

  • Required: name (Package Name), category (Package Category), org_id (Org ID), fee_rate_type (Fee Rate Type), metric_cycle_type (Metric Cycle Type), metric_type (Metric Type), granularity (Granularity), cutoff_method (Cutoff Method), cutoff_digits (Cutoff Digits)
  • Optional: maket_rule_ids (Market Rule IDs), fees (Fees), rates (Rates), max_metric_type (Max Metric Type), max_metric_rate (Max Metric Rate), min_metric_type (Min Metric Type), min_metric_rate (Min Metric Rate), metric_type_bill_amount_item_ids (Secondary Bill Amount Item IDs), special_fees (Special Fees), conditions (Trigger Conditions)
  • See each field for its format, allowed values, and business meaning.

Result

On success, the endpoint completes the operation. See the 200 response schema for returned data and subsequent state information.

POSThttps://b-api.lbkrs.com/v2/billing/billing_package

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

lb_hk_charging.lb_hk_billingpackage_update

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

namestringrequired

This field is required.

categorystringrequired

Corresponds to the ORG_PACKAGE_TYPE and similar category enums in the first step of the form wizard.

Values
1
General
2
FD Biz
org_idnumberrequired

Org ID associated with this request.

maket_rule_idsarray<string>

The field name is spelled as in the API (maket_rule_ids, not market_rule_ids); elements are rule IDs (number).

feesarray<string>

Each array item has the form { billing_item_id, currency, max, min, threshold }. billing_item_id identifies the billing scenario, currency is a currency code, and max, min, and threshold are numeric strings.

ratesarray<string>

Array elements { gt, lte, fee_rate, min }: configure the fee rate fee_rate and minimum charge min per interval (greater than gt, less than or equal to lte).

fee_rate_typenumberrequired

An enum value whose exact meaning was not confirmed in the client; it cascades according to the structure returned by billingItemFields.

Values
1
Fixed Rate
2
Single-Step Tiered Rate
3
Monthly Tiered Rate
4
Floating Rate
5
Floating Rate Single-Tier
metric_cycle_typenumberrequired

This field is required.

max_metric_typenumber
max_metric_ratestring
min_metric_typenumber
min_metric_ratestring
metric_typenumberrequired

Uses the same metric_type enum as the billing scenario, sourced from the billing_metric_type reference data.

Values
1
Transaction Quantity(Fractional support)
2
Transaction Amount/Other Amount
3
Single Billing By Corresponding granularity
4
Options Quantity
5
Upstream
6
Number Of Billing Contracts
7
Number Of Orders
8
Number Of Transactions
9
Value Of Positions
10
Calculation Based On Existing Scenarios
11
Market Value Of Securities Lending
13
Transaction Quantity Of Board Lot (Transfer Warehouse)
14
Market Value (Transfer Warehouse)
15
Number of Ems Orders
granularitynumberrequired

The enum is the same as ref billing_granularity.

Values
1
Contract
2
Order
3
Trade Done
4
Ems Order
cutoff_methodnumberrequired

Enum is the same as the billing_fee_cutoff_method reference.

Values
0
Follow the scene
1
Round (round half up)
2
Round up
3
Round down
cutoff_digitsnumberrequired

This field is required.

metric_type_bill_amount_item_idsarray<string>

Each item is a number and follows the same rules as the field with the same name in the billing scenario.

special_feesarray<string>

Array elements { max, min, threshold, max_metric_type, max_metric_rate, min_metric_type, name, rate, metric_type, granularity, cutoff_method, cutoff_digits }, used to add special rate items to the package.

conditionsarray<string>

Array element { field, value }:

  • field: Condition field number (integer) identifying which business dimension the condition applies to. For example, 3 denotes the account/counter condition.
  • value: The selected value for the condition, as a string.

Responses

HTTP 200The request was processed successfully. The response data does not contain additional business fields.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs