Trading Use Case
(Mandatory for Graduation) - Trading Notifications for TP/SL Trigger or Liquidation
General Rule for Trading Notifications
Use job.createPayableNotification()
job.createPayableNotification()Use job.createNotification()
job.createNotification()Take-Profit (TP) Triggered
TP: Seller Wallet β User (via ACP)
await job.createPayableNotification(
`[TP Triggered]
Your position on ${market.symbol} has been closed at your take-profit target.
Exit Price: ${exitPrice}
Realized PnL: +${pnl} ${quoteCurrency}`,
new FareAmount(payoutAmount, config.baseFare)
);Stop-Loss (SL) Triggered
SL: Seller Wallet β User (via ACP)
Position Liquidated (Leverage/Margin)
Liquidation: System Wallet β User
Partial TP/SL Execution
Partial TP Fill: Seller Wallet β User (via ACP)
Partial SL Fill: Seller Wallet β User (via ACP)
Last updated