Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimit ¶
type RateLimit struct {
// contains filtered or unexported fields
}
RateLimit rejects orders when the current time is before the next-accepted time written by the leaky bucket actor.
type Rule ¶
Rule is the interface that all risk rules must implement. Each rule inspects a RiskCheck command and returns an error to reject it, or nil to allow it through.
func NewRateLimit ¶
NewRateLimit creates a RateLimit rule from config.
type TpnlStop ¶
type TpnlStop struct {
// contains filtered or unexported fields
}
TpnlStop rejects orders when the trading PnL for a given (account, window) pair drops below the configured stop-loss threshold. At check time it purges expired trades from the shared TpnlState, reads per-symbol exposures, and applies current mid-prices to compute the live PnL.
Click to show internal directories.
Click to hide internal directories.