Estimate Price Query

Description

You can retrieve the estimated fiat amount you need to pay or the crypto amount you can receive through this API. However, please note that this API does not facilitate order creation.

Test environment

https://openapi-test.alchemypay.org/open/api/v4/merchant/order/quoted/result

Prod environment

https://openapi.alchemypay.org/open/api/v4/merchant/order/quoted/result

❗️This API can only be invoked on the server side.

Http method

  • POST

Http Header

ElementMandatoryData TypeRemarks
appidYstringPartner unique ID, Once a merchant has been on-boarded with Alchemy Pay, the merchant will be provided with the credentials with appId and appSecret
timestampYstringUTC time with 13 digits represents time in milliseconds, expiration period is 5 minutes.
signYstringSignature, you can refer to the signature here

Body Parameter

Element

Mandatory

Data Type

Remarks

side

Y

string

Pass value: BUY, SELL

fiatAmount

N

string

The amount of fiat currency

fiatCurrency

N

string

Fiat code, USD/EUR, etc. Check more
*Fiat currencies INR, CLP, COP, HUF, IDR, JPY, KRW, VND do not support inputting decimal points.

cryptoQuantity

N

string

The number of digits

cryptoCurrency

N

string

Crypto name. example: USDT

network

N

string

Crypto acquiring network: e.g.: ETH/BSC/BTC, etc.

payWayCode

N

string

Payment method code: For the specific value.

Response sample

{
	"success": true,
	"returnCode": "0000",
	"returnMsg": "SUCCESS",
	"extend": "",
	"data": {
		"cryptoPrice": "1.000",//The price of the cryptocurrency, denominated in fiat currency.
		"side": "BUY",
		"fiatAmount": "100",
		"cryptoQuantity": "95.32000000",//Estimated amount of crypto the user will receive
		"rampFee": "3.82",//ramp fee, denominated in fiat currency
		"networkFee": "0.86",//network fee,denominated in fiat currency
		"fiat": "USD",
		"crypto": "USDT",
		"payWayCode": "52004",
		"cryptoNetworkFee": "0.86",//network fee,Denominated in crypto units
		"rawRampFee": "3.82"
	},
	"traceId": "68b9588a700408023d9c80d1911111"
}

Return Code List

Return CodeReturn Message
3102Quote amount is out of the range, The Min purchase amount is XX, The max purchase amount is XX
81010Merchant parameter error

Other return codes reference: https://dash.readme.com/project/alchemypay/v4.0.1/docs/response-code-list