import { Message } from "@bufbuild/protobuf"; import { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace fees_pb_d_exports { export { FeeService, GetSpotFeeRatesRequest, GetSpotFeeRatesRequestSchema, GetSpotFeeRatesResponse, GetSpotFeeRatesResponseSchema, SpotFeeDiscount, SpotFeeDiscountSchema, SpotFeeMultiplier, SpotFeeMultiplierSchema, SpotFeeRate, SpotFeeRateBreakdown, SpotFeeRateBreakdownSchema, SpotFeeRateSchema, file_fees_v1_fees }; } /** * Describes the file fees/v1/fees.proto. */ declare const file_fees_v1_fees: GenFile; /** * SpotFeeRate describes, for one spot market and account target, the * effective maker and taker rates, the rates an order reserves its fee at, * and the components the effective rates are computed from. * * @generated from message fees.v1.SpotFeeRate */ type SpotFeeRate = Message<"fees.v1.SpotFeeRate"> & { /** * Stable numeric spot market identifier. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; /** * Effective maker fee rate encoded as a base-10 percentage string without a * percent sign. Values are between -100 and 100 inclusive. It is computed * from breakdown as SpotFeeRateBreakdown describes. * * @generated from field: string maker_fee_rate_percent = 3; */ makerFeeRatePercent: string; /** * Effective taker fee rate encoded as a non-negative base-10 percentage * string without a percent sign. Values are between 0 and 100 inclusive. It * is computed from breakdown as SpotFeeRateBreakdown describes. * * @generated from field: string taker_fee_rate_percent = 4; */ takerFeeRatePercent: string; /** * VIP tier used to resolve these rates, in the inclusive range 0 through 10. * * @generated from field: uint32 vip_tier = 5; */ vipTier: number; /** * Fee rate a new order on this market reserves its fee at when the fee is * paid in the quote asset, encoded as a non-negative base-10 percentage * string without a percent sign, between 0 and 100 inclusive. It is the * highest maker or taker rate of every VIP tier under the fee schedule in * force on this market, so it is at least the effective rates and * discounts never lower it. A buy limit order that pays its fee in the * quote asset reserves N + F, computed in units of 10^-18 of the quote * asset whatever the quote asset's own decimals: N is its price times its * quantity rounded up to 10^-18, and F is N times this rate rounded up to * 10^-18. It has sufficient quote balance when N + F is at most the * available quote balance, compared in the same 10^-18 units; other order * validation and market limits still apply. A post-only limit order * reserves at post_only_reserve_fee_rate_percent instead, and a buy sized * by a quote amount reserves at the lower of this rate and * taker_fee_rate_percent. Fills charge the effective rate, and the rest of * the reserve is released as the order fills or ends. * * @generated from field: string reserve_fee_rate_percent = 6; */ reserveFeeRatePercent: string; /** * Fee rate a new post-only limit order on this market reserves its fee at * when the fee is paid in the quote asset, encoded as a non-negative * base-10 percentage string without a percent sign, between 0 and 100 * inclusive: the highest maker rate of every VIP tier under the fee * schedule in force on this market, as reserve_fee_rate_percent describes. * * @generated from field: string post_only_reserve_fee_rate_percent = 7; */ postOnlyReserveFeeRatePercent: string; /** * Components of the effective maker and taker rates in force. * * @generated from field: fees.v1.SpotFeeRateBreakdown breakdown = 8; */ breakdown?: SpotFeeRateBreakdown | undefined; /** * Earliest scheduled time at which a component of these rates starts or * ends: a fee schedule or discount in breakdown ending, or a VIP tier, fee * policy, fee schedule or discount not yet in force starting. The effective * and reserve rates can change then, or stay the same. Omitted when no * change is scheduled. * * @generated from field: optional google.protobuf.Timestamp next_change_at = 9; */ nextChangeAt?: Timestamp | undefined; }; /** * Describes the message fees.v1.SpotFeeRate. * Use `create(SpotFeeRateSchema)` to create a new message. */ declare const SpotFeeRateSchema: GenMessage; /** * SpotFeeRateBreakdown lists the components of one market's effective fee * rates in force. A client reproduces maker_fee_rate_percent and * taker_fee_rate_percent exactly by applying the steps below to the maker * and the taker rate separately, in this order, in integer arithmetic. Work * in units of 0.0000001 percent: write every rate as an integer R, the * percentage times 10,000,000. Write every multiplier and discount as an * integer M or D, the percentage times 100. trunc(x / 10000) divides and * rounds toward zero. * * 1. Start from the VIP tier rate: R = tier_maker_fee_rate_percent or * tier_taker_fee_rate_percent. * 2. When market_multiplier is set, multiply by it: * R = trunc((R × M + 5000) / 10000). * 3. When R is above 0, let D be the highest maker or taker discount of * account_discounts, 0 when the list is empty. When D is above 0, apply * it: R = trunc((R × (10000 − D) + 5000) / 10000). * 4. When R is above 0 and referral_discount is set with a maker or taker * discount D above 0, apply it the same way: * R = trunc((R × (10000 − D) + 5000) / 10000). * * The result is the effective rate times 10,000,000. The steps multiply: a * 10% account discount and a 20% referral discount on a 0.1% rate leave * 0.1% × 0.9 × 0.8 = 0.072%. A negative maker rate is a rebate, which only * the multiplier scales. * * @generated from message fees.v1.SpotFeeRateBreakdown */ type SpotFeeRateBreakdown = Message<"fees.v1.SpotFeeRateBreakdown"> & { /** * Maker fee rate of the account's VIP tier under the fee policy in force, * before the market multiplier and discounts, encoded as a base-10 * percentage string without a percent sign. Values are between -100 and * 100 inclusive; a negative rate is a rebate. * * @generated from field: string tier_maker_fee_rate_percent = 1; */ tierMakerFeeRatePercent: string; /** * Taker fee rate of the account's VIP tier under the fee policy in force, * before the market multiplier and discounts, encoded as a non-negative * base-10 percentage string without a percent sign, between 0 and 100 * inclusive. * * @generated from field: string tier_taker_fee_rate_percent = 2; */ tierTakerFeeRatePercent: string; /** * Fee schedule multipliers in force on this market. Omitted when none is * in force, which leaves the tier rates unchanged. * * @generated from field: optional fees.v1.SpotFeeMultiplier market_multiplier = 3; */ marketMultiplier?: SpotFeeMultiplier | undefined; /** * Account discounts in force on this market, in no particular order. The * highest maker discount and the highest taker discount apply, each * possibly from a different discount. * * @generated from field: repeated fees.v1.SpotFeeDiscount account_discounts = 4; */ accountDiscounts: SpotFeeDiscount[]; /** * Referral discount in force for the account. Omitted when none is in * force. * * @generated from field: optional fees.v1.SpotFeeDiscount referral_discount = 5; */ referralDiscount?: SpotFeeDiscount | undefined; }; /** * Describes the message fees.v1.SpotFeeRateBreakdown. * Use `create(SpotFeeRateBreakdownSchema)` to create a new message. */ declare const SpotFeeRateBreakdownSchema: GenMessage; /** * SpotFeeMultiplier is the fee schedule of one market, which scales the VIP * tier rates. * * @generated from message fees.v1.SpotFeeMultiplier */ type SpotFeeMultiplier = Message<"fees.v1.SpotFeeMultiplier"> & { /** * Maker rate multiplier encoded as a base-10 percentage string without a * percent sign, between 0 and 100 inclusive with at most two decimals. * * @generated from field: string maker_multiplier_percent = 1; */ makerMultiplierPercent: string; /** * Taker rate multiplier encoded as a base-10 percentage string without a * percent sign, between 0 and 100 inclusive with at most two decimals. * * @generated from field: string taker_multiplier_percent = 2; */ takerMultiplierPercent: string; /** * Time from which the fee schedule is in force, inclusive. * * @generated from field: google.protobuf.Timestamp effective_from = 3; */ effectiveFrom?: Timestamp | undefined; /** * Time at which the fee schedule ends, exclusive. Omitted when it has no * scheduled end. * * @generated from field: optional google.protobuf.Timestamp effective_to = 4; */ effectiveTo?: Timestamp | undefined; }; /** * Describes the message fees.v1.SpotFeeMultiplier. * Use `create(SpotFeeMultiplierSchema)` to create a new message. */ declare const SpotFeeMultiplierSchema: GenMessage; /** * SpotFeeDiscount is one fee discount of the account's. * * @generated from message fees.v1.SpotFeeDiscount */ type SpotFeeDiscount = Message<"fees.v1.SpotFeeDiscount"> & { /** * Maker fee discount encoded as a base-10 percentage string without a * percent sign, with at most two decimals. It lowers a positive maker rate * only. * * @generated from field: string maker_discount_percent = 1; */ makerDiscountPercent: string; /** * Taker fee discount encoded as a base-10 percentage string without a * percent sign, with at most two decimals. * * @generated from field: string taker_discount_percent = 2; */ takerDiscountPercent: string; /** * True when the discount applies to every spot market; false when it * applies to selected markets, this one included. A referral discount * always applies to every spot market. * * @generated from field: bool all_markets = 3; */ allMarkets: boolean; /** * Time from which the discount is in force, inclusive. * * @generated from field: google.protobuf.Timestamp effective_from = 4; */ effectiveFrom?: Timestamp | undefined; /** * Time at which the discount ends, exclusive. Omitted when it has no * scheduled end. * * @generated from field: optional google.protobuf.Timestamp effective_to = 5; */ effectiveTo?: Timestamp | undefined; }; /** * Describes the message fees.v1.SpotFeeDiscount. * Use `create(SpotFeeDiscountSchema)` to create a new message. */ declare const SpotFeeDiscountSchema: GenMessage; /** * GetSpotFeeRatesRequest requests effective spot fee rates for one account * target and an optional set of markets. * * @generated from message fees.v1.GetSpotFeeRatesRequest */ type GetSpotFeeRatesRequest = Message<"fees.v1.GetSpotFeeRatesRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Optional unique spot market identifier filter. When empty, all currently * listed, non-disabled spot markets are returned. At most 100 identifiers * may be requested. * * @generated from field: repeated uint32 symbol_id = 2; */ symbolId: number[]; }; /** * Describes the message fees.v1.GetSpotFeeRatesRequest. * Use `create(GetSpotFeeRatesRequestSchema)` to create a new message. */ declare const GetSpotFeeRatesRequestSchema: GenMessage; /** * GetSpotFeeRatesResponse contains spot fee rates ordered by numeric market * identifier ascending. * * @generated from message fees.v1.GetSpotFeeRatesResponse */ type GetSpotFeeRatesResponse = Message<"fees.v1.GetSpotFeeRatesResponse"> & { /** * Effective spot fee rows ordered by symbol_id ascending. The result is a * finite snapshot of the requested or currently listed, non-disabled spot * market catalog and is not paginated. * * @generated from field: repeated fees.v1.SpotFeeRate fee_rates = 1; */ feeRates: SpotFeeRate[]; }; /** * Describes the message fees.v1.GetSpotFeeRatesResponse. * Use `create(GetSpotFeeRatesResponseSchema)` to create a new message. */ declare const GetSpotFeeRatesResponseSchema: GenMessage; /** * FeeService serves authenticated effective spot trading fee rates. * * @generated from service fees.v1.FeeService */ declare const FeeService: GenService<{ /** * Get effective maker and taker fee rates, the rates an order reserves its * fee at, and the components of the effective rates for the authenticated * caller's root account or selected subaccount. * * @generated from rpc fees.v1.FeeService.GetSpotFeeRates */ getSpotFeeRates: { methodKind: "unary"; input: typeof GetSpotFeeRatesRequestSchema; output: typeof GetSpotFeeRatesResponseSchema; }; }>; //#endregion export { FeeService, GetSpotFeeRatesRequest, GetSpotFeeRatesRequestSchema, GetSpotFeeRatesResponse, GetSpotFeeRatesResponseSchema, SpotFeeDiscount, SpotFeeDiscountSchema, SpotFeeMultiplier, SpotFeeMultiplierSchema, SpotFeeRate, SpotFeeRateBreakdown, SpotFeeRateBreakdownSchema, SpotFeeRateSchema, fees_pb_d_exports, file_fees_v1_fees }; //# sourceMappingURL=fees_pb.d.ts.map