acb-api-client
v0.1.0
Published
Unofficial ACB (Asia Commercial Bank) API client for Node.js
Maintainers
Readme
acb-api-client
🇺🇸 English | 🇻🇳 Tiếng Việt
Unofficial Node.js client for ACB (Asia Commercial Bank) API. Fetch account balances and transaction history.
Features
- 🔐 Authenticate with ACB using username and password
- 💰 Fetch account balances
- 📊 Retrieve transaction history
- 🚀 Express server example included
- 📦 Works with npm, pnpm, and bun
Installation
# npm
npm install acb-api-client
# pnpm
pnpm add acb-api-client
# bun
bun add acb-api-clientQuick Start
As a library
import { ACBClient } from 'acb-api-client';
const client = new ACBClient({
username: 'your_username',
password: 'your_password',
debug: false,
});
// Get balances
const { balances } = await client.getBalances();
console.log(balances);
// Get transactions
const accountNumber = balances[0].accountNumber;
const transactions = await client.getTransactions(accountNumber, 5);
console.log(transactions);Run demo server
Clone this repo:
git clone https://github.com/m4kky/acb-api-node.git cd acb-api-nodeCopy
.env.exampleto.envand fill in your ACB credentials:cp .env.example .env # Edit .env with your credentialsInstall dependencies and start:
npm install npm start
Server runs on http://localhost:3000
API Endpoints
GET /- Health checkGET /api/balances- Get all account balancesGET /api/transactions- Get transactions for first accountGET /api/transactions/:accountNumber- Get transactions for specific account
Query parameters:
rows- Number of transactions to fetch (default: 5)
Environment Variables
ACB_USERNAME=your_username
ACB_PASSWORD=your_password
PORT=3000
DEBUG=falseExample Response
Balances
{
"balances": [
{
"accountNumber": "19527581",
"accountDescription": "TKTT FIRST KHTN (CN) VND",
"ownerName": "VU XUAN PHONG",
"currency": "VND",
"balance": 10028.0,
"totalBalance": 10028.0,
"status": 1
}
]
}Transactions
{
"accountNumber": "19527581",
"transactions": [
{
"amount": 10000.0,
"type": "IN",
"description": "VU XUAN PHONG chuyen tien...",
"currency": "VND",
"postingDate": 1774803600000
}
]
}Package Manager Support
This package works with all major Node.js package managers:
# npm
npm install acb-api-client
# pnpm
pnpm add acb-api-client
# bun
bun add acb-api-clientDemo Repository
For a ready-to-run demo server, check out:
Just clone, configure .env, and run!
Author
Makky (@m4kky)
Credits
Inspired by community work on unofficial ACB integrations, including:
Disclaimer
This is an unofficial client and is not affiliated with ACB. APIs may change without notice. Use at your own risk.
License
ISC
