Bitcoin Forum
June 25, 2024, 06:18:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Kraken API <-> PHP - help with withdraw  (Read 465 times)
AgoraLive (OP)
Full Member
***
Offline Offline

Activity: 221
Merit: 100



View Profile
August 13, 2017, 11:27:56 AM
 #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  Sad
poordeveloper
Hero Member
*****
Offline Offline

Activity: 896
Merit: 527


₿₿₿₿₿₿₿


View Profile WWW
August 13, 2017, 02:17:05 PM
 #2

The API reference has that information: https://www.kraken.com/help/api#private-user-funding

Quote
URL: https://api.kraken.com/0/private/Withdraw

Input:

aclass = asset class (optional):
    currency (default)
asset = asset being withdrawn
key = withdrawal key name, as set up on your account
amount = amount to withdraw, including fees

Result: associative array of withdrawal transaction:

refid = reference id

🎰 Bitcoin Casinos ⭐⭐⭐⭐⭐
.
🔵 Buy Bitcoin (Visa / Mastercard / SEPA / Bank Transfer / Western Union / MoneyGram / RIA)
AgoraLive (OP)
Full Member
***
Offline Offline

Activity: 221
Merit: 100



View Profile
August 13, 2017, 03:08:46 PM
 #3

The API reference has that information: https://www.kraken.com/help/api#private-user-funding

Quote
URL: https://api.kraken.com/0/private/Withdraw

Input:

aclass = asset class (optional):
    currency (default)
asset = asset being withdrawn
key = withdrawal key name, as set up on your account
amount = amount to withdraw, including fees

Result: associative array of withdrawal transaction:

refid = reference id

As much as I do appreciate an answer, and thank you for it! I really mean that....

It does however not solve this for me. My coding skills are not close to yours, that's why I need something a little more "for dummies". I am aware of the kraken API help site, but can somebody write a simple script which like my 8 lines trading scripts allows me to input CURRENCY, AMOUNT and WALLET and then the script will make a widtdrawal from kraken?

Everything with the API key is setup, secret everything is working but I just need to know how I code the withdrawal part. Anybody?
poordeveloper
Hero Member
*****
Offline Offline

Activity: 896
Merit: 527


₿₿₿₿₿₿₿


View Profile WWW
August 13, 2017, 03:57:43 PM
 #4

The API reference has that information: https://www.kraken.com/help/api#private-user-funding

Quote
URL: https://api.kraken.com/0/private/Withdraw

Input:

aclass = asset class (optional):
    currency (default)
asset = asset being withdrawn
key = withdrawal key name, as set up on your account
amount = amount to withdraw, including fees

Result: associative array of withdrawal transaction:

refid = reference id

As much as I do appreciate an answer, and thank you for it! I really mean that....

It does however not solve this for me. My coding skills are not close to yours, that's why I need something a little more "for dummies". I am aware of the kraken API help site, but can somebody write a simple script which like my 8 lines trading scripts allows me to input CURRENCY, AMOUNT and WALLET and then the script will make a widtdrawal from kraken?

Everything with the API key is setup, secret everything is working but I just need to know how I code the withdrawal part. Anybody?
The only thing I have doubts about is the withdrawal key name. I'd assume it identifies the address the funds will be sent to, and should be on the list of saved withdrawal address.

Other than that, and replacing said "withdrawal key name", the code should be (untested):
Code:
$res = $kraken->QueryPrivate('Withdraw', array(
    'asset' => 'XBT',
    'key' => 'withdrawal key name here',
    'amount' => '0.002',
));

print_r($res);

The asset name may be "XXBT" instead of "XBT".

🎰 Bitcoin Casinos ⭐⭐⭐⭐⭐
.
🔵 Buy Bitcoin (Visa / Mastercard / SEPA / Bank Transfer / Western Union / MoneyGram / RIA)
AgoraLive (OP)
Full Member
***
Offline Offline

Activity: 221
Merit: 100



View Profile
August 13, 2017, 06:07:37 PM
 #5

@poordeveloper

THANK YOU!!!!! This did more or less exactly what I was looking for. I found that this worked when I used the name of the account which held a wallet address, I am not able to withdraw directly to an address therefore my question is now:

Is there a way to add an address using the kraken API?
poordeveloper
Hero Member
*****
Offline Offline

Activity: 896
Merit: 527


₿₿₿₿₿₿₿


View Profile WWW
August 13, 2017, 09:15:28 PM
 #6

@poordeveloper

THANK YOU!!!!! This did more or less exactly what I was looking for. I found that this worked when I used the name of the account which held a wallet address, I am not able to withdraw directly to an address therefore my question is now:

Is there a way to add an address using the kraken API?
Not that I know of.

🎰 Bitcoin Casinos ⭐⭐⭐⭐⭐
.
🔵 Buy Bitcoin (Visa / Mastercard / SEPA / Bank Transfer / Western Union / MoneyGram / RIA)
AgoraLive (OP)
Full Member
***
Offline Offline

Activity: 221
Merit: 100



View Profile
August 14, 2017, 04:26:08 AM
 #7

@poordeveloper

THANK YOU!!!!! This did more or less exactly what I was looking for. I found that this worked when I used the name of the account which held a wallet address, I am not able to withdraw directly to an address therefore my question is now:

Is there a way to add an address using the kraken API?
Not that I know of.

Anyway, thank you for the information you have provided so far!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!