{"_id":"5a84f34a2acc9c0012e37645","project":"558b53f749dc4f0d00517de0","version":{"_id":"55909cb433090f0d004d25d8","project":"558b53f749dc4f0d00517de0","forked_from":"558b53f749dc4f0d00517de3","__v":8,"createdAt":"2015-06-29T01:17:40.214Z","releaseDate":"2015-06-29T01:17:40.214Z","categories":["55909cb433090f0d004d25d9","55909cb433090f0d004d25da","55909cb433090f0d004d25db","55909cb433090f0d004d25dc","56c72c00197f9f1700c811db","56c72df5b3625c0d00422c9e","56e1b646150ed52d0062c652","56e9fe9779708c0e002b6026","57312dc94245100e001743f4","57646a570742400e00c04701","5894c96f4d9c7e27002e42ba"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"56c72c00197f9f1700c811db","__v":9,"pages":["56c72c1b862f940d0056475b","56c72ccfb4c1dc0d004ec2ce","56c72d28197f9f1700c811dc","56c72d4f9d75580d00026257","56c72d8349937c0d001deca3","56c72dab9e2b6c0d00048717","56c72f1c5652c217008e08b5","56cb35dbc675f50b00a4b71c","56cb35e7c675f50b00a4b71e"],"project":"558b53f749dc4f0d00517de0","version":"55909cb433090f0d004d25d8","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-19T14:51:44.638Z","from_sync":false,"order":3,"slug":"making-transfers","title":"Transfering funds"},"user":"54ea9905a6f14f0d003e96e7","githubsync":"","__v":5,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-15T02:41:14.904Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"language":"json","code":"{  \n   \"source\":\"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\",\n   \"sourceCurrency\":\"USD\",\n   \"sourceAmount\":\"5\",\n   \"dest\":\"email:sam:::at:::sendwyre.com\",\n   \"destCurrency\":\"BTC\", \n   \"message\": \"\" // \"Here's your first BTC\" // optional\n}"}]},"settings":"","results":{"codes":[{"status":200,"code":"{  \n   \"id\":\"PLV7BBP7MVJ\",\n   \"status\":\"UNCONFIRMED\",\n   \"failureReason\":null,\n   \"language\":\"en\",\n   \"createdAt\":1491585756340,\n   \"completedAt\":null,\n   \"depositInitiatedAt\":null,\n   \"cancelledAt\":null,\n   \"expiresAt\":1491585816340,\n   \"owner\": \"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\",\n   \"source\": \"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\",\n   \"dest\": \"bitcoin:2ShLpdz6XT8FRm1KZYSGwiHLZvZbrYgxrgB\",\n   \"sourceCurrency\":\"USD\",\n   \"sourceAmount\":5.00,\n   \"destCurrency\":\"BTC\",\n   \"destAmount\":0.00073,\n   \"exchangeRate\":6849.31,\n   \"desc\":\"Unconfirmed: Exchange of $5.00 to 0.00073BTC\",\n   \"message\":null,\n   \"totalFees\":0.00,\n   \"equivalencies\":{  \n      \"EUR\":0.00418079,\n      \"USD\":4.99,\n      \"CNY\":29.66\n   },\n   \"feeEquivalencies\":{  \n      \"EUR\":0.00,\n      \"USD\":0.00,\n      \"CNY\":0.00\n   },\n   \"fees\":{  \n      \"USD\":0.00,\n      \"BTC\":0.00\n   },\n   \"authorizingIp\":\"10.255.0.2\",\n   \"paymentUrl\":null,\n   \"exchangeOrderId\":null,\n   \"chargeId\":null,\n   \"depositId\":null,\n   \"sourceTxId\":null,\n   \"destTxId\":null,\n   \"customId\":null,\n   \"buy\":false,\n   \"instantBuy\":false,\n   \"sell\":false,\n   \"exchange\":true,\n   \"send\":true,\n   \"deposit\":false,\n   \"withdrawal\":false,\n   \"closed\":false,\n   \"reversingSubStatus\":null,\n   \"reversalReason\":null,\n   \"retrievalUrl\":null,\n   \"quotedMargin\":null,\n   \"pendingSubStatus\":null,\n   \"destName\":\"[email protected]\",\n   \"sourceName\":\"Primary Account\",\n   \"exchangeOrder\":null,\n   \"estimatedArrival\":1491585757279,\n   \"blockchainTx\":null,\n   \"documents\":[  \n\n   ],\n   \"reversalRevenue\":null,\n   \"reversalRevenueCurrency\":null,\n   \"depositInfo\":null,\n   \"chargeInfo\":null\n}","language":"json"}]},"auth":"required","params":[{"_id":"58dd78a485a2a02f00051f0c","ref":"","in":"body","required":false,"desc":"An SRN representing an account that the funds will be retrieved from","default":"","type":"string","name":"source"},{"_id":"56cb297119196e1300c81fe8","ref":"","in":"body","required":true,"desc":"The amount to withdrawal from the source, in units of `sourceCurrency`. Only include `sourceAmount` OR `destAmount`, not both.","default":"","type":"double","name":"sourceAmount"},{"_id":"56cb297119196e1300c81fe7","ref":"","in":"body","required":true,"desc":"The currency to withdrawal from the source wallet","default":"","type":"string","name":"sourceCurrency"},{"_id":"56cb297119196e1300c81fe6","ref":"","in":"body","required":true,"desc":"An email address, cellphone number, digital currency address or bank account to send the digital currency to. For bitcoin address use \"bitcoin:[address]\". Note: cellphone numbers are assumed to be a US number, for international numbers include a '+' and the country code as the prefix.","default":"","type":"string","name":"dest"},{"_id":"56cb297119196e1300c81fe5","ref":"","in":"body","required":true,"desc":"Specifies the total amount of currency to deposit (as defined in `depositCurrency`). Only include `sourceAmount` OR `destAmount`, not both.","default":"","type":"double","name":"destAmount"},{"_id":"56cb297119196e1300c81fe4","ref":"","in":"body","required":true,"desc":"The currency to deposit. if not provided, the deposit will be the same as the withdrawal currency (no exchange performed)","default":"","type":"string","name":"destCurrency"},{"_id":"56cb297119196e1300c81fe3","ref":"","in":"body","required":false,"desc":"An optional user visible message to be sent with the transaction.","default":"","type":"string","name":"message"},{"_id":"56d493e3a4a9211b00c8f0fe","ref":"","in":"body","required":false,"desc":"An optional url that Wyre will POST a status callback to (see [Callbacks](doc:callbacks))","default":"","type":"string","name":"callbackUrl"},{"_id":"56e1ca022506700e00de6e86","ref":"","in":"body","required":false,"desc":"An optional parameter to automatically confirm the transfer order.","default":"","type":"boolean","name":"autoConfirm"},{"_id":"584076be63e13523002d01d9","ref":"","in":"body","required":false,"desc":"an optional custom ID to tag the transfer","default":"","type":"string","name":"customId"},{"_id":"584076be63e13523002d01d8","ref":"","in":"body","required":false,"desc":"Optional- if true, the amount given (source, dest, equiv) will be treated as already including the fees and nothing in addition will be withdrew","default":"","type":"boolean","name":"amountIncludesFees"},{"_id":"584076be63e13523002d01d7","ref":"","in":"body","required":false,"desc":"creates a quote transfer object, but does not execute a real transfer.","default":"","type":"boolean","name":"preview"},{"_id":"584076be63e13523002d01d6","ref":"","in":"body","required":false,"desc":"When true, disables outbound emails/messages to the destination","default":"","type":"boolean","name":"muteMessages"}],"url":"/transfers"},"isReference":false,"order":4,"body":"Building a Bitcoin transfer request is exactly the same as a normal conversion between a traditional FX pair, but we've put a specific area together just to bring that to the attention of developers who were worried that it would be more complex than that.\n\n## Building the Bitcoin Transfer request\n\nWhen building your Transfer request you can use 7 out of these 8 fields:\n- `sourceAmount` - only include either `sourceAmount` or `destAmount`, not both. `sourceAmount` is the amount removed from your main account in order to send funds to the dest. In this case you specify the amount removed from your account, and the `destAmount` will be determined depending on the fees and exchange rate.\n- `sourceCurrency` - an ISO 3166-1 alpha-3 currency code that will be deducted from your account.\n- `dest` - a destination for the funds. This can be an email address, phone number, blockchain address, or bank account. See the Transfer Pairs section on the left side for more information on what's required to send to a bank account.\n- `destAmount` - only include either `sourceAmount` or `destAmount`, not both. `destAmount` is the exact amount that will be deposited into the `dest`. If `destAmount` is specified in the Transfer creation request the `sourceAmount` will be calculated from the `destAmount`, the exchange rate any fees on the Transfer\n- `destCurrency` - an ISO 3166-1 alpha-3 currency code that matches the `dest` type. The `destCurrency` can be the same or different from the `sourceCurrency`. If they are different an exchange will automatically occur.\n- `message` - An optional log message to include with the transfer\n- `callbackUrl` - An optional url that Wyre will POST a status callback to (see [Callbacks](doc:callbacks))\n- `autoConfirm` - An optional parameter to automatically confirm the transfer order. Not recommended.\n\nNow, with all of that in mind, let's build our first transfer request. We'll send funds from our account to an email address to start. For this example let's assume we are a crypto brokerage service converting some BTC in order to payout to a USD bank account. This customer is expecting to receive 10 USD from us. An example request for this might be: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"dest\\\": \\\"[email protected]\\\",\\n\\t\\\"sourceCurrency\\\": \\\"BTC\\\",\\n\\t\\\"destCurrency\\\": \\\"USD\\\",\\n\\t\\\"destAmount\\\": 10,\\n\\t\\\"message\\\":\\\"Here's your $10!\\\",\\n  \\\"autoConfirm\\\": \\\"false\\\",\\n  \\\"callbackUrl:\\\" \\\"https://requestb.in/\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##Reviewing your Transfer\n\nIf we submit this request we'll get back a Transfer response that looks something like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"id\\\":\\\"PLV7BBP7MVJ\\\",\\n   \\\"status\\\":\\\"UNCONFIRMED\\\",\\n   \\\"failureReason\\\":null,\\n   \\\"language\\\":\\\"en\\\",\\n   \\\"createdAt\\\":1491585756340,\\n   \\\"completedAt\\\":null,\\n   \\\"depositInitiatedAt\\\":null,\\n   \\\"cancelledAt\\\":null,\\n   \\\"expiresAt\\\":1491585816340,\\n   \\\"owner\\\": \\\"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\\\",\\n   \\\"source\\\": \\\"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\\\",\\n   \\\"dest\\\": \\\"email:[email protected]\\\",\\n   \\\"sourceCurrency\\\":\\\"BTC\\\",\\n   \\\"sourceAmount\\\":10.00,\\n   \\\"destCurrency\\\":\\\"USD\\\",\\n   \\\"destAmount\\\":59.62,\\n   \\\"exchangeRate\\\":5.96,\\n   \\\"desc\\\":\\\"Unconfirmed: Exchange of 10.00 BTC to 59.62 USD\\\",\\n   \\\"message\\\":null,\\n   \\\"totalFees\\\":0.00,\\n   \\\"equivalencies\\\":{  \\n      \\\"EUR\\\":0.00418079,\\n      \\\"USD\\\":10.00,\\n      \\\"BRL\\\":59.62\\n   },\\n   \\\"feeEquivalencies\\\":{  \\n      \\\"BTC\\\":0.00,\\n      \\\"USD\\\":0.00,\\n      \\\"BRL\\\":0.00\\n   },\\n   \\\"fees\\\":{  \\n      \\\"USD\\\":0.00,\\n      \\\"BTC\\\":0.00\\n   },\\n   \\\"authorizingIp\\\":\\\"10.255.0.2\\\",\\n   \\\"paymentUrl\\\":null,\\n   \\\"exchangeOrderId\\\":null,\\n   \\\"chargeId\\\":null,\\n   \\\"depositId\\\":null,\\n   \\\"sourceTxId\\\":null,\\n   \\\"destTxId\\\":null,\\n   \\\"customId\\\":null,\\n   \\\"buy\\\":false,\\n   \\\"instantBuy\\\":false,\\n   \\\"sell\\\":false,\\n   \\\"exchange\\\":true,\\n   \\\"send\\\":true,\\n   \\\"deposit\\\":false,\\n   \\\"withdrawal\\\":false,\\n   \\\"closed\\\":false,\\n   \\\"reversingSubStatus\\\":null,\\n   \\\"reversalReason\\\":null,\\n   \\\"retrievalUrl\\\":null,\\n   \\\"quotedMargin\\\":null,\\n   \\\"pendingSubStatus\\\":null,\\n   \\\"destName\\\":\\\"SCHAM SCHLACTER\\\",\\n   \\\"sourceName\\\":\\\"Primary Account\\\",\\n   \\\"exchangeOrder\\\":null,\\n   \\\"estimatedArrival\\\":1491585757279,\\n   \\\"blockchainTx\\\":null,\\n   \\\"documents\\\":[  \\n\\n   ],\\n   \\\"reversalRevenue\\\":null,\\n   \\\"reversalRevenueCurrency\\\":null,\\n   \\\"depositInfo\\\":null,\\n   \\\"chargeInfo\\\":null\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe above response issues an exchange rate quote for the volume of funds you wish to move. Our exchange rates API gives a good snapshot of what our exchange rates are, but the final exchange rate you'll see is dependent on the quantity of funds you're moving.\n\nOnce you've created the Transfer it will be in an UNCONFIRMED state. You will have 30 seconds to review the Transfer and confirm it before the quote expires. If the quote expires you'll have to reissue the Transfer request and confirm the new Transfer (more on that in [the next section](doc:confirming-a-quote) ).\n\nWhen reviewing the Transfer the main things you'll want to check out are the:\n- `exchangeRate` - The quoted exchange rate for the Transfer\n- `fees` - The `fees` object is a currency-> amount map of any fees that are applied on the Transfer. Make sure you check here to see what fees you'll be paying on the Transfer. If you are doing an exchange Transfer and we encounter fees on either side of the conversion you may see multiple entries here. For example, if you were moving funds from a USD bank account to a BRL bank account, there would be a USD fee for the deposit into Wyre and a BRL fee for the withdrawal from Wyre\n- `sourceAmount`/`destAmount` - depending on the request you made, you'll want to double check these fields at this stage and make sure that you're either sending or receiving the amount you expected.","excerpt":"","slug":"createbitcointransfer","type":"endpoint","title":"Create Bitcoin Transfer - πŸ”₯NewπŸ”₯"}

