API Reference / Pipeline
Class: Pipeline
Defined in: src/risk/Pipeline.ts:73
Pre-execution risk pipeline.
Runs each check in sequence and throws RiskViolationError on the first failure, so nothing reaches the broker after a rejection. Checks that need account state go through a RiskDataProvider; without one, those checks pass rather than block, which keeps the pipeline usable offline for order-shape validation.
These checks encode NSE/BSE rules and resolve instruments from the Indian scrip master — they do not apply to the Global Stocks (US equities) book.
Constructors
Constructor
new Pipeline(
config?):Pipeline
Defined in: src/risk/Pipeline.ts:78
Parameters
config?
PipelineConfig = {}
Returns
Pipeline
Methods
run()
run(
options):Promise<true>
Defined in: src/risk/Pipeline.ts:85
Runs every applicable check. Throws on the first violation.
Parameters
options
Returns
Promise<true>
report()
report(
options):Promise<RiskReport>
Defined in: src/risk/Pipeline.ts:112
Runs every check and collects the failures instead of throwing — for previews and dry runs, where the caller wants the full picture rather than the first problem.
Parameters
options
Returns
Promise<RiskReport>
getLimits()
getLimits():
RiskLimits
Defined in: src/risk/Pipeline.ts:143