{"id":37086071,"url":"https://github.com/designmeme/python-upbit-api","last_synced_at":"2026-01-14T10:35:22.202Z","repository":{"id":159582093,"uuid":"633676422","full_name":"designmeme/python-upbit-api","owner":"designmeme","description":"💙 Python Upbit API Wrapper","archived":false,"fork":false,"pushed_at":"2025-08-13T02:28:30.000Z","size":224,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T16:56:16.768Z","etag":null,"topics":["python-api-wrapper","upbit","upbit-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/designmeme.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-28T03:14:53.000Z","updated_at":"2025-08-13T02:28:22.000Z","dependencies_parsed_at":"2023-11-06T05:27:43.344Z","dependency_job_id":"6fa194d9-1187-4866-890c-fcb7a1c5104c","html_url":"https://github.com/designmeme/python-upbit-api","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/designmeme/python-upbit-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designmeme%2Fpython-upbit-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designmeme%2Fpython-upbit-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designmeme%2Fpython-upbit-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designmeme%2Fpython-upbit-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/designmeme","download_url":"https://codeload.github.com/designmeme/python-upbit-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designmeme%2Fpython-upbit-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-api-wrapper","upbit","upbit-api"],"created_at":"2026-01-14T10:35:21.626Z","updated_at":"2026-01-14T10:35:22.197Z","avatar_url":"https://github.com/designmeme.png","language":"Python","readme":"# Python Upbit API\n\n💙 Python Upbit API는 간단하고 명료한 Upbit API Wrapper 입니다. 👍\n\n[![Version](https://img.shields.io/pypi/v/python-upbit-api)][pypi]\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/python-upbit-api)][pypi]\n[![License](https://img.shields.io/pypi/l/python-upbit-api)][license]\n[![PyPI Downloads](https://img.shields.io/pypi/dm/python-upbit-api)][downloads]\n\n\n## Installation\n\npip 명령어로 간단하게 설치할 수 있습니다.\n\n```shell\npip install python-upbit-api\n```\n\n## Quick Start\n\n### 인증 없이 사용하기\n각종 시세 정보를 얻기 위한 **QUOTATION API만** 사용한다면 인증 정보 없이 초기화 후 사용합니다.\n\u003cbr/\u003e⚠️ EXCHANGE API를 사용하면 `upbit.exceptions.ApiKeyError` 예외가 발생합니다.\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 발생\n```\n\n### 인증 사용하기\n\n인증이 필요한 **EXCHANGE API**를 사용해야 한다면 인증 정보를 초기화시 등록 후 사용합니다. \n\u003cbr/\u003e🙆🏻‍♀️ QUOTATION API도 사용할 수 있습니다.\n\n`.env` 환경설정 파일에 발급 받은 인증 정보를 설정합니다.\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### 업비트 REST API를 모두 메서드로 제공\n\n[업비트 REST API][upbit docs api]를 `Upbit` 클래스의 메서드로 제공합니다.\n자세한 내용은 [upbit.py](https://github.com/designmeme/python-upbit-api/blob/main/upbit/upbit.py) 파일 내 docstring 참조.\n\n|    |                              | 메서드명                       |\n|----|:-----------------------------|:---------------------------|\n| 자산 | 전체 계좌 조회                     | get_accounts               |\n| 주문 | 주문 가능 정보                     | get_order_chance           |\n|  | 개별 주문 조회                     | get_order                  |\n|  | 주문 리스트 조회                    | get_orders                 |\n|  | id로 주문리스트 조회                 | get_orders_by_id           |\n|  | 체결 대기 주문 (Open Order) 조회     | get_open_orders            |\n|  | 종료된 주문 (Closed Order) 조회     | get_closed_orders          |\n|  | 주문 취소 접수                     | delete_order               |\n|  | 주문 일괄 취소 접수 | delete_orders |\n|  | id로 주문리스트 취소 접수 | delete_orders_by_id |\n|  | 주문하기                         | create_order               |\n| 출금 | 출금 리스트 조회                    | get_withdraws              |\n|  | 개별 출금 조회                     | get_withdraw               |\n|  | 출금 가능 정보                     | get_withdraw_chance        |\n|  | 디지털 자산 출금하기                  | create_withdraw_coin       |\n|  | 원화 출금하기                      | create_withdraw_krw        |\n|  | 출금 허용 주소 리스트 조회              | get_withdraw_addresses     |\n| 입금 | 입금 리스트 조회                    | get_deposits               |\n|  | 개별 입금 조회                     | get_deposit                |\n|  | 입금 주소 생성 요청                  | create_coin_address        |\n|  | 전체 입금 주소 조회                  | get_coin_addresses         |\n|  | 개별 입금 주소 조회                  | get_coin_address           |\n|  | 원화 입금하기                      | create_deposit_krw         |\n|  | 계정주 확인(트래블룰 검증)가능 거래소 리스트 조회 | get_vasps                  |\n|  | 입금 UUID로 트래블룰 검증하기           | verify_travel_rule_by_uuid |\n|  | 입금 TxID로 트래블룰 검증하기           | verify_travel_rule_by_txid |\n| 서비스 정보 | 입출금 현황                       | get_wallet_status          |\n|  | API 키 리스트 조회                 | get_api_keys               |\n| 시세 종목 조회 | 마켓 코드 조회                     | get_markets                |\n| 시세 캔들 조회 | 초(Second) 캔들                 | get_candles_second         |\n|  | 분(Minute) 캔들                 | get_candles_minute         |\n|  | 일(Day) 캔들                    | get_candles_day            |\n|  | 주(Week) 캔들                   | get_candles_week           |\n|  | 월(Month) 캔들                  | get_candles_month          |\n|  | 연(Year) 캔들                  | get_candles_year           |\n| 시세 체결 조회 | 최근 체결 내역                     | get_trades_ticks           |\n| 시세 현재가 조회 | 현재가 정보                       | get_ticker                 |\n| 시세 현재가 조회 | 마켓 단위 현재가 정보                 | get_tickers_by_quote       |\n| 시세 호가 조회 | 호가 정보                        | get_orderbook              |\n|  | 호가 모아보기 단위 정보                        | get_orderbook_levels       |\n|  | 호가 정책 조회                        | get_orderbook_instruments       |\n\n### Requests 사용\n[Requests][requests] 라이브러리를 사용합니다.\n\n\n1. `requests.Response` 객체를 그대로 반환합니다.\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` 클래스를 사용하여 재시도 횟수 등을 설정할 수 있습니다.\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` 요청 파라미터 `timeout` 값을 설정할 수 있습니다.\n\n   ```python\n   # example.py\n   from upbit import Upbit\n   \n   upbit = Upbit(timeout=(10, 5))  # 모든 요청에 설정할 timeout\n   \n   res = upbit.get_markets(timeout=10)  # 이 요청에만 설정할 timeout\n   ```\n\n### 예외 클래스 제공\n모든 API 요청에서 발생한 `requests.exceptions.HTTPError` 예외는 이 예외를 상속한 `upbit.exceptions.UpbitHTTPError` 예외로 발생합니다.\n\n아래 Upbit 공식 문서에 공개한 에러 유형에 맞는 예외 쌍을 가집니다.\n* [요청 수 제한](https://docs.upbit.com/docs/user-request-guide)\n* [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)\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    # ...예외 처리 코드\nexcept UpbitClientError as e:\n    res = e.response\n    # ...예외 처리 코드\nexcept UpbitServerError as e:\n    res = e.response\n    # ...예외 처리 코드\n```\n\n### 잔여 요청 수 확인\n업비트 API `Remaining-Req` 응답 헤더에 담긴 잔여 요청 수를 `upbit.models.RemainingReq` 객체로 제공되어 정보에 쉽게 접근 할 수 있습니다.\n요청 그룹별 최신 값을 프로퍼티에 저장하며 `get_remaining_reqs()` 함수를 호출하면 그룹의 최신 잔여 요청 수 객체를 확인 할 수 있습니다.\n\n참고: [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)\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# 응답 헤더도 그대로 사용 가능\nrr_text = res.headers['Remaining-Req']  # 'group=candles; min=59; sec=4'\n```\n\n### 요청 파라미터 모델 제공\nUpbit API 요청 파라미터에 사용할 다양한 데이터 모델을 타입으로 제공합니다.\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 \u0026 Type Hint\n잘 작성한 Docstring 내용과 타입으로 IDE에서 사용하기 편리합니다. 📝💡\n\n\n## WebSocket\n아직 지원하지 않습니다. [참고 이슈](https://github.com/designmeme/python-upbit-api/issues/7)\n\n\n## Changelog\n최신 변경 사항은 아래에서 확인할 수 있습니다.\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignmeme%2Fpython-upbit-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesignmeme%2Fpython-upbit-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignmeme%2Fpython-upbit-api/lists"}