Skip to main content

MarginInfo

Struct MarginInfo 

Source
pub struct MarginInfo {
Show 39 fields pub long_power: Option<String>, pub short_power: Option<String>, pub balance: Option<String>, pub market_value: Option<String>, pub elv: Option<String>, pub im: Option<String>, pub mcm: Option<String>, pub mm: Option<String>, pub im_balance: Option<String>, pub mcm_balance: Option<String>, pub mm_balance: Option<String>, pub im_recover: Option<String>, pub alerter_margin: Option<String>, pub alerter_margin_balance: Option<String>, pub elv_mv_ratio: Option<f64>, pub risk_level_type: Option<u32>, pub margin_call_days: Option<i32>, pub risk_status: Option<i32>, pub risk_status_client: Option<i32>, pub pstn_ratio: Option<String>, pub lever_multi: Option<String>, pub mm_balance_ratio: Option<String>, pub ibp: Option<String>, pub original_client_level: Option<u32>, pub original_risk_factor_client: Option<u32>, pub original_risk_level: Option<u32>, pub original_risk_status: Option<i32>, pub real_loan: Option<String>, pub loan_ratio: Option<String>, pub margin_value: Option<String>, pub margin_ratio: Option<String>, pub margin_init_ratio: Option<String>, pub margin_warn_ratio: Option<String>, pub margin_cover_ratio: Option<String>, pub regt_call_amount: Option<String>, pub is_high_leverage_user: Option<bool>, pub overnight_im: Option<String>, pub overnight_mm: Option<String>, pub overnight_mm_balance: Option<String>,
}
Expand description

MarginInfo 全字段对齐 mobile risk_user_account_info.proto.

Fields§

§long_power: Option<String>

多头购买力

§short_power: Option<String>

空头购买力

§balance: Option<String>

账户余额

§market_value: Option<String>

持仓市值

§elv: Option<String>

账户净值 (当前权益)

§im: Option<String>

当前初始保证金

§mcm: Option<String>

margin call 保证金

§mm: Option<String>

当前维持保证金

§im_balance: Option<String>

初始保证金剩余额度

§mcm_balance: Option<String>

margin call 保证金剩余额度

§mm_balance: Option<String>

剩余流动性 (elv - mm)

§im_recover: Option<String>

追缴保证金

§alerter_margin: Option<String>

预警保证金

§alerter_margin_balance: Option<String>

预警保证金剩余额度

§elv_mv_ratio: Option<f64>

资产 / 市值 比例 (杠杆指标)

§risk_level_type: Option<u32>

风险等级: SAFE=0 / MARGIN_CALL=1 / FORCE_CLOSE=2 / ALERT=3

§margin_call_days: Option<i32>

连续 margin call 天数

§risk_status: Option<i32>

账户状态码: 10/20/30=安全 / 41/42=较低 / 51/52=中等 / 61/62=偏高 / 70=预警 / 81-93=危险

§risk_status_client: Option<i32>

客户端风险状态码

§pstn_ratio: Option<String>

持仓占比

§lever_multi: Option<String>

杠杆倍数

§mm_balance_ratio: Option<String>

强平比例

§ibp: Option<String>

入金授信购买力

§original_client_level: Option<u32>

透传监察字段

§original_risk_factor_client: Option<u32>

透传监察字段

§original_risk_level: Option<u32>

透传监察字段

§original_risk_status: Option<i32>

透传监察字段

§real_loan: Option<String>

HK-specific (US/CN_AH 通常返空字符串)

实际借贷额, min(balance, 0)

§loan_ratio: Option<String>

账户授信比

§margin_value: Option<String>

港股股票保证金

§margin_ratio: Option<String>

港股账户保证金比例

§margin_init_ratio: Option<String>

初始保证金线

§margin_warn_ratio: Option<String>

保证金警戒线

§margin_cover_ratio: Option<String>

保证金平仓线

§regt_call_amount: Option<String>

Reg-T call amount

§is_high_leverage_user: Option<bool>

是否日内证券高杠杆客户组

§overnight_im: Option<String>

隔夜初始保证金

§overnight_mm: Option<String>

隔夜维持保证金

§overnight_mm_balance: Option<String>

隔夜剩余流动性

Implementations§

Source§

impl MarginInfo

Source

pub fn long_power(&self) -> &str

Returns the value of long_power, or the default value if long_power is unset.

Source

pub fn short_power(&self) -> &str

Returns the value of short_power, or the default value if short_power is unset.

Source

pub fn balance(&self) -> &str

Returns the value of balance, or the default value if balance is unset.

Source

pub fn market_value(&self) -> &str

Returns the value of market_value, or the default value if market_value is unset.

Source

pub fn elv(&self) -> &str

