nothingisdead / npm-kraken-api

[DEPRECATED] NodeJS Client Library for the Kraken (kraken.com) API
Other
412 stars 188 forks source link

DepositAddresses method not working #53

Open SandeshSarfare opened 6 years ago

SandeshSarfare commented 6 years ago

DepositAddresses throws an error

"EFunding:No funding method"

`kraken.api('DepositAddresses', { "new": 'true' }, function (error, data) {
    if (error) {
        console.log(error);
    }
    else {
        console.log(data.result);
        res.status(200).json({
            message: data.result
        });

    }
});`

How do I create a deposit address?

martin-cech commented 5 years ago

Ran into this too, the solution is to include parameter asset:

kraken.api('DepositAddresses', { asset: 'BTC' }, ...)

and additionally we found out that also parameter method must be included:

kraken.api('DepositAddresses', { asset: 'BTC', method: 'Bitcoin' }, ...)

We didn't find documentation for which methods are supported for which coins. We had to manually fetch methods from DepositMethods endpoint (which must be done one by one for each asset). Here's our list to save you the pain:

const KRAKEN_DEPOSIT_METHODS = {
  BTC: 'Bitcoin',
  XRP: 'Ripple XRP',
  ETH: 'Ether (Hex)',
  BCH: 'Bitcoin Cash',
  XLM: 'Stellar XLM',
  EOS: 'EOS',
  LTC: 'Litecoin',
  ADA: 'ADA',
  XMR: 'Monero',
  DASH: 'Dash',
  // ETC: '', // not available
  XTZ: 'XTZ',
  ZEC: 'Zcash (Transparent)',
  QTUM: 'QTUM',
  REP: 'REP',
  GNO: 'GNO',
  BAT: 'BAT',
  ICX: 'Icon',
  WAVES: 'Waves',
  DAI: 'Dai',
  LINK: 'Link',
};

Lastly, the parameter new should have values 1 or 0, value false results in actually creating a new address. Not sure what "false" (as string) do, boolean value false doesn't behave like expected.

umair982 commented 10 months ago

I am also facing this issue. I tried much but its saying "EFunding:No funding method". So please help me for this if you can . @martin-cech