Cannot use withdraw API using crypto_address
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
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.
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.
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 See #148
Hi, we are closing out PRs + Issues as this project is being archived.