Skip to content
Open
Show file tree
Hide file tree
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
33 changes: 17 additions & 16 deletions python/ccxt/async_support/lbank.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
from ccxt.base.decimal_to_precision import TICK_SIZE
from ccxt.base.precise import Precise

LBANK_TRANSACTION_STATUSES = {
'deposit': {
'1': 'pending',
'2': 'ok',
'3': 'failed',
'4': 'canceled',
'5': 'transfer',
},
'withdrawal': {
'1': 'pending',
'2': 'canceled',
'3': 'failed',
'4': 'ok',
},
}


class lbank(Exchange, ImplicitAPI):

Expand Down Expand Up @@ -2297,22 +2313,7 @@ async def withdraw(self, code: str, amount: float, address: str, tag: Str = None
}

def parse_transaction_status(self, status, type):
statuses: dict = {
'deposit': {
'1': 'pending',
'2': 'ok',
'3': 'failed',
'4': 'canceled',
'5': 'transfer',
},
'withdrawal': {
'1': 'pending',
'2': 'canceled',
'3': 'failed',
'4': 'ok',
},
}
return self.safe_string(self.safe_value(statuses, type, {}), status, status)
return self.safe_string(self.safe_value(LBANK_TRANSACTION_STATUSES, type, {}), status, status)

def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
#
Expand Down
Loading