Skip to content

Commit

Permalink
_send_os_order 오류 수정
Browse files Browse the repository at this point in the history
- hash_key 추가
22.07.29 기준 공식 API문서에는
hashkey 설정이 불필요하다고 되어있으나
실제로는 설정하지 않으면 에러 발생함
관련 이슈: koreainvestment/open-trading-api#5

- params 수정
  • Loading branch information
pjueon committed Jul 28, 2022
1 parent b46377a commit a702f6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pykis/public_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,12 @@ def _send_os_order(self, ticker: str, market_code: str, # pylint: disable=too-m
"OVRS_EXCG_CD": market_code,
"ORD_DVSN": order_type,
"ORD_QTY": str(order_amount),
"ORD_UNPR": price_as_str,
"OVRS_ORD_UNPR": price_as_str,
"ORD_SVR_DVSN_CD": "0",
}

req = APIRequestParameter(url_path, tr_id=tr_id,
params=params, requires_authentication=True, requires_hash=False)
params=params, requires_authentication=True, requires_hash=True)

response = self._send_post_request(req)
return response.outputs[0]
Expand Down

0 comments on commit a702f6d

Please sign in to comment.