Skip to main content
POST
/
partner
/
public
/
estimate
Estimate exchange amount for a currency pair
curl --request POST \
  --url https://api.example.com/api/v1/partner/public/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "exchangeId": 1,
  "sourceCurrencyId": 1,
  "destCurrencyId": 2,
  "amount": 1000,
  "direction": "source"
}
'
{
  "sourceAmount": 1000,
  "destAmount": 41500,
  "rate": 41.5,
  "isReverse": false,
  "sourceCurrency": {
    "id": 1,
    "name": "US Dollar",
    "ticker": "USD",
    "image": {
      "id": "cbcfa8b8-3a25-4adb-a9c6-e325f0d0f3ae",
      "path": "/uploads/usd.png"
    }
  },
  "destCurrency": {
    "id": 1,
    "name": "US Dollar",
    "ticker": "USD",
    "image": {
      "id": "cbcfa8b8-3a25-4adb-a9c6-e325f0d0f3ae",
      "path": "/uploads/usd.png"
    }
  },
  "exchangeId": 1,
  "offerId": 42
}

Authorizations

Authorization
string
header
required

Partner API key. Format: sk_branch_<32chars>, sk_personal_<32chars>, or pk_<32chars> (public, read-only)

Body

application/json
exchangeId
integer
required

Exchange office ID

Example:

1

sourceCurrencyId
integer
required

Source currency ID

Example:

1

destCurrencyId
integer
required

Destination currency ID

Example:

2

amount
number
required

Amount to convert

Example:

1000

direction
enum<string>
required

Whether amount is in source or destination currency

Available options:
source,
dest
Example:

"source"

Response

Estimation result

sourceAmount
number
Example:

1000

destAmount
number
Example:

41500

rate
number
Example:

41.5

isReverse
boolean

Whether the offer was matched in reverse direction

Example:

false

sourceCurrency
object
destCurrency
object
exchangeId
integer
Example:

1

offerId
integer
Example:

42