-1

I need help with the kraken API. I have created the connection and I am able to trade various pairs but now I need to make an automatic withdraw using their API. For the trading pairs I have the following running which buys 0.002 BTC using EURO

$res = $kraken->QueryPrivate('AddOrder', array(
    'pair' => 'XBTEUR', 
    'type' => 'sell', 
    'ordertype' => 'market', 
    'volume' => '0.002', 
));

print_r($res);

Now... how do I withdraw 0.002 btc using the api and sending these to my wallet: 1BujYrWGkzFdmecXUNgj8nE13gwXtxZxKZ

I can't seem to find this specific information anywhere :(

BastianW
  • 2,628
  • 7
  • 29
  • 38
AgoraLive
  • 81
  • 3
  • 10

1 Answers1

1

To answer my own question, this was the code I needed:

$res = $kraken->QueryPrivate('Withdraw', array(
    'asset' => 'XBT', 
    'key' => 'withdrawal key name here', 
    'amount' => '0.002', 
));

print_r($res);

Where as the key, was the name of the account which contained the wallet I wanted to withdraw fund to.

AgoraLive
  • 81
  • 3
  • 10