Get native buy rate
Returns a buy-rate quote for a currency pair, payment method, and amount. Accepts either Sdk-Partner-Token or Sdk-User-Token; when Sdk-User-Token is present and valid, it takes priority and the quote is calculated in that user's widget context, ignoring Sdk-Partner-Token.
Query Parameters
- enumtypeconst:buyrequired
Always
buy - Type: stringfromrequired
Currency to convert from
- Type: stringtorequired
Currency to convert to
- Type: stringamountrequired
Amount in currency from
- enumpayment
_method const:applerequiredPayment method:
apple— Apple Pay
- Type: booleanis
_total Whether
amountincludes the fee. - Type: stringnetwork
Blockchain network for the crypto currency, when it supports more than one. Defaults to that currency's default network.
Headers
- Type: stringFormat: ipSdk
- User - I P requiredThe end customer's real IP address
- Type: stringSdk
- User - Token Bearer token from /native/user/sign-in. When present, it takes priority over Sdk-Partner-Token: the quote is calculated in that user's context and kyc_limits is included in the response
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for get/sdk-partner/native/rate
curl 'https://sandbox-api.mrcr.io/v1.6/sdk-partner/native/rate?type=buy&from=&to=&amount=&payment_method=apple&is_total=true' \
--header 'Sdk-User-IP: 203.0.113.42' \
--header 'Sdk-Partner-Token: YOUR_SECRET_TOKEN'
{
"status": 200,
"data": {
"quote_token": "string",
"currency": "string",
"amount": "string",
"receivable_amount": "string",
"fiat_amount": "string",
"fiat_currency": "string",
"rate": "string",
"reverse_rate": "string",
"fee": {
"additionalProperty": "string"
},
"subtotal": {
"additionalProperty": "string"
},
"total": {
"additionalProperty": "string"
},
"total_denominated": "string",
"kyc_limits": null,
"network_fee": null,
"partner_fee": null,
"mercuryo_fee": null
}
}