pub struct Deal {Show 53 fields
pub id: usize,
pub bot_id: usize,
pub max_safety_orders: usize,
pub deal_has_error: bool,
pub account_id: usize,
pub active_safety_orders_count: usize,
pub created_at: DateTime<Utc>,
pub updated_at: Option<DateTime<Utc>>,
pub closed_at: Option<DateTime<Utc>>,
pub is_finished: bool,
pub current_active_safety_orders_count: usize,
pub completed_safety_orders_count: usize,
pub completed_manual_safety_orders_count: usize,
pub pair: Pair,
pub status: DealStatus,
pub take_profit: Decimal,
pub base_order_volume: Decimal,
pub safety_order_volume: Decimal,
pub safety_order_step_percentage: Decimal,
pub bought_amount: Option<Decimal>,
pub bought_volume: Option<Decimal>,
pub bought_average_price: Option<Decimal>,
pub sold_amount: Option<Decimal>,
pub sold_volume: Option<Decimal>,
pub sold_average_price: Option<Decimal>,
pub take_profit_type: TakeProfitType,
pub final_profit: Decimal,
pub martingale_coefficient: Decimal,
pub martingale_volume_coefficient: Decimal,
pub martingale_step_coefficient: Decimal,
pub profit_currency: ProfitCurrency,
pub stop_loss_type: StopLossType,
pub safety_order_volume_type: VolumeType,
pub base_order_volume_type: VolumeType,
pub from_currency: SmolStr,
pub to_currency: SmolStr,
pub current_price: Decimal,
pub take_profit_price: Option<Decimal>,
pub stop_loss_price: Option<Decimal>,
pub final_profit_percentage: Decimal,
pub actual_profit_percentage: Decimal,
pub bot_name: String,
pub account_name: String,
pub usd_final_profit: Decimal,
pub actual_profit: Decimal,
pub actual_usd_profit: Decimal,
pub failed_message: Option<String>,
pub reserved_base_coin: Decimal,
pub reserved_second_coin: Decimal,
pub trailing_deviation: Decimal,
pub trailing_max_price: Option<Decimal>,
pub tsl_max_price: Option<Decimal>,
pub strategy: Strategy,
}Fields§
§id: usize§bot_id: usize§max_safety_orders: usize§deal_has_error: bool§account_id: usize§active_safety_orders_count: usize§created_at: DateTime<Utc>§updated_at: Option<DateTime<Utc>>§closed_at: Option<DateTime<Utc>>§is_finished: bool§current_active_safety_orders_count: usize§completed_safety_orders_count: usizecompleted safeties (not including manual)
completed_manual_safety_orders_count: usizecompleted manual safeties
pair: Pair§status: DealStatus§take_profit: Decimal§base_order_volume: Decimal§safety_order_volume: Decimal§safety_order_step_percentage: Decimal§bought_amount: Option<Decimal>§bought_volume: Option<Decimal>§bought_average_price: Option<Decimal>§sold_amount: Option<Decimal>§sold_volume: Option<Decimal>§sold_average_price: Option<Decimal>§take_profit_type: TakeProfitType§final_profit: Decimal§martingale_coefficient: Decimal§martingale_volume_coefficient: Decimal§martingale_step_coefficient: Decimal§profit_currency: ProfitCurrency§stop_loss_type: StopLossType§safety_order_volume_type: VolumeType§base_order_volume_type: VolumeType§from_currency: SmolStr§to_currency: SmolStr§current_price: Decimal§take_profit_price: Option<Decimal>§stop_loss_price: Option<Decimal>§final_profit_percentage: Decimal§actual_profit_percentage: Decimal§bot_name: String§account_name: String§usd_final_profit: Decimal§actual_profit: Decimal§actual_usd_profit: Decimal§failed_message: Option<String>§reserved_base_coin: Decimal§reserved_second_coin: Decimal§trailing_deviation: Decimal§trailing_max_price: Option<Decimal>Highest price met in case of long deal, lowest price otherwise
tsl_max_price: Option<Decimal>Highest price met in TSL in case of long deal, lowest price otherwise
strategy: StrategyImplementations§
Source§impl Deal
impl Deal
pub fn id(&self) -> usize
pub fn account_id(&self) -> usize
pub fn bot_id(&self) -> usize
pub fn created_at(&self) -> DateTime<Utc>
pub fn status(&self) -> DealStatus
pub fn is_finished(&self) -> bool
pub fn is_active(&self) -> bool
pub fn pair(&self) -> &Pair
pub fn strategy(&self) -> Strategy
pub fn max_safety_orders(&self) -> usize
pub fn completed_safety_orders_count(&self) -> usize
pub fn completed_manual_safety_orders_count(&self) -> usize
pub fn bought_volume(&self) -> Option<Decimal>
pub fn reserved_base_coin(&self) -> Decimal
pub fn actual_profit(&self) -> Decimal
pub fn actual_usd_profit(&self) -> Decimal
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Deal
impl<'de> Deserialize<'de> for Deal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Deal
impl RefUnwindSafe for Deal
impl Send for Deal
impl Sync for Deal
impl Unpin for Deal
impl UnwindSafe for Deal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more