Calculate the exchange rate, amount, and fee
GET
/api/v1/exchange_requests/rate
const url = 'https://core.example.com/api/v1/exchange_requests/rate?currency=example&target_currency=example';const options = {method: 'GET', headers: {'session-token': '<session-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://core.example.com/api/v1/exchange_requests/rate?currency=example&target_currency=example' \ --header 'session-token: <session-token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”amount
number format: double
target_amount
number format: double
currency
required
string
target_currency
required
string
to_change
string
Responses
Section titled “ Responses ”Exchange calculation
Media typeapplication/json
object
success
required
boolean
status
required
integer
target_currency_rate
number format: double
amount
number format: double
target_amount
number format: double
commission_amount
number format: double
commission_value
number format: double
Example
{ "success": true, "status": 200}Authorization, validation, or business-rule error
Media typeapplication/json
object
success
required
boolean
status
required
integer
errors
required
One of:
Array<object>
object
code
string
kind
string
expiration
string
session
string
key
additional properties
any
object
key
additional properties
any
string
key
additional properties
any
Example
{ "success": false, "status": 403}