Skip to content
Longport Whale
Agent Billing

Add Billing Company Fee

The "Add" action on the agent billing page, adding a new billing rate configuration for an institution. Involves real billing configuration changes.

POSThttps://b-api.longbridge.xyz/billing/company_fee

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

custodian_idstringrequired

Custodian/Company ID. Custodian; value comes from the clear_custodian_broker_no_all dynamic enum, not fixed.

billing_item_idstringrequired

Billing Item ID. The billing item ID, selected via the billing item selector.

billing_itemobject

Billing Item Snapshot. The billing-item object, containing fields such as id/name_loc, submitted together with the selected billing scenario.

metric_typestring

Metric Type. The measurement type; values come from the billing_fee_metric_type dynamic enum, such as 1 = filled quantity, 2 = filled amount, 9/10/11 = option-related, etc.; filtered by the selected billing item.

thresholdstringrequired

Threshold. The measurement threshold; required when metric_type is not "charge by number of contracts". A numeric string with at most 10 decimal places.

fee_rate_typestringrequired

Fee Rate Type. Rate type; value comes from the billing_package_fee_type_ref dynamic enum: 1=fixed rate, 2=floating rate, 6=tiered rate, 7=floating tiered; agent billing does not support monthly tiered (3).

calculation_methodstringrequired

Calculation Method. The calculation method, derived from fee_rate_type: floating types (2, 7) are "2", and all others are "1".

fixed_ratesarray<string>

Fixed Rates. Used when the rate is fixed (fee_rate_type=1); each element is { fee_rate }, a value ≥ 0 with at most 10 decimal places.

ratesarray<string>required

Rate Rules. The final rate structure submitted, generated from fixed_rates/single_rates/float_rates/month_rates according to fee_rate_type; each element contains fields such as gt/lte/fee_rate.

currencystringrequired

Currency. Currency; values come from the global_currency_filter_by_account_channel dynamic enum, such as USD/HKD/CNH.

minstringrequired

Minimum Fee. A numeric string; defaults to 0.

maxstringrequired

Maximum Fee. A numeric string, default 999999999.

max_metricobject

Max Metric Config. Maximum-ratio limit object { max_metric_type, max_metric_rate }, shown only under specific measurement-type / business-type combinations.

max_metric_typestring

Max Metric Type. 0 = disabled, 1 = enabled

max_metric_ratestring

Max Metric Rate. The rate value when the maximum ratio limit is enabled; multiplied by 100 for display and divided by 100 to restore it upon submission.

granularitystringrequired

Granularity. Billing granularity; value comes from the billing_fee_granularity dynamic enum, shown only in scenarios such as filled quantity / filled amount.

min_metricobject

Min Metric Config. The minimum ratio limit object { min_metric_type, min_metric_rate }.

min_metric_typestring

Min Metric Type. Expanded from min_metric.min_metric_type.

min_metric_ratestring

Min Metric Rate. Expanded from min_metric.min_metric_rate.

cutoff_methodstringrequired

Cutoff Method. Rounding method; value comes from the billing_fee_cutoff_method dynamic enum.

cutoff_digitsstringrequired

Cutoff Digits. The number of rounding digits; the values come from the billing_cutoff_digit dynamic enum. Disabled when the rounding method is "Follow Scenario".

metric_cycle_typenumber

Metric Cycle Type. Measurement-cycle type: 4 for monthly tiered (fee_rate_type=3), otherwise 0; always 0 for agent billing.

special_feesarray<string>

Special Fee Conditions. An array of differentiated rate conditions, filtered by business type (in the agent scenario, conditions whose business type includes 11 are filtered out).

audit_frontend_resourceobject

Frontend Audit Snapshot. A frontend form snapshot attached upon submission for backend audit tracing; in the add scenario it is fixed as an add operation.

Responses

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

No nested fields

Whale Docs