Skip to main content
POST
/
v1
/
pay
/
currency
/
exchange
/
rate
/
query
Query exchange rate
curl --request POST \
  --url https://openplatform.gateapi.io/v1/pay/currency/exchange/rate/query \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "sourceCurrency": "EUR",
  "targetCurrency": "USDT"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "sourceCurrency": "EUR",
    "targetCurrency": "USDT",
    "rate": "0.021",
    "updateTime": 12324324324323
  }
}

Headers

X-GatePay-Certificate-ClientId
string
required

The clientId assigned when the merchant registers an application in the Gate merchant console.

Example:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
required

Request signature. GatePay uses this signature to verify whether the request is valid.

X-GatePay-Timestamp
string
required

UTC timestamp in milliseconds when the request is generated. GatePay will not process requests where the difference from the receive time exceeds 10 seconds.

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random string. Must comply with HTTP header rules; recommended length is within 32 characters, composed of digits and letters.

Example:

"9578"

Body

application/json
sourceCurrency
string
required

Base currency,Supported:EUR/GBP/USD/CNY/JPY/AUD/CAD/CHF

Example:

"EUR"

targetCurrency
string
required

Quote currency,Supported:USDT

Example:

"USDT"

Response

200 - application/json

SUCCESS

status
string
required

API response result

Example:

"SUCCESS"

code
string
required

Response error code

Example:

"000000"

errorMessage
string

Error description

Example:

""

data
object