pub struct ClosedOptionsPositionItem {
pub symbol: String,
pub side: Side,
pub total_open_fee: f64,
pub delivery_fee: f64,
pub total_close_fee: f64,
pub qty: f64,
pub close_time: u64,
pub avg_exit_price: f64,
pub delivery_price: f64,
pub open_time: u64,
pub avg_entry_price: f64,
pub total_pnl: f64,
}Expand description
Represents a single closed options position item.
Contains detailed information about a closed options position, including entry/exit prices, fees, P&L, and timing. Bots use this to analyze options trading performance, calculate profitability metrics, and audit trading history.
§Bybit API Reference
According to the Bybit V5 API documentation:
- Fee and price are displayed with trailing zeroes up to 8 decimal places.
- Positions are sorted by
closeTimein descending order. - Only supports querying closed options positions in the last 6 months.
Fields§
§symbol: StringThe options symbol name (e.g., “BTC-12JUN25-104019-C-USDT”).
Identifies the specific options contract. Bots use this to track performance by symbol and analyze specific options strategies.
side: SideThe position side (“Buy” or “Sell”).
Indicates whether the position was long (Buy) or short (Sell) the option. Bots use this to calculate directional exposure and analyze strategy performance.
total_open_fee: f64The total open fee paid for the position.
The cumulative fee paid when opening the position. Bots use this to calculate net profitability and optimize for fee efficiency.
delivery_fee: f64The delivery fee (if applicable).
The fee charged for options delivery at expiration. Bots use this to account for expiration costs in options strategies.
total_close_fee: f64The total close fee paid for the position.
The cumulative fee paid when closing the position. Bots use this to calculate total transaction costs and net P&L.
qty: f64The position quantity.
The number of options contracts in the position. Bots use this to calculate position size and exposure.
close_time: u64The timestamp when the position was closed (in milliseconds).
Indicates when the position was closed. Bots use this for time-series analysis and to correlate position closures with market events.
avg_exit_price: f64The average exit price.
The average price at which the position was closed. Bots use this to calculate exit efficiency and compare against target exit prices.
delivery_price: f64The delivery price (if applicable).
The settlement price at options expiration. Bots use this to analyze expiration outcomes for options held to maturity.
open_time: u64The timestamp when the position was opened (in milliseconds).
Indicates when the position was initially opened. Bots use this to calculate position duration and analyze holding period returns.
avg_entry_price: f64The average entry price.
The average price at which the position was opened. Bots use this to calculate entry efficiency and compare against target entry prices.
total_pnl: f64The total profit and loss for the position.
The net P&L including all fees. Bots use this as the primary performance metric for options trading strategies.
Trait Implementations§
Source§impl Clone for ClosedOptionsPositionItem
impl Clone for ClosedOptionsPositionItem
Source§fn clone(&self) -> ClosedOptionsPositionItem
fn clone(&self) -> ClosedOptionsPositionItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more