Name | python-upbit-api JSON |
Version |
1.8.0
JSON |
| download |
home_page | None |
Summary | Python Upbit API Wrapper |
upload_time | 2024-12-12 02:45:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2023 Lee Jihye Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
requests
urllib3
pyjwt
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Python Upbit API
💙 Python Upbit API는 간단하고 명료한 Upbit API Wrapper 입니다. 👍
[][pypi]
[][pypi]
[][license]
[][downloads]
## Installation
pip 명령어로 간단하게 설치할 수 있습니다.
```shell
pip install python-upbit-api
```
## Quick Start
### 인증 없이 사용하기
각종 시세 정보를 얻기 위한 **QUOTATION API만** 사용한다면 인증 정보 없이 초기화 후 사용합니다.
<br/>⚠️ EXCHANGE API를 사용하면 `upbit.exceptions.ApiKeyError` 예외가 발생합니다.
```python
# example.py
from upbit import Upbit
upbit = Upbit()
res = upbit.get_markets()
data = res.json()
upbit.get_accounts() # upbit.exceptions.ApiKeyError 발생
```
### 인증 사용하기
인증이 필요한 **EXCHANGE API**를 사용해야 한다면 인증 정보를 초기화시 등록 후 사용합니다.
<br/>🙆🏻♀️ QUOTATION API도 사용할 수 있습니다.
`.env` 환경설정 파일에 발급 받은 인증 정보를 설정합니다.
```
UPBIT_OPEN_API_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
UPBIT_OPEN_API_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
```python
# example.py
import os
from upbit import Upbit
access_key = os.environ.get('UPBIT_OPEN_API_ACCESS_KEY')
secret_key = os.environ.get('UPBIT_OPEN_API_SECRET_KEY')
upbit = Upbit(access_key, secret_key)
res = upbit.get_accounts()
data = res.json()
```
## Features
### 업비트 REST API를 모두 메서드로 제공
[업비트 REST API][upbit docs api]를 `Upbit` 클래스의 메서드로 제공합니다.
자세한 내용은 [upbit.py](https://github.com/designmeme/python-upbit-api/blob/main/upbit/upbit.py) 파일 내 docstring 참조.
| | | 메서드명 |
|----|:-----------------------------|:---------------------------|
| 자산 | 전체 계좌 조회 | get_accounts |
| 주문 | 주문 가능 정보 | get_order_chance |
| | 개별 주문 조회 | get_order |
| | 주문 리스트 조회 | get_orders |
| | id로 주문리스트 조회 | get_orders_by_id |
| | 체결 대기 주문 (Open Order) 조회 | get_open_orders |
| | 종료된 주문 (Closed Order) 조회 | get_closed_orders |
| | 주문 취소 접수 | delete_order |
| | 주문 일괄 취소 접수 | delete_orders |
| | id로 주문리스트 취소 접수 | delete_orders_by_id |
| | 주문하기 | create_order |
| 출금 | 출금 리스트 조회 | get_withdraws |
| | 개별 출금 조회 | get_withdraw |
| | 출금 가능 정보 | get_withdraw_chance |
| | 디지털 자산 출금하기 | create_withdraw_coin |
| | 원화 출금하기 | create_withdraw_krw |
| | 출금 허용 주소 리스트 조회 | get_withdraw_addresses |
| 입금 | 입금 리스트 조회 | get_deposits |
| | 개별 입금 조회 | get_deposit |
| | 입금 주소 생성 요청 | create_coin_address |
| | 전체 입금 주소 조회 | get_coin_addresses |
| | 개별 입금 주소 조회 | get_coin_address |
| | 원화 입금하기 | create_deposit_krw |
| | 계정주 확인(트래블룰 검증)가능 거래소 리스트 조회 | get_vasps |
| | 입금 UUID로 트래블룰 검증하기 | verify_travel_rule_by_uuid |
| | 입금 TxID로 트래블룰 검증하기 | verify_travel_rule_by_txid |
| 서비스 정보 | 입출금 현황 | get_wallet_status |
| | API 키 리스트 조회 | get_api_keys |
| 시세 종목 조회 | 마켓 코드 조회 | get_markets |
| 시세 캔들 조회 | 초(Second) 캔들 | get_candles_second |
| | 분(Minute) 캔들 | get_candles_minute |
| | 일(Day) 캔들 | get_candles_day |
| | 주(Week) 캔들 | get_candles_week |
| | 월(Month) 캔들 | get_candles_month |
| | 연(Year) 캔들 | get_candles_year |
| 시세 체결 조회 | 최근 체결 내역 | get_trades_ticks |
| 시세 현재가 조회 | 현재가 정보 | get_ticker |
| 시세 현재가 조회 | 마켓 단위 현재가 정보 | get_tickers_by_quote |
| 시세 호가 조회 | 호가 정보 | get_orderbook |
| | 호가 모아보기 단위 정보 | get_orderbook_levels |
### Requests 사용
[Requests][requests] 라이브러리를 사용합니다.
1. `requests.Response` 객체를 그대로 반환합니다.
```python
# example.py
from upbit import Upbit
upbit = Upbit()
res = upbit.get_markets()
data = res.json()
status_code = res.status_code
```
2. `requests.adapters.HTTPAdapter` 클래스를 사용하여 재시도 횟수 등을 설정할 수 있습니다.
```python
# example.py
from upbit import Upbit
import requests
adapter = requests.adapters.HTTPAdapter(max_retries=3)
upbit = Upbit(http_adapter=adapter)
```
3. `requests.Session.request` 요청 파라미터 `timeout` 값을 설정할 수 있습니다.
```python
# example.py
from upbit import Upbit
upbit = Upbit(timeout=(10, 5)) # 모든 요청에 설정할 timeout
res = upbit.get_markets(timeout=10) # 이 요청에만 설정할 timeout
```
### 예외 클래스 제공
모든 API 요청에서 발생한 `requests.exceptions.HTTPError` 예외는 이 예외를 상속한 `upbit.exceptions.UpbitHTTPError` 예외로 발생합니다.
아래 Upbit 공식 문서에 공개한 에러 유형에 맞는 예외 쌍을 가집니다.
* [요청 수 제한](https://docs.upbit.com/docs/user-request-guide)
* [API 주요 에러 코드 목록](https://docs.upbit.com/docs/api-%EC%A3%BC%EC%9A%94-%EC%97%90%EB%9F%AC-%EC%BD%94%EB%93%9C-%EB%AA%A9%EB%A1%9D)
```python
# example.py
from upbit import Upbit, TooManyRequests, UpbitClientError, UpbitServerError
upbit = Upbit()
try:
res = upbit.get_markets()
except TooManyRequests as e:
status_code = e.response.status_code # 429
# ...예외 처리 코드
except UpbitClientError as e:
res = e.response
# ...예외 처리 코드
except UpbitServerError as e:
res = e.response
# ...예외 처리 코드
```
### 잔여 요청 수 확인
업비트 API `Remaining-Req` 응답 헤더에 담긴 잔여 요청 수를 `upbit.models.RemainingReq` 객체로 제공되어 정보에 쉽게 접근 할 수 있습니다.
요청 그룹별 최신 값을 프로퍼티에 저장하며 `get_remaining_reqs()` 함수를 호출하면 그룹의 최신 잔여 요청 수 객체를 확인 할 수 있습니다.
참고: [Exchange API 잔여 요청 수 확인 방법](https://docs.upbit.com/docs/user-request-guide#exchange-api-%EC%9E%94%EC%97%AC-%EC%9A%94%EC%B2%AD-%EC%88%98-%ED%99%95%EC%9D%B8-%EB%B0%A9%EB%B2%95)
```python
# example.py
from upbit import Upbit
from upbit.models import RemainingReq
upbit = Upbit()
res = upbit.get_candles_day('KRW-BTC')
rr: RemainingReq = upbit.get_remaining_reqs('candles')
rr.minute
rr.updated
# 응답 헤더도 그대로 사용 가능
rr_text = res.headers['Remaining-Req'] # 'group=candles; min=59; sec=4'
```
### 요청 파라미터 모델 제공
Upbit API 요청 파라미터에 사용할 다양한 데이터 모델을 타입으로 제공합니다.
```python
# example.py
from upbit.models import OrderSide
# ...
# Type Hint
order_side: OrderSide = 'bid'
res = upbit.create_order(market='KRW-BTC', side=order_side, ord_type='limit', price='100', volume='0.01')
```
### Docstring & Type Hint
잘 작성한 Docstring 내용과 타입으로 IDE에서 사용하기 편리합니다. 📝💡
## WebSocket
아직 지원하지 않습니다. [참고 이슈](https://github.com/designmeme/python-upbit-api/issues/7)
## Changelog
최신 변경 사항은 아래에서 확인할 수 있습니다.
- [CHANGELOG.md][changelog]
- [PyPI Releases][releases]
[pypi]: https://pypi.org/project/python-upbit-api/
[releases]: https://pypi.org/project/python-upbit-api/#history
[changelog]: https://github.com/designmeme/python-upbit-api/blob/main/CHANGELOG.md
[license]: https://github.com/designmeme/python-upbit-api/blob/main/LICENSE
[downloads]: https://pypistats.org/packages/python-upbit-api
[requests]: https://requests.readthedocs.io/en/latest/
[upbit docs api]: https://docs.upbit.com/reference/
Raw data
{
"_id": null,
"home_page": null,
"name": "python-upbit-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\uc774\uc9c0\ud61c Lee Jihye <ghe.lee19@gmail.com>",
"keywords": null,
"author": null,
"author_email": "\uc774\uc9c0\ud61c Lee Jihye <ghe.lee19@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ad/f3/c59de9921b569ce0ea6cde0f350e0818fa0a2d092714365fd72611e204c2/python_upbit_api-1.8.0.tar.gz",
"platform": null,
"description": "# Python Upbit API\n\n\ud83d\udc99 Python Upbit API\ub294 \uac04\ub2e8\ud558\uace0 \uba85\ub8cc\ud55c Upbit API Wrapper \uc785\ub2c8\ub2e4. \ud83d\udc4d\n\n[][pypi]\n[][pypi]\n[][license]\n[][downloads]\n\n\n## Installation\n\npip \uba85\ub839\uc5b4\ub85c \uac04\ub2e8\ud558\uac8c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n```shell\npip install python-upbit-api\n```\n\n## Quick Start\n\n### \uc778\uc99d \uc5c6\uc774 \uc0ac\uc6a9\ud558\uae30\n\uac01\uc885 \uc2dc\uc138 \uc815\ubcf4\ub97c \uc5bb\uae30 \uc704\ud55c **QUOTATION API\ub9cc** \uc0ac\uc6a9\ud55c\ub2e4\uba74 \uc778\uc99d \uc815\ubcf4 \uc5c6\uc774 \ucd08\uae30\ud654 \ud6c4 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.\n<br/>\u26a0\ufe0f EXCHANGE API\ub97c \uc0ac\uc6a9\ud558\uba74 `upbit.exceptions.ApiKeyError` \uc608\uc678\uac00 \ubc1c\uc0dd\ud569\ub2c8\ub2e4.\n\n```python\n# example.py\nfrom upbit import Upbit\n\nupbit = Upbit()\nres = upbit.get_markets()\ndata = res.json()\n\nupbit.get_accounts() # upbit.exceptions.ApiKeyError \ubc1c\uc0dd\n```\n\n### \uc778\uc99d \uc0ac\uc6a9\ud558\uae30\n\n\uc778\uc99d\uc774 \ud544\uc694\ud55c **EXCHANGE API**\ub97c \uc0ac\uc6a9\ud574\uc57c \ud55c\ub2e4\uba74 \uc778\uc99d \uc815\ubcf4\ub97c \ucd08\uae30\ud654\uc2dc \ub4f1\ub85d \ud6c4 \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n<br/>\ud83d\ude46\ud83c\udffb\u200d\u2640\ufe0f QUOTATION API\ub3c4 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n`.env` \ud658\uacbd\uc124\uc815 \ud30c\uc77c\uc5d0 \ubc1c\uae09 \ubc1b\uc740 \uc778\uc99d \uc815\ubcf4\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n```\nUPBIT_OPEN_API_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nUPBIT_OPEN_API_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n```python\n# example.py\nimport os\nfrom upbit import Upbit\n\naccess_key = os.environ.get('UPBIT_OPEN_API_ACCESS_KEY')\nsecret_key = os.environ.get('UPBIT_OPEN_API_SECRET_KEY')\nupbit = Upbit(access_key, secret_key)\nres = upbit.get_accounts()\ndata = res.json()\n```\n\n## Features\n\n### \uc5c5\ube44\ud2b8 REST API\ub97c \ubaa8\ub450 \uba54\uc11c\ub4dc\ub85c \uc81c\uacf5\n\n[\uc5c5\ube44\ud2b8 REST API][upbit docs api]\ub97c `Upbit` \ud074\ub798\uc2a4\uc758 \uba54\uc11c\ub4dc\ub85c \uc81c\uacf5\ud569\ub2c8\ub2e4.\n\uc790\uc138\ud55c \ub0b4\uc6a9\uc740 [upbit.py](https://github.com/designmeme/python-upbit-api/blob/main/upbit/upbit.py) \ud30c\uc77c \ub0b4 docstring \ucc38\uc870.\n\n| | | \uba54\uc11c\ub4dc\uba85 |\n|----|:-----------------------------|:---------------------------|\n| \uc790\uc0b0 | \uc804\uccb4 \uacc4\uc88c \uc870\ud68c | get_accounts |\n| \uc8fc\ubb38 | \uc8fc\ubb38 \uac00\ub2a5 \uc815\ubcf4 | get_order_chance |\n| | \uac1c\ubcc4 \uc8fc\ubb38 \uc870\ud68c | get_order |\n| | \uc8fc\ubb38 \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_orders |\n| | id\ub85c \uc8fc\ubb38\ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_orders_by_id |\n| | \uccb4\uacb0 \ub300\uae30 \uc8fc\ubb38 (Open Order) \uc870\ud68c | get_open_orders |\n| | \uc885\ub8cc\ub41c \uc8fc\ubb38 (Closed Order) \uc870\ud68c | get_closed_orders |\n| | \uc8fc\ubb38 \ucde8\uc18c \uc811\uc218 | delete_order |\n| | \uc8fc\ubb38 \uc77c\uad04 \ucde8\uc18c \uc811\uc218 | delete_orders |\n| | id\ub85c \uc8fc\ubb38\ub9ac\uc2a4\ud2b8 \ucde8\uc18c \uc811\uc218 | delete_orders_by_id |\n| | \uc8fc\ubb38\ud558\uae30 | create_order |\n| \ucd9c\uae08 | \ucd9c\uae08 \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_withdraws |\n| | \uac1c\ubcc4 \ucd9c\uae08 \uc870\ud68c | get_withdraw |\n| | \ucd9c\uae08 \uac00\ub2a5 \uc815\ubcf4 | get_withdraw_chance |\n| | \ub514\uc9c0\ud138 \uc790\uc0b0 \ucd9c\uae08\ud558\uae30 | create_withdraw_coin |\n| | \uc6d0\ud654 \ucd9c\uae08\ud558\uae30 | create_withdraw_krw |\n| | \ucd9c\uae08 \ud5c8\uc6a9 \uc8fc\uc18c \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_withdraw_addresses |\n| \uc785\uae08 | \uc785\uae08 \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_deposits |\n| | \uac1c\ubcc4 \uc785\uae08 \uc870\ud68c | get_deposit |\n| | \uc785\uae08 \uc8fc\uc18c \uc0dd\uc131 \uc694\uccad | create_coin_address |\n| | \uc804\uccb4 \uc785\uae08 \uc8fc\uc18c \uc870\ud68c | get_coin_addresses |\n| | \uac1c\ubcc4 \uc785\uae08 \uc8fc\uc18c \uc870\ud68c | get_coin_address |\n| | \uc6d0\ud654 \uc785\uae08\ud558\uae30 | create_deposit_krw |\n| | \uacc4\uc815\uc8fc \ud655\uc778(\ud2b8\ub798\ube14\ub8f0 \uac80\uc99d)\uac00\ub2a5 \uac70\ub798\uc18c \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_vasps |\n| | \uc785\uae08 UUID\ub85c \ud2b8\ub798\ube14\ub8f0 \uac80\uc99d\ud558\uae30 | verify_travel_rule_by_uuid |\n| | \uc785\uae08 TxID\ub85c \ud2b8\ub798\ube14\ub8f0 \uac80\uc99d\ud558\uae30 | verify_travel_rule_by_txid |\n| \uc11c\ube44\uc2a4 \uc815\ubcf4 | \uc785\ucd9c\uae08 \ud604\ud669 | get_wallet_status |\n| | API \ud0a4 \ub9ac\uc2a4\ud2b8 \uc870\ud68c | get_api_keys |\n| \uc2dc\uc138 \uc885\ubaa9 \uc870\ud68c | \ub9c8\ucf13 \ucf54\ub4dc \uc870\ud68c | get_markets |\n| \uc2dc\uc138 \uce94\ub4e4 \uc870\ud68c | \ucd08(Second) \uce94\ub4e4 | get_candles_second |\n| | \ubd84(Minute) \uce94\ub4e4 | get_candles_minute |\n| | \uc77c(Day) \uce94\ub4e4 | get_candles_day |\n| | \uc8fc(Week) \uce94\ub4e4 | get_candles_week |\n| | \uc6d4(Month) \uce94\ub4e4 | get_candles_month |\n| | \uc5f0(Year) \uce94\ub4e4 | get_candles_year |\n| \uc2dc\uc138 \uccb4\uacb0 \uc870\ud68c | \ucd5c\uadfc \uccb4\uacb0 \ub0b4\uc5ed | get_trades_ticks |\n| \uc2dc\uc138 \ud604\uc7ac\uac00 \uc870\ud68c | \ud604\uc7ac\uac00 \uc815\ubcf4 | get_ticker |\n| \uc2dc\uc138 \ud604\uc7ac\uac00 \uc870\ud68c | \ub9c8\ucf13 \ub2e8\uc704 \ud604\uc7ac\uac00 \uc815\ubcf4 | get_tickers_by_quote |\n| \uc2dc\uc138 \ud638\uac00 \uc870\ud68c | \ud638\uac00 \uc815\ubcf4 | get_orderbook |\n| | \ud638\uac00 \ubaa8\uc544\ubcf4\uae30 \ub2e8\uc704 \uc815\ubcf4 | get_orderbook_levels |\n\n### Requests \uc0ac\uc6a9\n[Requests][requests] \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.\n\n\n1. `requests.Response` \uac1d\uccb4\ub97c \uadf8\ub300\ub85c \ubc18\ud658\ud569\ub2c8\ub2e4.\n \n ```python\n # example.py\n from upbit import Upbit\n \n upbit = Upbit()\n res = upbit.get_markets()\n \n data = res.json()\n status_code = res.status_code\n ```\n\n2. `requests.adapters.HTTPAdapter` \ud074\ub798\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc7ac\uc2dc\ub3c4 \ud69f\uc218 \ub4f1\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n ```python\n # example.py\n from upbit import Upbit\n import requests\n \n adapter = requests.adapters.HTTPAdapter(max_retries=3)\n \n upbit = Upbit(http_adapter=adapter)\n ```\n\n3. `requests.Session.request` \uc694\uccad \ud30c\ub77c\ubbf8\ud130 `timeout` \uac12\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n ```python\n # example.py\n from upbit import Upbit\n \n upbit = Upbit(timeout=(10, 5)) # \ubaa8\ub4e0 \uc694\uccad\uc5d0 \uc124\uc815\ud560 timeout\n \n res = upbit.get_markets(timeout=10) # \uc774 \uc694\uccad\uc5d0\ub9cc \uc124\uc815\ud560 timeout\n ```\n\n### \uc608\uc678 \ud074\ub798\uc2a4 \uc81c\uacf5\n\ubaa8\ub4e0 API \uc694\uccad\uc5d0\uc11c \ubc1c\uc0dd\ud55c `requests.exceptions.HTTPError` \uc608\uc678\ub294 \uc774 \uc608\uc678\ub97c \uc0c1\uc18d\ud55c `upbit.exceptions.UpbitHTTPError` \uc608\uc678\ub85c \ubc1c\uc0dd\ud569\ub2c8\ub2e4.\n\n\uc544\ub798 Upbit \uacf5\uc2dd \ubb38\uc11c\uc5d0 \uacf5\uac1c\ud55c \uc5d0\ub7ec \uc720\ud615\uc5d0 \ub9de\ub294 \uc608\uc678 \uc30d\uc744 \uac00\uc9d1\ub2c8\ub2e4.\n* [\uc694\uccad \uc218 \uc81c\ud55c](https://docs.upbit.com/docs/user-request-guide)\n* [API \uc8fc\uc694 \uc5d0\ub7ec \ucf54\ub4dc \ubaa9\ub85d](https://docs.upbit.com/docs/api-%EC%A3%BC%EC%9A%94-%EC%97%90%EB%9F%AC-%EC%BD%94%EB%93%9C-%EB%AA%A9%EB%A1%9D)\n\n```python\n# example.py\nfrom upbit import Upbit, TooManyRequests, UpbitClientError, UpbitServerError\n\nupbit = Upbit()\ntry:\n res = upbit.get_markets()\nexcept TooManyRequests as e:\n status_code = e.response.status_code # 429\n # ...\uc608\uc678 \ucc98\ub9ac \ucf54\ub4dc\nexcept UpbitClientError as e:\n res = e.response\n # ...\uc608\uc678 \ucc98\ub9ac \ucf54\ub4dc\nexcept UpbitServerError as e:\n res = e.response\n # ...\uc608\uc678 \ucc98\ub9ac \ucf54\ub4dc\n```\n\n### \uc794\uc5ec \uc694\uccad \uc218 \ud655\uc778\n\uc5c5\ube44\ud2b8 API `Remaining-Req` \uc751\ub2f5 \ud5e4\ub354\uc5d0 \ub2f4\uae34 \uc794\uc5ec \uc694\uccad \uc218\ub97c `upbit.models.RemainingReq` \uac1d\uccb4\ub85c \uc81c\uacf5\ub418\uc5b4 \uc815\ubcf4\uc5d0 \uc27d\uac8c \uc811\uadfc \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\uc694\uccad \uadf8\ub8f9\ubcc4 \ucd5c\uc2e0 \uac12\uc744 \ud504\ub85c\ud37c\ud2f0\uc5d0 \uc800\uc7a5\ud558\uba70 `get_remaining_reqs()` \ud568\uc218\ub97c \ud638\ucd9c\ud558\uba74 \uadf8\ub8f9\uc758 \ucd5c\uc2e0 \uc794\uc5ec \uc694\uccad \uc218 \uac1d\uccb4\ub97c \ud655\uc778 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n\ucc38\uace0: [Exchange API \uc794\uc5ec \uc694\uccad \uc218 \ud655\uc778 \ubc29\ubc95](https://docs.upbit.com/docs/user-request-guide#exchange-api-%EC%9E%94%EC%97%AC-%EC%9A%94%EC%B2%AD-%EC%88%98-%ED%99%95%EC%9D%B8-%EB%B0%A9%EB%B2%95)\n\n```python\n# example.py\nfrom upbit import Upbit\nfrom upbit.models import RemainingReq\n\nupbit = Upbit()\nres = upbit.get_candles_day('KRW-BTC')\nrr: RemainingReq = upbit.get_remaining_reqs('candles')\nrr.minute\nrr.updated\n\n# \uc751\ub2f5 \ud5e4\ub354\ub3c4 \uadf8\ub300\ub85c \uc0ac\uc6a9 \uac00\ub2a5\nrr_text = res.headers['Remaining-Req'] # 'group=candles; min=59; sec=4'\n```\n\n### \uc694\uccad \ud30c\ub77c\ubbf8\ud130 \ubaa8\ub378 \uc81c\uacf5\nUpbit API \uc694\uccad \ud30c\ub77c\ubbf8\ud130\uc5d0 \uc0ac\uc6a9\ud560 \ub2e4\uc591\ud55c \ub370\uc774\ud130 \ubaa8\ub378\uc744 \ud0c0\uc785\uc73c\ub85c \uc81c\uacf5\ud569\ub2c8\ub2e4.\n\n```python\n# example.py\nfrom upbit.models import OrderSide\n\n# ...\n\n# Type Hint\norder_side: OrderSide = 'bid'\nres = upbit.create_order(market='KRW-BTC', side=order_side, ord_type='limit', price='100', volume='0.01')\n```\n\n### Docstring & Type Hint\n\uc798 \uc791\uc131\ud55c Docstring \ub0b4\uc6a9\uacfc \ud0c0\uc785\uc73c\ub85c IDE\uc5d0\uc11c \uc0ac\uc6a9\ud558\uae30 \ud3b8\ub9ac\ud569\ub2c8\ub2e4. \ud83d\udcdd\ud83d\udca1\n\n\n## WebSocket\n\uc544\uc9c1 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. [\ucc38\uace0 \uc774\uc288](https://github.com/designmeme/python-upbit-api/issues/7)\n\n\n## Changelog\n\ucd5c\uc2e0 \ubcc0\uacbd \uc0ac\ud56d\uc740 \uc544\ub798\uc5d0\uc11c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n- [CHANGELOG.md][changelog]\n- [PyPI Releases][releases]\n\n\n[pypi]: https://pypi.org/project/python-upbit-api/\n[releases]: https://pypi.org/project/python-upbit-api/#history\n[changelog]: https://github.com/designmeme/python-upbit-api/blob/main/CHANGELOG.md\n[license]: https://github.com/designmeme/python-upbit-api/blob/main/LICENSE\n[downloads]: https://pypistats.org/packages/python-upbit-api\n[requests]: https://requests.readthedocs.io/en/latest/\n[upbit docs api]: https://docs.upbit.com/reference/\n\n\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Lee Jihye Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Python Upbit API Wrapper",
"version": "1.8.0",
"project_urls": {
"changelog": "https://github.com/designmeme/python-upbit-api/blob/main/CHANGELOG.md",
"homepage": "https://github.com/designmeme/python-upbit-api",
"issues": "https://github.com/designmeme/python-upbit-api/issues",
"repository": "https://github.com/designmeme/python-upbit-api.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bc7df5fed832d0686302aa9be27621f2f54f78b30d87bab7cc2c2962af85cc2b",
"md5": "a61c0d807899a1d2c563be51b51363d2",
"sha256": "046277665d334501f194952d003710962b928ab90975963986fca9db052fc4fb"
},
"downloads": -1,
"filename": "python_upbit_api-1.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a61c0d807899a1d2c563be51b51363d2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 22930,
"upload_time": "2024-12-12T02:45:14",
"upload_time_iso_8601": "2024-12-12T02:45:14.242157Z",
"url": "https://files.pythonhosted.org/packages/bc/7d/f5fed832d0686302aa9be27621f2f54f78b30d87bab7cc2c2962af85cc2b/python_upbit_api-1.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "adf3c59de9921b569ce0ea6cde0f350e0818fa0a2d092714365fd72611e204c2",
"md5": "262f27fbb27b077091406be2c5838ced",
"sha256": "a636e1d6bfaf215ff367e86eb91f9ee1c962b2919ec6a4b9b42ea25b21b86edc"
},
"downloads": -1,
"filename": "python_upbit_api-1.8.0.tar.gz",
"has_sig": false,
"md5_digest": "262f27fbb27b077091406be2c5838ced",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 21748,
"upload_time": "2024-12-12T02:45:17",
"upload_time_iso_8601": "2024-12-12T02:45:17.153988Z",
"url": "https://files.pythonhosted.org/packages/ad/f3/c59de9921b569ce0ea6cde0f350e0818fa0a2d092714365fd72611e204c2/python_upbit_api-1.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 02:45:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "designmeme",
"github_project": "python-upbit-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "pyjwt",
"specs": [
[
">=",
"2.0.0"
]
]
}
],
"lcname": "python-upbit-api"
}