From 6d774711534204e283973c1e4637f6e6a4e6c093 Mon Sep 17 00:00:00 2001 From: Afiz Momin Date: Fri, 8 Mar 2024 18:28:17 -0800 Subject: [PATCH] fix: retrieve all the wallets in the account 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()