Skip to main content

Query Asset Records

Query card transaction history. Supports filtering by status, last digits of card number, merchant name, transaction type, time range, etc. Results are paginated.

HTTP Request

POST/v5/card/transaction/query-asset-records

Request Parameters

ParameterRequiredTypeComments
statusCodefalsestringTransaction status code. 0: Pending, 1: Cleared, 2: Declined
limitfalseintegerNumber of items per page. Default: 100. Range: [1, 500]
pagefalseintegerPage number. Default: 1. Min: 1
pan4falsestringLast 2/4 digits of card number, used to filter transactions of a specific card
createBeginTimefalseintegerStart time of transaction (Unix ms timestamp)
createEndTimefalseintegerEnd time of transaction (Unix ms timestamp)
merchNamefalsestringMerchant name. Supports fuzzy search
typefalsestringQuery type. SIDE_QUERY_AUTH: Authorization, SIDE_QUERY_FINANCIAL: Clearing, SIDE_QUERY_REFUND: Refund
txnIdfalsestringTransaction ID. Exact match
cardTokenfalsestringCard token, used to identify a specific card
orderNofalsestringOrder number. Exact match

Response Parameters

ParameterTypeComments
retCodeintegerBusiness return code. 0: success; non-zero: failure
retMsgstringReturn message
resultobject
> pageSizeintegerNumber of items per page
> pageNointegerCurrent page number
> totalCountintegerTotal number of records
> dataarrayTransaction record list
>> pan4stringLast 4 digits of card number
>> pan6stringFirst 6 digits of card number (BIN)
>> tradeStatusstringTrade status. 0: In_Progress, 1: Completed, 2: Declined, 3: Reversal
>> sidestringTransaction type. 1: Authorization, 2: Authorization Reversal, 3: Transaction, 4: Refund (unDeduct), 5: Refund, 6: Chargeback, 7: Transaction (Direct), 8: Refund Reversal, 9: Chargeback Reversal, 10: Refund Request, 11: Refund Reversal Request, 12: Chargeback Fee, 13: ATM Withdrawal
>> basicAmountstringTotal amount
>> basicCurrencystringTotal amount currency code
>> transactionAmountstringAmount before tax
>> transactionCurrencystringAmount before tax currency code
>> txnCreateintegerTransaction creation time (Unix ms timestamp)
>> merchCountrystringMerchant country
>> merchCitystringMerchant city
>> merchNamestringMerchant name
>> txnIdstringTransaction ID
>> declinedReasonstringDeclined reason. Only populated when transaction is declined
>> totalFeesstringTotal fees
>> uidintegerUser ID
>> transactionCurrencyAmountstringFiat transaction amount
>> fxPadstringFee
>> interchangeFeestringInterchange fee (non-cumulative, unrelated to users, card network related)
>> billAmountstringBill amount
>> paidAmountstringTransaction currency amount
>> paidCurrencystringPaid currency code
>> bonusAmountstringTrial bonus
>> foreignTransactionFeestringForeign transaction fee
>> totalTaxstringTotal tax
>> paidFiatstringFiat paid amount
>> withdrawalFeestringWithdrawal fee
>> statusstringTransaction status. -1: Init, 0: Pending, 1: Success, 2: Fail
>> orderNostringOrder number
>> mccCodestringMerchant Category Code (MCC)
>> merchCategoryDescstringMerchant category description

Request Example

POST /v5/card/transaction/query-asset-records?limit=10&page=1 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211918471
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"pageSize": 100,
"pageNo": 1,
"totalCount": 2,
"data": [
{
"pan4": "1234",
"pan6": "456789",
"tradeStatus": "1",
"side": "3",
"basicAmount": "101.50",
"basicCurrency": "USD",
"transactionAmount": "100.00",
"transactionCurrency": "USD",
"txnCreate": 1672211918471,
"merchCountry": "US",
"merchCity": "New York",
"merchName": "Amazon",
"txnId": "TXN20230101001",
"declinedReason": "",
"totalFees": "1.50",
"uid": 100001,
"transactionCurrencyAmount": "100.00",
"fxPad": "",
"interchangeFee": "0.50",
"billAmount": "101.50",
"paidAmount": "101.50",
"paidCurrency": "USDT",
"bonusAmount": "0",
"foreignTransactionFee": "0",
"totalTax": "1.50",
"paidFiat": "0",
"withdrawalFee": "0",
"status": "1",
"orderNo": "ORD20230101001",
"mccCode": "5411",
"merchCategoryDesc": "Grocery Stores"
}
]
},
"retExtInfo": {},
"time": 1672211918471
}