SecurityQuote
struct SecurityQuote
Quote of securitity
Fields
Yesterday's close
Yesterday's close
Yesterday's close
Security trading status
Security trading status
Security trading status
Quote of US pre market
Quote of US pre market
Quote of US pre market
Quote of US post market
Quote of US post market
Quote of US post market
Methods
new
pub fn new(inner: SecurityQuote): SecurityQuote
[src]
fn new(inner: _SecurityQuote): SecurityQuote {
let trade_status = inner.trade_status as TradeStatus;
let pre_market_quote: PrePostQuote? = nil;
if (inner.pre_market_quote.is_some()) {
pre_market_quote = PrePostQuote.new(inner.pre_market_quote!);
}
let post_market_quote: PrePostQuote? = nil;
if (inner.post_market_quote.is_some()) {
post_market_quote = PrePostQuote.new(inner.post_market_quote!);
}
return SecurityQuote {
symbol: inner.symbol,
last_done: inner.last_done,
prev_close: inner.prev_close,
open: inner.open,
high: inner.high,
low: inner.low,
timestamp: inner.timestamp,
volume: inner.volume,
turnover: inner.turnover,
trade_status: trade_status!,
pre_market_quote,
post_market_quote,
};
}
new
pub fn new(inner: SecurityQuote): SecurityQuote
[src]
fn new(inner: _SecurityQuote): SecurityQuote {
let trade_status = inner.trade_status as TradeStatus;
let pre_market_quote: PrePostQuote? = nil;
if (inner.pre_market_quote.is_some()) {
pre_market_quote = PrePostQuote.new(inner.pre_market_quote!);
}
let post_market_quote: PrePostQuote? = nil;
if (inner.post_market_quote.is_some()) {
post_market_quote = PrePostQuote.new(inner.post_market_quote!);
}
return SecurityQuote {
symbol: inner.symbol,
last_done: inner.last_done,
prev_close: inner.prev_close,
open: inner.open,
high: inner.high,
low: inner.low,
timestamp: inner.timestamp,
volume: inner.volume,
turnover: inner.turnover,
trade_status: trade_status!,
pre_market_quote,
post_market_quote,
};
}