pub struct MoexParser;Expand description
MOEX ISS response parser
Implementations§
Source§impl MoexParser
impl MoexParser
Sourcepub fn parse_price(response: &Value) -> Result<f64, String>
pub fn parse_price(response: &Value) -> Result<f64, String>
Parse current price from MOEX response
Expected block: “marketdata” Required column: “LAST”
Sourcepub fn parse_ticker(response: &Value, _symbol: &str) -> Result<Ticker, String>
pub fn parse_ticker(response: &Value, _symbol: &str) -> Result<Ticker, String>
Parse ticker from MOEX response
Expected blocks:
- “securities” - for symbol info
- “marketdata” - for price and volume data
Sourcepub fn parse_klines(response: &Value) -> Result<Vec<Kline>, String>
pub fn parse_klines(response: &Value) -> Result<Vec<Kline>, String>
Parse klines/candles from MOEX response
Expected block: “candles” Required columns: “open”, “close”, “high”, “low”, “volume”, “begin”, “end”
Auto Trait Implementations§
impl Freeze for MoexParser
impl RefUnwindSafe for MoexParser
impl Send for MoexParser
impl Sync for MoexParser
impl Unpin for MoexParser
impl UnsafeUnpin for MoexParser
impl UnwindSafe for MoexParser
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