dexbot 1.6.17 → 1.7.0

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 (156) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +24 -18
  3. package/analysis/README.md +105 -12
  4. package/analysis/ama_fitting/README.md +2 -2
  5. package/analysis/bot_fitting/README.md +3 -3
  6. package/claw/package.json +1 -1
  7. package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
  8. package/claw/runtimes/openclaw-plugin/package.json +1 -1
  9. package/dist/analysis/analyze_args.d.ts +2 -1
  10. package/dist/analysis/analyze_dynamic_weight.js +2 -1
  11. package/dist/analysis/analyze_kalman.js +3 -2
  12. package/dist/analysis/analyze_liquidity.d.ts +17 -0
  13. package/dist/analysis/analyze_liquidity.js +325 -0
  14. package/dist/analysis/analyze_regime.js +3 -2
  15. package/dist/analysis/analyze_regime_windows.js +3 -2
  16. package/dist/analysis/analyze_volatility.js +3 -2
  17. package/dist/analysis/fills_source.d.ts +1 -8
  18. package/dist/analysis/fills_source.js +1 -1
  19. package/dist/analysis/grid_correction_check.d.ts +9 -6
  20. package/dist/analysis/grid_correction_check.js +56 -64
  21. package/dist/analysis/liquidity/liquidity_chain.d.ts +66 -0
  22. package/dist/analysis/liquidity/liquidity_chain.js +178 -0
  23. package/dist/analysis/liquidity/liquidity_chart_generator.d.ts +19 -0
  24. package/dist/analysis/liquidity/liquidity_chart_generator.js +523 -0
  25. package/dist/analysis/liquidity/liquidity_depth_model.d.ts +141 -0
  26. package/dist/analysis/liquidity/liquidity_depth_model.js +230 -0
  27. package/dist/analysis/liquidity/liquidity_view.d.ts +38 -0
  28. package/dist/analysis/liquidity/liquidity_view.js +55 -0
  29. package/dist/analysis/math_utils.d.ts +1 -1
  30. package/dist/analysis/trade_profitability.d.ts +1 -1
  31. package/dist/analysis/trade_profitability.js +2 -1
  32. package/dist/analysis/tradingview/analyze_tradingview.js +2 -1
  33. package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +3 -3
  34. package/dist/analysis/trend_detection/huber_scale_variants.d.ts +4 -3
  35. package/dist/dexbot.js +74 -169
  36. package/dist/market_adapter/cli_args.d.ts +6 -1
  37. package/dist/market_adapter/cli_args.js +16 -2
  38. package/dist/market_adapter/core/kibana_candles.d.ts +5 -1
  39. package/dist/market_adapter/core/kibana_candles.js +3 -1
  40. package/dist/market_adapter/core/strategies/regime_gate.d.ts +7 -1
  41. package/dist/market_adapter/core/strategies/regime_gate.js +3 -1
  42. package/dist/market_adapter/inputs/cex_candle_parsing.d.ts +7 -2
  43. package/dist/market_adapter/inputs/cex_candle_parsing.js +3 -1
  44. package/dist/market_adapter/inputs/fetch_book_data.d.ts +7 -1
  45. package/dist/market_adapter/inputs/fetch_book_data.js +3 -1
  46. package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +2 -11
  47. package/dist/market_adapter/inputs/fetch_lp_data.d.ts +26 -1
  48. package/dist/market_adapter/inputs/fetch_lp_data.js +62 -52
  49. package/dist/market_adapter/inputs/kibana_feed_source.d.ts +14 -2
  50. package/dist/market_adapter/inputs/kibana_feed_source.js +14 -1
  51. package/dist/market_adapter/inputs/window_cache.d.ts +14 -3
  52. package/dist/market_adapter/inputs/window_cache.js +14 -1
  53. package/dist/market_adapter/lp_chart_runner.d.ts +12 -9
  54. package/dist/market_adapter/lp_chart_runner.js +3 -1
  55. package/dist/market_adapter/lp_chart_strategy_loader.d.ts +5 -1
  56. package/dist/market_adapter/lp_chart_strategy_loader.js +3 -1
  57. package/dist/market_adapter/market_adapter.d.ts +10 -2
  58. package/dist/market_adapter/market_adapter.js +10 -11
  59. package/dist/market_adapter/utils/chain.d.ts +2 -3
  60. package/dist/market_adapter/utils/file_json_cache.d.ts +5 -1
  61. package/dist/market_adapter/utils/file_json_cache.js +3 -1
  62. package/dist/market_adapter/utils/file_lock.js +1 -1
  63. package/dist/market_adapter/utils/native_history.d.ts +7 -3
  64. package/dist/market_adapter/utils/native_history.js +3 -1
  65. package/dist/market_adapter/utils/pair_orientation.d.ts +2 -2
  66. package/dist/modules/asset_lookup.d.ts +25 -0
  67. package/dist/modules/asset_lookup.js +75 -0
  68. package/dist/modules/bots_file_lock.d.ts +2 -2
  69. package/dist/modules/bots_file_lock.js +2 -2
  70. package/dist/modules/chain_scan.d.ts +64 -0
  71. package/dist/modules/chain_scan.js +80 -0
  72. package/dist/modules/cli_colors.d.ts +5 -0
  73. package/dist/modules/cli_colors.js +7 -0
  74. package/dist/modules/cli_progress.d.ts +51 -0
  75. package/dist/modules/cli_progress.js +113 -0
  76. package/dist/modules/constants.js +6 -3
  77. package/dist/modules/dexbot_class.d.ts +8 -0
  78. package/dist/modules/dexbot_class.js +10 -0
  79. package/dist/modules/dexbot_cow_runtime.d.ts +62 -1
  80. package/dist/modules/dexbot_cow_runtime.js +475 -47
  81. package/dist/modules/dexbot_credential_client.d.ts +5 -0
  82. package/dist/modules/dexbot_fill_runtime.js +20 -0
  83. package/dist/modules/dexbot_maintenance_runtime.js +71 -9
  84. package/dist/modules/dexbot_startup_runtime.js +7 -1
  85. package/dist/modules/graceful_shutdown.d.ts +2 -2
  86. package/dist/modules/graceful_shutdown.js +2 -2
  87. package/dist/modules/launcher/runtime_entry.d.ts +21 -1
  88. package/dist/modules/launcher/runtime_entry.js +36 -1
  89. package/dist/modules/launcher/runtime_mode.d.ts +4 -3
  90. package/dist/modules/liquidity_pool_ref.d.ts +32 -0
  91. package/dist/modules/liquidity_pool_ref.js +116 -0
  92. package/dist/modules/node_manager.d.ts +1 -1
  93. package/dist/modules/node_manager.js +1 -1
  94. package/dist/modules/order/accounting.js +2 -1
  95. package/dist/modules/order/export.d.ts +2 -2
  96. package/dist/modules/order/export.js +2 -2
  97. package/dist/modules/order/grid.d.ts +19 -14
  98. package/dist/modules/order/grid.js +269 -61
  99. package/dist/modules/order/grid_reconcile.js +27 -2
  100. package/dist/modules/order/grid_reconcile_internal.js +94 -15
  101. package/dist/modules/order/index.d.ts +24 -4
  102. package/dist/modules/order/manager.d.ts +12 -0
  103. package/dist/modules/order/manager.js +44 -11
  104. package/dist/modules/order/strategy.js +22 -2
  105. package/dist/modules/order/sync_engine.d.ts +32 -1
  106. package/dist/modules/order/sync_engine.js +209 -26
  107. package/dist/modules/order/utils/math.d.ts +26 -10
  108. package/dist/modules/order/utils/math.js +54 -14
  109. package/dist/modules/order/utils/order.d.ts +158 -11
  110. package/dist/modules/order/utils/order.js +434 -21
  111. package/dist/modules/order/utils/system.d.ts +136 -30
  112. package/dist/modules/order/utils/system.js +465 -63
  113. package/dist/modules/order/utils/validate.d.ts +1 -0
  114. package/dist/modules/order/utils/validate.js +37 -3
  115. package/dist/modules/storage/index.d.ts +3 -2
  116. package/dist/modules/storage/index.js +3 -2
  117. package/dist/modules/types.d.ts +14 -0
  118. package/dist/modules/utils/asset_symbols.d.ts +13 -2
  119. package/dist/modules/utils/asset_symbols.js +21 -2
  120. package/dist/scripts/analysis_runner.d.ts +10 -0
  121. package/dist/scripts/analysis_runner.js +33 -0
  122. package/dist/scripts/analyze-orders.js +2 -1
  123. package/dist/scripts/asset.d.ts +26 -0
  124. package/dist/scripts/asset.js +165 -0
  125. package/dist/scripts/bts_distribution.d.ts +1 -0
  126. package/dist/scripts/bts_distribution.js +194 -142
  127. package/dist/scripts/chart_command.d.ts +1 -1
  128. package/dist/scripts/chart_command.js +60 -86
  129. package/dist/scripts/chart_targets.d.ts +18 -0
  130. package/dist/scripts/chart_targets.js +52 -0
  131. package/dist/scripts/dw.js +1 -1
  132. package/dist/scripts/liquid.d.ts +24 -0
  133. package/dist/scripts/liquid.js +134 -0
  134. package/dist/scripts/rich_list.js +12 -16
  135. package/dist/scripts/token_distribution.d.ts +2 -0
  136. package/dist/scripts/token_distribution.js +132 -108
  137. package/dist/scripts/tv.js +1 -1
  138. package/dist/scripts/verify-browser-bundle.js +18 -0
  139. package/docs/COPY_ON_WRITE_MASTER_PLAN.md +1 -1
  140. package/docs/COW_INVARIANTS.md +21 -11
  141. package/docs/DEXBOT_COMPARISON.md +6 -6
  142. package/docs/EVOLUTION.md +10 -8
  143. package/docs/FUND_MOVEMENT_AND_ACCOUNTING.md +11 -11
  144. package/docs/GRID_PRICE_INVARIANT.md +28 -5
  145. package/docs/GRID_RECONCILE.md +25 -5
  146. package/docs/LIFECYCLE.md +11 -11
  147. package/docs/LOGGING.md +37 -2
  148. package/docs/ORDER_ENGINE_POST_1.0_RETROSPECTIVE.md +124 -36
  149. package/docs/README.md +1 -1
  150. package/docs/WORKFLOW.md +3 -1
  151. package/docs/architecture.md +115 -13
  152. package/docs/developer_guide.md +12 -0
  153. package/market_adapter/README.md +9 -4
  154. package/modules/README.md +23 -15
  155. package/package.json +6 -3
  156. package/scripts/README.md +23 -7
