|
1 | 1 | # MBBank API for Python |
2 | | -A unofficially lightweight Python Api for the "Military Commercial Joint Stock Bank" personal account |
3 | 2 |
|
4 | | -## Why we have this lib ? |
| 3 | +An unofficial, lightweight Python API for the "Military Commercial Joint Stock Bank" (MBBank) personal accounts. |
5 | 4 |
|
6 | | -Because I don't want to lose money on some api services like [casso.vn](https://casso.vn/) or [payos.vn](https://payos.vn/) |
7 | | -when have freemium tier but with limit :> |
| 5 | +> [!WARNING] |
| 6 | +> This library is unofficial and not endorsed by MBBank. Use it at your own risk. |
8 | 7 |
|
9 | | -What you need that it use this lib to make your own code so you can use it free forever |
| 8 | +## Features |
10 | 9 |
|
11 | | -[Documentation & FAQ](http://mbbank.rtfd.io/) |
| 10 | +- **Login**: Authenticate with your MBBank credentials. |
| 11 | +- **Balance**: Check account balances. |
| 12 | +- **Transaction History**: Retrieve transaction history for your accounts. |
| 13 | +- **Transfer**: Perform money transfers to another account*. |
| 14 | +- **Async Support**: Includes asynchronous capabilities for better performance. |
12 | 15 |
|
13 | | -## Requires |
14 | | - - [onnx with cuda](https://onnxruntime.ai/getting-started) (optional if you want to use cuda gpu) |
| 16 | +> [!NOTE] |
| 17 | +> Transfer feature requires MBBank APP on your phone to scan OTP code and confirm the transfer. |
15 | 18 |
|
16 | | - - python3 |
17 | | - |
18 | | -## Install |
19 | | - pip install mbbank-lib |
20 | | - or Dev Ver |
21 | | - |
22 | | - pip install git+https://github.com/thedtvn/MBBank |
| 19 | +## Installation |
| 20 | + |
| 21 | +### From PyPI |
| 22 | + |
| 23 | +```bash |
| 24 | +pip install mbbank-lib |
| 25 | +``` |
| 26 | + |
| 27 | +### From Source (Development Version) |
| 28 | + |
| 29 | +```bash |
| 30 | +pip install git+https://github.com/thedtvn/MBBank |
| 31 | +``` |
| 32 | + |
| 33 | +## Requirements |
| 34 | + |
| 35 | +- Python 3.x |
| 36 | +- [onnxruntime-gpu](https://onnxruntime.ai/getting-started) (Optional, for CUDA GPU support) |
| 37 | + |
| 38 | +## Quick Start |
| 39 | + |
| 40 | +Here is a simple example of how to log in and fetch your account balance: |
| 41 | + |
| 42 | +```python |
| 43 | +import mbbank |
| 44 | + |
| 45 | +def main(): |
| 46 | + username = "YOUR_USERNAME" |
| 47 | + password = "YOUR_PASSWORD" |
| 48 | + |
| 49 | + try: |
| 50 | + mb = mbbank.MBBank(username=username, password=password) |
| 51 | + |
| 52 | + # Get balance information |
| 53 | + balance_info = mb.getBalance() |
| 54 | + |
| 55 | + if balance_info.acct_list: |
| 56 | + print(f"Login successful! Found {len(balance_info.acct_list)} account(s).") |
| 57 | + for acct in balance_info.acct_list: |
| 58 | + print(f"Account: {acct.acctNo} - Balance: {acct.currentBalance} {acct.currency}") |
| 59 | + else: |
| 60 | + print("Login successful, but no accounts found.") |
| 61 | + |
| 62 | + except Exception as e: |
| 63 | + print(f"An error occurred: {e}") |
| 64 | + |
| 65 | +if __name__ == "__main__": |
| 66 | + main() |
| 67 | +``` |
| 68 | + |
| 69 | +For more examples, check the [examples directory](https://github.com/thedtvn/MBBank/tree/main/examples) or [docs](http://mbbank.rtfd.io/) |
| 70 | + |
| 71 | +## Documentation |
| 72 | + |
| 73 | +For detailed documentation and FAQ, visit: [http://mbbank.rtfd.io/](http://mbbank.rtfd.io/) |
| 74 | + |
| 75 | +## Related Projects |
| 76 | + |
| 77 | +- [Payment QR Code Generator (vietqr.io)](https://vietqr.io/) |
| 78 | +- [MBBank JS API](https://github.com/CookieGMVN/MBBank) |
| 79 | +- [MBBank OCR](https://github.com/thedtvn/mbbank-capcha-ocr) |
23 | 80 |
|
24 | 81 | ## Donate |
25 | | -If you like this project and want to support it, you can do so by donating via the following methods: |
26 | | -- **Momo**: 0961291206 |
27 | | -- **ZaloPay**: 0961291206 |
28 | | -- **Banking**: |
29 | | - - Techcombank - NGUYEN DUONG TUAN |
30 | | - - Account Nickname: THEDTVN |
31 | | - - Account Nuber: 9612912060 |
32 | 82 |
|
33 | | -## Extra Info |
34 | | -- Payment QR Code Generator |
35 | | - - [vietqr.io](https://vietqr.io/) |
| 83 | +If you find this project helpful, you can support the developer: |
| 84 | + |
| 85 | +- **Momo**: 0961291206 |
| 86 | +- **ZaloPay**: 0961291206 |
| 87 | +- **Banking**: |
| 88 | + - Bank: Techcombank |
| 89 | + - Account Name: NGUYEN DUONG TUAN |
| 90 | + - Account Number: 9612912060 |
| 91 | + - Nickname: THEDTVN |
36 | 92 |
|
37 | | -- [MBBank JS API](https://github.com/CookieGMVN/MBBank) |
| 93 | +## License |
38 | 94 |
|
39 | | -- [MBBank OCR](https://github.com/thedtvn/mbbank-capcha-ocr) |
| 95 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE.txt) file for details. |
0 commit comments