@polyester/sdk 0.32.2-devnet-20261103214026 → 0.33.0-devnet-20261104141024
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/dist/gen/auth/v1/auth_pb.js +1 -1
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js +1 -1
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +6 -4
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts.map +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/fees/v1/fees_pb.d.ts +228 -12
- package/dist/gen/fees/v1/fees_pb.d.ts.map +1 -1
- package/dist/gen/fees/v1/fees_pb.js +23 -4
- package/dist/gen/fees/v1/fees_pb.js.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +16 -121
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.js +4 -22
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +24 -21
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +54 -28
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +18 -12
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +28 -14
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +11 -7
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.js +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.js.map +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +3 -2
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts.map +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +4 -3
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +51 -31
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +19 -17
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +19 -19
- package/dist/services/balances/balances.schemas.d.ts +3 -3
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +2 -2
- package/dist/services/fees/fees.d.ts +1 -1
- package/dist/services/fees/fees.js +1 -1
- package/dist/services/fees/fees.js.map +1 -1
- package/dist/services/fees/fees.schemas.d.ts +172 -1
- package/dist/services/fees/fees.schemas.d.ts.map +1 -1
- package/dist/services/fees/fees.schemas.js +38 -1
- package/dist/services/fees/fees.schemas.js.map +1 -1
- package/dist/services/fees/fees.types.d.ts +2 -2
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +148 -148
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +7 -7
- package/dist/services/orders/orders-output.schemas.d.ts +11 -11
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +15 -15
- package/dist/services/trades/trades.schemas.d.ts +2 -2
- package/dist/services/transfers/transfers.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +34 -34
- package/package.json +1 -1
|
@@ -15,13 +15,184 @@ declare const GetSpotFeeRatesInputSchema: v.SchemaWithPipe<readonly [v.StrictObj
|
|
|
15
15
|
symbolId: number[];
|
|
16
16
|
}>]>;
|
|
17
17
|
type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;
|
|
18
|
+
declare const SpotFeeDiscountSchema: v.ObjectSchema<{
|
|
19
|
+
readonly makerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
20
|
+
readonly takerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
21
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
22
|
+
readonly allMarkets: v.BooleanSchema<undefined>;
|
|
23
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
24
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
25
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
26
|
+
}, undefined>, v.TransformAction<{
|
|
27
|
+
seconds: bigint;
|
|
28
|
+
nanos: number;
|
|
29
|
+
}, number>]>;
|
|
30
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
31
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
32
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
33
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
34
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
35
|
+
seconds: bigint;
|
|
36
|
+
nanos: number;
|
|
37
|
+
} | undefined, number | undefined>]>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
type SpotFeeDiscount = v.InferOutput<typeof SpotFeeDiscountSchema>;
|
|
40
|
+
/**
|
|
41
|
+
* Components of one market's effective rates. Applying the tier rate, then
|
|
42
|
+
* `marketMultiplier`, then the highest of `accountDiscounts`, then
|
|
43
|
+
* `referralDiscount`, in integer arithmetic, reproduces the effective rates.
|
|
44
|
+
*/
|
|
45
|
+
declare const SpotFeeRateBreakdownSchema: v.ObjectSchema<{
|
|
46
|
+
readonly tierMakerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
47
|
+
readonly tierTakerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
48
|
+
readonly marketMultiplier: v.OptionalSchema<v.ObjectSchema<{
|
|
49
|
+
readonly makerMultiplierPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
50
|
+
readonly takerMultiplierPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
51
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
52
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
53
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
54
|
+
}, undefined>, v.TransformAction<{
|
|
55
|
+
seconds: bigint;
|
|
56
|
+
nanos: number;
|
|
57
|
+
}, number>]>;
|
|
58
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
59
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
60
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
61
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
62
|
+
seconds: bigint;
|
|
63
|
+
nanos: number;
|
|
64
|
+
} | undefined, number | undefined>]>;
|
|
65
|
+
}, undefined>, undefined>;
|
|
66
|
+
readonly accountDiscounts: v.ArraySchema<v.ObjectSchema<{
|
|
67
|
+
readonly makerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
68
|
+
readonly takerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
69
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
70
|
+
readonly allMarkets: v.BooleanSchema<undefined>;
|
|
71
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
72
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
73
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
74
|
+
}, undefined>, v.TransformAction<{
|
|
75
|
+
seconds: bigint;
|
|
76
|
+
nanos: number;
|
|
77
|
+
}, number>]>;
|
|
78
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
79
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
80
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
81
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
82
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
83
|
+
seconds: bigint;
|
|
84
|
+
nanos: number;
|
|
85
|
+
} | undefined, number | undefined>]>;
|
|
86
|
+
}, undefined>, undefined>;
|
|
87
|
+
readonly referralDiscount: v.OptionalSchema<v.ObjectSchema<{
|
|
88
|
+
readonly makerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
89
|
+
readonly takerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
90
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
91
|
+
readonly allMarkets: v.BooleanSchema<undefined>;
|
|
92
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
93
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
94
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
95
|
+
}, undefined>, v.TransformAction<{
|
|
96
|
+
seconds: bigint;
|
|
97
|
+
nanos: number;
|
|
98
|
+
}, number>]>;
|
|
99
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
100
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
101
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
102
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
103
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
104
|
+
seconds: bigint;
|
|
105
|
+
nanos: number;
|
|
106
|
+
} | undefined, number | undefined>]>;
|
|
107
|
+
}, undefined>, undefined>;
|
|
108
|
+
}, undefined>;
|
|
109
|
+
type SpotFeeRateBreakdown = v.InferOutput<typeof SpotFeeRateBreakdownSchema>;
|
|
18
110
|
declare const SpotFeeRateSchema: v.ObjectSchema<{
|
|
19
111
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
20
112
|
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
21
113
|
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
22
114
|
readonly vipTier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
115
|
+
/**
|
|
116
|
+
* Rate a new order reserves its quote-asset fee at; size buy orders by it.
|
|
117
|
+
* At least the effective rates, and discounts never lower it.
|
|
118
|
+
*/
|
|
119
|
+
readonly reserveFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
120
|
+
/** Rate a new post-only limit order reserves its quote-asset fee at. */
|
|
121
|
+
readonly postOnlyReserveFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
122
|
+
readonly breakdown: v.ObjectSchema<{
|
|
123
|
+
readonly tierMakerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
124
|
+
readonly tierTakerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
125
|
+
readonly marketMultiplier: v.OptionalSchema<v.ObjectSchema<{
|
|
126
|
+
readonly makerMultiplierPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
127
|
+
readonly takerMultiplierPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
128
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
129
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
130
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
131
|
+
}, undefined>, v.TransformAction<{
|
|
132
|
+
seconds: bigint;
|
|
133
|
+
nanos: number;
|
|
134
|
+
}, number>]>;
|
|
135
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
136
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
137
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
138
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
139
|
+
seconds: bigint;
|
|
140
|
+
nanos: number;
|
|
141
|
+
} | undefined, number | undefined>]>;
|
|
142
|
+
}, undefined>, undefined>;
|
|
143
|
+
readonly accountDiscounts: v.ArraySchema<v.ObjectSchema<{
|
|
144
|
+
readonly makerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
145
|
+
readonly takerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
146
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
147
|
+
readonly allMarkets: v.BooleanSchema<undefined>;
|
|
148
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
149
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
150
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
151
|
+
}, undefined>, v.TransformAction<{
|
|
152
|
+
seconds: bigint;
|
|
153
|
+
nanos: number;
|
|
154
|
+
}, number>]>;
|
|
155
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
156
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
157
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
158
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
159
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
160
|
+
seconds: bigint;
|
|
161
|
+
nanos: number;
|
|
162
|
+
} | undefined, number | undefined>]>;
|
|
163
|
+
}, undefined>, undefined>;
|
|
164
|
+
readonly referralDiscount: v.OptionalSchema<v.ObjectSchema<{
|
|
165
|
+
readonly makerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
166
|
+
readonly takerDiscountPercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
167
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
168
|
+
readonly allMarkets: v.BooleanSchema<undefined>;
|
|
169
|
+
readonly effectiveFrom: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
170
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
171
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
172
|
+
}, undefined>, v.TransformAction<{
|
|
173
|
+
seconds: bigint;
|
|
174
|
+
nanos: number;
|
|
175
|
+
}, number>]>;
|
|
176
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
177
|
+
readonly effectiveTo: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
178
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
179
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
180
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
181
|
+
seconds: bigint;
|
|
182
|
+
nanos: number;
|
|
183
|
+
} | undefined, number | undefined>]>;
|
|
184
|
+
}, undefined>, undefined>;
|
|
185
|
+
}, undefined>;
|
|
186
|
+
/** Unix ms of the earliest scheduled change to a rate component; undefined when none. */
|
|
187
|
+
readonly nextChangeAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
188
|
+
readonly seconds: v.BigintSchema<undefined>;
|
|
189
|
+
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
190
|
+
}, undefined>, undefined>, v.TransformAction<{
|
|
191
|
+
seconds: bigint;
|
|
192
|
+
nanos: number;
|
|
193
|
+
} | undefined, number | undefined>]>;
|
|
23
194
|
}, undefined>;
|
|
24
195
|
type SpotFeeRate = v.InferOutput<typeof SpotFeeRateSchema>;
|
|
25
196
|
//#endregion
|
|
26
|
-
export { GetSpotFeeRatesInput, GetSpotFeeRatesInputSchema, SpotFeeRate, SpotFeeRateSchema };
|
|
197
|
+
export { GetSpotFeeRatesInput, GetSpotFeeRatesInputSchema, SpotFeeDiscount, SpotFeeRate, SpotFeeRateBreakdown, SpotFeeRateSchema };
|
|
27
198
|
//# sourceMappingURL=fees.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.schemas.d.ts","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fees.schemas.d.ts","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"mappings":";;cAWa,4BAA0B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAkB3B,uBAAuB,EAAE,kBAAkB;cAGjD,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;;;;KAUf,kBAAkB,EAAE,mBAAmB;;;;;;cAO7C,4BAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAepB,uBAAuB,EAAE,mBAAmB;cAE3C,mBAAiB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiBlB,cAAc,EAAE,mBAAmB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OptionalTimestampMsSchema, TimestampMsSchema } from "../../shared/schemas.js";
|
|
1
2
|
import { SymbolIdInputSchema } from "../shared.js";
|
|
2
3
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
3
4
|
import { VipTierNumberSchema } from "../vip/vip.schemas.js";
|
|
@@ -11,11 +12,47 @@ const GetSpotFeeRatesInputSchema = v.pipe(v.strictObject({
|
|
|
11
12
|
subaccountId: accountScopeToSubaccountId(account),
|
|
12
13
|
symbolId: symbolIds
|
|
13
14
|
})));
|
|
15
|
+
const SpotFeeDiscountSchema = v.object({
|
|
16
|
+
makerDiscountPercent: DecimalStringSchema,
|
|
17
|
+
takerDiscountPercent: DecimalStringSchema,
|
|
18
|
+
/** False when the discount applies to selected markets, this one included. */
|
|
19
|
+
allMarkets: v.boolean(),
|
|
20
|
+
effectiveFrom: TimestampMsSchema,
|
|
21
|
+
/** Unix ms, exclusive; undefined when the discount has no scheduled end. */
|
|
22
|
+
effectiveTo: OptionalTimestampMsSchema
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Components of one market's effective rates. Applying the tier rate, then
|
|
26
|
+
* `marketMultiplier`, then the highest of `accountDiscounts`, then
|
|
27
|
+
* `referralDiscount`, in integer arithmetic, reproduces the effective rates.
|
|
28
|
+
*/
|
|
29
|
+
const SpotFeeRateBreakdownSchema = v.object({
|
|
30
|
+
tierMakerFeeRatePercent: DecimalStringSchema,
|
|
31
|
+
tierTakerFeeRatePercent: DecimalStringSchema,
|
|
32
|
+
marketMultiplier: v.optional(v.object({
|
|
33
|
+
makerMultiplierPercent: DecimalStringSchema,
|
|
34
|
+
takerMultiplierPercent: DecimalStringSchema,
|
|
35
|
+
effectiveFrom: TimestampMsSchema,
|
|
36
|
+
effectiveTo: OptionalTimestampMsSchema
|
|
37
|
+
})),
|
|
38
|
+
accountDiscounts: v.array(SpotFeeDiscountSchema),
|
|
39
|
+
referralDiscount: v.optional(SpotFeeDiscountSchema)
|
|
40
|
+
});
|
|
14
41
|
const SpotFeeRateSchema = v.object({
|
|
15
42
|
symbolId: v.number(),
|
|
16
43
|
makerFeeRatePercent: DecimalStringSchema,
|
|
17
44
|
takerFeeRatePercent: DecimalStringSchema,
|
|
18
|
-
vipTier: VipTierNumberSchema
|
|
45
|
+
vipTier: VipTierNumberSchema,
|
|
46
|
+
/**
|
|
47
|
+
* Rate a new order reserves its quote-asset fee at; size buy orders by it.
|
|
48
|
+
* At least the effective rates, and discounts never lower it.
|
|
49
|
+
*/
|
|
50
|
+
reserveFeeRatePercent: DecimalStringSchema,
|
|
51
|
+
/** Rate a new post-only limit order reserves its quote-asset fee at. */
|
|
52
|
+
postOnlyReserveFeeRatePercent: DecimalStringSchema,
|
|
53
|
+
breakdown: SpotFeeRateBreakdownSchema,
|
|
54
|
+
/** Unix ms of the earliest scheduled change to a rate component; undefined when none. */
|
|
55
|
+
nextChangeAt: OptionalTimestampMsSchema
|
|
19
56
|
});
|
|
20
57
|
const SpotFeeRatesSchema = v.array(SpotFeeRateSchema);
|
|
21
58
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.schemas.js","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport { VipTierNumberSchema } from \"../vip/vip.schemas.js\";\n\nconst DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetSpotFeeRatesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolIds: v.optional(\n v.pipe(\n v.array(SymbolIdInputSchema),\n v.transform((ids) => [...new Set(ids)]),\n v.maxLength(100),\n ),\n [],\n ),\n }),\n v.transform(({ account, symbolIds }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n symbolId: symbolIds,\n })),\n);\n\nexport type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;\nexport type GetSpotFeeRatesRequest = v.InferOutput<typeof GetSpotFeeRatesInputSchema>;\n\nexport const SpotFeeRateSchema = v.object({\n symbolId: v.number(),\n makerFeeRatePercent: DecimalStringSchema,\n takerFeeRatePercent: DecimalStringSchema,\n vipTier: VipTierNumberSchema,\n});\n\nexport type SpotFeeRate = v.InferOutput<typeof SpotFeeRateSchema>;\n\nexport const SpotFeeRatesSchema = v.array(SpotFeeRateSchema);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fees.schemas.js","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { OptionalTimestampMsSchema, TimestampMsSchema } from \"../../shared/schemas.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport { VipTierNumberSchema } from \"../vip/vip.schemas.js\";\n\nconst DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetSpotFeeRatesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolIds: v.optional(\n v.pipe(\n v.array(SymbolIdInputSchema),\n v.transform((ids) => [...new Set(ids)]),\n v.maxLength(100),\n ),\n [],\n ),\n }),\n v.transform(({ account, symbolIds }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n symbolId: symbolIds,\n })),\n);\n\nexport type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;\nexport type GetSpotFeeRatesRequest = v.InferOutput<typeof GetSpotFeeRatesInputSchema>;\n\nconst SpotFeeDiscountSchema = v.object({\n makerDiscountPercent: DecimalStringSchema,\n takerDiscountPercent: DecimalStringSchema,\n /** False when the discount applies to selected markets, this one included. */\n allMarkets: v.boolean(),\n effectiveFrom: TimestampMsSchema,\n /** Unix ms, exclusive; undefined when the discount has no scheduled end. */\n effectiveTo: OptionalTimestampMsSchema,\n});\n\nexport type SpotFeeDiscount = v.InferOutput<typeof SpotFeeDiscountSchema>;\n\n/**\n * Components of one market's effective rates. Applying the tier rate, then\n * `marketMultiplier`, then the highest of `accountDiscounts`, then\n * `referralDiscount`, in integer arithmetic, reproduces the effective rates.\n */\nconst SpotFeeRateBreakdownSchema = v.object({\n tierMakerFeeRatePercent: DecimalStringSchema,\n tierTakerFeeRatePercent: DecimalStringSchema,\n marketMultiplier: v.optional(\n v.object({\n makerMultiplierPercent: DecimalStringSchema,\n takerMultiplierPercent: DecimalStringSchema,\n effectiveFrom: TimestampMsSchema,\n effectiveTo: OptionalTimestampMsSchema,\n }),\n ),\n accountDiscounts: v.array(SpotFeeDiscountSchema),\n referralDiscount: v.optional(SpotFeeDiscountSchema),\n});\n\nexport type SpotFeeRateBreakdown = v.InferOutput<typeof SpotFeeRateBreakdownSchema>;\n\nexport const SpotFeeRateSchema = v.object({\n symbolId: v.number(),\n makerFeeRatePercent: DecimalStringSchema,\n takerFeeRatePercent: DecimalStringSchema,\n vipTier: VipTierNumberSchema,\n /**\n * Rate a new order reserves its quote-asset fee at; size buy orders by it.\n * At least the effective rates, and discounts never lower it.\n */\n reserveFeeRatePercent: DecimalStringSchema,\n /** Rate a new post-only limit order reserves its quote-asset fee at. */\n postOnlyReserveFeeRatePercent: DecimalStringSchema,\n breakdown: SpotFeeRateBreakdownSchema,\n /** Unix ms of the earliest scheduled change to a rate component; undefined when none. */\n nextChangeAt: OptionalTimestampMsSchema,\n});\n\nexport type SpotFeeRate = v.InferOutput<typeof SpotFeeRateSchema>;\n\nexport const SpotFeeRatesSchema = v.array(SpotFeeRateSchema);\n"],"mappings":";;;;;;AASA,MAAM,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAEvE,MAAa,6BAA6B,EAAE,KACxC,EAAE,aAAa;CACX,GAAG;CACH,WAAW,EAAE,SACT,EAAE,KACE,EAAE,MAAM,mBAAmB,GAC3B,EAAE,WAAW,QAAQ,CAAC,GAAG,IAAI,IAAI,GAAG,CAAC,CAAC,GACtC,EAAE,UAAU,GAAG,CACnB,GACA,CAAC,CACL;AACJ,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,iBAAiB;CACrC,cAAc,2BAA2B,OAAO;CAChD,UAAU;AACd,EAAE,CACN;AAKA,MAAM,wBAAwB,EAAE,OAAO;CACnC,sBAAsB;CACtB,sBAAsB;;CAEtB,YAAY,EAAE,QAAQ;CACtB,eAAe;;CAEf,aAAa;AACjB,CAAC;;;;;;AASD,MAAM,6BAA6B,EAAE,OAAO;CACxC,yBAAyB;CACzB,yBAAyB;CACzB,kBAAkB,EAAE,SAChB,EAAE,OAAO;EACL,wBAAwB;EACxB,wBAAwB;EACxB,eAAe;EACf,aAAa;CACjB,CAAC,CACL;CACA,kBAAkB,EAAE,MAAM,qBAAqB;CAC/C,kBAAkB,EAAE,SAAS,qBAAqB;AACtD,CAAC;AAID,MAAa,oBAAoB,EAAE,OAAO;CACtC,UAAU,EAAE,OAAO;CACnB,qBAAqB;CACrB,qBAAqB;CACrB,SAAS;;;;;CAKT,uBAAuB;;CAEvB,+BAA+B;CAC/B,WAAW;;CAEX,cAAc;AAClB,CAAC;AAID,MAAa,qBAAqB,EAAE,MAAM,iBAAiB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GetSpotFeeRatesInput, SpotFeeRate } from "./fees.schemas.js";
|
|
2
|
-
export type { GetSpotFeeRatesInput, SpotFeeRate };
|
|
1
|
+
import { GetSpotFeeRatesInput, SpotFeeDiscount, SpotFeeRate, SpotFeeRateBreakdown } from "./fees.schemas.js";
|
|
2
|
+
export type { GetSpotFeeRatesInput, SpotFeeDiscount, SpotFeeRate, SpotFeeRateBreakdown };
|
|
@@ -14,7 +14,7 @@ type TimestampInit = {
|
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
16
16
|
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
|
|
17
|
-
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 |
|
|
17
|
+
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
|
|
20
20
|
readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
|
|
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
229
|
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
230
|
-
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 |
|
|
230
|
+
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
233
233
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
289
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
290
|
-
depth: 1 | 5 | 10 | 20 |
|
|
290
|
+
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
293
293
|
tsSec: number;
|
|
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
349
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
350
|
-
depth: 1 | 5 | 10 | 20 |
|
|
350
|
+
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
353
353
|
tsSec: number;
|