transfer currency internally between wallets on the same account https://docs.pacifica.fi/api-documentation/api/rest-api/subaccounts/subaccount-fund-transfer :param str code: unified currency code :param float amount: amount to transfer :param str fromAccou
(self, code: str, amount: float, fromAccount: str, toAccount: str, params={})
| 2782 | } |
| 2783 | |
| 2784 | async def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry: |
| 2785 | """ |
| 2786 | transfer currency internally between wallets on the same account |
| 2787 | |
| 2788 | https://docs.pacifica.fi/api-documentation/api/rest-api/subaccounts/subaccount-fund-transfer |
| 2789 | |
| 2790 | :param str code: unified currency code |
| 2791 | :param float amount: amount to transfer |
| 2792 | :param str fromAccount: account to transfer from *spot, swap* |
| 2793 | :param str toAccount: account to transfer to *swap, spot or address* |
| 2794 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2795 | :param int [params.expiryWindow]: time to live in milliseconds |
| 2796 | :returns dict: a `transfer structure <https://docs.ccxt.com/?id=transfer-structure>` |
| 2797 | """ |
| 2798 | operationType = 'transfer_funds' |
| 2799 | sigPayload = { |
| 2800 | 'to_account': toAccount, |
| 2801 | 'amount': amount, |
| 2802 | } |
| 2803 | request = self.post_action_request(operationType, sigPayload, params) |
| 2804 | params = self.omit(params, ['expiryWindow']) |
| 2805 | response = self.privatePostAccountSubaccountTransfer(self.extend(request, params)) |
| 2806 | # |
| 2807 | # { |
| 2808 | # "success": True, |
| 2809 | # "data": { |
| 2810 | # "success": True, |
| 2811 | # "error": null |
| 2812 | # }, |
| 2813 | # "error": null, |
| 2814 | # "code": null |
| 2815 | # } |
| 2816 | # |
| 2817 | data = self.safe_dict(response, 'data', {}) |
| 2818 | return self.parse_transfer(data) |
| 2819 | |
| 2820 | def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry: |
| 2821 | # |
nothing calls this directly
no test coverage detected