{"_id":"5d1d9a69184c8e025e303aa8","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":22,"createdAt":"2015-10-29T19:08:12.724Z","releaseDate":"2015-10-29T19:08:12.724Z","categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251","5ab2fcf66a1d77001230b47e","5afc2943bd2ef4000330bca7","5d1d87419a969a00141c6b4c","5d1d8948ef26b2002c6468d1","5d1d8afe7b2b24005bec7de0","5d1d8b24f5cfcb00201490bb","5d1d8bb82d46d1004a02581f","5d1d8de1e4edb0019ed63acd","5d1d8f6b613fb90050d0d3e0","5d1d934ed377870191039d28","5d1d99810b2e4600500eb5ff","5d1da14e613fb90050d0d491","5d229a846cf323005a7fa998","5d229a8c8abf65001cc4768d","5d229a9494b856002e26b6e1","5d229a9bf77bb900507ccb04","5d229aa88abf65001cc4768e","5d24310a9ca8c80054786177","5d24359101cc3a00508e7482","5d24418fa791b20050733b32"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"updatedAt":"2019-07-09T07:14:52.642Z","project":"544fc17e698ab40800b4f891","category":{"_id":"5d1d99810b2e4600500eb5ff","project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","isAPI":false,"__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2019-07-04T06:15:29.680Z","from_sync":false,"order":21,"slug":"wallets-1","title":"Wallets"},"user":"5d19a189b4596f0072f571d4","__v":3,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-07-04T06:19:21.118Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"apiSetting":"5d1d8bb82d46d1004a02581d","examples":{"codes":[{"code":"curl -X POST \\\n    -H 'Content-Type: application/json' \\\n    -H 'Authorization: Bearer YOUR_TOKEN' \\\n    -H 'Accept: application/json' \\\n    -d '{\"target_address\": \"1a2b3c\", \"amount\": 0.0001, \"account\": \"234abc\"}' \\\n    https://coins.ph/api/v3/transfers/\n","language":"curl"},{"code":"import json\nimport requests\n\nTOKEN = 'YOUR TOKEN'\nurl = 'https://coins.ph/api/v3/transfers/'\n\nheaders = {\n    'Authorization': 'Bearer {}'.format(TOKEN),\n    'Content-Type': 'application/json;charset=UTF-8',\n    'Accept': 'application/json'\n}\n\nbody = json.dumps({\n    \"account\": \"234abc\",\n    \"target_address\": \"1a2b3c\",\n    \"amount\": 0.0001\n})\n\n\nrequests.post(url, headers=headers, data=body)","language":"python"}]},"results":{"codes":[{"name":"","code":"{\n  'transfer': {\n    'status': 'pending',\n    'account': '234abc',\n    'exchange': null,\n    'created_at': '2015-05-28T02:58:12.984219Z',\n    'payment': 'x45b1',\n    'target_address': '1a2b3c',\n    'amount': '0.00010000',\n    'id': '1ba2b'\n  }\n}","language":"json","status":201}]},"method":"post","auth":"required","params":[{"_id":"5d1d9a69184c8e025e303aaf","ref":"","in":"body","required":true,"desc":"The [account](doc:crypto-accounts) id of the sender.","default":"","type":"string","name":"account"},{"_id":"5d1d9a69184c8e025e303aae","ref":"","in":"body","required":true,"desc":"The phone number, email address, or wallet address of the recipient.","default":"","type":"string","name":"target_address"},{"_id":"5d1d9a69184c8e025e303aad","ref":"","in":"body","required":true,"desc":"The amount to transfer, denominated in the currency of the source account.","default":"","type":"string","name":"amount"},{"_id":"5d1d9a69184c8e025e303aac","ref":"","in":"body","required":false,"desc":"The currency of `amount`. By default, `currency` is denominated by the `account` currency. If the currency of `target_address` is known, this parameter can be filled up to send out funds in the currency of `target_address`. For example, you may send out funds from a BTC account to a target PHP address by setting this as `PBTC`.","default":"","type":"string","name":"currency"},{"_id":"5d1d9a69184c8e025e303aab","ref":"","in":"body","required":false,"desc":"A two factor code from the user. Only used when the sender has enabled two factor authentication.","default":"","type":"string","name":"verification_code"},{"_id":"5d1d9a69184c8e025e303aaa","ref":"","in":"body","required":false,"desc":"A set of arbitrary key-value pairs used for storing additional information about the transfer.","default":"","type":"string","name":"reference"},{"_id":"5d1d9a69184c8e025e303aa9","ref":"","in":"body","required":false,"desc":"Optional comment to for the transaction","default":"","type":"string","name":"message"}],"url":"/api/v3/transfers/"},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Please note that you must be business verified to be able to make a transfer. For more information, you may contact [business:::at:::coins.ph](mailto:business@coins.ph).\"\n}\n[/block]\nThe transfers API allows sending funds between coins wallet accounts of different users. It allows sending funds with different currencies (ie. `PHP->BTC`, `BTC->PHP`, `PHP->PHP`, `BTC->BTC`) and takes care of the necessary conversion between currencies.\n\n## Properties\n\n* **id** - ID of the transfer record.\n* **account** - [Account](doc:crypto-accounts) ID of the user making the transfer.\n* **target_address** - The wallet address of the recipient.\n* **payment** - Specifies the outgoing payment ID of the transfer if the transfer was successful.\n* **exchange** - The exchange ID for non BTC->BTC transfers, such as BTC->PHP.\n* **status** - Specifies whether the transaction is `pending`, `success`, or `failed`.\n* **created_at** - Specifies the date when the transfer was created.\n\n## Errors\n\n### Fee amount errors\n\n* HTTP 400 - **Whoops! We had to update the Blockchain Fee to 0.0001. Please confirm before continuing.** Fee amount is optional parameter, but when it's provided, we compare it with the current fee 0.0001.\n\n### Amount errors\n\n* HTTP 400 - **Ensure this value is greater than or equal to X** The error depends on currency limits which are set in the system.\n* HTTP 400 - **Ensure this value is lower than or equal to X.** The error depends on currency limits which are set in the system.\n\n### Currency errors\n\n* HTTP 400 - **Unsupported currency.** The error appears when you specified a currency that is different from currency of sender account or target address.\n\n### Target address errors\n\n* HTTP 400 - **You cannot transfer to yourself.** This happens when the specified target address is owned by the sender.\n* HTTP 400 - **Target account not found.** This happens when the specified target address does not exist.\n* HTTP 400 - **Invalid address format.** API failed to recognise a type of target address.\n* HTTP 400 - **You cannot transfer between addresses of the same account.**\n* HTTP 400 - **Target account not found.** In case we find out that target address is \"internalcoin\" (for example PBTC) and it does not exist, we return the error.\n* HTTP 400 - **Currency mismatch.** It happens when user tries to send funds from account to target address and its currency is different from the account.\n* HTTP 400 - **Direct transfer is not allowed.** We limit ability to send money from/to non Bitcoin accounts except the system ones.\n\n### Non field errors\n\n* HTTP 400 - **Sending funds from your account is temporarily disabled, please contact our customer support team.** This happens when the sender's account is currently disabled.\n- HTTP 400 - **Insufficient balance.** It happens when account does not have enough funds\n  to create a payment. Historically it's part of non field errors.\n- HTTP 400 - **Phone or email verification is required.**\n- HTTP 400 - **This is a flagged Bitcoin address used in Phishing attacks, for the safety of your funds, we have locked down your account.Please contact our support team to reactivate.** We block users who try to send Bitcoins to a blacklisted list of addresses. Original motivation was that our customers got a virus which replaced a Bitcoin address and funds were \"stolen\". To prevent that ASAP, we have added user blocking on API level.\n- HTTP 400 - **Sending bitcoins is temporarily disabled.**\n- HTTP 400 - **To transfer with low priority, please send at least 0.001 BTC.**\n- HTTP 400 - **Please update your application in order to process this payment.**\n- HTTP 400 - **This payment would result in exceeding recipient's limit.**\n- HTTP 400 - **This account is no longer active.** Sending to inactive accounts is not allowed.\n\n### Activity limit errors\n\n* HTTP 400 - **The amount you are sending will exceed your recipient's daily limits. Please try sending a smaller amount or wait 24 hours to send the funds.**\n* HTTP 400 - **This recipient's daily limits have been met. Please wait 24 hours to send funds.**\n* HTTP 400 - **The amount you are sending will exceed your recipient's limits. Please try sending a smaller amount.**\n* HTTP 400 - **Unfortuately you cannot send to this recipient at this time because their limits have been met.**","excerpt":"Transfer funds between two accounts","slug":"transfers-2","type":"endpoint","title":"transfers"}

