Rate

Get Order Rate

The Get Order Rate GETendpoint gets the lowest possible exchange rate for an order placed by a consumer from a provider. This requires your publickey in the environment variables while the query params passed will be the payInCurrencyCode , recieveInCurrencyCode & orderAmount.

The returned result will have a rateValidityInSeconds, providerRateAmount& providerRateReference. To get a response for a sell or swap order, switch to desired networks and currency inputs on request and make the call. See the example below;

?payInCurrencyCode=NGN&payInCurrencyNetwork=LOCAL&receiveInCurrencyCode=BUSD&receiveInCurrencyNetwork=BEP20&orderAmount=500

GET https://checkout-api-sandbox.xendbridge.com/api/ThirdPartyUI/Rate

Query Parameters

Name
Type
Description

payInCurrencyCode*

NGN

payInCurrencyNetwork*

string

LOCAL

receiveInCurrencyCode*

string

BUSD

receiveInCurrencyNetwork*

string

BEP-20

orderAmount*

double

500

Headers

Name
Type
Description

publicKey*

string

{publicKey}

{
    "data": {
        "exchangeRate": 559.00,
        "maximumAmount": 10000.000000000,
        "minimumAmount": 5.000000000,
        "providerRateReference": "1382CB3D300346E6A183B720181E0D2B",
        "rateValidityInSeconds": 20
    },
    "status": "OK",
    "message": ""
}
Parameters
Type
Definitions

payInCurrencyCode

string

Required The currency to be paid in.

payInCurrencyNetwork

string

Required The network of the currency to be paid in

receiveInCurrencyCode

string

Required The currency to be received in.

receiveInCurrencyNetwork

string

Required The network of the currency to be received in

orderAmount

double

Required The amount of the order.

Last updated