sharebook-kr / pyupbit

python wrapper for upbit API
Apache License 2.0
480 stars 290 forks source link

README에서 시장가 매매의 수수료 설명이 잘못돼 있음 #27

Closed jy0x5d closed 3 years ago

jy0x5d commented 3 years ago
upbit = pyupbit.Upbit(key, secret)
krw = 0
for balance in upbit.get_balances():
    if balance["currency"]=="KRW":
        krw = balance["balance"]
        break
upbit.buy_market_order("KRW-BTC", int(krw))

위 코드는 수수료가 부족해서 주문 체결이 되지 않습니다. 따라서 README의

시장가 매수는 매우선 매도호가에 즉시 매수합니다. buy_market_order 메서드로 티커와 매수 금액만을 입력합니다. 매수 금액은 수수료를 포함한 금액입니다. 다음 예제에서 주문한 10000원은 수수료가 포함된 금액입니다. 수수료가 0.05%라면 수수료를 제외한 9995원만이 주문에 사용됩니다.

부분은 수정해야 할 것 같습니다.

mr-yoo commented 3 years ago

감사합니다. 수정 반영했습니다.