StockPosition#
- class pyqqq.datatypes.StockPosition(asset_code: str, asset_name: str, quantity: int, sell_possible_quantity: int, average_purchase_price: Decimal, current_price: int | Decimal | None = None, current_value: int | Decimal | None = None, current_pnl: Decimal | None = None, current_pnl_value: int | Decimal | None = None)[source]#
주식 보유 종목 정보를 담는 데이터 클래스입니다.
- __init__(asset_code: str, asset_name: str, quantity: int, sell_possible_quantity: int, average_purchase_price: Decimal, current_price: int | Decimal | None = None, current_value: int | Decimal | None = None, current_pnl: Decimal | None = None, current_pnl_value: int | Decimal | None = None) None #
Methods
__init__
(asset_code, asset_name, quantity, ...)Attributes
current_pnl
현재 손익률
current_pnl_value
현재 손익 금액
current_price
현재 가격
current_value
현재 가치
asset_code
종목 코드
asset_name
종목 이름
quantity
보유 수량
sell_possible_quantity
매도 가능 수량
average_purchase_price
평균 매입 가격