pub enum RawSignalMsg {
Show 18 variants
Entry {
ts: String,
symbol: String,
side: String,
order_type: String,
price: Option<f64>,
risk: f64,
stoploss: Option<f64>,
targets: Vec<f64>,
group: Option<String>,
trade_id: Option<String>,
entry_class: Option<String>,
},
Close {
ts: String,
position: PositionRefMsg,
},
ClosePartial {
ts: String,
position: PositionRefMsg,
ratio: f64,
},
ModifyStoploss {
ts: String,
position: PositionRefMsg,
price: f64,
},
MoveStoplossToEntry {
ts: String,
position: PositionRefMsg,
},
AddTarget {
ts: String,
position: PositionRefMsg,
price: f64,
close_ratio: f64,
},
RemoveTarget {
ts: String,
position: PositionRefMsg,
price: f64,
},
ModifyTarget {
ts: String,
position: PositionRefMsg,
old_price: f64,
new_price: f64,
},
AddRule {
ts: String,
position: PositionRefMsg,
rule: RuleConfigDefMsg,
},
RemoveRule {
ts: String,
position: PositionRefMsg,
rule_name: String,
},
ScaleIn {
ts: String,
position: PositionRefMsg,
price: Option<f64>,
size: f64,
},
CancelPending {
ts: String,
position: PositionRefMsg,
},
CloseAllOf {
ts: String,
symbol: String,
},
CloseAll {
ts: String,
},
CancelAllPending {
ts: String,
},
ModifyAllStoploss {
ts: String,
symbol: String,
price: f64,
},
CloseAllInGroup {
ts: String,
group_id: String,
},
ModifyAllStoplossInGroup {
ts: String,
group_id: String,
price: f64,
},
}Expand description
Wire-safe signal that can represent any action, not just entries.
Uses #[serde(tag = "action")] so each variant is distinguished by an
"action" field in the JSON/Bincode representation.
Variants§
Entry
Open a new position (same semantics as RawSignalEntryMsg).
Fields
Close
Close position(s) at market.
ClosePartial
Close a fraction of position(s).
ModifyStoploss
Set or replace the stoploss price.
MoveStoplossToEntry
Move stoploss to the average entry price.
AddTarget
Add a take-profit level.
RemoveTarget
Remove a take-profit level at a specific price.
ModifyTarget
Atomically change an existing take-profit price while retaining its ratio.
AddRule
Attach a management rule.
RemoveRule
Remove a management rule by name.
ScaleIn
Scale into an existing position.
CancelPending
Cancel a pending order.
CloseAllOf
Close all open positions on a symbol.
CloseAll
Close all open positions.
CancelAllPending
Cancel all pending orders.
ModifyAllStoploss
Modify stoploss for all open positions on a symbol.
CloseAllInGroup
Close all open positions in a group.
ModifyAllStoplossInGroup
Modify stoploss for all open positions in a group.