posttransfers

Transfer funds between two accounts

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

account:
required
string
The [account](doc:crypto-accounts) id of the sender.
target_address:
required
string
The phone number, email address, or wallet address of the recipient.
amount:
required
string
The amount to transfer, denominated in the currency of the source account.
currency:
string
The currency of `amount`. By default, `currency` is denominated by the `account` currency. If the currency of `target_address` is known, this parameter can be filled up to send out funds in the currency of `target_address`. For example, you may send out funds from a BTC account to a target PHP address by setting this as `PBTC`.
verification_code:
string
A two factor code from the user. Only used when the sender has enabled two factor authentication.
reference:
string
A set of arbitrary key-value pairs used for storing additional information about the transfer.
message:
string
Optional comment to for the transaction

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "body": "Please note that you must be business verified to be able to make a transfer. For more information, you may contact [business@coins.ph](mailto:business@coins.ph)." } [/block] The transfers API allows sending funds between coins wallet accounts of different users. It allows sending funds with different currencies (ie. `PHP->BTC`, `BTC->PHP`, `PHP->PHP`, `BTC->BTC`) and takes care of the necessary conversion between currencies. ## Properties * **id** - ID of the transfer record. * **account** - [Account](doc:crypto-accounts) ID of the user making the transfer. * **target_address** - The wallet address of the recipient. * **payment** - Specifies the outgoing payment ID of the transfer if the transfer was successful. * **exchange** - The exchange ID for non BTC->BTC transfers, such as BTC->PHP. * **status** - Specifies whether the transaction is `pending`, `success`, or `failed`. * **created_at** - Specifies the date when the transfer was created. ## Errors ### Fee amount errors * HTTP 400 - **Whoops! We had to update the Blockchain Fee to 0.0001. Please confirm before continuing.** Fee amount is optional parameter, but when it's provided, we compare it with the current fee 0.0001. ### Amount errors * HTTP 400 - **Ensure this value is greater than or equal to X** The error depends on currency limits which are set in the system. * HTTP 400 - **Ensure this value is lower than or equal to X.** The error depends on currency limits which are set in the system. ### Currency errors * HTTP 400 - **Unsupported currency.** The error appears when you specified a currency that is different from currency of sender account or target address. ### Target address errors * HTTP 400 - **You cannot transfer to yourself.** This happens when the specified target address is owned by the sender. * HTTP 400 - **Target account not found.** This happens when the specified target address does not exist. * HTTP 400 - **Invalid address format.** API failed to recognise a type of target address. * HTTP 400 - **You cannot transfer between addresses of the same account.** * HTTP 400 - **Target account not found.** In case we find out that target address is "internalcoin" (for example PBTC) and it does not exist, we return the error. * HTTP 400 - **Currency mismatch.** It happens when user tries to send funds from account to target address and its currency is different from the account. * HTTP 400 - **Direct transfer is not allowed.** We limit ability to send money from/to non Bitcoin accounts except the system ones. ### Non field errors * HTTP 400 - **Sending funds from your account is temporarily disabled, please contact our customer support team.** This happens when the sender's account is currently disabled. - HTTP 400 - **Insufficient balance.** It happens when account does not have enough funds to create a payment. Historically it's part of non field errors. - HTTP 400 - **Phone or email verification is required.** - HTTP 400 - **This is a flagged Bitcoin address used in Phishing attacks, for the safety of your funds, we have locked down your account.Please contact our support team to reactivate.** We block users who try to send Bitcoins to a blacklisted list of addresses. Original motivation was that our customers got a virus which replaced a Bitcoin address and funds were "stolen". To prevent that ASAP, we have added user blocking on API level. - HTTP 400 - **Sending bitcoins is temporarily disabled.** - HTTP 400 - **To transfer with low priority, please send at least 0.001 BTC.** - HTTP 400 - **Please update your application in order to process this payment.** - HTTP 400 - **This payment would result in exceeding recipient's limit.** - HTTP 400 - **This account is no longer active.** Sending to inactive accounts is not allowed. ### Activity limit errors * HTTP 400 - **The amount you are sending will exceed your recipient's daily limits. Please try sending a smaller amount or wait 24 hours to send the funds.** * HTTP 400 - **This recipient's daily limits have been met. Please wait 24 hours to send funds.** * HTTP 400 - **The amount you are sending will exceed your recipient's limits. Please try sending a smaller amount.** * HTTP 400 - **Unfortuately you cannot send to this recipient at this time because their limits have been met.**