Skip to content

API Reference


API Reference / previewOrder

Function: previewOrder() ​

previewOrder(params, options?): Promise<OrderPreviewResult>

Defined in: src/agent/OrderPreview.ts:33

Validates and summarizes an order without placing it.

Runs the same contract the live order path uses, then — when a risk pipeline is supplied — collects every risk violation rather than stopping at the first, so an agent sees the full picture before asking for confirmation.

Parameters ​

params ​

Record<string, unknown>

options? ​

OrderPreviewOptions = {}

Returns ​

Promise<OrderPreviewResult>

Community project — not affiliated with Dhan. MIT License.