Current Token Rate Interface

Amount in USD = Amount in the target token * Current Token Rate. Take BTC for an example: 10000 USD = 0.059 BTC*16944.3 USD (the current rate of BTC)

Return current rate of target token

POST https://admin.ccpayment.com/ccpayment/v1/token/rate

Return the real-time price of the target token and its equivalent value in passed amount in USD

Headers

Name
Type
Description

Appid*

String

Merchant's unique credential. Find it on the Developer pagearrow-up-right.

Timestamp*

String

Timestamp in seconds (10-digit) expires in 2 minutes.

Sign*

String

SHA-256 (APPID + APP Secret +timestamp+body (json string)). Signature guidearrow-up-right.

Request Body

Name
Type
Description

amount*

Amount in USD

token_id*

String

Token ID for the target token. Get token id by calling interface or checking it on the sheetarrow-up-right

Response

Body

{
	"code": 10000,
	"msg": "success",
	"data": {
		"price": "16944.3",
		"value": "0.0590168965374787"
	}
}

Parameters

Request Body Example

Last updated