pub struct Trade {Show 16 fields
pub id: i64,
pub token_name: String,
pub token_symbol: String,
pub token_address: String,
pub token_image: Option<String>,
pub swapper_address: String,
pub swapper_username: Option<String>,
pub swapper_avatar: Option<String>,
pub trade_side: TradeSide,
pub eth_amount: String,
pub token_amount: String,
pub network: String,
pub date: i64,
pub tx_hash: String,
pub token_price: String,
pub eth_price: String,
}Expand description
A single swap against the bonding curve or the graduated pair.
Fields§
§id: i64Internal row id. Pass the highest one you have seen as latest_trade_id
to RecentTradesParams to poll incrementally.
token_name: StringToken name.
token_symbol: StringToken ticker.
token_address: StringToken contract address.
token_image: Option<String>Token image URL.
swapper_address: StringWallet that made the trade.
swapper_username: Option<String>Trader’s display name, when set.
swapper_avatar: Option<String>Trader’s avatar URL, when set.
trade_side: TradeSideBuy or sell.
eth_amount: StringBNB amount. Decimal string — do not parse as f64.
token_amount: StringToken amount. Decimal string — do not parse as f64.
network: StringChain slug.
date: i64Trade time, UNIX seconds.
tx_hash: StringTransaction hash.
token_price: StringToken price in USD at trade time. Decimal string.
eth_price: StringBNB price in USD at trade time. Decimal string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Trade
impl<'de> Deserialize<'de> for Trade
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Trade
impl RefUnwindSafe for Trade
impl Send for Trade
impl Sync for Trade
impl Unpin for Trade
impl UnsafeUnpin for Trade
impl UnwindSafe for Trade
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