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

License

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

Disclaimer

This project is not affiliated with MBBank. Use it responsibly and at your own risk.

The author is not liable for any damage or loss resulting from the use of this library.

Always ensure you comply with MBBank's terms of service and security guidelines when using this API.

Legal

Any takedown requests or legal problems from MBBank can contact the author at:

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.2.tar.gz (36.9 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.2-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mbbank_lib-0.3.2.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.tar.gz
Algorithm Hash digest
SHA256 fccef876621167a1614e054911090984aeecbd161385c797371546693a8501af
MD5 8697411fc7536b055298a593969b5c4d
BLAKE2b-256 b337e8ddaca9ce88f1d88d171fa56bce84f4253d2a271e6ccc8f2a63dd037143

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mbbank_lib-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5aca9f96a0c8dad2264d8f2a4d22c8617263df9a46d5f94d2e9f0a8397ac72e8
MD5 d099511b5ae995f5a488950fd57f68ae
BLAKE2b-256 f3a5157370770b816850323c39d1eaa80ecb7ba665b227a4921c5da6bbef37df

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