(self, transaction: dict, currency: Currency = None)
| 6277 | return self.parse_transactions(response['data'], currency, since, limit) |
| 6278 | |
| 6279 | def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction: |
| 6280 | # |
| 6281 | # fetchDeposits |
| 6282 | # |
| 6283 | # { |
| 6284 | # "id": "75115912", |
| 6285 | # "type": "deposit", |
| 6286 | # "sub-type": "NORMAL", |
| 6287 | # "request-id": "trc20usdt-a2e229a44ef2a948c874366230bb56aa73631cc0a03d177bd8b4c9d38262d7ff-200", |
| 6288 | # "currency": "usdt", |
| 6289 | # "chain": "trc20usdt", |
| 6290 | # "tx-hash": "a2e229a44ef2a948c874366230bb56aa73631cc0a03d177bd8b4c9d38262d7ff", |
| 6291 | # "amount": "2849.000000000000000000", |
| 6292 | # "from-addr-tag": "", |
| 6293 | # "address-id": "0", |
| 6294 | # "address": "TRFTd1FxepQE6CnpwzUEMEbFaLm5bJK67s", |
| 6295 | # "address-tag": "", |
| 6296 | # "fee": "0", |
| 6297 | # "state": "safe", |
| 6298 | # "wallet-confirm": "2", |
| 6299 | # "created-at": "1621843808662", |
| 6300 | # "updated-at": "1621843857137" |
| 6301 | # }, |
| 6302 | # |
| 6303 | # fetchWithdrawals |
| 6304 | # |
| 6305 | # { |
| 6306 | # "id": "61335312", |
| 6307 | # "type": "withdraw", |
| 6308 | # "sub-type": "NORMAL", |
| 6309 | # "currency": "usdt", |
| 6310 | # "chain": "trc20usdt", |
| 6311 | # "tx-hash": "30a3111f2fead74fae45c6218ca3150fc33cab2aa59cfe41526b96aae79ce4ec", |
| 6312 | # "amount": "12.000000000000000000", |
| 6313 | # "from-addr-tag": "", |
| 6314 | # "address-id": "27321591", |
| 6315 | # "address": "TRf5JacJQRsF4Nm2zu11W6maDGeiEWQu9e", |
| 6316 | # "address-tag": "", |
| 6317 | # "fee": "1.000000000000000000", |
| 6318 | # "state": "confirmed", |
| 6319 | # "created-at": "1621852316553", |
| 6320 | # "updated-at": "1621852467041" |
| 6321 | # } |
| 6322 | # |
| 6323 | # withdraw |
| 6324 | # |
| 6325 | # { |
| 6326 | # "status": "ok", |
| 6327 | # "data": "99562054" |
| 6328 | # } |
| 6329 | # |
| 6330 | timestamp = self.safe_integer(transaction, 'created-at') |
| 6331 | code = self.safe_currency_code(self.safe_string(transaction, 'currency')) |
| 6332 | type = self.safe_string(transaction, 'type') |
| 6333 | if type == 'withdraw': |
| 6334 | type = 'withdrawal' |
| 6335 | feeCost = self.safe_string(transaction, 'fee') |
| 6336 | if feeCost is not None: |
no test coverage detected