Skip to content

Commit

Permalink
Merge pull request sharebook-kr#63 from pjueon/add_api
Browse files Browse the repository at this point in the history
입출금 리스트 조회 api 추가, 주석오류 수정
  • Loading branch information
brayden-jo authored Feb 27, 2022
2 parents d9f745c + 436968c commit f77a1c3
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions pyupbit/exchange_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,32 @@ def sell_limit_order(self, ticker, price, volume, contain_req=False):
#--------------------------------------------------------------------------
# 출금
#--------------------------------------------------------------------------
def get_withdraw_list(self, currency: str, contain_req=False):
"""
출금 리스트 조회
:param currency: Currency 코드
:param contain_req: Remaining-Req 포함여부
:return:
"""
try:
url = "https://api.upbit.com/v1/withdraws"
data = {"currency": currency}
headers = self._request_headers(data)

result = _send_get_request(url, headers=headers, data=data)
if contain_req:
return result
else:
return result[0]
except Exception as x:
print(x.__class__.__name__)
return None

# 개별 출금 조회
def get_individual_withdraw_order(self, uuid: str, currency: str, contain_req=False):
"""
현금 출금
개별 출금 조회
:param uuid: 출금 UUID
:param txid: 출금 TXID
:param currency: Currency 코드
:param contain_req: Remaining-Req 포함여부
:return:
Expand Down Expand Up @@ -528,6 +548,27 @@ def withdraw_cash(self, amount: str, contain_req=False):
# 입금
#--------------------------------------------------------------------------
# 입금 리스트 조회
def get_deposit_list(self, currency: str, contain_req=False):
"""
입금 리스트 조회
:currency: Currency 코드
:param contain_req: Remaining-Req 포함여부
:return:
"""
try:
url = "https://api.upbit.com//v1/deposits"
data = {"currency": currency}
headers = self._request_headers(data)

result = _send_get_request(url, headers=headers, data=data)
if contain_req:
return result
else:
return result[0]
except Exception as x:
print(x.__class__.__name__)
return None

# 개별 입금 조회
# 입금 주소 생성 요청
# 전체 입금 주소 조회
Expand Down

0 comments on commit f77a1c3

Please sign in to comment.