I. Common Request Parameters

ParamDescription
domainProduction domain name (https://openapi.gasstation.ai/ ),Not supported in the test environment
app_id:Please create the API first, then retrieve it
secrect:Please create the API first, then retrieve it

AES Encryption Method

Operation Mode:ECB

Cryptography:PKCS7

Output Format: Base64 UrlSafe

II. Interface Rules

ParamDescription
Transmission Method:https
Response Status Code:0 indicates processing success, non-0 indicates request error or system exception
Request Address:Domain + Interface Address
Encryption Algorithm:AES

III. Common Response Parameters

ParamTypeRequiredDescription
app_idStringRequiredMerchant unique identifier
dataStringRequiredData in JSON format Encrypted string; encrypted with the Client’s AES key, specific encryption information is described in the Request Parameter Data Structure of each interface

Example Request Parameters: { "time": "1600128590"}

Encrypted data: UJ3SABwJnabqiDf0WMSANU5L99g29LQDOcSsdTrUXXU=

cURL
   curl -X POST \
   'https://openapi.gasstation.ai/api/mpc/tron/gas/balance?app_id=49e9c57da66788e5178c8fec2905067b&data=UJ3SABwJnabqiDf0WMSANU5L99g29LQDOcSsdTrUXXU='

Response Parameter Format

ParamTypeRequiredDescription
codeStringYesStatus code, e.g., 100002
msgStringYesExplanation of the response result, e.g., Request parameter error
dataStringNoSpecific response data; data structure defined in the Response Parameter Data Structure of each interface
{
  "code": 0,
  "msg": "Success",
  "data": {
    "symbol": "trx",
    "balance": "92.4792050000000000"
  }
}