Returns the value of elv, or the default value if elv is unset.

Source

pub fn im(&self) -> &str

Returns the value of im, or the default value if im is unset.

Source

pub fn mcm(&self) -> &str

Returns the value of mcm, or the default value if mcm is unset.

Source

pub fn mm(&self) -> &str

Returns the value of mm, or the default value if mm is unset.

Source

pub fn im_balance(&self) -> &str

Returns the value of im_balance, or the default value if im_balance is unset.

Source

pub fn mcm_balance(&self) -> &str

Returns the value of mcm_balance, or the default value if mcm_balance is unset.

Source

pub fn mm_balance(&self) -> &str

Returns the value of mm_balance, or the default value if mm_balance is unset.

Source

pub fn im_recover(&self) -> &str

Returns the value of im_recover, or the default value if im_recover is unset.

Source

pub fn alerter_margin(&self) -> &str

Returns the value of alerter_margin, or the default value if alerter_margin is unset.

Source

pub fn alerter_margin_balance(&self) -> &str

Returns the value of alerter_margin_balance, or the default value if alerter_margin_balance is unset.

Source

pub fn elv_mv_ratio(&self) -> f64

Returns the value of elv_mv_ratio, or the default value if elv_mv_ratio is unset.

Source

pub fn risk_level_type(&self) -> u32

Returns the value of risk_level_type, or the default value if risk_level_type is unset.

Source

pub fn margin_call_days(&self) -> i32

Returns the value of margin_call_days, or the default value if margin_call_days is unset.

Source

pub fn risk_status(&self) -> i32

Returns the value of risk_status, or the default value if risk_status is unset.

Source

pub fn risk_status_client(&self) -> i32

Returns the value of risk_status_client, or the default value if risk_status_client is unset.

Source

pub fn pstn_ratio(&self) -> &str

Returns the value of pstn_ratio, or the default value if pstn_ratio is unset.

Source

pub fn lever_multi(&self) -> &str

Returns the value of lever_multi, or the default value if lever_multi is unset.

Source

pub fn mm_balance_ratio(&self) -> &str

Returns the value of mm_balance_ratio, or the default value if mm_balance_ratio is unset.

Source

pub fn ibp(&self) -> &str

Returns the value of ibp, or the default value if ibp is unset.

Source

pub fn original_client_level(&self) -> u32

Returns the value of original_client_level, or the default value if original_client_level is unset.

Source

pub fn original_risk_factor_client(&self) -> u32

Returns the value of original_risk_factor_client, or the default value if original_risk_factor_client is unset.

Source

pub fn original_risk_level(&self) -> u32

Returns the value of original_risk_level, or the default value if original_risk_level is unset.

Source

pub fn original_risk_status(&self) -> i32

Returns the value of original_risk_status, or the default value if original_risk_status is unset.

Source

pub fn real_loan(&self) -> &str

Returns the value of real_loan, or the default value if real_loan is unset.

Source

pub fn loan_ratio(&self) -> &str

Returns the value of loan_ratio, or the default value if loan_ratio is unset.

Source

pub fn margin_value(&self) -> &str

Returns the value of margin_value, or the default value if margin_value is unset.

Source

pub fn margin_ratio(&self) -> &str

Returns the value of margin_ratio, or the default value if margin_ratio is unset.

Source

pub fn margin_init_ratio(&self) -> &str

Returns the value of margin_init_ratio, or the default value if margin_init_ratio is unset.

Source

pub fn margin_warn_ratio(&self) -> &str

Returns the value of margin_warn_ratio, or the default value if margin_warn_ratio is unset.

Source

pub fn margin_cover_ratio(&self) -> &str

Returns the value of margin_cover_ratio, or the default value if margin_cover_ratio is unset.

Source

pub fn regt_call_amount(&self) -> &str

Returns the value of regt_call_amount, or the default value if regt_call_amount is unset.

Source

pub fn is_high_leverage_user(&self) -> bool

Returns the value of is_high_leverage_user, or the default value if is_high_leverage_user is unset.

Source

pub fn overnight_im(&self) -> &str

Returns the value of overnight_im, or the default value if overnight_im is unset.

Source

pub fn overnight_mm(&self) -> &str

Returns the value of overnight_mm, or the default value if overnight_mm is unset.

Source

pub fn overnight_mm_balance(&self) -> &str

Returns the value of overnight_mm_balance, or the default value if overnight_mm_balance is unset.

Trait Implementations§

Source§

impl Clone for MarginInfo

Source§

fn clone(&self) -> MarginInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MarginInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MarginInfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MarginInfo

Source§

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 Message for MarginInfo

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for MarginInfo

Source§

fn eq(&self, other: &MarginInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MarginInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MarginInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,