Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetMarketPriceInfo not working #94

Open
jmche opened this issue Sep 5, 2022 · 1 comment
Open

GetMarketPriceInfo not working #94

jmche opened this issue Sep 5, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jmche
Copy link

jmche commented Sep 5, 2022

최신 버전으로 update후 GetMarketPriceInfo함수가 작동되지 않습니다. 항상 [] 값d이 return됩니다.

@jmche jmche added the bug Something isn't working label Sep 5, 2022
elbakramer added a commit that referenced this issue Sep 6, 2022
@elbakramer
Copy link
Owner

elbakramer commented Sep 13, 2022

일단 말씀주신 GetMarketPriceInfo() 함수의 내부 TR 코드는 OPT10007 이며
해당 TR 은 KOAStudio 상 멀티데이터를 출력하는 것으로 표기되어 있습니다.

image

그런데 기존에는 이게 여러가지 이유에서 싱글데이터를 출력하는 것처럼 동작하고 있었고,
최근 관련해 코드 여기저기를 정상화하는 과정에서 내부 동작은 멀티데이터 출력으로 변경되었지만,
그걸 외부적으로 사용하던 해당 함수에서는 해당 변경사항을 반영하지 못하여 빈 값으로 반환되고 있었습니다.

문서상 멀티데이터 출력이긴 하지만,
TR 관련 데이터 파일의 정보나 실제 테스트시의 반환값을 봤을 때, 사실상 1개의 레코드만 반환하는 것으로 보여서요.
해당 함수가 반환하는 값의 타입에는 기존과 차이가 없도록 멀티데이터의 가장 첫번째 행을 반환하도록 수정했습니다.

responses = self.TransactionCall(rqname, trcode, scrno, inputs)
_single, multi = self._ParseTransactionCallResponses(responses)
single = multi.iloc[0]
return single

다만 위의 1개 가정이 틀리는 상황도 있을지는 파악된 바가 없어서 데이터 누락이 발생할 수도 있는 점은 참고 바랍니다.

최신 버전 (v0.9.0) 으로 업데이트 후 이슈 해결되는지 테스트 부탁드리겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants