get_possible_quantity

TossSimpleDomesticStock.get_possible_quantity(asset_code: str, order_type: OrderType = OrderType.MARKET, price: int = 0) dict[source]

주문 가능 수량을 조회합니다.

수량은 매매 수수료(원 단위 올림)를 포함한 총비용이 매수 가능 현금을 넘지 않는 최대치로 계산합니다.

Parameters:
  • asset_code (str) – 종목 코드

  • order_type (OrderType) – 주문 유형 (LIMIT/MARKET)

  • price (int) – 주문 가격. 지정가 주문 시 필수이며, 시장가 주문에서는 무시된다.

Returns:

주문 가능 수량 정보

  • investable_cash (int): 주문 가능 현금

  • reusable_amount (int): 재사용 가능 금액 (제공되지 않음 - 항상 0)

  • price (int): 계산 기준 단가 (지정가 또는 상한가)

  • quantity (int): 주문 가능 수량 (수수료 반영)

  • amount (int): 주문 시 소요 금액 (수수료 제외 주문 금액)

Return type:

dict