pub struct Params {Show 22 fields
pub leverage_max: String,
pub borrow_interest_rate_max: String,
pub borrow_interest_rate_min: String,
pub borrow_interest_rate_increase: String,
pub borrow_interest_rate_decrease: String,
pub health_gain_factor: String,
pub max_open_positions: i64,
pub pool_open_threshold: String,
pub borrow_interest_payment_fund_percentage: String,
pub borrow_interest_payment_fund_address: String,
pub safety_factor: String,
pub borrow_interest_payment_enabled: bool,
pub whitelisting_enabled: bool,
pub perpetual_swap_fee: String,
pub max_limit_order: i64,
pub fixed_funding_rate: String,
pub minimum_long_take_profit_price_ratio: String,
pub maximum_long_take_profit_price_ratio: String,
pub maximum_short_take_profit_price_ratio: String,
pub enable_take_profit_custody_liabilities: bool,
pub weight_breaking_fee_factor: String,
pub enabled_pools: Vec<u64>,
}
Fields§
§leverage_max: String
§borrow_interest_rate_max: String
§borrow_interest_rate_min: String
§borrow_interest_rate_increase: String
§borrow_interest_rate_decrease: String
§health_gain_factor: String
§max_open_positions: i64
§pool_open_threshold: String
§borrow_interest_payment_fund_percentage: String
§borrow_interest_payment_fund_address: String
§safety_factor: String
§borrow_interest_payment_enabled: bool
§whitelisting_enabled: bool
§perpetual_swap_fee: String
§max_limit_order: i64
§fixed_funding_rate: String
§minimum_long_take_profit_price_ratio: String
minimum value for take_profit_price/current price for long, should be greater than 1
maximum_long_take_profit_price_ratio: String
max value for take_profit_price/current price for long, should be greater than 1
maximum_short_take_profit_price_ratio: String
max value for take_profit_price/current price for short, should be less than 1
enable_take_profit_custody_liabilities: bool
No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in validate message
weight_breaking_fee_factor: String
We create this and send this value to estimate swap ONLY when opening and closing the position Ideally this value is set to half. When trader open a position if they receive a weight balance bonus (which is half of weight breaking fee, ideally) then while closing position they are charged weight breaking fee. So we just directly apply half weight breaking fee on perpetual swaps Question: does each need to have separate value of this because PoolParams.WeightRecoveryFeePortion can be different Also, if trader has no bonus only fee, then overall we are only applying the fee half time
enabled_pools: Vec<u64>
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Params
impl<'de> Deserialize<'de> for Params
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>,
Source§impl JsonSchema for Params
impl JsonSchema for Params
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl Message for Params
impl Message for Params
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.