coinbase/coinbase-python

transfer_money method only supports BTC

theorb77 opened this issue · 5 comments

Hello,
I'm doing the following (Python3):

client.transfer_money(usdwalletid, to=ltcwalletid, amount='{0}'.format(float(usdwallet['balance']['amount'])))

Where usdwalletid and ltcwalletid are pulled from the client.get_accounts() method. I realize the float wasn't necessary. I get the following response:

ValueError: Missing required parameter: currency

Which is fine, I guess. The Python documentation here doesn't call that out in the example and should probably be updated (even though currency is specified as required in the arguments).

Anyway, I do this instead:

client.transfer_money(usdwalletid, to=ltcwalletid, amount='{0}'.format(float(usdwallet['balance']['amount'])), currency='USD')

The currency parameter seems redundant given that each wallet type (I presume) can only hold one type of currency, such that you could derive the currency from the targetted wallet. But that's not why I'm here:

coinbase.wallet.error.InvalidRequestError: APIError(id=invalid_request): You can only move BTC out of a wallet

It doesn't support the other cryptocurrencies Coinbase supports? That's weird:

client.transfer_money(btcwalletid, to=usdwalletid, amount='0.00274735', currency='BTC')

And the reply:

coinbase.wallet.error.InvalidRequestError: APIError(id=invalid_request): You can only move BTC into a wallet or a vault account

So I guess I can only move BTC out of a wallet in to another BTC wallet or Vault? Is that right?

Don't you mean to buy LTC with USD vs. transfer money. LTC wallet can't accept USD. The currency field is to describe the amount, e.g. BTC->BTC $100 worth.

Yeah, I am finding it not possible to transfer coin -> coin. Despite the fact that the documentation makes it seem like you can. Any updates on this @achampion? I'm trying to find a way to transfer programmatically between coins.

Try to client.buy(...) the other currency vs. client.transfer_money(...). You will have to pay the fee necessary to make that purchase.

But can you even client.buy(...) from coin to coin? Or do you mean from USD wallet to coin?

I think coinbase only supports to and from USD. GDax (the underlying trading platform) supports coin to coin.