@polyester/sdk 0.32.2-devnet-20261103155212 → 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 +11 -1
- package/dist/core-client.d.ts +1 -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/auth/v1/subaccounts_pb.d.ts +17 -0
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js +3 -1
- package/dist/gen/auth/v1/subaccounts_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/index.js +3 -3
- 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 +5 -23
- 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 +69 -26
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +26 -9
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +38 -15
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +21 -8
- 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 +66 -28
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +35 -15
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +19 -19
- package/dist/services/balances/balances.js +1 -1
- package/dist/services/balances/balances.schemas.d.ts +4 -4
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- 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 +13 -13
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +148 -148
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +34 -34
- package/dist/services/orders/orders-input.schemas.d.ts +3 -3
- package/dist/services/orders/orders-output.schemas.d.ts +18 -18
- package/dist/services/orders/orders.codecs.js +1 -0
- package/dist/services/orders/orders.codecs.js.map +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +3 -3
- package/dist/services/subaccounts/index.d.ts +2 -2
- package/dist/services/subaccounts/subaccounts.d.ts +11 -3
- package/dist/services/subaccounts/subaccounts.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.js +14 -4
- package/dist/services/subaccounts/subaccounts.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +11 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.js +5 -1
- package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.types.d.ts +2 -2
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +1 -1
- package/dist/services/transfers/transfers.js +1 -1
- 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 +22 -22
- package/dist/services/triggers/triggers.codecs.js +1 -0
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/dist/wired-services.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ var FeesService = class {
|
|
|
17
17
|
this.#resolver = resolver;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Returns effective maker and taker spot fee rates for the resolved account target, optionally filtered by market identifier.
|
|
20
|
+
* Returns effective maker and taker spot fee rates, the rates an order reserves its fee at, and the components of the effective rates for the resolved account target, optionally filtered by market identifier.
|
|
21
21
|
*/
|
|
22
22
|
async getSpotRates(input = {}, options) {
|
|
23
23
|
const resolvedInput = resolveAccountScopedInput(input, this.#resolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.js","names":["#client","Proto.FeeService","#resolver"],"sources":["../../../src/services/fees/fees.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/fees/v1/fees_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n GetSpotFeeRatesInputSchema,\n SpotFeeRatesSchema,\n type GetSpotFeeRatesInput,\n type SpotFeeRate,\n} from \"./fees.schemas.js\";\n\n/**\n * Reads authenticated effective spot trading fee rates.\n */\nexport class FeesService {\n #client: Client<typeof Proto.FeeService>;\n #resolver?: SubaccountResolver;\n\n constructor(transports: AuthApiTransports, resolver?: SubaccountResolver) {\n this.#client = createClient(Proto.FeeService, transports.authApi);\n this.#resolver = resolver;\n }\n\n /**\n * Returns effective maker and taker spot fee rates for the resolved account target, optionally filtered by market identifier.\n */\n async getSpotRates(\n input: GetSpotFeeRatesInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotFeeRate[]> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const validatedInput = parse(GetSpotFeeRatesInputSchema, resolvedInput);\n const res = await this.#client.getSpotFeeRates(\n removeUndefined(validatedInput),\n toConnectCallOptions(options),\n );\n return parse(SpotFeeRatesSchema, res.feeRates);\n }\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,cAAb,MAAyB;CACrB;CACA;CAEA,YAAY,YAA+B,UAA+B;EACtE,KAAKA,UAAU,aAAaC,YAAkB,WAAW,OAAO;EAChE,KAAKC,YAAY;CACrB;;;;CAKA,MAAM,aACF,QAA8B,CAAC,GAC/B,SACsB;EACtB,MAAM,gBAAgB,0BAA0B,OAAO,KAAKA,SAAS;EACrE,MAAM,iBAAiB,MAAM,4BAA4B,aAAa;EACtE,MAAM,MAAM,MAAM,KAAKF,QAAQ,gBAC3B,gBAAgB,cAAc,GAC9B,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,oBAAoB,IAAI,QAAQ;CACjD;AACJ"}
|
|
1
|
+
{"version":3,"file":"fees.js","names":["#client","Proto.FeeService","#resolver"],"sources":["../../../src/services/fees/fees.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/fees/v1/fees_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n GetSpotFeeRatesInputSchema,\n SpotFeeRatesSchema,\n type GetSpotFeeRatesInput,\n type SpotFeeRate,\n} from \"./fees.schemas.js\";\n\n/**\n * Reads authenticated effective spot trading fee rates.\n */\nexport class FeesService {\n #client: Client<typeof Proto.FeeService>;\n #resolver?: SubaccountResolver;\n\n constructor(transports: AuthApiTransports, resolver?: SubaccountResolver) {\n this.#client = createClient(Proto.FeeService, transports.authApi);\n this.#resolver = resolver;\n }\n\n /**\n * Returns effective maker and taker spot fee rates, the rates an order reserves its fee at, and the components of the effective rates for the resolved account target, optionally filtered by market identifier.\n */\n async getSpotRates(\n input: GetSpotFeeRatesInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotFeeRate[]> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const validatedInput = parse(GetSpotFeeRatesInputSchema, resolvedInput);\n const res = await this.#client.getSpotFeeRates(\n removeUndefined(validatedInput),\n toConnectCallOptions(options),\n );\n return parse(SpotFeeRatesSchema, res.feeRates);\n }\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,cAAb,MAAyB;CACrB;CACA;CAEA,YAAY,YAA+B,UAA+B;EACtE,KAAKA,UAAU,aAAaC,YAAkB,WAAW,OAAO;EAChE,KAAKC,YAAY;CACrB;;;;CAKA,MAAM,aACF,QAA8B,CAAC,GAC/B,SACsB;EACtB,MAAM,gBAAgB,0BAA0B,OAAO,KAAKA,SAAS;EACrE,MAAM,iBAAiB,MAAM,4BAA4B,aAAa;EACtE,MAAM,MAAM,MAAM,KAAKF,QAAQ,gBAC3B,gBAAgB,cAAc,GAC9B,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,oBAAoB,IAAI,QAAQ;CACjD;AACJ"}
|
|
@@ -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 };
|
|
@@ -13,8 +13,8 @@ type TimestampInit = {
|
|
|
13
13
|
};
|
|
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
|
-
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"
|
|
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 |
|
|
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 | 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>;
|
|
@@ -122,7 +122,7 @@ declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRa
|
|
|
122
122
|
type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;
|
|
123
123
|
declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
124
124
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
125
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
125
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
126
126
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
127
127
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
128
128
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -142,7 +142,7 @@ declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
|
142
142
|
type OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;
|
|
143
143
|
declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): {
|
|
144
144
|
symbolId: number;
|
|
145
|
-
interval: DecodedEnum<"
|
|
145
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
146
146
|
tsSec: number;
|
|
147
147
|
isFinal: boolean;
|
|
148
148
|
bids: {
|
|
@@ -226,8 +226,8 @@ declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw,
|
|
|
226
226
|
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
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
230
|
-
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 100 |
|
|
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 | "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>]>;
|
|
@@ -267,7 +267,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
267
267
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"close" | "peak">>]>;
|
|
268
268
|
readonly liveBucket: v.OptionalSchema<v.ObjectSchema<{
|
|
269
269
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
270
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
270
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
271
271
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
272
272
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
273
273
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -286,8 +286,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
286
286
|
}, undefined>, undefined>;
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
|
-
interval: DecodedEnum<"
|
|
290
|
-
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 |
|
|
289
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
290
|
+
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
293
293
|
tsSec: number;
|
|
@@ -327,7 +327,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
327
327
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
328
328
|
liveBucket?: {
|
|
329
329
|
symbolId: number;
|
|
330
|
-
interval: DecodedEnum<"
|
|
330
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
331
331
|
tsSec: number;
|
|
332
332
|
isFinal: boolean;
|
|
333
333
|
bids?: {
|
|
@@ -346,8 +346,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
346
346
|
} | undefined;
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
|
-
interval: DecodedEnum<"
|
|
350
|
-
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 |
|
|
349
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
350
|
+
depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 200 | 50 | 500 | 1000;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
353
353
|
tsSec: number;
|
|
@@ -387,7 +387,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
387
387
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
388
388
|
liveBucket: {
|
|
389
389
|
symbolId: number;
|
|
390
|
-
interval: DecodedEnum<"
|
|
390
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
391
391
|
tsSec: number;
|
|
392
392
|
isFinal: boolean;
|
|
393
393
|
bids: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
2
1
|
import { U128Value } from "../../utils/u128.js";
|
|
2
|
+
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
//#region src/services/internal-transfers/internal-transfers.schemas.d.ts
|
|
5
5
|
declare const InternalTransferDestinationInputSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|