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— reserved for future sell/swap support. - Type: stringfromrequired
Currency being paid with — a fiat or crypto code.
- Type: stringtorequired
Currency being received — the other kind (fiat/crypto) from
from. - Type: stringamountrequired
Amount, in
fromortodepending onis_total. - enumpayment
_method const:applerequiredAlways
apple— the only currently supported value. - 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, used for fee/limit resolution and as an antifraud signal.
- Type: stringSdk
- User - Token Optional 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 andkyc_limitsis included in the response.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
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
}
}