TransactionLogEntry

Struct TransactionLogEntry 

Source
pub struct TransactionLogEntry {
Show 34 fields pub id: u64, pub currency: String, pub amount: Option<f64>, pub balance: f64, pub timestamp: u64, pub transaction_type: String, pub info: Option<Value>, pub change: f64, pub cashflow: f64, pub user_id: u64, pub trade_id: Option<String>, pub order_id: Option<String>, pub position: Option<f64>, pub side: Option<TransactionSide>, pub contracts: Option<f64>, pub interest_pl: Option<f64>, pub user_role: Option<UserRole>, pub fee_role: Option<String>, pub index_price: Option<f64>, pub price: Option<f64>, pub user_seq: u64, pub settlement_price: Option<f64>, pub price_currency: Option<String>, pub equity: f64, pub total_interest_pl: Option<f64>, pub session_upl: Option<f64>, pub profit_as_cashflow: Option<bool>, pub commission: Option<f64>, pub session_rpl: Option<f64>, pub mark_price: Option<f64>, pub block_rfq_id: Option<u64>, pub ip: Option<String>, pub username: String, pub instrument_name: Option<String>,
}
Expand description

Generic transaction log entry

Fields§

§id: u64

Unique identifier

§currency: String

Currency, i.e “BTC”, “ETH”, “USDC”

§amount: Option<f64>

It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.

§balance: f64

Cash balance after the transaction

§timestamp: u64

The timestamp (milliseconds since the Unix epoch)

§transaction_type: String

Transaction category/type. Common types: trade, deposit, withdrawal, settlement, delivery, transfer, swap, correction

§info: Option<Value>

Additional information regarding transaction. Strongly dependent on the log entry type

§change: f64

Change in cash balance. For trades: fees and options premium paid/received. For settlement: Futures session PNL and perpetual session funding.

§cashflow: f64

For futures and perpetual contracts: Realized session PNL (since last settlement). For options: the amount paid or received for the options traded.

§user_id: u64

Unique user identifier

§trade_id: Option<String>

Unique (per currency) trade identifier

§order_id: Option<String>

Unique order identifier

§position: Option<f64>

Updated position size after the transaction

§side: Option<TransactionSide>

One of: short or long in case of settlements, close sell or close buy in case of deliveries, open sell, open buy, close sell, close buy in case of trades

§contracts: Option<f64>

It represents the order size in contract units. (Optional, may be absent in historical data).

§interest_pl: Option<f64>

Actual funding rate of trades and settlements on perpetual instruments

§user_role: Option<UserRole>

Trade role of the user: maker or taker

§fee_role: Option<String>

Fee role of the user: maker or taker. Can be different from trade role when iceberg order was involved.

§index_price: Option<f64>

The index price for the instrument during the delivery

§price: Option<f64>

Settlement/delivery price or the price level of the traded contracts

§user_seq: u64

Sequential identifier of user transaction

§settlement_price: Option<f64>

The settlement price for the instrument during the delivery

§price_currency: Option<String>

Currency symbol associated with the price field value

§equity: f64

Updated equity value after the transaction

§total_interest_pl: Option<f64>

Total session funding rate

§session_upl: Option<f64>

Session unrealized profit and loss

§profit_as_cashflow: Option<bool>

Indicator informing whether the cashflow is waiting for settlement or not

§commission: Option<f64>

Commission paid so far (in base currency)

§session_rpl: Option<f64>

Session realized profit and loss

§mark_price: Option<f64>

Market price during the trade

§block_rfq_id: Option<u64>

ID of the Block RFQ - when trade was part of the Block RFQ

§ip: Option<String>

The IP address from which the trade was initiated

§username: String

System name or user defined subaccount alias

§instrument_name: Option<String>

Unique instrument identifier

Trait Implementations§

Source§

impl Clone for TransactionLogEntry

Source§

fn clone(&self) -> TransactionLogEntry

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 TransactionLogEntry

Source§

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

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

impl<'de> Deserialize<'de> for TransactionLogEntry

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 Display for TransactionLogEntry

Source§

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

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

impl Serialize for TransactionLogEntry

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

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.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

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

Source§

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
Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

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>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,