coinbasepro-python icon indicating copy to clipboard operation
coinbasepro-python copied to clipboard

Method to yield a deposit address like depositCrypto

Open IvoCrnkovic opened this issue 6 years ago • 1 comments

Is there a way to replicate the functionality offered by the depositCrypto method in the official Node client? As in a method that returns an address to send crypto to in order to deposit it?

https://github.com/coinbase/coinbase-pro-node/blob/8bce637716bf73669337398fe53df24b2d25af1b/lib/clients/authenticated.js#L262

I see withdrawCrypto here but not the reverse.

IvoCrnkovic avatar Sep 04 '19 20:09 IvoCrnkovic

We don't yet have that. It looks like the endpoint is in the documentation here: https://docs.pro.coinbase.com/#generate-a-crypto-deposit-address

In the meantime you can do this --

Grab the coinbase account id for the currency you want an address for from:

auth_client.get_coinbase_accounts()

Then use the coinbase account id in the following request:

auth_client._send_message('post', '/coinbase-accounts/' + coinbase_account_id + '/addresses')

mcardillo55 avatar Nov 22 '20 10:11 mcardillo55