Skip to content
Longport Whale
Rate Setups(Package-based)

Add Billing Package

Submitted by the "Add" sub-page on the Rate Setups (Package-based) page (the actual form is in a step-by-step wizard).

POSThttps://b-api.longbridge.xyz/v2/billing/billing_package

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

namestringrequired

Package Name

categorystringrequired

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

org_idnumberrequired

Org ID

maket_rule_idsarray<string>

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

feesarray<string>

Fees. Array element { billing_item_id, currency, max, min, threshold }: billing_item_id references a billing scenario (billing_item) ID, currency is a currency code, and max/min/threshold are all numeric strings.

ratesarray<string>

Rates. 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

Fee Rate Type. An enum value whose exact meaning was not confirmed in the front end; it cascades according to the structure returned by billingItemFields.

metric_cycle_typenumberrequired

Metric Cycle Type

max_metric_typenumber

Max Metric Type

max_metric_ratestring

Max Metric Rate

min_metric_typenumber

Min Metric Type

min_metric_ratestring

Min Metric Rate

metric_typenumberrequired

Metric Type. The enum is the same as the metric_type of the charging scenario (billing_item), from ref billing_metric_type.

granularitynumberrequired

Granularity. The enum is the same as ref billing_granularity.

cutoff_methodnumberrequired

Cutoff Method. Enum is the same as the billing_fee_cutoff_method reference.

cutoff_digitsnumberrequired

Cutoff Digits

metric_type_bill_amount_item_idsarray<string>

Secondary Bill Amount Item IDs. Each element is a number; usage is the same as the field of the same name in the fee scenario (billing_item).

special_feesarray<string>

Special Fees. 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>

Trigger Conditions. Array element { field, value }: field is the condition-field number, value is a string; semantics follow the billing_my_rate_condition_field condition configuration.

Responses

HTTP 200No confirmable field definitions are available for the response yet.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs