Skip to main content
POST
/
trades
/
pbc
/
sell
/
rate-calculator
/
{assetId}
Rate Calculator
curl --request POST \
  --url https://api.breet.io/v1/trades/pbc/sell/rate-calculator/{assetId} \
  --header 'Content-Type: application/json' \
  --header 'X-Breet-Env: <api-key>' \
  --header 'x-app-id: <api-key>' \
  --header 'x-app-secret: <api-key>' \
  --data '
{
  "amountInUSD": 1,
  "currency": "ngn"
}
'
{
  "message": "data fetched",
  "success": true,
  "data": {
    "NGNAmount": 1000,
    "GHSAmount": 90.9090909090909,
    "rate": 1000,
    "cryptoAmount": 0.0068731027254410335
  },
  "meta": {},
  "summary": {},
  "stats": {}
}

Authorizations

x-app-id
string
header
required

Your application ID from the Breet dashboard

x-app-secret
string
header
required

Your application secret from the Breet dashboard

X-Breet-Env
string
header
required

Environment selector: development or production

Path Parameters

assetId
string
required

Returned by the fetch assets endpoint.

Body

application/json
amountInUSD
number
currency
string

Target fiat currency. Supported values: ngn, ghs.

Response

200 - application/json

Rate calculation returned successfully