coinbase-pro-node icon indicating copy to clipboard operation
coinbase-pro-node copied to clipboard

Cannot use withdraw API using crypto_address

Open adityamertia opened this issue 8 years ago • 5 comments

Hi,

When i try to withdraw ETH from gdax to another crypto_address using withdraw API it throws error "opts must include param coinbase_account_id"

Documentation of gdax-node documents it as below:

// Withdraw from your Exchange BTC account to another BTC address.
const withdrawAddressParams = {
  'amount': 10.00,
  'currency': 'BTC',
  'crypto_address': '15USXR6S4DhSWVHUxXRCuTkD1SA6qAdy'
}
authedClient.withdrawCrypto(withdrawAddressParams, callback);

This throws error that withdrawCrypto method doesnt exists. It looks like a typo in documentation.

If i use following code:

const withdrawAddressParams = {
  'amount': 0.002,
  'currency': 'ETH',
  'crypto_address': '03x245276ad8c2747ec69a6005970769280d'
}
authedClient.withdraw(withdrawAddressParams, function(response){
   console.log(response);
});

it throws error "opts must include param coinbase_account_id"

Thanks Aditya

adityamertia avatar Dec 24 '17 12:12 adityamertia

The method definitely exists: https://github.com/coinbase/gdax-node/blob/17619ca073a64f20674a2c125d6cbe7a43b2d420/lib/clients/authenticated.js#L260-L263

Not sure what your error is, would be great if you could provide some more context.

fb55 avatar Dec 25 '17 18:12 fb55

Had this error too. In my case, it's because i used npm install gdax-node. In that library, withdrawcrypto is not available. Download directly from github (zip file), problem goes away.

wannesdemaeght avatar Dec 31 '17 15:12 wannesdemaeght

from npm npm install gdax from GitHub npm install coinbase/gdax-node

Issue is because GitHub has the latest version and npm repo has older version which doesn't have withdrawCrypto function. npm repo needs to be updated.

adityamertia avatar Jan 03 '18 13:01 adityamertia

@adityamertia See #148

rmm5t avatar Jan 03 '18 14:01 rmm5t

Hi, we are closing out PRs + Issues as this project is being archived.

drewrothstein avatar Jan 16 '20 05:01 drewrothstein