Ledger
GetAvailableBalances returns the user's available balance for each product
Splits available vs locked amounts derived from the ledger entries, rather than returning the entries themselves
Send 'Authorization: APIKey ' to authenticate with a API key.
account_id represents the account identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /ledger/v1/balances/{accountId} HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"balances": [
{
"available": "text",
"locked": "text",
"productId": "text"
}
]
}GetUserTradeHistory returns historical ticket trade data for a user (paginated)
Each entry is a single ticket-linked trade (deposit, withdraw, swap) Use GetUserTradeHistoryGrouped for aggregated totals per time bucket instead
Send 'Authorization: APIKey ' to authenticate with a API key.
account_id is the user's account identifier
limit is the maximum number of entries to return (defaults to 50)
page is the 1-indexed page number (defaults to 1)
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /ledger/v1/trades/{accountId} HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"entries": [
{
"amount": "text",
"amountUsd": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"journalId": "text",
"subType": "text",
"symbol": "text",
"ticketId": "text"
}
],
"total": "text"
}GetUserTradeHistoryGrouped returns historical ticket trade data grouped by time frame for a user
Buckets trades by day, week or month, aggregating amount and ticket count per bucket instead of returning individual trades
Send 'Authorization: APIKey ' to authenticate with a API key.
account_id is the user's account identifier
time_frame specifies the grouping period: "day", "week", or "month"
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /ledger/v1/trades/{accountId}/grouped?timeFrame=text HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"groups": [
{
"period": "2026-01-01T00:00:00.000Z",
"subType": "text",
"symbol": "text",
"ticketCount": "text",
"totalAmount": "text",
"totalAmountUsd": "text"
}
]
}Unfiltered and unpaginated. Use GetLedgerEntriesFiltered for large accounts or when scoping to a product/time range
Send 'Authorization: APIKey ' to authenticate with a API key.
account_id represents the account identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /ledger/v1/{accountId} HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"entries": [
{
"accountId": "text",
"amount": "text",
"amountUsd": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"description": "text",
"direction": "text",
"id": "text",
"journalId": "text",
"productId": "text",
"subType": "text",
"type": "text"
}
]
}GetLedgerEntriesFiltered returns a user's entries filtered by product and time range
product_id, start_date and end_date are all optional and independently combinable
Send 'Authorization: APIKey ' to authenticate with a API key.
account_id represents the account identifier
product_id optionally filters entries to a single product
start_date optionally filters entries created at or after this time
end_date optionally filters entries created at or before this time
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /ledger/v1/{accountId}/entries HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"entries": [
{
"accountId": "text",
"amount": "text",
"amountUsd": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"description": "text",
"direction": "text",
"id": "text",
"journalId": "text",
"productId": "text",
"subType": "text",
"type": "text"
}
]
}Last updated