postCreate Bitcoin Transfer - πŸ”₯NewπŸ”₯


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

source:
string
An SRN representing an account that the funds will be retrieved from
sourceAmount:
required
double
The amount to withdrawal from the source, in units of `sourceCurrency`. Only include `sourceAmount` OR `destAmount`, not both.
sourceCurrency:
required
string
The currency to withdrawal from the source wallet
dest:
required
string
An email address, cellphone number, digital currency address or bank account to send the digital currency to. For bitcoin address use "bitcoin:[address]". Note: cellphone numbers are assumed to be a US number, for international numbers include a '+' and the country code as the prefix.
destAmount:
required
double
Specifies the total amount of currency to deposit (as defined in `depositCurrency`). Only include `sourceAmount` OR `destAmount`, not both.
destCurrency:
required
string
The currency to deposit. if not provided, the deposit will be the same as the withdrawal currency (no exchange performed)
message:
string
An optional user visible message to be sent with the transaction.
callbackUrl:
string
An optional url that Wyre will POST a status callback to (see [Callbacks](doc:callbacks))
autoConfirm:
boolean
An optional parameter to automatically confirm the transfer order.
customId:
string
an optional custom ID to tag the transfer
amountIncludesFees:
boolean
Optional- if true, the amount given (source, dest, equiv) will be treated as already including the fees and nothing in addition will be withdrew
preview:
boolean
creates a quote transfer object, but does not execute a real transfer.
muteMessages:
boolean
When true, disables outbound emails/messages to the destination

