rust #10
@ -3,17 +3,24 @@ use std::future::Future;
|
||||
|
||||
use tokio::task::JoinHandle;
|
||||
|
||||
use crate::managers::{OrderManager, PositionManager, PriceManager};
|
||||
use crate::managers::{OptionUpdate, OrderManager, PositionManager, PriceManager};
|
||||
use crate::models::{Position, PositionProfitState};
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
|
||||
pub enum SignalKind {
|
||||
Update(u64),
|
||||
ClosePosition(Position),
|
||||
#[derive(Debug)]
|
||||
pub struct ActorMessage {
|
||||
pub(crate) message: Message,
|
||||
pub(crate) respond_to: oneshot::Sender<OptionUpdate>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Message {
|
||||
Update { tick: u64 },
|
||||
ClosePosition { position: Position },
|
||||
OpenPosition,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub struct EventMetadata {
|
||||
position_id: Option<u64>,
|
||||
order_id: Option<u64>,
|
||||
@ -44,7 +51,7 @@ pub enum EventKind {
|
||||
Any,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub struct Event {
|
||||
kind: EventKind,
|
||||
tick: u64,
|
||||
@ -74,113 +81,113 @@ impl Event {
|
||||
self.metadata
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Dispatcher {
|
||||
event_handlers: HashMap<EventKind, Vec<Box<dyn Fn(&Event, &PriceManager) -> JoinHandle<()>>>>,
|
||||
profit_state_handlers:
|
||||
HashMap<PositionProfitState, Vec<Box<dyn Fn(&Position, &PriceManager) -> JoinHandle<()>>>>,
|
||||
signal_handlers: HashMap<SignalKind, Vec<Box<dyn Fn(&SignalKind) -> JoinHandle<()>>>>,
|
||||
|
||||
on_any_event_handlers: Vec<Box<dyn Fn(&Event, &PriceManager) -> JoinHandle<()>>>,
|
||||
on_any_profit_state_handlers: Vec<Box<dyn Fn(&Position, &PriceManager) -> JoinHandle<()>>>,
|
||||
}
|
||||
|
||||
impl Dispatcher {
|
||||
pub fn new() -> Self {
|
||||
Dispatcher {
|
||||
event_handlers: HashMap::new(),
|
||||
profit_state_handlers: HashMap::new(),
|
||||
signal_handlers: HashMap::new(),
|
||||
on_any_event_handlers: Vec::new(),
|
||||
on_any_profit_state_handlers: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn call_signal_handlers(&self, signal: &SignalKind) {
|
||||
if let Some(functions) = self.signal_handlers.get(&signal) {
|
||||
for f in functions {
|
||||
f(signal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn call_event_handlers(&self, event: &Event, status: &PriceManager) {
|
||||
if let Some(functions) = self.event_handlers.get(&event.kind()) {
|
||||
for f in functions {
|
||||
f(event, status);
|
||||
}
|
||||
}
|
||||
|
||||
for f in &self.on_any_event_handlers {
|
||||
f(event, status);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn call_position_state_handlers(&self, position: &Position, status: &PriceManager) {
|
||||
if let Some(profit_state) = &position.profit_state() {
|
||||
if let Some(functions) = self.profit_state_handlers.get(profit_state) {
|
||||
for f in functions {
|
||||
f(position, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for f in &self.on_any_profit_state_handlers {
|
||||
f(position, status);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_event_handler<F: 'static, Fut: 'static>(&mut self, event: EventKind, f: F)
|
||||
where
|
||||
F: Fn(&Event, &PriceManager) -> Fut,
|
||||
Fut: Future<Output = ()> + Send,
|
||||
{
|
||||
match event {
|
||||
EventKind::Any => self
|
||||
.on_any_event_handlers
|
||||
.push(Box::new(move |e, s| tokio::spawn(f(&e, s)))),
|
||||
_ => self
|
||||
.event_handlers
|
||||
.entry(event)
|
||||
.or_default()
|
||||
.push(Box::new(move |e, s| tokio::spawn(f(&e, s)))),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_positionstate_handler<F: 'static, Fut: 'static>(
|
||||
&mut self,
|
||||
state: PositionProfitState,
|
||||
f: F,
|
||||
) where
|
||||
F: Fn(&Position, &PriceManager) -> Fut,
|
||||
Fut: Future<Output = ()> + Send,
|
||||
{
|
||||
match state {
|
||||
// PositionProfitState::Any => self
|
||||
// .on_any_position_state_handlers
|
||||
// .push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
_ => self
|
||||
.profit_state_handlers
|
||||
.entry(state)
|
||||
.or_default()
|
||||
.push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_signal_handler<F: 'static, Fut: 'static>(&mut self, signal: SignalKind, f: F)
|
||||
where
|
||||
F: Fn(&SignalKind) -> Fut,
|
||||
Fut: Future<Output = ()> + Send,
|
||||
{
|
||||
match signal {
|
||||
// PositionProfitState::Any => self
|
||||
// .on_any_position_state_handlers
|
||||
// .push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
_ => self
|
||||
.signal_handlers
|
||||
.entry(signal)
|
||||
.or_default()
|
||||
.push(Box::new(move |s| tokio::spawn(f(s)))),
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// pub struct Dispatcher {
|
||||
// event_handlers: HashMap<EventKind, Vec<Box<dyn Fn(&Event, &PriceManager) -> JoinHandle<()>>>>,
|
||||
// profit_state_handlers:
|
||||
// HashMap<PositionProfitState, Vec<Box<dyn Fn(&Position, &PriceManager) -> JoinHandle<()>>>>,
|
||||
// signal_handlers: HashMap<SignalKind, Vec<Box<dyn Fn(&SignalKind) -> JoinHandle<()>>>>,
|
||||
//
|
||||
// on_any_event_handlers: Vec<Box<dyn Fn(&Event, &PriceManager) -> JoinHandle<()>>>,
|
||||
// on_any_profit_state_handlers: Vec<Box<dyn Fn(&Position, &PriceManager) -> JoinHandle<()>>>,
|
||||
// }
|
||||
//
|
||||
// impl Dispatcher {
|
||||
// pub fn new() -> Self {
|
||||
// Dispatcher {
|
||||
// event_handlers: HashMap::new(),
|
||||
// profit_state_handlers: HashMap::new(),
|
||||
// signal_handlers: HashMap::new(),
|
||||
// on_any_event_handlers: Vec::new(),
|
||||
// on_any_profit_state_handlers: Vec::new(),
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn call_signal_handlers(&self, signal: &SignalKind) {
|
||||
// if let Some(functions) = self.signal_handlers.get(&signal) {
|
||||
// for f in functions {
|
||||
// f(signal);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn call_event_handlers(&self, event: &Event, status: &PriceManager) {
|
||||
// if let Some(functions) = self.event_handlers.get(&event.kind()) {
|
||||
// for f in functions {
|
||||
// f(event, status);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for f in &self.on_any_event_handlers {
|
||||
// f(event, status);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn call_position_state_handlers(&self, position: &Position, status: &PriceManager) {
|
||||
// if let Some(profit_state) = &position.profit_state() {
|
||||
// if let Some(functions) = self.profit_state_handlers.get(profit_state) {
|
||||
// for f in functions {
|
||||
// f(position, status);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for f in &self.on_any_profit_state_handlers {
|
||||
// f(position, status);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn register_event_handler<F: 'static, Fut: 'static>(&mut self, event: EventKind, f: F)
|
||||
// where
|
||||
// F: Fn(&Event, &PriceManager) -> Fut,
|
||||
// Fut: Future<Output = ()> + Send,
|
||||
// {
|
||||
// match event {
|
||||
// EventKind::Any => self
|
||||
// .on_any_event_handlers
|
||||
// .push(Box::new(move |e, s| tokio::spawn(f(&e, s)))),
|
||||
// _ => self
|
||||
// .event_handlers
|
||||
// .entry(event)
|
||||
// .or_default()
|
||||
// .push(Box::new(move |e, s| tokio::spawn(f(&e, s)))),
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn register_positionstate_handler<F: 'static, Fut: 'static>(
|
||||
// &mut self,
|
||||
// state: PositionProfitState,
|
||||
// f: F,
|
||||
// ) where
|
||||
// F: Fn(&Position, &PriceManager) -> Fut,
|
||||
// Fut: Future<Output = ()> + Send,
|
||||
// {
|
||||
// match state {
|
||||
// // PositionProfitState::Any => self
|
||||
// // .on_any_position_state_handlers
|
||||
// // .push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
// _ => self
|
||||
// .profit_state_handlers
|
||||
// .entry(state)
|
||||
// .or_default()
|
||||
// .push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pub fn register_signal_handler<F: 'static, Fut: 'static>(&mut self, signal: SignalKind, f: F)
|
||||
// where
|
||||
// F: Fn(&SignalKind) -> Fut,
|
||||
// Fut: Future<Output = ()> + Send,
|
||||
// {
|
||||
// match signal {
|
||||
// // PositionProfitState::Any => self
|
||||
// // .on_any_position_state_handlers
|
||||
// // .push(Box::new(move |p, s| tokio::spawn(f(&p, s)))),
|
||||
// _ => self
|
||||
// .signal_handlers
|
||||
// .entry(signal)
|
||||
// .or_default()
|
||||
// .push(Box::new(move |s| tokio::spawn(f(s)))),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -8,15 +8,16 @@ use log::{debug, error, info};
|
||||
use tokio::signal::unix::Signal;
|
||||
use tokio::sync::mpsc::channel;
|
||||
use tokio::sync::mpsc::{Receiver, Sender};
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
use crate::connectors::{Client, ExchangeKind};
|
||||
use crate::currency::SymbolPair;
|
||||
use crate::events::{Dispatcher, Event, SignalKind};
|
||||
use crate::events::{ActorMessage, Event, Message};
|
||||
use crate::models::{ExecutedOrder, OrderForm, OrderKind, Position, PriceTicker};
|
||||
use crate::strategy::{FastOrderStrategy, OrderStrategy, PositionStrategy, TrailingStop};
|
||||
use crate::BoxError;
|
||||
|
||||
type OptionUpdate = (Option<Vec<Event>>, Option<Vec<SignalKind>>);
|
||||
pub type OptionUpdate = (Option<Vec<Event>>, Option<Vec<Message>>);
|
||||
|
||||
pub struct EventManager {
|
||||
events: Vec<Event>,
|
||||
@ -28,14 +29,14 @@ pub struct EventManager {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PriceManager {
|
||||
receiver: Receiver<SignalKind>,
|
||||
receiver: Receiver<ActorMessage>,
|
||||
pair: SymbolPair,
|
||||
prices: Vec<PriceEntry>,
|
||||
client: Client,
|
||||
}
|
||||
|
||||
pub struct PriceManagerHandle {
|
||||
sender: Sender<SignalKind>,
|
||||
sender: Sender<ActorMessage>,
|
||||
}
|
||||
|
||||
impl PriceManagerHandle {
|
||||
@ -54,13 +55,22 @@ impl PriceManagerHandle {
|
||||
Self { sender }
|
||||
}
|
||||
|
||||
pub async fn update(&mut self, tick: u64) {
|
||||
self.sender.send(SignalKind::Update(tick)).await.unwrap();
|
||||
pub async fn update(&mut self, tick: u64) -> Result<OptionUpdate, BoxError> {
|
||||
let (send, recv) = oneshot::channel();
|
||||
|
||||
self.sender
|
||||
.send(ActorMessage {
|
||||
message: Message::Update { tick },
|
||||
respond_to: send,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(recv.await?)
|
||||
}
|
||||
}
|
||||
|
||||
impl PriceManager {
|
||||
pub fn new(receiver: Receiver<SignalKind>, pair: SymbolPair, client: Client) -> Self {
|
||||
pub fn new(receiver: Receiver<ActorMessage>, pair: SymbolPair, client: Client) -> Self {
|
||||
PriceManager {
|
||||
receiver,
|
||||
pair,
|
||||
@ -69,9 +79,9 @@ impl PriceManager {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn handle_message(&mut self, message: SignalKind) -> Result<(), BoxError> {
|
||||
match message {
|
||||
SignalKind::Update(tick) => {
|
||||
pub async fn handle_message(&mut self, message: ActorMessage) -> Result<(), BoxError> {
|
||||
match message.message {
|
||||
Message::Update { tick } => {
|
||||
let a = self.update(tick).await?;
|
||||
self.add_entry(a);
|
||||
}
|
||||
@ -93,7 +103,7 @@ impl PriceManager {
|
||||
current_prices,
|
||||
self.pair.clone(),
|
||||
None,
|
||||
None,
|
||||
// None,
|
||||
))
|
||||
}
|
||||
|
||||
@ -118,7 +128,7 @@ pub struct PriceEntry {
|
||||
pair: SymbolPair,
|
||||
price: PriceTicker,
|
||||
events: Option<Vec<Event>>,
|
||||
signals: Option<Vec<SignalKind>>,
|
||||
// signals: Option<Vec<SignalKind>>,
|
||||
}
|
||||
|
||||
impl PriceEntry {
|
||||
@ -127,14 +137,14 @@ impl PriceEntry {
|
||||
price: PriceTicker,
|
||||
pair: SymbolPair,
|
||||
events: Option<Vec<Event>>,
|
||||
signals: Option<Vec<SignalKind>>,
|
||||
// signals: Option<Vec<SignalKind>>,
|
||||
) -> Self {
|
||||
PriceEntry {
|
||||
tick,
|
||||
pair,
|
||||
price,
|
||||
events,
|
||||
signals,
|
||||
// signals,
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,9 +160,9 @@ impl PriceEntry {
|
||||
pub fn events(&self) -> &Option<Vec<Event>> {
|
||||
&self.events
|
||||
}
|
||||
pub fn signals(&self) -> &Option<Vec<SignalKind>> {
|
||||
&self.signals
|
||||
}
|
||||
// pub fn signals(&self) -> &Option<Vec<SignalKind>> {
|
||||
// &self.signals
|
||||
// }
|
||||
}
|
||||
|
||||
/******************
|
||||
@ -160,7 +170,7 @@ impl PriceEntry {
|
||||
******************/
|
||||
|
||||
pub struct PositionManagerHandle {
|
||||
sender: Sender<SignalKind>,
|
||||
sender: Sender<ActorMessage>,
|
||||
}
|
||||
|
||||
impl PositionManagerHandle {
|
||||
@ -180,14 +190,23 @@ impl PositionManagerHandle {
|
||||
Self { sender }
|
||||
}
|
||||
|
||||
pub async fn update(&mut self, tick: u64) {
|
||||
self.sender.send(SignalKind::Update(tick)).await.unwrap();
|
||||
pub async fn update(&mut self, tick: u64) -> Result<OptionUpdate, BoxError> {
|
||||
let (send, recv) = oneshot::channel();
|
||||
|
||||
self.sender
|
||||
.send(ActorMessage {
|
||||
message: Message::Update { tick },
|
||||
respond_to: send,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(recv.await?)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PositionManager {
|
||||
receiver: Receiver<SignalKind>,
|
||||
receiver: Receiver<ActorMessage>,
|
||||
current_tick: u64,
|
||||
pair: SymbolPair,
|
||||
positions_history: HashMap<u64, Position>,
|
||||
@ -198,7 +217,7 @@ pub struct PositionManager {
|
||||
|
||||
impl PositionManager {
|
||||
pub fn new(
|
||||
receiver: Receiver<SignalKind>,
|
||||
receiver: Receiver<ActorMessage>,
|
||||
pair: SymbolPair,
|
||||
client: Client,
|
||||
strategy: Box<dyn PositionStrategy>,
|
||||
@ -218,10 +237,12 @@ impl PositionManager {
|
||||
self.current_tick
|
||||
}
|
||||
|
||||
pub async fn handle_message(&mut self, msg: SignalKind) -> Result<(), BoxError> {
|
||||
match msg {
|
||||
SignalKind::Update(tick) => {
|
||||
self.update(tick).await?;
|
||||
pub async fn handle_message(&mut self, msg: ActorMessage) -> Result<(), BoxError> {
|
||||
match msg.message {
|
||||
Message::Update { tick } => {
|
||||
let result = self.update(tick).await?;
|
||||
|
||||
msg.respond_to.send(result);
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
@ -296,7 +317,7 @@ impl PositionManager {
|
||||
pub type TrackedPositionsMap = HashMap<u64, ExecutedOrder>;
|
||||
|
||||
pub struct OrderManagerHandle {
|
||||
sender: Sender<SignalKind>,
|
||||
sender: Sender<ActorMessage>,
|
||||
}
|
||||
|
||||
impl OrderManagerHandle {
|
||||
@ -316,20 +337,35 @@ impl OrderManagerHandle {
|
||||
Self { sender }
|
||||
}
|
||||
|
||||
pub async fn update(&mut self, tick: u64) {
|
||||
self.sender.send(SignalKind::Update(tick)).await.unwrap();
|
||||
pub async fn update(&mut self, tick: u64) -> Result<OptionUpdate, BoxError> {
|
||||
let (send, recv) = oneshot::channel();
|
||||
|
||||
self.sender
|
||||
.send(ActorMessage {
|
||||
message: Message::Update { tick },
|
||||
respond_to: send,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(recv.await?)
|
||||
}
|
||||
|
||||
pub async fn close_position(&mut self, position: Position) {
|
||||
pub async fn close_position(&mut self, position: Position) -> Result<OptionUpdate, BoxError> {
|
||||
let (send, recv) = oneshot::channel();
|
||||
|
||||
self.sender
|
||||
.send(SignalKind::ClosePosition(position))
|
||||
.await
|
||||
.unwrap();
|
||||
.send(ActorMessage {
|
||||
message: Message::ClosePosition { position },
|
||||
respond_to: send,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(recv.await?)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OrderManager {
|
||||
receiver: Receiver<SignalKind>,
|
||||
receiver: Receiver<ActorMessage>,
|
||||
tracked_positions: TrackedPositionsMap,
|
||||
pair: SymbolPair,
|
||||
open_orders: Vec<ExecutedOrder>,
|
||||
@ -341,7 +377,7 @@ impl OrderManager {
|
||||
const UNDERCUT_PERC: f64 = 0.005;
|
||||
|
||||
pub fn new(
|
||||
receiver: Receiver<SignalKind>,
|
||||
receiver: Receiver<ActorMessage>,
|
||||
pair: SymbolPair,
|
||||
client: Client,
|
||||
strategy: Box<dyn OrderStrategy>,
|
||||
@ -356,12 +392,12 @@ impl OrderManager {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn handle_message(&mut self, msg: SignalKind) -> Result<(), BoxError> {
|
||||
match msg {
|
||||
SignalKind::Update(_) => {
|
||||
pub async fn handle_message(&mut self, msg: ActorMessage) -> Result<(), BoxError> {
|
||||
match msg.message {
|
||||
Message::Update { .. } => {
|
||||
self.update();
|
||||
}
|
||||
SignalKind::ClosePosition(position) => self.close_position(&position).await?,
|
||||
Message::ClosePosition { position, .. } => self.close_position(&position).await?,
|
||||
_ => {}
|
||||
};
|
||||
|
||||
@ -438,7 +474,7 @@ pub struct PairManager {
|
||||
price_manager: PriceManagerHandle,
|
||||
order_manager: OrderManagerHandle,
|
||||
position_manager: PositionManagerHandle,
|
||||
dispatcher: Dispatcher,
|
||||
// dispatcher: Dispatcher,
|
||||
}
|
||||
|
||||
impl PairManager {
|
||||
@ -456,7 +492,7 @@ impl PairManager {
|
||||
client.clone(),
|
||||
Box::new(TrailingStop::new()),
|
||||
),
|
||||
dispatcher: Dispatcher::new(),
|
||||
// dispatcher: Dispatcher::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,10 @@ use std::fmt::{Debug, Formatter};
|
||||
|
||||
use dyn_clone::DynClone;
|
||||
|
||||
use crate::events::{Event, EventKind, EventMetadata, SignalKind};
|
||||
use crate::events::{Event, EventKind, EventMetadata, Message};
|
||||
use crate::managers::{OrderManager, PositionManager, TrackedPositionsMap};
|
||||
use crate::models::{ExecutedOrder, OrderForm, Position, PositionProfitState};
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
/***************
|
||||
* DEFINITIONS
|
||||
@ -17,7 +18,7 @@ pub trait PositionStrategy: DynClone + Send {
|
||||
&self,
|
||||
position: Position,
|
||||
manager: &PositionManager,
|
||||
) -> (Position, Option<Vec<Event>>, Option<Vec<SignalKind>>);
|
||||
) -> (Position, Option<Vec<Event>>, Option<Vec<Message>>);
|
||||
}
|
||||
|
||||
impl Debug for dyn PositionStrategy {
|
||||
@ -84,7 +85,7 @@ impl PositionStrategy for TrailingStop {
|
||||
&self,
|
||||
position: Position,
|
||||
manager: &PositionManager,
|
||||
) -> (Position, Option<Vec<Event>>, Option<Vec<SignalKind>>) {
|
||||
) -> (Position, Option<Vec<Event>>, Option<Vec<Message>>) {
|
||||
let mut signals = vec![];
|
||||
let events = vec![];
|
||||
|
||||
@ -102,7 +103,9 @@ impl PositionStrategy for TrailingStop {
|
||||
} else if TrailingStop::MAX_LOSS_PERC < pl_perc && pl_perc < 0.0 {
|
||||
PositionProfitState::Loss
|
||||
} else {
|
||||
signals.push(SignalKind::ClosePosition(position.clone()));
|
||||
signals.push(Message::ClosePosition {
|
||||
position: position.clone(),
|
||||
});
|
||||
PositionProfitState::Critical
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user