Skip to content

Releases: interruping/upbeat

v0.3.0

22 Mar 13:57

Choose a tag to compare

New Features

  • 매수 주문 최소금액 클라이언트 검증 (#44)

    • validate_min_order=True 옵션으로 주문 전 최소금액을 사전 검증
    • 검증 실패 시 ValidationError 발생 (API 호출 없이 즉시 차단)
    from upbeat import Upbeat, ValidationError
    
    client = Upbeat(access_key="...", secret_key="...", validate_min_order=True)
    
    try:
        client.orders.create(market="KRW-BTC", side="bid", ord_type="limit", volume="0.0001", price="100")
    except ValidationError as e:
        print(f"{e.total} < 최소 {e.min_total}")  # 주문금액 미달
  • get_chance() per-market TTL 캐시 (#46)

    • 주문 가능 정보를 마켓별로 캐싱하여 반복 호출 시 API 요청을 줄임
    • 만료된 캐시 엔트리 자동 정리

Bug Fixes

  • orders API get_chance 반환 타입 및 OrderCreated 모델 수정 (#40)

Tests

  • VCR cassette 기반 통합 테스트 추가 — quotation API (#38), exchange API (#42)
  • min_total 캐시 동작 검증 테스트 추가

Docs

  • README에 ValidationError, validate_min_order 옵션 반영

v0.2.0

10 Mar 12:35

Choose a tag to compare

Breaking Changes

  • client.strategies에서 편의 헬퍼가 client.shortcuts로 이동 (#35)
    • get_portfolio_value(), get_portfolio(), market_buy_krw(), place_and_wait(), cancel_all_orders()는 이제 client.shortcuts.*로 접근
    • client.strategies에는 매매 전략(dca, rebalance, price_alert)만 남음

마이그레이션

# Before (0.1.0)
client.strategies.get_portfolio_value()
client.strategies.market_buy_krw("KRW-BTC", 10000)

# After (0.2.0)
client.shortcuts.get_portfolio_value()
client.shortcuts.market_buy_krw("KRW-BTC", 10000)

Internal

  • 공유 클라이언트 프로토콜을 _protocols.py로 추출
  • shortcuts/strategies 경계 명확화: shortcuts = API 편의 헬퍼, strategies = 매매 전략

v0.1.0

08 Mar 07:03

Choose a tag to compare

첫 번째 릴리스

업비트(Upbit) 암호화폐 거래소 API를 위한 Python 클라이언트 라이브러리.

주요 기능

  • 동기/비동기 클라이언트 (Upbeat / AsyncUpbeat)
  • REST API 전체 지원 (시세 조회, 계좌, 주문, 입금, 출금, 마켓, 트래블룰)
  • WebSocket 실시간 스트리밍
  • Pydantic v2 타입 안전 응답 모델
  • 자동 재시도 (지수 백오프)
  • 스마트 레이트 리밋 (Remaining-Req 헤더 추적)
  • JWT 인증 (HS512)
  • 트레이딩 전략 헬퍼 (DCA, 리밸런싱, 포트폴리오, 알림)
  • pandas DataFrame 연동 (선택)

설치

pip install upbeat
# 또는
uv add upbeat