TransactionLogEntry

Struct TransactionLogEntry 

Source
pub struct TransactionLogEntry {
Show 20 fields pub id: String, pub symbol: String, pub side: String, pub funding: Option<String>, pub order_link_id: Option<String>, pub order_id: String, pub fee: f64, pub change: String, pub cash_flow: f64, pub transaction_time: String, pub type_field: String, pub fee_rate: String, pub bonus_change: Option<String>, pub size: f64, pub qty: f64, pub cash_balance: f64, pub currency: String, pub category: String, pub trade_price: String, pub trade_id: String,
}
Expand description

Represents a single transaction log entry.

Details a specific transaction, such as a trade, funding fee, or margin adjustment, including associated costs and quantities. Bots use this to audit trading activity and calculate net performance in perpetual futures trading.

Fields§

§id: String

The unique identifier for the transaction.

A unique ID assigned by Bybit to track the transaction. Bots use this to correlate transactions with other data, such as orders or executions.

§symbol: String

The trading pair symbol (e.g., “BTCUSDT”).

Identifies the perpetual futures contract or asset involved in the transaction. Bots use this to filter transactions by market.

§side: String

The trade side (“Buy” or “Sell”).

Indicates whether the transaction was a buy or sell action. Bots use this to track position direction and calculate net exposure.

§funding: Option<String>

The funding fee (optional).

The funding fee applied to the transaction, if applicable, in the settlement currency. Bots use this to calculate funding costs for perpetual futures positions.

§order_link_id: Option<String>

The user-defined order link ID (optional).

A custom identifier for the order, if set by the bot. Bots use this to track specific orders across transactions.

§order_id: String

The unique order ID.

The Bybit-assigned ID for the order associated with the transaction. Bots use this to correlate transactions with specific orders.

§fee: f64

The transaction fee.

The fee charged for the transaction, in the settlement currency. Bots use this to calculate trading costs and optimize fee-efficient strategies.

§change: String

The balance change caused by the transaction.

The net change in account balance due to the transaction, as a string (e.g., “+100.50” or “-50.25”). Bots use this to track account balance updates.

§cash_flow: f64

The cash flow of the transaction.

The net cash flow (positive or negative) resulting from the transaction, in the settlement currency. Bots use this to calculate liquidity impacts.

§transaction_time: String

The timestamp of the transaction.

The time when the transaction occurred, as a string (e.g., “2025-05-19T13:07:00Z”). Bots use this to align transactions with market events.

§type_field: String

The type of transaction (e.g., “TRADE”, “FUNDING”).

Specifies the nature of the transaction, such as trade execution or funding fee. Bots use this to categorize transactions for analysis.

§fee_rate: String

The fee rate applied to the transaction.

The fee rate (e.g., “0.00075” for 0.075%) applied to the transaction. Bots use this to verify fee calculations and optimize trading costs.

§bonus_change: Option<String>

The bonus change, if any (optional).

Any bonus or promotional balance changes applied to the transaction, in the settlement currency. Bots use this to account for special incentives.

§size: f64

The position size affected by the transaction.

The size of the position involved in the transaction, in base asset units. Bots use this to track position changes and calculate exposure.

§qty: f64

The quantity traded in the transaction.

The amount of the base asset traded, in base asset units. Bots use this to verify trade execution details.

§cash_balance: f64

The resulting cash balance after the transaction.

The account’s cash balance after the transaction, in the settlement currency. Bots use this to monitor available funds for trading.

§currency: String

The currency of the transaction (e.g., “USDT”).

The settlement currency used for the transaction. Bots use this to ensure correct currency handling in multi-currency accounts.

§category: String

The product category (e.g., “linear”).

The instrument type of the transaction, such as linear for USDT-margined perpetuals. Bots use this to filter transactions by contract type.

§trade_price: String

The trade price.

The price at which the trade was executed, as a string (e.g., “50000.00”). Bots use this to verify execution prices and calculate P&L.

§trade_id: String

The unique trade ID.

A unique identifier for the trade execution associated with the transaction. Bots use this to track specific trade events.

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