@metamask-previews/perps-controller 24.1.0-preview-e9ac9ffe1 → 24.1.0-preview-70269bbdb

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/PerpsController-method-action-types.d.ts +26 -1
  3. package/dist/PerpsController-method-action-types.d.ts.map +1 -1
  4. package/dist/PerpsController-method-action-types.js.map +1 -1
  5. package/dist/PerpsController.d.ts +20 -1
  6. package/dist/PerpsController.d.ts.map +1 -1
  7. package/dist/PerpsController.js +159 -2
  8. package/dist/PerpsController.js.map +1 -1
  9. package/dist/constants/eventNames.d.ts +0 -6
  10. package/dist/constants/eventNames.d.ts.map +1 -1
  11. package/dist/constants/eventNames.js +0 -13
  12. package/dist/constants/eventNames.js.map +1 -1
  13. package/dist/constants/hyperLiquidConfig.d.ts +19 -3
  14. package/dist/constants/hyperLiquidConfig.d.ts.map +1 -1
  15. package/dist/constants/hyperLiquidConfig.js +21 -5
  16. package/dist/constants/hyperLiquidConfig.js.map +1 -1
  17. package/dist/constants/performanceMetrics.d.ts +2 -14
  18. package/dist/constants/performanceMetrics.d.ts.map +1 -1
  19. package/dist/constants/performanceMetrics.js +1 -17
  20. package/dist/constants/performanceMetrics.js.map +1 -1
  21. package/dist/constants/perpsConfig.d.ts +27 -0
  22. package/dist/constants/perpsConfig.d.ts.map +1 -1
  23. package/dist/constants/perpsConfig.js +27 -0
  24. package/dist/constants/perpsConfig.js.map +1 -1
  25. package/dist/index.d.ts +7 -5
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +4 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/perpsErrorCodes.d.ts +2 -0
  30. package/dist/perpsErrorCodes.d.ts.map +1 -1
  31. package/dist/perpsErrorCodes.js +2 -0
  32. package/dist/perpsErrorCodes.js.map +1 -1
  33. package/dist/providers/HyperLiquidProvider.d.ts +7 -3
  34. package/dist/providers/HyperLiquidProvider.d.ts.map +1 -1
  35. package/dist/providers/HyperLiquidProvider.js +161 -103
  36. package/dist/providers/HyperLiquidProvider.js.map +1 -1
  37. package/dist/providers/LighterProvider.d.ts +3 -3
  38. package/dist/providers/LighterProvider.d.ts.map +1 -1
  39. package/dist/providers/LighterProvider.js +20 -9
  40. package/dist/providers/LighterProvider.js.map +1 -1
  41. package/dist/services/TerminalMarketService.d.ts.map +1 -1
  42. package/dist/services/TerminalMarketService.js +4 -2
  43. package/dist/services/TerminalMarketService.js.map +1 -1
  44. package/dist/services/TradingService.js +11 -9
  45. package/dist/services/TradingService.js.map +1 -1
  46. package/dist/types/index.d.ts +107 -2
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/index.js +0 -1
  49. package/dist/types/index.js.map +1 -1
  50. package/dist/utils/advancedOrderLists.d.ts +104 -0
  51. package/dist/utils/advancedOrderLists.d.ts.map +1 -0
  52. package/dist/utils/advancedOrderLists.js +421 -0
  53. package/dist/utils/advancedOrderLists.js.map +1 -0
  54. package/dist/utils/advancedOrders.d.ts +275 -0
  55. package/dist/utils/advancedOrders.d.ts.map +1 -0
  56. package/dist/utils/advancedOrders.js +639 -0
  57. package/dist/utils/advancedOrders.js.map +1 -0
  58. package/dist/utils/hyperLiquidAdapter.d.ts.map +1 -1
  59. package/dist/utils/hyperLiquidAdapter.js +4 -1
  60. package/dist/utils/hyperLiquidAdapter.js.map +1 -1
  61. package/dist/utils/hyperLiquidValidation.d.ts.map +1 -1
  62. package/dist/utils/hyperLiquidValidation.js +22 -57
  63. package/dist/utils/hyperLiquidValidation.js.map +1 -1
  64. package/dist/utils/index.d.ts +2 -0
  65. package/dist/utils/index.d.ts.map +1 -1
  66. package/dist/utils/index.js +2 -0
  67. package/dist/utils/index.js.map +1 -1
  68. package/dist/utils/lighterScaleOrders.d.ts.map +1 -1
  69. package/dist/utils/lighterScaleOrders.js +16 -65
  70. package/dist/utils/lighterScaleOrders.js.map +1 -1
  71. package/dist/utils/perpsFormatters.d.ts +29 -4
  72. package/dist/utils/perpsFormatters.d.ts.map +1 -1
  73. package/dist/utils/perpsFormatters.js +51 -5
  74. package/dist/utils/perpsFormatters.js.map +1 -1
  75. package/docs/README.md +28 -0
  76. package/docs/architecture.md +256 -0
  77. package/docs/contracts/events.md +267 -0
  78. package/docs/contracts/feature-flags.md +39 -0
  79. package/docs/contracts/traces.md +83 -0
  80. package/docs/formatting.md +82 -0
  81. package/docs/tpsl.md +89 -0
  82. package/docs/venues/hyperliquid/README.md +27 -0
  83. package/docs/venues/hyperliquid/init-flow.md +116 -0
  84. package/docs/venues/hyperliquid/order-types.md +60 -0
  85. package/docs/venues/hyperliquid/trading-rules.md +77 -0
  86. package/docs/venues/lighter/api-keys.md +58 -0
  87. package/docs/venues/lighter/capabilities.md +74 -0
  88. package/package.json +4 -3
