package for db openapi
Project description
DB증권 OpenApi Package
This is a simple package for DB RestAPI version.
Installation
pip install dbopenapi
Usage
모든 요청은 비동기로 처리되며, 요청에 대한 응답은 await 키워드를 사용하여 받을 수 있습니다.
Samples: https://github.com/teranum/db-openapi-samples
로그인 요청은 반드시 먼저 수행되어야 하며, 로그인이 성공하면 다른 요청을 수행할 수 있습니다.
import asyncio
import dbopenapi
from app_keys import appkey, appsecretkey # app_keys.py 파일에 appkey, appsecretkey 변수를 정의하고 사용하세요
async def main():
api=dbopenapi.OpenApi()
if not await api.login(appkey, appsecretkey): return print(f"연결실패: {api.last_message}")
print("연결성공, 접속서버: " + ("모의투자" if api.is_simulation else "실투자"))
... # 다른 작업 수행
await api.close()
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dbopenapi-0.0.5.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for dbopenapi-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e158731f100fcd395a86bea7ce0254703a30643ef121d340903046a4271de59 |
|
MD5 | dedfc3fad49f570a6ecc196a71aa75e7 |
|
BLAKE2b-256 | 4859a60d9ee15193748d932488fa8fc1615f4d165517b1120d83af8cd0ddfcb5 |