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
    • Nickname: THEDTVN

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.0.tar.gz (29.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.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mbbank_lib-0.3.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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.0.tar.gz
Algorithm Hash digest
SHA256 7858fe0a3abc009cef4c4582f967b06297aad6235452af73266ada0886b04d84
MD5 150a2f37f868e27ca001edef519ca809
BLAKE2b-256 c0226f8b81821ab9afb6b103805f388e3751e444417391338d6fb08b84cd6afc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mbbank_lib-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21ad44391396a93da26179a2f27a59c08de43b1156891ffb616d9808876a472b
MD5 9f494ab9cd5e50da1eca6750fe0391e7
BLAKE2b-256 b20ccd0517b67d1a52dbc694a2e4f61704e82aaace0a24d1aca00d3d7c4dbb86

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