Batch Query History Order of Merchant

Introduction:

This API allows merchants integrated Standard API to batch query a user’s orders by email.

Each query only supports retrieving orders within 30 days.

API Description

Request Method: POST

Request Path: /open/api/v4/merchant/query/UserHistory

Request Parameters

Header Parameters:

ParameterMandatoryTypeRemarks
appIdYstringAppid, merchant unique identifier
timestampYstringCurrent UTC 13-digit timestamp, valid within 5 minutes
signYstringSign the appId, timeStamp, and requested parameters

Body Parameters:

FieldMandatoryTypeDescription
typeYstringSELL or BUY
emailNstringEmail; if not provided, it represents all orders of the merchant
beginTimestampNlongTimestamp of the starting time for order creation, in UTC+0
endTimestampNlongTimestamp of the ending time for order creation, in UTC+0
pageNumNintPage number; default is 1
pageSizeNintDefault is 100, maximum is 500
  • "beginTime" and "endTime" are empty, return the last 30 days of data.
  • "beginTime" has a value, "endTime" is null, endTime defaults to the current time.
  • "beginTime" is null, "endTime" has a value, beginTime defaults to 30 days before endTime.

Response Parameters

Response Parameter Example (onramp):

Order would be response as list format and chronological sorting.

{
    "total": 39,
    "pageIndex": 1,
    "pageSize": 39,
    "result": [
        {
            "orderNo": "1044203173299257344",
            "fiat": "USD",
            "fiatAmount": "10.99",
            "cryptoQuantity": "10.05000000",
            "crypto": "USDT",
            "network": "MATIC",
            "rampFee": "0.83",
            "networkFee": "0.05000000",
            "cryptoPrice": "1.00",
            "status": "FINISHED",
            "payWayCode": "10001",
            "rebateUsdAmount": "0.00",
            "rebateFiatAmount": "0.00", // commission quantity, no rebate then return 0, need to be based on the account management - On Ramp - Off Ramp rebate rebate amount show, regardless of the order status, all return rebate quantity
            "hash": "0x2b26d0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX89f0e0ac",
            "createTime": 1740524610000,
            "updateTime": 1740528780000,
            "rawRampFee": "0.838501"
        }
    ]
}

Response Parameter Example (offramp):

Order would be response as list format and chronological sorting.

{
    "total": 166,
    "pageIndex": 1,
    "pageSize": 100,
    "result": [
        {
            "orderNo": "1215258435406155776",
            "fiat": "EUR",
            "fiatAmount": "0.0000000000",
            "cryptoQuantity": "50.0000000000",
            "crypto": "USDT",
            "cryptoPrice": "1.0000000000",    USDT/USD price
                        "status": "ORDER_TIMEOUT",
            "hash": "",
            "network": "TRX",
            "rampFee": "0.0000000000",
            "payWayCode": "19000",
            "createTime": 1709781789000,
            "updateTime": 1709954593000
        }
    }
}