Transaction
This endpoint retrieves the cash transaction records associated with a user's account, including deposits, withdrawals, trade settlements, fees, and currency conversions. It supports filters by date, transaction direction, and business type. It is useful for account reconciliation, reporting, and personal finance tracking.
📨 HTTP Request
bash
GET /account/v1/transactions📥 Query Parameters
| Parameter | Type | Required | Description | Example Values |
|---|---|---|---|---|
page | int | No | Current page number | 1 as default |
page_size | int | No | Number of records per page | 20 as default |
business_type | enum | No | Filter by business type | hk_stock, us_stock, other, see business_type enum |
io_type | enum | No | Filter by cash flow direction | in, out , see io_type enum for details. |
from_date | long | No | the timespan of Start date of query range | 1746775317 |
to_date | long | No | he timespan of End date of query range | 1746775317 |
✅ Successful Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | int | Transaction record ID |
account_id | int | Account ID |
tran_type | enum | Transaction type (see tran_type enum) |
date | long | the timespan of Transaction date |
sett_date | long | the timespan of Settlement date |
base_currency | string | Currency code |
market | enum | Market code (see market enum) |
product_code | string | Security/product code |
product_name | string | Security/product name |
price | decimal | Price per unit |
qty | decimal | Quantity |
amt | decimal | Transaction amount |
balance | decimal | Account balance after transaction |
io_type | enum | Cash flow direction (see io_type enum) |
fx_currency | string | Foreign exchange currency |
fx_amt | decimal | Amount in foreign currency |
fx_rate | decimal | Exchange rate |
remarks | string | Additional remarks |
business_type | enum | Business type (see business_type enum) |
business_sub_type | enum | Business sub-type (see business_sub_type enum) |
❌ Error Response
Error Fields
| Field | Type | Description |
|---|---|---|
code | int | Error code |
message | string | Human-readable error message |
details | string | Additional error information |
💡 cURL Example
Copy
bash
curl -X GET "https://{{base_url}}/account/v1/transactions?page=1&page_size=20&from_date=1746775317&to_date=1746775257&io_type=in&business_types=us_stock" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Timestamp: 1345678912312" \
-H "X-API-Signature: YOUR_GENERATED_SIGNATURE" \
-H "Content-Type: application/json"✅ Sample Success Response
json
{
"code": 0,
"data": {
"total_records": 1,
"page": 1,
"page_size": 20,
"transactions": [
{
"id": 0,
"tran_type": "cash",
"date": 1746775317,
"sett_date": 1746775317,
"base_currency": "USD",
"market": "usex",
"product_code": "AAPL",
"product_name": "Apple Inc.",
"price": 150.0,
"qty": 10,
"amt": 1500.0,
"balance": 8500.0,
"io_type": "out",
"fx_ccy": "USD",
"fx_amt": 1500.0,
"fx_rate": 1.0,
"remarks": "Equity trade",
"business_type": "us_stock",
"business_sub_type": "not"
}
]
}
}❌ Sample Error Response
json
{
"code": 12010012,
"message": "Internal server error"
}
