XendBridge
Search…
⌃K

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;
get
https://canary.xendbridge.com
/api/PeerToPeerOrder...
.../Rate?payInCurrencyCode=NGN&payInCurrencyNetwork=LOCAL&receiveInCurrencyCode=BUSD&receiveInCurrencyNetwork=BEP20&orderAmount=500
Request Fields
Response Fields
Parameters
Type
Definitions
payInCurrencyCode
string
Required The currency to be paid in.
recieveInCurrencyCode
string
Required The currency to be received in.
orderAmount
string
Required The amount of the order.
Parameters
Type
Definitions
exchangeRate
decimal
This is the exchange rate at which an order could be exchanged for
maximumAmount
decimal
This is the maximum amount a customer can order.
minimumAmount
decimal
This is the minimum amount a customer can order.
providerRateReference
string
This is the reference of the rates of a provider.
rateValidityInSeconds
int
This is the validity of an order rate of a provider in seconds.