pub struct DCAConfigJson {Show 14 fields
pub direction: String,
pub trigger_price: String,
pub base_order_size: String,
pub dca_order_size: String,
pub max_dca_orders: u32,
pub size_multiplier: String,
pub price_deviation_pct: String,
pub deviation_multiplier: String,
pub take_profit_pct: String,
pub stop_loss: Option<String>,
pub leverage: String,
pub max_leverage: String,
pub restart_on_complete: bool,
pub cooldown_period_secs: u64,
}Expand description
DCA strategy configuration from JSON
Fields§
§direction: StringDirection: “long” or “short”
trigger_price: StringPrice to trigger base order
base_order_size: StringBase order size in base asset
dca_order_size: StringDCA order size in base asset
max_dca_orders: u32Maximum number of DCA orders
size_multiplier: StringSize multiplier for each subsequent DCA order
price_deviation_pct: StringPrice deviation percentage to trigger first DCA
deviation_multiplier: StringDeviation multiplier for subsequent triggers
take_profit_pct: StringTake profit percentage from average entry
stop_loss: Option<String>Optional stop loss as absolute PnL threshold (negative value)
leverage: StringLeverage (1 for spot-like)
max_leverage: StringMax leverage allowed
restart_on_complete: boolWhether to restart cycle after take profit
cooldown_period_secs: u64Cooldown period in seconds between cycles (default: 60)
Trait Implementations§
Source§impl Clone for DCAConfigJson
impl Clone for DCAConfigJson
Source§fn clone(&self) -> DCAConfigJson
fn clone(&self) -> DCAConfigJson
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DCAConfigJson
impl Debug for DCAConfigJson
Source§impl<'de> Deserialize<'de> for DCAConfigJson
impl<'de> Deserialize<'de> for DCAConfigJson
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
Source§impl JsonSchema for DCAConfigJson
impl JsonSchema for DCAConfigJson
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for DCAConfigJson
impl RefUnwindSafe for DCAConfigJson
impl Send for DCAConfigJson
impl Sync for DCAConfigJson
impl Unpin for DCAConfigJson
impl UnsafeUnpin for DCAConfigJson
impl UnwindSafe for DCAConfigJson
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