def gettransactions():
global privapi
global transactions
window.lsttransactions.delete(0, tk.END)
debugout("Requesting Transaction History...")
# The API Doesn't allow for Null type or "All" so we have to pull both dicts and combine them.
txlist = privapi.gettransactions("Deposit")
# After the first API call we'll check for an error string.
if isinstance(txlist, str):
debugout(txlist)
else:
txlist = txlist + privapi.gettransactions("Withdraw")
itx = 0
for tx in txlist:
tid = tx["Id"]
currency = tx["Currency"]
txid = tx["TxId"]
ttype = tx["Type"]
amount = tx["Amount"]
fee = tx["Fee"]
status = tx["Status"]
confirmations = tx["Confirmations"]
timestamp = tx["Timestamp"]
address = tx["Address"]
tmptx = transaction.Transaction(tid, currency, txid, ttype, amount, fee, status, confirmations, timestamp,
address)
key = tmptx.tostring()
transactions[key] = tmptx
window.lsttransactions.insert(tk.END, key)
itx = itx + 1
debugout("Transaction History data received, " + str(itx) + " transactions found.")
# Cancel a single trade via it's OrderId
评论列表
文章目录