Skip to main content

Data API: Prices

Table of Endpoints

NameMethodEndpointScope
Get Buy PriceGET/v2/prices/:currency_pair/buyN/A
Get Sell PriceGET/v2/prices/:currency_pair/sellN/A
Get Spot PriceGET/v2/prices/:currency_pair/spotN/A

Get Buy Price

Get the total price to buy one bitcoin or ether.

Note that exchange rates fluctuates so the price is only correct for seconds at the time. This buy price includes standard Coinbase fee (1%) but excludes any other fees including bank fees. If you need more accurate price estimate for a specific payment method or amount, see buy bitcoin endpoint and quote: true option.

This endpoint doesn't require authentication.

HTTP Request

GET https://api.coinbase.com/v2/prices/:currency_pair/buy

Scopes

  • No permission required

Examples

Request

curl https://api.coinbase.com/v2/prices/BTC-USD/buy \
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response

{
"data": {
"amount": "1020.25",
"currency": "USD"
}
}

Get Sell Price

Get the total price to sell one bitcoin or ether.

Note that exchange rates fluctuates so the price is only correct for seconds at the time. This sell price includes standard Coinbase fee (1%) but excludes any other fees including bank fees. If you need more accurate price estimate for a specific payment method or amount, see sell bitcoin endpoint and quote: true option.

This endpoint doesn't require authentication.

HTTP Request

GET https://api.coinbase.com/v2/prices/:currency_pair/sell

Scopes

  • No permission required

Examples

Request

curl https://api.coinbase.com/v2/prices/BTC-USD/sell /
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response

{
"data": {
"amount": "1010.25",
"currency": "USD"
}
}

Get Spot Price

Get the current market price for bitcoin. This is usually somewhere in between the buy and sell price.

Note that exchange rates fluctuates so the price is only correct for seconds at the time.

You can also get historic prices with date parameter.

This endpoint doesn't require authentication.

HTTP Request

GET https://api.coinbase.com/v2/prices/:currency_pair/spot

Scopes

  • No permission required

Arguments

ParameterTypeRequiredDescription
datestringOptionalFor historic spot price, use format YYYY-MM-DD (UTC)

Examples

Request

curl https://api.coinbase.com/v2/prices/BTC-USD/spot \
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response

{
"data": {
"amount": "1015.00",
"currency": "USD"
}
}

Was this helpful?