rusty_feeder/exchange/binance/
instrument.rs1use rusty_model::{
2 instruments::{Instrument, InstrumentId},
3 venues::Venue,
4};
5use smartstring::alias::String;
6use std::any::Any;
7
8#[derive(Debug, Clone)]
10pub struct BinanceInstrument {
11 pub id: InstrumentId,
13}
14
15impl Instrument for BinanceInstrument {
16 fn id(&self) -> InstrumentId {
17 self.id.clone()
18 }
19
20 fn symbol(&self) -> String {
21 self.id.symbol.clone()
22 }
23
24 fn venue(&self) -> Venue {
25 Venue::Binance
26 }
27
28 fn as_any(&self) -> &dyn Any {
29 self
30 }
31
32 fn clone_box(&self) -> Box<dyn Instrument> {
33 Box::new(self.clone())
34 }
35}