---
title: "Rate Calculator"
method: POST
path: "/trades/pbc/sell/rate-calculator/{assetId}"
tags: ["Rates and Prices"]
---

# Rate Calculator

`POST /trades/pbc/sell/rate-calculator/{assetId}`

## Request

- Base URL: `https://api.breet.io/v1`
- URL: `https://api.breet.io/v1/trades/pbc/sell/rate-calculator/{assetId}`
- Auth: API key in header `x-app-id` and API key in header `x-app-secret` and API key in header `X-Breet-Env`
- TypeScript: <https://skmtc.dev/breet/apis/breet-public-api/docs/trades/pbc/sell/rate-calculator/:assetId/post.ts> (a function with typed inputs; its response is checked against the schema)

Calculate crypto amount and get NGN/GHS rate. This endpoint returns Breet's actual conversion rate for NGN or GHS. Use this endpoint to determine the exact amount you'll receive when converting crypto to NGN or GHS.

## Path parameters

- `assetId` string, required

## Request body

- object
  - `amountInUSD` number
  - `currency` string: Target fiat currency. Supported values: ngn, ghs.

## Response `200`

Rate calculation returned successfully

## Other responses

- `404`: Asset not found
- `422`: Request validation failed — check the errors array for field-level details
- `500`: An unexpected server error occurred

---

[API](https://skmtc.dev/breet/apis/breet-public-api.md) - [All operations](https://skmtc.dev/breet/apis/breet-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/breet/apis/breet-public-api/revisions/a2559b3ef61f?raw)
