Name | Description | Type |
---|---|---|
Amount |
The amount you want to withdraw (denominated in the currency) |
decimal number |
Address |
The address you want to withdraw the coins to |
string |
Currency |
The currency that is being passed in (example: GBP, BTC) |
string |
ForceBuy |
set to true if you want to buy the BTC needed if your account doesn't have enough already |
boolean |
ForceBuyCurrency |
if force buy is set to true, enter the fiat currency you wish to force buy with (example: GBP, EUR) |
string |
APIKey |
Your public API Key which can be found in your account |
globally unique identifier |
Signature |
Your encrypted signature which includes your APIKey, UserId and Nonce, then salted with your API Secret |
string |
Nonce |
A constantly incrementing integer, you can use a timestamp for example. Example: 34235 |
integer |
Request Formats
application/json, text/json
{ "Amount": 1.0, "Address": "sample string 2", "Currency": "sample string 3", "ForceBuy": true, "ForceBuyCurrency": "sample string 5", "APIKey": "a8dc15b2-bf93-4fd4-8849-8266a22195ec", "Signature": "sample string 7", "Nonce": 8 }
application/xml, text/xml
<WithdrawCoinsParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Controllers"> <APIKey xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">a8dc15b2-bf93-4fd4-8849-8266a22195ec</APIKey> <Nonce xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">8</Nonce> <Signature xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">sample string 7</Signature> <Address>sample string 2</Address> <Amount>1</Amount> <Currency>sample string 3</Currency> <ForceBuy>true</ForceBuy> <ForceBuyCurrency>sample string 5</ForceBuyCurrency> </WithdrawCoinsParams>
Response Information
Resource Description
None.
Response Formats
application/json, text/json, application/xml, text/xml
Sample not available.
public static async Task WithdrawCoins()
{
string PublicKey = "You API Key".ToLower();
string nonce = ((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds).ToString();
string CCSignature = GetHash(nonce);
Dictionary<string, string>
values = new Dictionary<string, string>
{
{ "APIKey", PublicKey },
{ "Signature", CCSignature },
{ "Nonce", nonce },
{ "Amount", "0.0005" },
{ "Address", "Bitcoin Wallet Address" },
{ "CoinType", "BTC" },
};
FormUrlEncodedContent content = new FormUrlEncodedContent(values);
HttpResponseMessage response = await client.PostAsync("https://checkout.coincorner.com/api/WithdrawCoins", content);
string WithdrawnCoins = await response.Content.ReadAsStringAsync();
}
<?php
function WithdrawCoins()
{
$nonce = (int)(microtime(true) * 1e6);
$Api_Key = 'Your API Key';
$sig = Generate_Sig($nonce);
$params = array (
'APIKey' => $Api_Key,
'nonce' => $nonce,
'Signature' => $sig,
'CoinType' => 'BTC',
'Amount' => '0.005',
'Address' => 'Bitcoin Wallet Address'
);
$url = 'https://checkout.coincorner.com/api/WithdrawCoins';
$curl = curl_init();
$curl_options = array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url);
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
array_merge($curl_options, array(CURLOPT_POST => 1));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt_array($curl, $curl_options);
curl_setopt($curl, CURLOPT_HTTPHEADER, array());
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
$response = json_decode(curl_exec($curl), TRUE);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
exit();
}
?>
#!/usr/bin/env ruby
require 'httparty'
require 'date'
$APIKey = 'Your API Key'
$nonce = DateTime.now.strftime('%Q')
$sig = GenerateSig($nonce)
$response = HTTParty.post('https://checkout.coincorner.com/api/WithdrawCoins', body: {
'APIKey' => $APIKey,
'Signature' => $sig,
'Nonce' => $nonce,
'UserId' => $UserId,
'Address' => 'Bitcoin Wallet Address',
'CoinType' => 'BTC',
'Amount' => '0.0005',
})
import requests
import time
URL = "https://checkout.coincorner.com/api/WithdrawCoins"
API_KEY = "Your API Key"
nonce = int(time.time())
sig = GenerateSig(nonce)
data = {
'APIKey': API_KEY,
'Signature': sig,
'Nonce': nonce,
'Address':'Bitcoin Wallet Address',
'CoinType': 'BTC',
'Amount': '0.0005',
}
response = requests.post(url = URL, data = data)
const https = require('https')
var APIKey = 'Your API Key';
var nonce = Date.now();
var sig = GenerateSig(nonce);
const data = JSON.stringify({
'APIKey': APIKey,
'Signature': sig,
'Nonce': nonce,
'Amount':'0.0005',
'CoinType':'BTC',
'Address':'Bitcoin Wallet Address'
})
const options = {
host: 'checkout.coincorner.com',
path: '/api/WithdrawCoins',
protocol: 'https:',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data)
}
}
const req = https.request(options, (res) => {
res.setEncoding('utf8');
res.on('data', (chunk) => {
console.log(`BODY: ${chunk}`);
});
});
req.write(data);
req.end()