By the end of this page you will have theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/markzuckerbergas/gbmplus-api-python/llms.txt
Use this file to discover all available pages before exploring further.
gbmplus library installed, your GBM+ credentials configured as environment variables, and a working Python script that authenticates with the platform and retrieves the list of your investment strategies (accounts). The whole process takes under five minutes.
Install the library
Install If your system has both Python 2 and Python 3 installed, use If you already have a previous version of
gbmplus from the Python Package Index using pip:pip3 to ensure the package is installed for Python 3:gbmplus installed and want to upgrade to the latest release, run:Obtain your credentials
The SDK requires three credentials to authenticate with GBM+:Keep all three values secret and never commit them to source control.
- USER_EMAIL — the email address you use to log in to GBM+.
- USER_PASSWORD — your GBM+ account password.
- CLIENT_ID — a client identifier associated with your GBM+ session.
Finding your CLIENT_ID: The
CLIENT_ID is not the same as your account or contract number. To find it, open the GBM+ login page in your browser, open the developer tools (F12), go to the Network tab, and log in. Inspect the POST request sent to auth.gbm.com — the clientid field in the request body is your CLIENT_ID. The project README also includes a screenshot showing exactly where to look.Set environment variables
The recommended way to supply credentials is through environment variables. The SDK reads Add these lines to your
USER_EMAIL, USER_PASSWORD, and CLIENT_ID from your shell environment at startup.- Linux / macOS
- Windows PowerShell
~/.bashrc, ~/.zshrc, or equivalent shell profile to persist them across sessions.Instantiate the client
Import the library and create a As soon as
GBMPlusAPI instance. A single object manages your entire session:GBMPlusAPI is instantiated, the SDK automatically:- Reads your credentials from the environment variables you set in the previous step.
- Authenticates against
https://auth.gbm.com/api/v1/session/userand stores your Bearer access token. - Fetches your primary contract ID from
https://api.gbm.com/v1/contracts, which is required by most subsequent API calls.
output_log=False suppresses creation of a log file on disk. You can omit this parameter (or set it to True) to keep a timestamped log of all API activity.Make your first API call
Retrieve the list of all your strategies (accounts) and print the result:You can also look up a single account by its strategy name. For example, to retrieve only the Smart Cash strategy:Both calls follow the
client.scope.operation() pattern — gbm is the client, accounts is the scope (module), and getAccounts() / getAccount() are the operations.