Skip to content

Question #1

@vmasilva

Description

@vmasilva

Hi,

This is not an issue, just to reach out you, to make a question.

Does this API supports transfer(as we have in the UI transfer), from 1 crypto to another 1?

Example, I want to convert from BTC to ETH. Is that possible?

Let me tell you what I already try:
I tried with the "transfer_money", I receive an error, but it looks that the response from the API is 200, with empty content.

my code:


tx = client.transfer_money('5ed81c1a-..........',to='b6bbfc11-.......',amount='0.0003',currency='BTC')
print(tx)

# 5ed81c1a-.......... => my default account, BTC
# b6bbfc11-......    => the ETH account

Output:;

<Response [200]>
b'{}'
{}
Traceback (most recent call last):
  File "account.py", line 36, in <module>
    tx = client.transfer_money('5ed81c1a-..........',to='b6bbfc11-.......',amount='0.0003',currency='BTC')
  File "/home/user/.local/lib/python3.7/site-packages/coinbase/wallet/client.py", line 345, in transfer_money
    return self._make_api_object(response, Transaction)
  File "/home/user/.local/lib/python3.7/site-packages/coinbase/wallet/client.py", line 150, in _make_api_object
    raise build_api_error(response, blob)
coinbase.wallet.error.APIError: APIError(id=): 

Can you help please?

Thank you.

Regards,
Vasco Silva

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions