Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I buy from a pair that is not listed? #101

Open
raschmitt opened this issue Feb 13, 2025 · 1 comment
Open

How can I buy from a pair that is not listed? #101

raschmitt opened this issue Feb 13, 2025 · 1 comment

Comments

@raschmitt
Copy link

raschmitt commented Feb 13, 2025

I'm trying to buy BTC, but I only have BRL (Brazilian Real) in my account. Since there is no BTC-BRL trading pair, I assume I must first convert my BRL to USD (or USDC) in order to purchase BTC-USD.

To get a conversion quote, I attempted the following code:

quote = client.create_convert_quote(
    from_currency="BRL",
    to_currency="USD",
    amount="100"  # Replace with the amount of BRL you want to convert
)

However, this results in the following error:

requests.exceptions.HTTPError: 400 Client Error: Bad Request {"error":"INVALID_ARGUMENT","error_details":"Unsupported account in this conversion","message":"Unsupported account in this conversion"}

Questions

  1. Is BRL conversion supported via the SDK?

    • If not, is there an alternative way to convert BRL to USD (or USDC) programmatically?
  2. What is the correct workflow for buying BTC if I only have BRL?

    • Should I first manually convert BRL to another supported currency?
    • If so, what endpoints should I use?
  3. Is there a list of supported conversion pairs for create_convert_quote()?

    • If BRL to USD is not supported, is there a way to retrieve the available conversion paths?
Copy link

Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our Advanced API Discord instead (use this invite link if it's your first time accessing the Discord).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant