From f5319e4241994c7ac2b017fca5bcfe79ffe86c44 Mon Sep 17 00:00:00 2001 From: Afiz Momin Date: Mon, 26 May 2025 03:38:22 -0700 Subject: [PATCH] fix: retrieve all the wallets in the account (#842) The default page size of 50 records may miss the wallet with funds which results in 'Insufficient funds' error. Currently, Coinbase list around 70 wallets and using maximum page size of 250 avoid the funds error. However, this is a temporary fix; until they add more than 250 wallets. This is an edge case as well and the error is only seen when a user has selected all the wallets when creating an API keys. --- models/exchange/coinbase/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/exchange/coinbase/api.py b/models/exchange/coinbase/api.py index b7d72812..980e8544 100644 --- a/models/exchange/coinbase/api.py +++ b/models/exchange/coinbase/api.py @@ -117,7 +117,7 @@ def get_accounts(self) -> pd.DataFrame: # GET /api/v3/brokerage/accounts try: - df = self.auth_api("GET", "api/v3/brokerage/accounts") + df = self.auth_api("GET", "api/v3/brokerage/accounts", "limit=250") except Exception: return pd.DataFrame()