get_positions#

KISSimpleOverseasStock.get_positions(to_frame: bool = False) List[StockPosition] | DataFrame[source]#

보유 포지션 정보를 조회하여 리스트 또는 데이터프레임 형식으로 반환합니다.

Parameters:

to_frame (bool, optional) – True일 경우 Pandas DataFrame으로 반환, False일 경우 리스트 형식의 StockPosition 객체들로 반환. 기본값은 False.

Returns:

보유 포지션 정보를 포함한 리스트 또는 DataFrame.
  • 리스트 형식 (StockPosition 객체들):
    • asset_code (str): 자산 티커 코드.

    • asset_name (str): 자산 이름.

    • quantity (float): 보유 수량.

    • sell_possible_quantity (float): 매도 가능 수량.

    • average_purchase_price (float): 평균 매입가.

    • current_price (float): 현재 가격.

    • current_value (float): 현재 평가 금액.

    • current_pnl (float): 현재 손익률.

    • current_pnl_value (float): 현재 손익 금액.

    • exchange (str): 거래소 코드.

    • currency (str): 거래 통화.

  • 데이터프레임 형식 (to_frame=True):
    • asset_code: 인덱스가 자산 코드인 Pandas DataFrame.

    • 나머지 필드는 위와 동일.

Return type:

List[StockPosition] | pd.DataFrame