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.4.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for dbopenapi-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f02b9f3d4c07b99a301b637edd0b03acdc51a025bfe7209347744304ee74bbcb |
|
MD5 | 25574556e340f826853c4363b9911fff |
|
BLAKE2b-256 | d04d885ce1d260d15e44922df2e1e97a1e9adf17cc48f5c2fcbe5daa4b6fe43d |