{"_id":"56326e9fdf556c0d00cd08e0","category":{"_id":"56326e9ddf556c0d00cd08d2","project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","pages":["56326e9fdf556c0d00cd08e0","56326e9fdf556c0d00cd08e1","56326e9fdf556c0d00cd08e2","56326e9fdf556c0d00cd08e3","56326e9fdf556c0d00cd08e4","56326e9fdf556c0d00cd08e5","56326e9fdf556c0d00cd08e6","56326e9fdf556c0d00cd08e7","56326e9fdf556c0d00cd08e8"],"__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-01T08:07:30.539Z","from_sync":false,"order":8,"slug":"wallets","title":"Wallets"},"editedParams":true,"editedParams2":true,"project":"544fc17e698ab40800b4f891","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":2,"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"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"__v":5,"parentDoc":null,"user":"544fc065698ab40800b4f888","updates":["5986ae8a720847000fea1892","599c21fa09f77600199935a5"],"next":{"pages":[],"description":""},"createdAt":"2015-05-01T08:13:51.086Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"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","name":""},{"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"}]},"method":"post","results":{"codes":[{"language":"json","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}","name":"","status":201}]},"settings":"","auth":"required","params":[{"_id":"554335bf62b30e0d004b16c4","ref":"","in":"body","required":true,"desc":"The [account](doc:crypto-accounts) id of the sender.","default":"","type":"string","name":"account"},{"_id":"554335bf62b30e0d004b16c3","ref":"","in":"body","required":true,"desc":"The phone number, email address, or wallet address of the recipient.","default":"","type":"string","name":"target_address"},{"_id":"554335bf62b30e0d004b16c2","ref":"","in":"body","required":true,"desc":"The amount to transfer, denominated in the currency of the source account.","default":"","type":"string","name":"amount"},{"_id":"5652bc6da4d16c2b0034c6be","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":"5566c2d21c38390d00697e57","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":"58dc9caba27767190078688c","ref":"","in":"body","required":false,"desc":"A set of arbitrary key-value pairs used for storing additional information about the transfer.","default":"","type":"object","name":"reference"},{"_id":"5981aadd559ca6001e3b2bde","ref":"","in":"body","required":false,"desc":"Optional comment to for the transaction","default":"","type":"string","name":"message"}],"url":"/api/v3/transfers/"},"isReference":false,"order":0,"body":"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.\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","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:
object
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

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.**