Examples


Result Format


Documentation

Building a Bitcoin transfer request is exactly the same as a normal conversion between a traditional FX pair, but we've put a specific area together just to bring that to the attention of developers who were worried that it would be more complex than that. ## Building the Bitcoin Transfer request When building your Transfer request you can use 7 out of these 8 fields: - `sourceAmount` - only include either `sourceAmount` or `destAmount`, not both. `sourceAmount` is the amount removed from your main account in order to send funds to the dest. In this case you specify the amount removed from your account, and the `destAmount` will be determined depending on the fees and exchange rate. - `sourceCurrency` - an ISO 3166-1 alpha-3 currency code that will be deducted from your account. - `dest` - a destination for the funds. This can be an email address, phone number, blockchain address, or bank account. See the Transfer Pairs section on the left side for more information on what's required to send to a bank account. - `destAmount` - only include either `sourceAmount` or `destAmount`, not both. `destAmount` is the exact amount that will be deposited into the `dest`. If `destAmount` is specified in the Transfer creation request the `sourceAmount` will be calculated from the `destAmount`, the exchange rate any fees on the Transfer - `destCurrency` - an ISO 3166-1 alpha-3 currency code that matches the `dest` type. The `destCurrency` can be the same or different from the `sourceCurrency`. If they are different an exchange will automatically occur. - `message` - An optional log message to include with the transfer - `callbackUrl` - An optional url that Wyre will POST a status callback to (see [Callbacks](doc:callbacks)) - `autoConfirm` - An optional parameter to automatically confirm the transfer order. Not recommended. Now, with all of that in mind, let's build our first transfer request. We'll send funds from our account to an email address to start. For this example let's assume we are a crypto brokerage service converting some BTC in order to payout to a USD bank account. This customer is expecting to receive 10 USD from us. An example request for this might be: [block:code] { "codes": [ { "code": "{\n\t\"dest\": \"[email protected]\",\n\t\"sourceCurrency\": \"BTC\",\n\t\"destCurrency\": \"USD\",\n\t\"destAmount\": 10,\n\t\"message\":\"Here's your $10!\",\n \"autoConfirm\": \"false\",\n \"callbackUrl:\" \"https://requestb.in/\"\n}", "language": "json" } ] } [/block] ##Reviewing your Transfer If we submit this request we'll get back a Transfer response that looks something like this: [block:code] { "codes": [ { "code": "{ \n \"id\":\"PLV7BBP7MVJ\",\n \"status\":\"UNCONFIRMED\",\n \"failureReason\":null,\n \"language\":\"en\",\n \"createdAt\":1491585756340,\n \"completedAt\":null,\n \"depositInitiatedAt\":null,\n \"cancelledAt\":null,\n \"expiresAt\":1491585816340,\n \"owner\": \"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\",\n \"source\": \"account:i6rgs8mjdmmu7cnf7a5bgl0r0vudsfe5\",\n \"dest\": \"email:[email protected]\",\n \"sourceCurrency\":\"BTC\",\n \"sourceAmount\":10.00,\n \"destCurrency\":\"USD\",\n \"destAmount\":59.62,\n \"exchangeRate\":5.96,\n \"desc\":\"Unconfirmed: Exchange of 10.00 BTC to 59.62 USD\",\n \"message\":null,\n \"totalFees\":0.00,\n \"equivalencies\":{ \n \"EUR\":0.00418079,\n \"USD\":10.00,\n \"BRL\":59.62\n },\n \"feeEquivalencies\":{ \n \"BTC\":0.00,\n \"USD\":0.00,\n \"BRL\":0.00\n },\n \"fees\":{ \n \"USD\":0.00,\n \"BTC\":0.00\n },\n \"authorizingIp\":\"10.255.0.2\",\n \"paymentUrl\":null,\n \"exchangeOrderId\":null,\n \"chargeId\":null,\n \"depositId\":null,\n \"sourceTxId\":null,\n \"destTxId\":null,\n \"customId\":null,\n \"buy\":false,\n \"instantBuy\":false,\n \"sell\":false,\n \"exchange\":true,\n \"send\":true,\n \"deposit\":false,\n \"withdrawal\":false,\n \"closed\":false,\n \"reversingSubStatus\":null,\n \"reversalReason\":null,\n \"retrievalUrl\":null,\n \"quotedMargin\":null,\n \"pendingSubStatus\":null,\n \"destName\":\"SCHAM SCHLACTER\",\n \"sourceName\":\"Primary Account\",\n \"exchangeOrder\":null,\n \"estimatedArrival\":1491585757279,\n \"blockchainTx\":null,\n \"documents\":[ \n\n ],\n \"reversalRevenue\":null,\n \"reversalRevenueCurrency\":null,\n \"depositInfo\":null,\n \"chargeInfo\":null\n}", "language": "json" } ] } [/block] The above response issues an exchange rate quote for the volume of funds you wish to move. Our exchange rates API gives a good snapshot of what our exchange rates are, but the final exchange rate you'll see is dependent on the quantity of funds you're moving. Once you've created the Transfer it will be in an UNCONFIRMED state. You will have 30 seconds to review the Transfer and confirm it before the quote expires. If the quote expires you'll have to reissue the Transfer request and confirm the new Transfer (more on that in [the next section](doc:confirming-a-quote) ). When reviewing the Transfer the main things you'll want to check out are the: - `exchangeRate` - The quoted exchange rate for the Transfer - `fees` - The `fees` object is a currency-> amount map of any fees that are applied on the Transfer. Make sure you check here to see what fees you'll be paying on the Transfer. If you are doing an exchange Transfer and we encounter fees on either side of the conversion you may see multiple entries here. For example, if you were moving funds from a USD bank account to a BRL bank account, there would be a USD fee for the deposit into Wyre and a BRL fee for the withdrawal from Wyre - `sourceAmount`/`destAmount` - depending on the request you made, you'll want to double check these fields at this stage and make sure that you're either sending or receiving the amount you expected.