Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions pyupbit/exchange_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def get_chance(self, ticker, contain_req=False):


# 개별 주문 조회
def get_order(self, ticker_or_uuid, state='wait', page=1, limit=100, contain_req=False):
def get_order(self, ticker_or_uuid='None', state='wait', page=1, limit=100, contain_req=False):
"""
주문 리스트 조회
:param ticker: market
Expand All @@ -288,8 +288,16 @@ def get_order(self, ticker_or_uuid, state='wait', page=1, limit=100, contain_req
data = {'uuid': ticker_or_uuid}
headers = self._request_headers(data)
result = _send_get_request(url, headers=headers, data=data)
else :

elif ticker_or_uuid == 'None':
url = "https://api.upbit.com/v1/orders"
data = {'state': state,
'page': page,
'limit': limit,
'order_by': 'desc'
}
headers = self._request_headers(data)
result = _send_get_request(url, headers=headers, data=data)
else:
url = "https://api.upbit.com/v1/orders"
data = {'market': ticker_or_uuid,
'state': state,
Expand Down Expand Up @@ -515,11 +523,17 @@ def withdraw_coin(self, currency, amount, address, secondary_address='None', tra
"""
try:
url = "https://api.upbit.com/v1/withdraws/coin"
data = {"currency": currency,
"amount": amount,
"address": address,
"secondary_address": secondary_address,
"transaction_type": transaction_type}
if secondary_address == 'None':
data = {"currency": currency,
"amount": amount,
"address": address,
"transaction_type": transaction_type}
else:
data = {"currency": currency,
"amount": amount,
"address": address,
"secondary_address": secondary_address,
"transaction_type": transaction_type}
headers = self._request_headers(data)
result = _send_post_request(url, headers=headers, data=data)
if contain_req:
Expand Down Expand Up @@ -565,7 +579,7 @@ def get_deposit_list(self, currency: str, contain_req=False):
:return:
"""
try:
url = "https://api.upbit.com//v1/deposits"
url = "https://api.upbit.com/v1/deposits"
data = {"currency": currency}
headers = self._request_headers(data)

Expand Down Expand Up @@ -701,4 +715,4 @@ def get_api_key_list(self, contain_req=False):

# API키 리스트 조회
#resp = upbit.get_api_key_list()
#print(resp)
#print(resp)