<p>This looks like a service that does what you're asking for, if I'm understanding your ask and this page correctly: <a href="https://developers.coinbase.com/docs/wallet/guides/send-receive" rel="nofollow noreferrer">https://developers.coinbase.com/docs/wallet/guides/send-receive</a></p>

<p>This would require you to already have USD on deposit in your Coinbase account.  The page says they are working on a feature to automatically withdraw USD from a linked bank account (I wouldn't hold my breath for this).</p>

<p>Since you explicitly asked about doing this via an API, I looked into this aspect a little bit, too:
<a href="https://developers.coinbase.com/api/v2#transactions" rel="nofollow noreferrer">https://developers.coinbase.com/api/v2#transactions</a></p>

<p>In the example json on the right, I'm seeing that it has separate "amount" and "native amount" sections specifying BTC and USD respectively, and there's an "instant_exchange" field.  This leads me to believe it can do exactly what you're asking for, provided you have USD on deposit and instantly available:</p>

<ul>
<li>Hold USD, not BTC</li>
<li>Create a new transaction to send BTC, via API</li>
<li>USD is converted to BTC "just-in-time" at time of transaction</li>
</ul>

<p>I didn't look into converting a USD amount to BTC based on the current price via Coinbase's API, but <em><strong>of course</strong></em> their API will provide for that (via a previous request).  </p>

<p>blockchain.info also offers a free API to do this, although I'm sure the precise exchange rate on Coinbase will vary slightly from what blockchain.info reports: <a href="https://blockchain.info/tobtc?currency=USD&amp;value=500" rel="nofollow noreferrer">https://blockchain.info/tobtc?currency=USD&amp;value=500</a></p>

<p>Hope that helps.. although I imagine you've probably answered this yourself since posting this question.</p>

CC BY-SA 4.0
2018-05-17T15:37:47.907Z
2018-05-17T15:37:47.907Z
adfaklsdjf
<p>You have to use Coinbase. Their API description is a bit confusing because it combines Coinbase and Gdax. Coinbase is to transfer USD into crypto, and Gdax for crypto-to-crypto trades.
An API is a software, it is not an exchange. To trade USD into crypto, you need an exchange (not an API). To make the exchange, you have to do it via an API that interfaces you with an exchange (this is how your question could have been more clear). </p>

CC BY-SA 4.0
2018-05-12T16:19:02.637Z
2018-05-12T16:19:02.637Z
Vera
<p>Yes, you could use blockchain.info api, they provide this service. </p>

<p>Link : <a href="https://blockchain.info/tobtc?currency=USD&amp;value=500" rel="nofollow noreferrer">https://blockchain.info/tobtc?currency=USD&amp;value=500</a></p>

<p>Value should be your USD amount, also you could change currency to any currency.</p>

<p>You could do that mathematically but you will need bitcoin price.</p>

<p>For example 1 bitcoin worth $10,000</p>

<p>value in USD = exchange rate * amount of bitcoins</p>

<p>Or expressed in the units of the terms:</p>

<p>[USD] = [USD/BTC] * [BTC]</p>

<hr>

<p>After your edit:</p>

<p>You can use bitfinx they offer API for buy/sell crypto currency.</p>

<blockquote>
  <p>Bitfinex's API are designed to offer an easy and efficient way to
  build digital asset trading applications and tools: create your own
  charts, monitor and edit your orders and positions,track your trading
  history and wallets movements. Discover all the possibilities.</p>
</blockquote>

CC BY-SA 3.0
2017-11-30T17:14:19.743Z
I couldn't be more specific when I said

_"I'm looking for an API that literally exchanges USD to Bitcoin, not only value."_
elongl
CC BY-SA 3.0
2017-11-30T20:13:06.667Z
Where would you put the USD?  In the DVD drive?  Take a picture of the bill with a camera?
abelenky
CC BY-SA 3.0
2017-12-03T14:10:36.853Z
@abelenky A site appears that charges money from me. Like buying something online.
elongl
CC BY-SA 3.0
2017-12-03T16:23:44.147Z
Then that is a site that *charges your credit card and provides BTC*, which is *not* the same thing as converting USD to BTC.
abelenky
CC BY-SA 3.0
2017-11-29T20:12:23.710Z
2017-11-30T19:01:07.523Z
2017-11-30T19:01:07.523Z
Tailer
<p>I am not aware of any exchange that accepts USD directly, however in the <a href="https://poloniex.com/support/api/" rel="nofollow noreferrer">API description</a> of <a href="https://poloniex.com/" rel="nofollow noreferrer">Poloniex</a> exchange there are buy and sell methods which should accept USD trading.</p>

<p>Please note that although you can trade with USD at Poloniex, you can only deposit and withdraw Coins not USD.</p>

CC BY-SA 3.0
2017-11-29T12:21:18.790Z
2017-11-29T12:21:18.790Z
Gábor Héja
<p>I'm looking for an API that <strong>literally</strong> exchanges USD to Bitcoin, not only value.</p>

<p>I've been looking all over for an exchange that accepts USD in it's API.</p>

<p>I've found tons that will do Crypto => Crypto but none that would do USD => Crypto.</p>

<p>Can someone share a service that does that? Or is there another way to exchange USD to Crypto programmatically?</p>

CC BY-SA 3.0
2017-11-30T19:53:57.950Z
You cannot send "USD" via an API call, so do you want dollars sent from your Paypal account? You cannot mail a check via an API call.  That would be a lot more than an "API".  That would be an entire service.
abelenky
CC BY-SA 3.0
2017-12-02T12:40:56.600Z
@abelenky I get your point, maybe I wasn't clear enough.
Changelly for example, allows you to exchange USD to Crypto.
To charge USD, you open a URL and pay with your Visa/Mastercard.
I just want that URL (In this example).
There is a way somehow...
elongl
<api><development><currencies><services>
Is there an API that exchanges USD to Bitcoin?
elongl
# Is there an API that exchanges USD to Bitcoin?

(Asked by: username_0 on 2017-11-29)

I'm looking for an API that **literally** exchanges USD to Bitcoin, not only value.

I've been looking all over for an exchange that accepts USD in it's API.

I've found tons that will do Crypto => Crypto but none that would do USD => Crypto.

Can someone share a service that does that? Or is there another way to exchange USD to Crypto programmatically?

**Tags:** api, development, currencies, services

> **Comments:**
> **username_1**: You cannot send "USD" via an API call, so do you want dollars sent from your Paypal account? You cannot mail a check via an API call.  That would be a lot more than an "API".  That would be an entire service.  
> **username_0**: @username_1 I get your point, maybe I wasn't clear enough. Changelly for example, allows you to exchange USD to Crypto. To charge USD, you open a URL and pay with your Visa/Mastercard. I just want that URL (In this example). There is a way somehow...  

---

## 4 answers

### Answer by username_2 on 2018-05-17. Score: 4

This looks like a service that does what you're asking for, if I'm understanding your ask and this page correctly: <https://developers.coinbase.com/docs/wallet/guides/send-receive>

This would require you to already have USD on deposit in your Coinbase account. The page says they are working on a feature to automatically withdraw USD from a linked bank account (I wouldn't hold my breath for this).

Since you explicitly asked about doing this via an API, I looked into this aspect a little bit, too:
<https://developers.coinbase.com/api/v2#transactions>

In the example json on the right, I'm seeing that it has separate "amount" and "native amount" sections specifying BTC and USD respectively, and there's an "instant\_exchange" field. This leads me to believe it can do exactly what you're asking for, provided you have USD on deposit and instantly available:

* Hold USD, not BTC
* Create a new transaction to send BTC, via API
* USD is converted to BTC "just-in-time" at time of transaction

I didn't look into converting a USD amount to BTC based on the current price via Coinbase's API, but ***of course*** their API will provide for that (via a previous request).

blockchain.info also offers a free API to do this, although I'm sure the precise exchange rate on Coinbase will vary slightly from what blockchain.info reports: <https://blockchain.info/tobtc?currency=USD&value=500>

Hope that helps.. although I imagine you've probably answered this yourself since posting this question.


---

### Answer by username_3 on 2018-05-12. Score: 1

You have to use Coinbase. Their API description is a bit confusing because it combines Coinbase and Gdax. Coinbase is to transfer USD into crypto, and Gdax for crypto-to-crypto trades.
An API is a software, it is not an exchange. To trade USD into crypto, you need an exchange (not an API). To make the exchange, you have to do it via an API that interfaces you with an exchange (this is how your question could have been more clear).


---

### Answer by username_4 on 2017-11-29. Score: 0

Yes, you could use blockchain.info api, they provide this service.

Link : <https://blockchain.info/tobtc?currency=USD&value=500>

Value should be your USD amount, also you could change currency to any currency.

You could do that mathematically but you will need bitcoin price.

For example 1 bitcoin worth $10,000

value in USD = exchange rate \* amount of bitcoins

Or expressed in the units of the terms:

[USD] = [USD/BTC] \* [BTC]

---

After your edit:

You can use bitfinx they offer API for buy/sell crypto currency.

> Bitfinex's API are designed to offer an easy and efficient way to
> build digital asset trading applications and tools: create your own
> charts, monitor and edit your orders and positions,track your trading
> history and wallets movements. Discover all the possibilities.

> **Comments:**
> **username_0**: I couldn't be more specific when I said  _"I'm looking for an API that literally exchanges USD to Bitcoin, not only value."_  
> **username_1**: Where would you put the USD?  In the DVD drive?  Take a picture of the bill with a camera?  
> **username_0**: @username_1 A site appears that charges money from me. Like buying something online.  
> **username_1**: Then that is a site that *charges your credit card and provides BTC*, which is *not* the same thing as converting USD to BTC.  

---

### Answer by username_5 on 2017-11-29. Score: 0

I am not aware of any exchange that accepts USD directly, however in the [API description](https://poloniex.com/support/api/) of [Poloniex](https://poloniex.com/) exchange there are buy and sell methods which should accept USD trading.

Please note that although you can trade with USD at Poloniex, you can only deposit and withdraw Coins not USD.


---

