Skip to content
Agent Billing

Edit Billing Company Fee

Updates an agent or institutional rate. This operation changes the live billing configuration; use it with caution.

Request parameters

  • Required: id (Company Fee Record ID), custodian_id (Custodian/Company ID), billing_item_id (Billing Item ID), threshold (Threshold), fee_rate_type (Fee Rate Type), calculation_method (Calculation Method), rates (Rate Rules), currency (Currency), min (Minimum Fee), max (Maximum Fee), granularity (Granularity), cutoff_method (Cutoff Method), cutoff_digits (Cutoff Digits)
  • Optional: billing_item (Billing Item Snapshot), metric_type (Metric Type), fixed_rates (Fixed Rates), max_metric (Max Metric Config), max_metric_type (Max Metric Type), max_metric_rate (Max Metric Rate), min_metric (Min Metric Config), min_metric_type (Min Metric Type), min_metric_rate (Min Metric Rate), metric_cycle_type (Metric Cycle Type), special_fees (Special Fee Conditions), audit_frontend_resource (Frontend Audit Snapshot)
  • See each field for its format, allowed values, default behavior, and business meaning.

Risk notice

This operation may affect live business data or asset state. Verify the target records, amounts, quantities, and operation type before calling it.

Result

On success, the endpoint completes the described business operation. See the 200 response schema for returned data.

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

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

idstringrequired

The rate record id; displayed and submitted with the form when editing.

custodian_idstringrequired

In edit mode this field is not editable; the original value is only displayed and submitted with the form.

billing_item_idstringrequired

The selected billing-item id; populated from the detail data in edit mode.

billing_itemobject

A billing-item object, containing fields such as id/name_loc.

metric_typestring

Values come from the billing_fee_metric_type dynamic enumeration and are not fixed.

Allowed values:

  • 1 - Transaction Quantity(Fractional support)
  • 2 - Transaction 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

Call GET /v1/datasets/refs/billing_fee_metric_type to retrieve the current data dictionary, and use the returned entry's key as this field's value.

1 · Transaction Quantity(Fractional support)2 · Transaction Amount3 · Single Billing By Corresponding granularity4 · Options Quantity5 · Upstream6 · Number Of Billing Contracts7 · Number Of Orders8 · Number Of Transactions9 · Value Of Positions10 · Calculation Based On Existing Scenarios11 · Market Value Of Securities Lending13 · Transaction Quantity Of Board Lot (Transfer Warehouse)14 · Market Value (Transfer Warehouse)15 · Number of Ems Orders

thresholdstringrequired

Required when metric_type is not "charge by contract count"; a numeric string with up to 10 decimal places.

fee_rate_typestringrequired

Values come from billing_package_fee_type_ref: 1 = fixed (FIXED), 2 = floating (FLOAT), 6 = tiered, and 7 = floating tiered. Broker billing does not support monthly tiers (3).

Allowed values:

  • 1 - FIXED
  • 2 - FLOAT
  • 6 - SINGLE_STEP
  • 7 - FLOAT_SINGLE_STEP

1 · FIXED2 · FLOAT6 · SINGLE_STEP7 · FLOAT_SINGLE_STEP

calculation_methodstringrequired

Derived from fee_rate_type: floating types (2, 7) are "2", the rest are "1".

fixed_ratesarray<string>

Used when fee_rate_type=1 (fixed rate); each element is { fee_rate: string }.

ratesarray<string>required

The final rate structure generated based on fee_rate_type; elements contain fields such as gt/lte/fee_rate.

currencystringrequired

Values come from the global_currency_filter_by_account_channel dynamic enumeration and are not fixed.

Call GET /v1/datasets/refs/tenant_currencies_by_channel to retrieve the current data dictionary, and use the returned entry's key as this field's value.

minstringrequired

Specifies Minimum Fee. This field is required.

maxstringrequired

Specifies Maximum Fee. This field is required.

max_metricobject

The raw form object { max_metric_type, max_metric_rate }.

max_metric_typestring

0 = disabled, 1 = enabled; expanded from max_metric.max_metric_type.

Allowed values:

  • 0 - Disabled
  • 1 - Enabled

0 · Disabled1 · Enabled

max_metric_ratestring

The rate value when the maximum-ratio limit is enabled; divided by 100 before submission.

granularitystringrequired

Values come from the billing_fee_granularity dynamic enumeration and are not fixed.

Allowed values:

  • 1 - Contract
  • 2 - Order
  • 3 - Trade_done
  • 4 - Ems_order

Call GET /v1/datasets/refs/billing_fee_granularity to retrieve the current data dictionary, and use the returned entry's key as this field's value.

1 · Contract2 · Order3 · Trade_done4 · Ems_order

min_metricobject

the request field raw object { min_metric_type, min_metric_rate }.

min_metric_typestring

Expanded from min_metric.min_metric_type.

min_metric_ratestring

Expanded from min_metric.min_metric_rate.

cutoff_methodstringrequired

Values come from the billing_fee_cutoff_method dynamic enumeration and are not fixed.

Allowed values:

  • 1 - Round
  • 2 - Round Up
  • 3 - Round Down

Call GET /v1/datasets/refs/billing_fee_cutoff_method to retrieve the current data dictionary, and use the returned entry's key as this field's value.

1 · Round2 · Round Up3 · Round Down

cutoff_digitsstringrequired

Values come from the billing_cutoff_digit dynamic enumeration and are not fixed.

Allowed values: 0, 1, 2, 3

Call GET /v1/datasets/refs/billing_cutoff_digit to retrieve the current data dictionary, and use the returned entry's key as this field's value.

0 · 01 · 12 · 23 · 3

metric_cycle_typenumber

Fixed logic: 4 when fee_rate_type is monthly-tiered (3), otherwise 0; always 0 for agent billing.

special_feesarray<string>

The array of differentiated rate conditions maintained by the SpecialFeeFields component.

audit_frontend_resourceobject

Audit metadata attached on submit; in the edit scenario it always includes { isEdit: true } and the original detail data.

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