FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::Position Struct Reference

#include <fastmm/core/position.hpp>

Public Member Functions

Notional net_pnl () const noexcept
 
bool flat () const noexcept
 
Qty abs_qty () const noexcept
 

Public Attributes

Qty qty {}
 signed net position (+ long / - short)
 
Price avg_px {}
 average entry price of the open position
 
Notional realized {}
 closed PnL (before fees)
 
Notional unrealized {}
 mark-to-market of the open position at the last mark()
 
Notional fees {}
 cumulative fees paid (negative = rebates)
 
Price last_mark {}
 
Qty gross_traded {}
 sum of |fill qty|
 
std::uint32_t fills = 0
 
std::uint32_t pad_ = 0
 

Member Function Documentation

◆ net_pnl()

Notional fastmm::Position::net_pnl ( ) const
inlinenoexcept

◆ flat()

bool fastmm::Position::flat ( ) const
inlinenoexcept

◆ abs_qty()

Qty fastmm::Position::abs_qty ( ) const
inlinenoexcept

Member Data Documentation

◆ qty

Qty fastmm::Position::qty {}

signed net position (+ long / - short)

◆ avg_px

Price fastmm::Position::avg_px {}

average entry price of the open position

◆ realized

Notional fastmm::Position::realized {}

closed PnL (before fees)

◆ unrealized

Notional fastmm::Position::unrealized {}

mark-to-market of the open position at the last mark()

◆ fees

Notional fastmm::Position::fees {}

cumulative fees paid (negative = rebates)

◆ last_mark

Price fastmm::Position::last_mark {}

◆ gross_traded

Qty fastmm::Position::gross_traded {}

sum of |fill qty|

◆ fills

std::uint32_t fastmm::Position::fills = 0

◆ pad_

std::uint32_t fastmm::Position::pad_ = 0