MCPcopy Create free account
hub / github.com/ccxt/ccxt / transfer

Method transfer

python/ccxt/async_support/pacifica.py:2784–2818  ·  view source on GitHub ↗

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={})

Source from the content-addressed store, hash-verified

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 #

Callers

nothing calls this directly

Calls 6

post_action_requestMethod · 0.95
parse_transferMethod · 0.95
safe_dictMethod · 0.80
omitMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected