fetch a history of internal transfers made on an account https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords :param str code: unified currency code of the currency transferred :param int [since]: the earliest time in ms to fetch transfers for
(self, code: Str = None, since: Int = None, limit: Int = None, params={})
| 8902 | }, market) |
| 8903 | |
| 8904 | def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]: |
| 8905 | """ |
| 8906 | fetch a history of internal transfers made on an account |
| 8907 | |
| 8908 | https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords |
| 8909 | |
| 8910 | :param str code: unified currency code of the currency transferred |
| 8911 | :param int [since]: the earliest time in ms to fetch transfers for |
| 8912 | :param int [limit]: the maximum number of transfers structures to retrieve |
| 8913 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 8914 | :param int [params.until]: the latest time in ms to fetch entries for |
| 8915 | :returns dict[]: a list of `transfer structures <https://docs.ccxt.com/?id=transfer-structure>` |
| 8916 | """ |
| 8917 | if code is None: |
| 8918 | raise ArgumentsRequired(self.id + ' fetchTransfers() requires a code argument') |
| 8919 | self.load_markets() |
| 8920 | type = None |
| 8921 | type, params = self.handle_market_type_and_params('fetchTransfers', None, params) |
| 8922 | fromAccount = self.safe_string(params, 'fromAccount', type) |
| 8923 | params = self.omit(params, 'fromAccount') |
| 8924 | accountsByType = self.safe_value(self.options, 'accountsByType', {}) |
| 8925 | type = self.safe_string(accountsByType, fromAccount) |
| 8926 | currency = self.currency(code) |
| 8927 | request = { |
| 8928 | 'coin': currency['id'], |
| 8929 | 'fromType': type, |
| 8930 | } |
| 8931 | if since is not None: |
| 8932 | request['startTime'] = since |
| 8933 | if limit is not None: |
| 8934 | request['limit'] = limit |
| 8935 | request, params = self.handle_until_option('endTime', request, params) |
| 8936 | response = self.privateSpotGetV2SpotAccountTransferRecords(self.extend(request, params)) |
| 8937 | # |
| 8938 | # { |
| 8939 | # "code": "00000", |
| 8940 | # "msg": "success", |
| 8941 | # "requestTime": 1700873854651, |
| 8942 | # "data": [ |
| 8943 | # { |
| 8944 | # "coin": "USDT", |
| 8945 | # "status": "Successful", |
| 8946 | # "toType": "crossed_margin", |
| 8947 | # "toSymbol": "", |
| 8948 | # "fromType": "spot", |
| 8949 | # "fromSymbol": "", |
| 8950 | # "size": "11.64958799", |
| 8951 | # "ts": "1700729673028", |
| 8952 | # "clientOid": "1111506298504744960", |
| 8953 | # "transferId": "24930940" |
| 8954 | # }, |
| 8955 | # ] |
| 8956 | # } |
| 8957 | # |
| 8958 | data = self.safe_list(response, 'data', []) |
| 8959 | return self.parse_transfers(data, currency, since, limit) |
| 8960 | |
| 8961 | def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry: |
nothing calls this directly
no test coverage detected