@@ -47,8 +47,7 @@
47
47
  * - updateGapEvacuationStreaks(...) - Tick per-slot gap-evacuation streak counter
48
48
  * - collectRefillSlotIds(...) - Refill-slot wire for the COW boundary hold
49
49
  *
50
- * SECTION 6: FILTERING & DRIFT DIAGNOSTICS (12 functions)
51
- * - parseSlotIndex(id) - Parse "slot-N" to its rail index
50
+ * SECTION 6: FILTERING & DRIFT DIAGNOSTICS (11 functions)
52
51
  * - filterOrdersByType(orders, orderType) - Filter orders by type
53
52
  * - buildOutsideInPairGroups(items, accessors) - Outside->center pair grouping
54
53
  * - extractBatchOperationResults(result) - Extract operation_results from chain batch result
@@ -202,6 +201,112 @@ declare function isFreshlyPlacedOrder(manager: OrderManagerLike, chainOrderId: s
202
201
  * @returns {Object} The same entry, stamped
203
202
  */
204
203
  declare function _stampCorrectionProvenance(entry: PendingPriceCorrection, source: string): PendingPriceCorrection;
204
+ /**
205
+ * Resolve the EXECUTION price of a fill from its paid/received raw amounts
206
+ * (quote per base). This is the fill FACT the LAST-FILL-GUARD pivot and the
207
+ * boundary re-anchor need — the slot price is only a grid identity and may be
208
+ * stale after a refused-commit chain adoption or an off-ladder maker fill.
209
+ *
210
+ * Returns null when either side of the amounts is missing/unusable, so callers
211
+ * can fall back (a fill we cannot price must not move the pivot).
212
+ *
213
+ * @param {Object} assets - {assetA (base), assetB (quote)} with precisions
214
+ * @param {string|null} paysAssetId - Asset the account paid
215
+ * @param {number} paysAmountRaw - Raw (integer) amount paid
216
+ * @param {string|null} receivesAssetId - Asset the account received
217
+ * @param {number} receivesAmountRaw - Raw (integer) amount received
218
+ * @returns {number|null} Quote-per-base price, or null when unresolvable
219
+ */
220
+ declare function resolveExecutionPrice(assets: AssetPair | null | undefined, paysAssetId: string | null | undefined, paysAmountRaw: number | null | undefined, receivesAssetId: string | null | undefined, receivesAmountRaw: number | null | undefined): number | null;
221
+ /**
222
+ * Resolve the grid SLOT a fill belongs to when its chain order id no longer
223
+ * identifies one.
224
+ *
225
+ * Every virtualisation path (`virtualizeOrder` -> `convertToSpreadPlaceholder`
226
+ * / `toRailHolePlaceholder`) NULLS `orderId`, so after a phantom cleanup or a
227
+ * refused-commit adoption the master holds no slot keyed by the filled order:
228
+ * the id lookup misses exactly when the fill matters most. The genesis ladder
229
+ * is the authority for "which slot does this price belong to" (same rule pass 2
230
+ * uses for adoption), so the fill's own execution price identifies the level.
231
+ *
232
+ * Returns null for a price outside the frozen rail: a shelf/manual order or an
233
+ * off-ladder wick must never be mapped onto an edge slot (that would arm the
234
+ * pivot with a price the grid never traded at).
235
+ *
236
+ * @param {Object} manager - OrderManager instance (genesis ladder + assets)
237
+ * @param {number} price - Fill execution price
238
+ * @param {Object} [hints] - Optional {size, type} of the fill for edge-dust tolerance
239
+ * @returns {string|null} `slot-N` id, or null when unresolvable/out-of-grid
240
+ */
241
+ declare function resolveSlotIdForFillPrice(manager: OrderManagerLike, price: number, hints?: {
242
+ size?: number | null;
243
+ type?: string | null;
244
+ }): string | null;
245
+ /**
246
+ * REVIVE a virtualised slot whose chain order is still LIVE on chain.
247
+ *
248
+ * The state hole this closes: a slot can be virtualised (phantom cleanup on a
249
+ * truncated read, refused-commit adoption, rotation cleanup) while its order
250
+ * still rests on the chain. In that state the slot is invisible to window
251
+ * accounting (`_countActiveOnGrid` needs ACTIVE/PARTIAL) but its order is still
252
+ * counted in `chainCount`, so the reconcile reads a shortfall it can never
253
+ * repair — and the planner sees a free level, which is how a second order can be
254
+ * created at a price that already holds one.
255
+ *
256
+ * The revive is broadcast-free (master-only): the order is already on chain, so
257
+ * this only re-materialises the slot at its chain size/state. It refuses when
258
+ * the chain order does NOT rest at this slot's level: the slot then merely
259
+ * aliases the id (a rotation source whose cancel has not landed, a re-slotted
260
+ * order) and reviving it would resurrect a level the planner emptied on purpose.
261
+ *
262
+ * @param {Object} manager - OrderManager instance
263
+ * @param {Object} slot - Master slot (must NOT be placed)
264
+ * @param {Object} chainOrder - Parsed chain order (price/size/type/orderId)
265
+ * @param {unknown} rawOnChain - Raw chain object for the slot snapshot
266
+ * @param {string} context - Update context tag for logging/accounting
267
+ * @param {Object} [options] - {skipAccounting}
268
+ * @returns {Promise<Object|null>} The revived slot when applied, else null
269
+ */
270
+ declare function reviveVirtualSlotFromChain(manager: OrderManagerLike, slot: ManagedOrder, chainOrder: ParsedChainOrder | null | undefined, rawOnChain: unknown, context: string, options?: {
271
+ skipAccounting?: boolean;
272
+ }): Promise<ManagedOrder | null>;
273
+ /**
274
+ * ATTRIBUTE a fill to the grid when its chain order id identifies no live slot
275
+ * ("order not found in active grid").
276
+ *
277
+ * The failure this closes (live incident): a 120s stale broadcast region
278
+ * deferred the fill queue, a phantom cleanup then virtualised the filled slots
279
+ * (which NULLS their `orderId`), and the re-delivered fills were dropped AFTER
280
+ * their accounting had been booked. Neither the LAST-FILL-GUARD pivot nor the
281
+ * owed boundary crawl learned the execution price, so the pivot stayed on a
282
+ * stale, HIGHER value and the direction rule then allowed re-buys ABOVE the
283
+ * market (9 buy-lower violations, 23.5% of the window's BTS).
284
+ *
285
+ * Two identities, in order:
286
+ * 1. the slot that still owns the chain order id (any state — a virtualised
287
+ * slot can keep its id), or
288
+ * 2. the genesis ladder level the fill's own execution price maps to (the
289
+ * common case, because virtualisation clears the id).
290
+ *
291
+ * Only what the fill PROVES is recorded: the pivot, and — when the resolved
292
+ * slot is a hole — an owed boundary crawl. The slot and the already-booked
293
+ * accounting are never touched: the funds are the accountant's business, this
294
+ * only keeps the geometry honest. A price outside the frozen rail is refused,
295
+ * so a shelf/manual order can never arm the pivot at a level the grid does not
296
+ * trade.
297
+ *
298
+ * @param {Object} manager - OrderManager instance
299
+ * @param {Object} params - fill identity {orderId, pays/receives amount+asset, isPartial}
300
+ * @returns {boolean} true when the fill was attributed to the grid
301
+ */
302
+ declare function attributeUnmatchedFillToGrid(manager: OrderManagerLike, params: {
303
+ orderId?: string | null;
304
+ paysAssetId?: string | null;
305
+ paysAmountRaw?: number | null;
306
+ receivesAssetId?: string | null;
307
+ receivesAmountRaw?: number | null;
308
+ isPartial?: boolean;
309
+ }): boolean;
205
310
  /**
206
311
  * Find the live grid slot that currently owns a chain order.
207
312
  * When slotId is supplied, only that exact slot is considered; otherwise all
@@ -512,6 +617,25 @@ declare function toRailHolePlaceholder(order: ManagedOrder, railType: string, si
512
617
  * index, boundary, or gap width is unusable so callers fail closed.
513
618
  */
514
619
  declare function geometryTypeForSlotIndex(idx: number | string | null | undefined, boundaryIdx: number | string | null | undefined, gapSlots: number | string | null | undefined): OrderType | null;
620
+ /**
621
+ * Resolve a slot's LIVE ladder position from its on-chain price.
622
+ *
623
+ * `slot.id` is the local generation index; after a refused-commit adoption it
624
+ * can be stale (an order still keyed at slot-117 can be resting at the
625
+ * slot-138 price on chain). Evacuation geometry must therefore prefer the
626
+ * chain order's real price, mapped onto the genesis ladder, and only fall back
627
+ * to the stored slot index. The slot's identity price is NOT rewritten — this
628
+ * is a read-only geometry probe (GRID-PRICE-INVARIANT stays intact).
629
+ *
630
+ * @param slot - Grid slot (needs id/orderId/rawOnChain)
631
+ * @param assets - Asset pair (precision + ids) for parseChainOrder
632
+ * @param genesis - Genesis ladder for price -> slot index
633
+ * @returns {idx, price}: ladder index (null when unknown) and live price
634
+ */
635
+ declare function resolveLiveOrderLadderPosition(slot: ManagedOrder | null | undefined, assets: AssetPair | null | undefined, genesis: unknown): {
636
+ idx: number | null;
637
+ price: number | null;
638
+ };
515
639
  /**
516
640
  * Detect gap-evacuation candidates by GEOMETRY ONLY: live on-chain orders
517
641
  * whose parsed slot index sits strictly inside the gap band
@@ -519,12 +643,20 @@ declare function geometryTypeForSlotIndex(idx: number | string | null | undefine
519
643
  * Phase 2 retypes in-band actives to rail types, so type-based detection
520
644
  * would go blind exactly when evacuation matters.
521
645
  *
646
+ * The ladder index prefers the order's LIVE chain price (see
647
+ * resolveLiveOrderLadderPosition): a refused-commit adoption can leave the
648
+ * local slot id in-rail while the order actually rests inside the band.
649
+ *
522
650
  * @param {Map} masterGrid - Master grid (slotId -> order)
523
651
  * @param {number} boundaryIdx - Last BUY slot index (frozen at plan-build)
524
652
  * @param {number} gapSlots - Spread gap slot count (frozen at plan-build)
653
+ * @param {Object} [options] - assets/genesis for the live-price probe
525
654
  * @returns {Array} Candidates [{id, idx, type, price, size, orderId}]
526
655
  */
527
- declare function detectGapEvacuationCandidates(masterGrid: Map<string, ManagedOrder>, boundaryIdx: number | string | null, gapSlots: number | string | null): Array<{
656
+ declare function detectGapEvacuationCandidates(masterGrid: Map<string, ManagedOrder>, boundaryIdx: number | string | null, gapSlots: number | string | null, options?: {
657
+ assets?: AssetPair | null;
658
+ genesis?: unknown;
659
+ }): Array<{
528
660
  id: string;
529
661
  idx: number;
530
662
  type: OrderType;
@@ -562,13 +694,6 @@ declare function updateGapEvacuationStreaks(streakMap: Map<string, number>, cand
562
694
  * @returns {string} ORDER_TYPES.BUY or ORDER_TYPES.SELL
563
695
  */
564
696
  declare function resolveSpreadOrderSide(price: number | string, startPrice: number | string | null | undefined): OrderType;
565
- /**
566
- * Parse a grid slot id ("slot-123") to its rail index. Delegates to
567
- * shared slot.ts single source (GRID_PRICE_SLOT_DETERMINISM_PLAN §2.1).
568
- * @param {unknown} id - grid slot id string
569
- * @returns {number|null}
570
- */
571
- declare function parseSlotIndex(id: string | null | undefined): number | null;
572
697
  /**
573
698
  * Whether a parsed chain order matches a grid slot exactly:
574
699
  * type-compatible (slot may be SPREAD), price strictly equal via integer
@@ -1164,6 +1289,28 @@ declare function resolveEdgeOrders(config: OrderConfigView | null | undefined):
1164
1289
  * @returns {Set<string>|null} Edge slot ids, or null when side disabled
1165
1290
  */
1166
1291
  declare function edgeOrderIdSet(allSlots: SlotLike[], config: OrderConfigView | null | undefined, orderType: OrderType, anchorPrice?: unknown, excludeIds?: Set<string> | null): Set<string> | null;
1292
+ /**
1293
+ * Collect the fill ids that belong to EDGE-pinned insurance orders.
1294
+ *
1295
+ * Edge orders (grid floor / ceiling) are static fat-finger insurance, not
1296
+ * market movement: the boundary crawl already excludes their fills
1297
+ * (`deriveTargetBoundary`), and the same exclusion must apply to the fill
1298
+ * reference the LAST-FILL-GUARD pivots on and the boundary re-anchor uses.
1299
+ * Without it, one wick that triggers a far-out insurance order would arm the
1300
+ * guard at that price AND re-anchor the window to the grid edge — the exact
1301
+ * "teleport" class the geometry guards exist to prevent.
1302
+ *
1303
+ * Uses the SAME classification the placement pickers use (live window ids
1304
+ * excluded, live edge anchor) so "edge" cannot mean two things.
1305
+ *
1306
+ * @param {Object} manager - OrderManager (orders Map, config, boundary)
1307
+ * @param {Array<Object>} fills - Fill batch
1308
+ * @returns {Set<string>} Slot ids of edge-pinned fills (empty when none/unknown)
1309
+ */
1310
+ declare function collectEdgePinnedFillIds(manager: OrderManagerLike, fills: Array<{
1311
+ id?: string;
1312
+ type?: string;
1313
+ }> | null | undefined): Set<string>;
1167
1314
  /**
1168
1315
  * Window member ids for one side from the live manager (see
1169
1316
  * windowIdSetFromSlots). Delegates so the manager and explicit-geometry
@@ -1414,7 +1561,7 @@ declare function collectKnownOnChainOrderIds(mgr: OrderManagerLike, placedResult
1414
1561
  createIds: string[];
1415
1562
  all: string[];
1416
1563
  };
1417
- export { parseChainOrder, applyChainSizeToGridOrder, buildFillKey, correctOrderPriceOnChain, correctAllPriceMismatches, _validatePriceCorrectionEntry, _stampCorrectionProvenance, findLiveOrderOwnerByChainId, buildCreateOrderArgs, getOrderTypeFromUpdatedFlags, resolveConfiguredPriceBound, virtualizeOrder, convertToSpreadPlaceholder, toRailHolePlaceholder, geometryTypeForSlotIndex, detectGapEvacuationCandidates, updateGapEvacuationStreaks, resolveSpreadOrderSide, chainOrderMatchesSlot, chainOrderMatchesSlotWithTolerance, crossingCandidateChainId, isCrossingCheckCandidate, buildCrossingCheckCandidates, parseSlotIndex, filterOrdersByType, buildOutsideInPairGroups, extractBatchOperationResults, formatUnmatchedChainOrder, isNonBlockingUnmatchedOrder, isStrandedHoldOrder, isOrderOnChain, isOrderVirtual, hasOnChainId, isOrderPlaced, isPhantomOrder, isSlotAvailable, isEmptyGridSlot, isOrderHealthy, checkSizeThreshold, checkSizesBeforeMinimum, calculateIdealBoundary, assignGridRoles, resolveOnChainRetypeType, shouldFlagOutOfSpread, buildIndexes, validateIndexes, ordersEqual, buildDelta, deriveTargetBoundary, isShiftEligibleFill, resolveEdgeCount, resolveEdgeOrders, selectEdgeSlots, getCoreOrdersTotal, getSideBudget, calculateBudgetedSizes, buildCreateOpFingerprint, isOrderGoneErrorMessage, recordDuplicateOrphanDetection, clearDuplicateOrphanDetection, duplicateOrphanLogInfo, chainOrderUnchangedFromCache, detectCrossedBookPlan, collectKnownOnChainOrderIds, edgeOrderIdSet, liveWindowIdSet, checkGridPriceInvariant, reportGridPriceInvariant };
1564
+ export { parseChainOrder, resolveLiveOrderLadderPosition, applyChainSizeToGridOrder, resolveExecutionPrice, resolveSlotIdForFillPrice, reviveVirtualSlotFromChain, attributeUnmatchedFillToGrid, buildFillKey, correctOrderPriceOnChain, correctAllPriceMismatches, _validatePriceCorrectionEntry, _stampCorrectionProvenance, findLiveOrderOwnerByChainId, buildCreateOrderArgs, getOrderTypeFromUpdatedFlags, resolveConfiguredPriceBound, virtualizeOrder, convertToSpreadPlaceholder, toRailHolePlaceholder, geometryTypeForSlotIndex, detectGapEvacuationCandidates, updateGapEvacuationStreaks, resolveSpreadOrderSide, chainOrderMatchesSlot, chainOrderMatchesSlotWithTolerance, crossingCandidateChainId, isCrossingCheckCandidate, buildCrossingCheckCandidates, filterOrdersByType, buildOutsideInPairGroups, extractBatchOperationResults, formatUnmatchedChainOrder, isNonBlockingUnmatchedOrder, isStrandedHoldOrder, isOrderOnChain, isOrderVirtual, hasOnChainId, isOrderPlaced, isPhantomOrder, isSlotAvailable, isEmptyGridSlot, isOrderHealthy, checkSizeThreshold, checkSizesBeforeMinimum, calculateIdealBoundary, assignGridRoles, resolveOnChainRetypeType, shouldFlagOutOfSpread, buildIndexes, validateIndexes, ordersEqual, buildDelta, deriveTargetBoundary, isShiftEligibleFill, resolveEdgeCount, resolveEdgeOrders, selectEdgeSlots, getCoreOrdersTotal, getSideBudget, calculateBudgetedSizes, buildCreateOpFingerprint, isOrderGoneErrorMessage, recordDuplicateOrphanDetection, clearDuplicateOrphanDetection, duplicateOrphanLogInfo, chainOrderUnchangedFromCache, detectCrossedBookPlan, collectKnownOnChainOrderIds, collectEdgePinnedFillIds, edgeOrderIdSet, liveWindowIdSet, checkGridPriceInvariant, reportGridPriceInvariant };
1418
1565
  export type { CrawlEntry };
1419
1566
  export { resolveEdgeAnchorPrice, resolveLiveEdgeAnchorPrice, compareEdge, collectRefillSlotIds, recordOrderPlacement, isFreshlyPlacedOrder, _filterUnmatchedChainOrders };
1420
1567
  //# sourceMappingURL=order.d.ts.map