apyhub
Back
▣ FINANCE

Convert and Get Crypto Prices API

What it does

Crypto Prices Converter gives you live spot prices and conversion results for supported cryptocurrencies and fiat currencies. Send a quote currency and one or more symbols to get current prices back, or pass a source currency, target currency, and amount to calculate a conversion.

The spot prices endpoint accepts vs as usd, eur, gbp, btc, or eth, plus an optional symbols query string. The response includes the requested vs, a source string, and a prices object keyed by symbol. Each symbol entry returns price, with optional change24h and marketCap values when available.

The conversion endpoint takes required from and to query parameters, plus an optional amount. The response returns from, to, amount, result, usdPerFrom, and usdPerTo, which makes it useful for displaying exchange values or normalising balances across assets.

Use Crypto Prices Converter when you need current pricing in a trading dashboard, a portfolio view, a checkout flow, or an internal finance tool that compares coin values without maintaining your own rate feed.

▣ ENDPOINT 01 / 02
GET
Spot prices
https://api.eu.apyhub.com/corsair96/convert-and-get-crypto-prices-api/crypto/prices

QUICKSTART

GUIDE

Quickstart

Fetch spot prices for the default quote currency (usd) and symbol (BTC).

curl -X GET "https://api.eu.apyhub.com/corsair96/convert-and-get-crypto-prices-api/crypto/prices?vs=usd&symbols=BTC" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with required vs, source, and prices fields. vs is the quote currency used, source is the price provider string, and prices is an object keyed by symbol, where each value includes a required price number and optional change24h and marketCap fields.

{
  "vs": "usd",
  "source": "cryptocompare",
  "prices": {
    "BTC": {
      "price": 65000,
      "change24h": 1.25,
      "marketCap": 1270000000000
    }
  }
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns spot prices for one or more symbols quoted in a selected currency. The request accepts query parameters for the quote currency and the symbols to price, and the response returns a JSON object containing the selected quote currency, the data source, and a prices object keyed by symbol.

Query Parameter(s)

AttributeTypeMandatoryDescription
vsENUMNoQuote currency for the returned prices. Allowed values: usd, eur, gbp, btc, eth. Default: usd.
symbolsStringNoSymbol or symbols to price. Default: BTC.

Response

Returns a JSON object with required vs, source, and prices fields. vs is a quote-currency string, source is a string, and prices is an object whose keys are the requested symbols; each symbol maps to an object containing a required price number and optional change24h and marketCap numeric fields, each of which may also be null.

ParameterTypeDescription
vsENUMQuote currency used for the returned prices. Allowed values: usd, eur, gbp, btc, eth.
sourceStringData source identifier.
pricesObjectObject keyed by symbol. Each value is an object with price and optional change24h and marketCap fields.
prices[].priceNumberPrice in the requested quote currency.
prices[].change24hNumber24h change percentage. May be null.
prices[].marketCapNumberMarket cap in the requested quote currency. May be null.
▣ ENDPOINT 02 / 02
GET
Convert between coins and fiats
https://api.eu.apyhub.com/corsair96/convert-and-get-crypto-prices-api/crypto/convert

QUICKSTART

GUIDE

Quickstart

Convert 1 unit from USD to EUR with a simple GET request.

curl -X GET "https://api.eu.apyhub.com/corsair96/convert-and-get-crypto-prices-api/crypto/convert?from=USD&to=EUR&amount=1" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with from, to, amount, result, usdPerFrom, and usdPerTo fields. from and to are currency codes, amount is the input amount, result is the converted value, and usdPerFrom / usdPerTo are the USD exchange rates used.

{
  "from": "USD",
  "to": "EUR",
  "amount": 1,
  "result": 0.92,
  "usdPerFrom": 1,
  "usdPerTo": 1.087
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Converts an amount from one coin or fiat currency to another and returns the converted value along with the input/output currency codes and USD reference rates used for the conversion.

Query Parameter(s)

AttributeTypeMandatoryDescription
toStringYesTarget currency code.
fromStringYesSource currency code.
amountNumberNoAmount to convert. Defaults to 1. Minimum 0, maximum 1000000000000000.

Response

Returns a JSON object with from and to string fields, an amount number field, a result number field for the converted value, and usdPerFrom / usdPerTo number fields containing the USD reference rates used for the conversion.

ParameterTypeDescription
fromStringSource currency code.
toStringTarget currency code.
amountNumberInput amount that was converted.
resultNumberConverted amount in the target currency.
usdPerToNumberUSD reference rate for the target currency.
usdPerFromNumberUSD reference rate for the source currency.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.