afterPlaceOrder
Called on the entry path right after a successful order placement call. This hook fires for both signal and no-signal entries.
Params
{
ctx: StrategyHookCtx;
market: {
candle: KlineChartItem;
btcCandle: KlineChartItem;
};
decision: EntryDecision;
entry: StrategyHookEntryContext;
policy: StrategyHookPolicyContext;
ml?: StrategyHookMlContext;
ai?: StrategyHookAiContext;
order: StrategyHookOrderContext;
}
order.result depends on the entry path:
- With signal:
order.resultis theSignalobject. - Without signal:
order.resultis thedecision.codestring.
Output
| Return | Type |
|---|---|
| No return value | void or Promise<void> |
This hook cannot block runtime flow. If it throws, the error is logged, onRuntimeError is called, and the runtime continues.