liveOrderValue function

MoveCallBuilder liveOrderValue({
  1. required dynamic arguments,
  2. String? package,
  3. Map<String, dynamic>? config,
})

Return one live order's full-close range value before fees. Requires a market-bound Pricer and does not prove account ownership of order_id. Public for SDK, PTB, and devInspect position valuation.

Implementation

MoveCallBuilder liveOrderValue(
    {required dynamic arguments,
    String? package,
    Map<String, dynamic>? config}) {
  final packageAddress = package ??
      (config?['predictPackageId'] as String?) ??
      '@local-pkg/deepbook_predict';
  return (tx) => tx.moveCall(
        '$packageAddress::expiry_market::live_order_value',
        arguments: normalizeMoveArguments(tx, arguments, [null, null, 'u256'],
            ['market', 'pricer', 'orderId']),
      );
}