Skip to main content

A unofficially lightweight Python API wrapper for the "Military Commercial Joint Stock Bank" (MBBank) personal accounts

Project description

MBBank API for Python

An unofficial, lightweight Python API wrapper for the "Military Commercial Joint Stock Bank" (MBBank) personal accounts.

[!WARNING] This library is unofficial and not endorsed by MBBank. Use it at your own risk.

Features

  • Login: Authenticate with your MBBank credentials.
  • Balance: Check account balances.
  • Transaction History: Retrieve transaction history for your accounts.
  • Transfer: Perform money transfers to another account*.
  • Async Support: Includes asynchronous capabilities for better performance.

[!NOTE] Transfer feature requires MBBank APP on your phone to scan OTP code and confirm the transfer.

Installation

From PyPI

pip install mbbank-lib

From Source (Development Version)

pip install git+https://github.com/thedtvn/MBBank

Requirements

Quick Start

Here is a simple example of how to log in and fetch your account balance:

import mbbank

def main():
    username = "YOUR_USERNAME"
    password = "YOUR_PASSWORD"

    try:
        mb = mbbank.MBBank(username=username, password=password)
        
        # Get balance information
        balance_info = mb.getBalance()
        
        if balance_info.acct_list:
            print(f"Login successful! Found {len(balance_info.acct_list)} account(s).")
            for acct in balance_info.acct_list:
                print(f"Account: {acct.acctNo} - Balance: {acct.currentBalance} {acct.currency}")
        else:
            print("Login successful, but no accounts found.")

    except Exception as e:
        print(f"An error occurred: {e}")

if __name__ == "__main__":
    main()

For more examples, check the examples directory or docs

Documentation

For detailed documentation and FAQ, visit: http://mbbank.rtfd.io/

Related Projects

Donate

If you find this project helpful, you can support the developer:

  • Momo: 0961291206
  • ZaloPay: 0961291206
  • Banking:
    • Bank: Techcombank
    • Account Name: NGUYEN DUONG TUAN
    • Account Number: 9612912060

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbbank_lib-0.3.1.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbbank_lib-0.3.1-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file mbbank_lib-0.3.1.tar.gz.

File metadata

  • Download URL: mbbank_lib-0.3.1.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mbbank_lib-0.3.1.tar.gz
Algorithm Hash digest
SHA256 db123c34d820f632b7a20b91efe1c9f706fe44246fcce1bd139c9727eeade405
MD5 930102f982048d27fa7ba3fdd01ca22e
BLAKE2b-256 96010b33c3a688fd770ef24d0f26889a40c67fe621d7114ead4901762f1bfa9d

See more details on using hashes here.

File details

Details for the file mbbank_lib-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: mbbank_lib-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mbbank_lib-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbfc11e89f2bcd1c725a8edc1988dff5468c4887247adad9791213c466f9c5aa
MD5 6ce55e6606266a270f872cfd6ef837c2
BLAKE2b-256 82b886dff108710d087304a4b526be94d6b9b954e05e680ca8e88158612ed5e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page