This example demonstrates how to move funds between two GBM+ strategies usingDocumentation 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.
gbm.transfers.transfer(). A common use case is sweeping idle cash from the Smart Cash strategy into an active investment strategy — the SDK makes this a single function call once you have the origin and target account IDs.
Prerequisites
Before running this example, make sure you have:- An authenticated GBM+ session (valid email, password, and
client_idconfigured — see the quickstart) - The name of the origin strategy (this example uses
'Smart Cash') - The name of the target strategy you want to fund
Full example
The complete script below fetches all accounts, resolves the origin and target account IDs by strategy name, and executes the transfer.Step-by-step walkthrough
Instantiate the client
Create a On instantiation the SDK automatically authenticates your session and fetches your main contract ID. Credentials are read from the environment variables
GBMPlusAPI instance. Setting output_log=False skips writing a log file to disk — useful for quick scripts.GBM_USER_EMAIL, GBM_USER_PASSWORD, and GBM_CLIENT_ID (or passed directly as constructor arguments).Fetch all accounts and build a name-keyed dictionary
getAccounts() returns a list of account objects, each representing one of your GBM+ strategies. Wrapping the list in a dict keyed by "name" lets you look up accounts by their human-readable strategy name.Look up the origin (Smart Cash) and target account
Use The guard
.get() on the dictionary to retrieve each account object. Replace 'NAME OF YOUR STRATEGY' with the exact name of your target strategy as it appears in the GBM+ app.if smart_cash_account and target_account prevents the transfer from running if either strategy name isn’t found.Parameters
The amount in MXN pesos to transfer from the origin strategy to the target strategy.
The
account_id of the strategy from which funds will be withdrawn. Retrieve this value from the account object returned by getAccounts() or getAccount().The
account_id of the strategy that will receive the funds. Same source as origin_account_id.Getting account IDs
Account IDs are not static strings you hard-code — they are fetched at runtime from the API. BothgetAccounts() (returns all strategies as a list) and getAccount(name) (returns a single strategy by name) expose the account_id field:
Strategy names are case-sensitive and must match exactly what is shown in your GBM+ dashboard. If
accounts_dict.get('Smart Cash') returns None, double-check the name against the output of getAccounts().