@deprecated use fetchDepositsWithdrawals instead https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions :param str code: unified currency code for the currency of the transactions, default is None :param int [since]: timestamp in ms of the e
(self, code: Str = None, since: Int = None, limit: Int = None, params={})
| 1443 | ] |
| 1444 | |
| 1445 | def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}): |
| 1446 | """ |
| 1447 | @deprecated |
| 1448 | use fetchDepositsWithdrawals instead |
| 1449 | |
| 1450 | https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions |
| 1451 | |
| 1452 | :param str code: unified currency code for the currency of the transactions, default is None |
| 1453 | :param int [since]: timestamp in ms of the earliest transaction, default is None |
| 1454 | :param int [limit]: max number of transactions to return, default is None |
| 1455 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1456 | :returns dict: a list of `transaction structure <https://docs.ccxt.com/?id=transaction-structure>` |
| 1457 | """ |
| 1458 | self.load_markets() |
| 1459 | request = { |
| 1460 | # 'page': '1', |
| 1461 | # 'size': 100, |
| 1462 | } |
| 1463 | response = self.privateGetAuthTransaction(self.extend(request, params)) |
| 1464 | # |
| 1465 | # { |
| 1466 | # "hasNext":false, |
| 1467 | # "content":[ |
| 1468 | # { |
| 1469 | # "id":"fbf7d0d1-2629-4ad8-9def-7a1dba423362", |
| 1470 | # "status":"TRANSACTION_STATUS_CONFIRMED", |
| 1471 | # "type":"TRANSACTION_TYPE_DEPOSIT", |
| 1472 | # "senderAddress":"", |
| 1473 | # "recipientAddress":"0x3c46fa2e3f9023bc4897828ed173f8ecb3a554bc", |
| 1474 | # "amount":"200.000000000000000000", |
| 1475 | # "transactionFee":"0.000000000000000000", |
| 1476 | # "timestamp":1635893208404, |
| 1477 | # "transactionHash":"0x28bad3b74a042df13d64ddfbca855566a51bf7f190b8cd565c236a18d5cd493f#42", |
| 1478 | # "blockHeight":13540262, |
| 1479 | # "currency":"0c3a106d-bde3-4c13-a26e-3fd2394529e5", |
| 1480 | # "memo":null, |
| 1481 | # "paymentProvider":"a8d6d1cb-f84a-4e9d-aa82-c6a08b356ee1", |
| 1482 | # "requiresCode":false |
| 1483 | # } |
| 1484 | # ], |
| 1485 | # "first":true, |
| 1486 | # "hasContent":true, |
| 1487 | # "pageSize":10 |
| 1488 | # } |
| 1489 | # |
| 1490 | currency = None |
| 1491 | if code is not None: |
| 1492 | currency = self.currency(code) |
| 1493 | content = self.safe_list(response, 'content', []) |
| 1494 | return self.parse_transactions(content, currency, since, limit) |
| 1495 | |
| 1496 | def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction: |
| 1497 | # |
nothing calls this directly
no test coverage detected