@@ -0,0 +1,275 @@
1
+ import { BigNumber } from 'bignumber.js';
2
+ import type { ChaseOrder, ChaseOrderLists, ChaseOrderStatus, ChasePlacementCheck, PerpsOrderCapabilities, PerpsStrategyRules, ScaleLadderSizing, ScalePriceWarning, StrategyOrderType, TwapOrder, TwapOrderStatus, TwapSlicePreview } from '../types/index.js';
3
+ /** Result shape shared with `validateOrderParams`. */
4
+ export type AdvancedOrderValidationResult = {
5
+ isValid: boolean;
6
+ error?: string;
7
+ };
8
+ /**
9
+ * The venue's rules for one strategy on a market, read from the result of
10
+ * `getOrderCapabilities`.
11
+ *
12
+ * @param capabilities - Order capabilities of the market.
13
+ * @param strategy - Strategy whose rules are wanted.
14
+ * @returns The rules, or `undefined` when the market is unavailable, the
15
+ * venue does not run that strategy there, or it does not report the rules.
16
+ */
17
+ export declare function getStrategyRules<Strategy extends StrategyOrderType>(capabilities: PerpsOrderCapabilities | undefined, strategy: Strategy): PerpsStrategyRules[Strategy] | undefined;
18
+ /** TWAP statuses that mean the schedule is still executing. */
19
+ export declare const TWAP_ORDER_ACTIVE_STATUSES: readonly TwapOrderStatus[];
20
+ /**
21
+ * Whether a TWAP schedule is still executing.
22
+ *
23
+ * @param order - TWAP schedule.
24
+ * @returns True for an active schedule; every other status has ended.
25
+ */
26
+ export declare function isTwapOrderActive(order: Pick<TwapOrder, 'status'>): boolean;
27
+ /**
28
+ * Split TWAP schedules into running and ended ones, keeping their order.
29
+ *
30
+ * @param orders - TWAP schedules.
31
+ * @returns Active and ended schedules.
32
+ */
33
+ export declare function partitionTwapOrders(orders: readonly TwapOrder[]): {
34
+ active: TwapOrder[];
35
+ ended: TwapOrder[];
36
+ };
37
+ /**
38
+ * Bound a TWAP's executed size to its schedule and derive what remains.
39
+ *
40
+ * @param totalSize - Schedule size.
41
+ * @param executedSize - Executed size as reported or proven by fills.
42
+ * @returns Executed size within `[0, totalSize]`, the remaining size and the
43
+ * fill progress in basis points (floored; 0 for an empty schedule).
44
+ */
45
+ export declare function boundTwapExecution(totalSize: BigNumber, executedSize: BigNumber): {
46
+ executedSize: BigNumber;
47
+ remainingSize: BigNumber;
48
+ fillProgressBps: number;
49
+ };
50
+ /**
51
+ * Whether a TWAP record replaces the one held for the same schedule.
52
+ *
53
+ * A venue reports one lifecycle as an activation plus a terminal record, and
54
+ * `lastUpdated` can tie between them (it folds in slice fills both receive) or
55
+ * favor the activation (a read folds fills in milliseconds, a terminal push
56
+ * carries whole seconds). Terminality therefore decides first, since an ended
57
+ * schedule never runs again; otherwise the strictly newer record wins.
58
+ *
59
+ * @param candidate - Record just received.
60
+ * @param existing - Record already held.
61
+ * @returns True when the candidate replaces the held record.
62
+ */
63
+ export declare function supersedesTwapOrder(candidate: Pick<TwapOrder, 'status' | 'lastUpdated'>, existing: Pick<TwapOrder, 'status' | 'lastUpdated'>): boolean;
64
+ /**
65
+ * Raise a TWAP's execution totals to what its slice fills prove executed.
66
+ *
67
+ * A venue can keep reporting zero executed size while slices fill, so the
68
+ * fills are the fresher record. The totals are only ever raised: fills a read
69
+ * did not page in never lower what the venue already reported.
70
+ *
71
+ * @param order - TWAP schedule with the slice fills known for it.
72
+ * @returns The schedule with totals and progress raised from its fills.
73
+ */
74
+ export declare function reconcileTwapExecution(order: TwapOrder): TwapOrder;
75
+ /**
76
+ * Identity of a TWAP schedule across reads and stream pushes.
77
+ *
78
+ * @param order - TWAP schedule.
79
+ * @returns Provider-scoped order key.
80
+ */
81
+ export declare const twapOrderKey: (order: Pick<TwapOrder, 'orderId' | 'providerId'>) => string;
82
+ /**
83
+ * Merge TWAP records from a read or a stream push into held ones.
84
+ *
85
+ * A record is matched by provider and order ID. Held records missing from
86
+ * `incoming` are kept: a stream carries no fills and caps ended history, so
87
+ * absence there is not proof a schedule is gone.
88
+ *
89
+ * @param retained - Records already held.
90
+ * @param incoming - Records from a read or stream push.
91
+ * @returns Merged records, newest first.
92
+ */
93
+ export declare function mergeTwapOrders(retained: readonly TwapOrder[], incoming: readonly TwapOrder[]): TwapOrder[];
94
+ /**
95
+ * Check a TWAP draft against the venue's rules.
96
+ *
97
+ * @param params - Draft values and venue rules.
98
+ * @param params.rules - TWAP rules from `getStrategyRules`; absent means the
99
+ * venue does not run TWAP on this market.
100
+ * @param params.durationMinutes - Running time in whole minutes.
101
+ * @param params.usdAmount - Total order value in USD, when known.
102
+ * @returns Validation result with a `PERPS_ERROR_CODES` error.
103
+ */
104
+ export declare function validateTwapOrder(params: {
105
+ rules: PerpsStrategyRules['twap'];
106
+ durationMinutes?: number;
107
+ usdAmount?: string | number;
108
+ }): AdvancedOrderValidationResult;
109
+ /**
110
+ * Preview how a TWAP is cut into slices on the venue's cadence.
111
+ *
112
+ * The slice size is floored to the venue's size grid, so it is never shown
113
+ * finer than the venue can trade; `isBelowMinimumSize` flags a slice that
114
+ * floors to nothing.
115
+ *
116
+ * @param params - Draft values and venue rules.
117
+ * @param params.rules - TWAP rules from `getStrategyRules`.
118
+ * @param params.durationMinutes - Running time in whole minutes.
119
+ * @param params.size - Total size in base units.
120
+ * @param params.sizeDecimals - Venue size precision of the market.
121
+ * @param params.price - Reference price, to value each slice.
122
+ * @returns The preview, or `undefined` when the rules or inputs are missing.
123
+ */
124
+ export declare function computeTwapSlicePreview(params: {
125
+ rules: PerpsStrategyRules['twap'];
126
+ durationMinutes?: number;
127
+ size?: string | number;
128
+ sizeDecimals: number;
129
+ price?: string | number;
130
+ }): TwapSlicePreview | undefined;
131
+ /**
132
+ * Chase statuses that belong in the running list: still chasing, or waiting
133
+ * for a cancel to settle.
134
+ */
135
+ export declare const CHASE_ORDER_RUNNING_STATUSES: readonly ChaseOrderStatus[];
136
+ /**
137
+ * Whether a chase belongs in the running list rather than history.
138
+ *
139
+ * @param order - Chase snapshot.
140
+ * @returns True while it chases or its cancel is pending.
141
+ */
142
+ export declare function isChaseOrderRunning(order: Pick<ChaseOrder, 'status'>): boolean;
143
+ /**
144
+ * Whether cancelling a chase by its handle can still do something: it is
145
+ * running (a pending cancel may be retried), or it stopped with a child order
146
+ * still resting.
147
+ *
148
+ * @param order - Chase snapshot.
149
+ * @returns True when a cancel should be offered.
150
+ */
151
+ export declare function isChaseOrderCancelable(order: Pick<ChaseOrder, 'status' | 'restingOrderId'>): boolean;
152
+ /**
153
+ * Check whether another chase can be placed under the venue's cap.
154
+ *
155
+ * Only chases that are still chasing take a slot; one waiting on a cancel or
156
+ * stopped by a cap does not, matching what the provider enforces.
157
+ *
158
+ * @param params - Venue rules and current chase snapshots.
159
+ * @param params.rules - Chase rules from `getStrategyRules`.
160
+ * @param params.chaseOrders - Current chase snapshots for the account.
161
+ * @returns Whether a placement fits, with the counts it was judged on.
162
+ */
163
+ export declare function checkChasePlacement(params: {
164
+ rules: PerpsStrategyRules['chase'];
165
+ chaseOrders: readonly Pick<ChaseOrder, 'status'>[];
166
+ }): ChasePlacementCheck;
167
+ /**
168
+ * Identity of a chase session across reads.
169
+ *
170
+ * @param order - Chase snapshot.
171
+ * @returns Provider-scoped handle key.
172
+ */
173
+ export declare const chaseOrderKey: (order: Pick<ChaseOrder, 'handle' | 'providerId'>) => string;
174
+ /**
175
+ * Build running and history chase lists from a fresh read, keeping ended
176
+ * chases a provider has since dropped.
177
+ *
178
+ * A chase that vanishes while running is dropped: without its ending the list
179
+ * would show a guess. History is bounded to the newest `historyLimit` rows.
180
+ *
181
+ * @param params - Previous lists and the latest read.
182
+ * @param params.previous - Lists built from the previous read.
183
+ * @param params.current - Chase snapshots from the latest read.
184
+ * @param params.historyLimit - Most ended chases kept.
185
+ * @returns Running and history lists, newest first.
186
+ */
187
+ export declare function mergeChaseOrderHistory(params: {
188
+ previous?: ChaseOrderLists;
189
+ current: readonly ChaseOrder[];
190
+ historyLimit?: number;
191
+ }): ChaseOrderLists;
192
+ /**
193
+ * Size a scale ladder by the one rule every venue applies: an exact base size
194
+ * is split as given; a USD amount buys the largest size on the venue's grid
195
+ * whose ladder value, rung price times rung size, stays within it.
196
+ *
197
+ * @param params - Normalized ladder prices and the sizing intent.
198
+ * @param params.prices - Venue-normalized rung prices, in ladder order.
199
+ * @param params.sizeDecimals - Venue size precision of the market.
200
+ * @param params.skew - Optional rung-size skew, as `splitScaleSizes` takes it.
201
+ * @param params.size - Exact total base size.
202
+ * @param params.usdAmount - Maximum ladder value in USD.
203
+ * @returns Rung sizes and ladder totals.
204
+ * @throws `ORDER_SIZE_POSITIVE` for a missing or non-positive amount, and
205
+ * `ORDER_SCALE_SIZE_TOO_SMALL` when no rung can get a grid unit. The internal
206
+ * guards `ORDER_SCALE_SIZE_CONSERVATION_FAILED` and
207
+ * `ORDER_SCALE_EXPOSURE_EXCEEDS_INTENT` fire only if the split itself breaks.
208
+ */
209
+ export declare function sizeScaleLadder(params: {
210
+ prices: readonly string[];
211
+ sizeDecimals: number;
212
+ skew?: number;
213
+ } & ({
214
+ size: string;
215
+ usdAmount?: never;
216
+ } | {
217
+ usdAmount: string;
218
+ size?: never;
219
+ })): ScaleLadderSizing;
220
+ /**
221
+ * Check a scale draft against the venue's rules and, when the venue preview
222
+ * is known, its per-rung minimum.
223
+ *
224
+ * @param params - Draft values, venue rules and the optional venue preview.
225
+ * @param params.rules - Scale rules from `getStrategyRules`.
226
+ * @param params.minPrice - Lowest ladder price.
227
+ * @param params.maxPrice - Highest ladder price.
228
+ * @param params.count - Number of rungs.
229
+ * @param params.skew - Optional rung-size skew.
230
+ * @param params.preview - Ladder prices and sizes from `getScalePriceLadder`,
231
+ * with the venue's per-order minimum value.
232
+ * @returns Validation result with a `PERPS_ERROR_CODES` error.
233
+ */
234
+ export declare function validateScaleOrder(params: {
235
+ rules: PerpsStrategyRules['scale'];
236
+ minPrice?: number;
237
+ maxPrice?: number;
238
+ count?: number;
239
+ skew?: number;
240
+ preview?: Readonly<{
241
+ prices: readonly string[];
242
+ sizes: readonly string[];
243
+ minimumQuoteAmount: string;
244
+ }>;
245
+ }): AdvancedOrderValidationResult;
246
+ /**
247
+ * Classify scale ladder prices against the book for warnings.
248
+ *
249
+ * - `crosses_market` / `partially_crosses_market`: both or one ladder end is at
250
+ * or through the opposite touch (best ask for a buy, best bid for a sell),
251
+ * so those rungs fill at once as taker.
252
+ * - `far_from_market`: the far ladder end sits more than
253
+ * `ORDER_PRICE_WARNING_CONFIG.FarFromMarketRatio` from the near touch (best
254
+ * bid for a buy, best ask for a sell); `distancePercent` is that distance,
255
+ * rounded up to a whole percent.
256
+ *
257
+ * A reduce-only ladder gets no distance warning, since it only closes. Each
258
+ * check is skipped while its touch is unknown.
259
+ *
260
+ * @param params - Ladder prices, side and top of book.
261
+ * @param params.prices - Rung prices (any order).
262
+ * @param params.isBuy - Whether the ladder buys.
263
+ * @param params.bestBid - Best bid price.
264
+ * @param params.bestAsk - Best ask price.
265
+ * @param params.reduceOnly - Whether the ladder only reduces a position.
266
+ * @returns Warnings, empty when there is nothing to warn about.
267
+ */
268
+ export declare function classifyScalePriceWarnings(params: {
269
+ prices: readonly (string | number)[];
270
+ isBuy: boolean;
271
+ bestBid?: string | number;
272
+ bestAsk?: string | number;
273
+ reduceOnly?: boolean;
274
+ }): ScalePriceWarning[];
275
+ //# sourceMappingURL=advancedOrders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced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