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

Method transfer

js/src/pacifica.js:2920–2942  ·  view source on GitHub ↗

* @method * @name pacifica#transfer * @description transfer currency internally between wallets on the same account * @see https://docs.pacifica.fi/api-documentation/api/rest-api/subaccounts/subaccount-fund-transfer * @param {string} code unified currency code * @param {floa

(code, amount, fromAccount, toAccount, params = {})

Source from the content-addressed store, hash-verified

2918 * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
2919 */
2920 async transfer(code, amount, fromAccount, toAccount, params = {}) {
2921 const operationType = 'transfer_funds';
2922 const sigPayload = {
2923 'to_account': toAccount,
2924 'amount': amount,
2925 };
2926 const request = this.postActionRequest(operationType, sigPayload, params);
2927 params = this.omit(params, ['expiryWindow']);
2928 const response = this.privatePostAccountSubaccountTransfer(this.extend(request, params));
2929 //
2930 // {
2931 // "success": true,
2932 // "data": {
2933 // "success": true,
2934 // "error": null
2935 // },
2936 // "error": null,
2937 // "code": null
2938 // }
2939 //
2940 const data = this.safeDict(response, 'data', {});
2941 return this.parseTransfer(data);
2942 }
2943 parseTransfer(transfer, currency = undefined) {
2944 //
2945 // {

Callers

nothing calls this directly

Calls 6

postActionRequestMethod · 0.95
parseTransferMethod · 0.95
omitMethod · 0.45
extendMethod · 0.45
safeDictMethod · 0.45

Tested by

no test coverage detected