MCPcopy
hub / github.com/danpaquin/coinbasepro-python / get_account

Method get_account

cbpro/authenticated_client.py:43–61  ·  view source on GitHub ↗

Get information for a single account. Use this endpoint when you know the account_id. Args: account_id (str): Account id for account you want to get. Returns: dict: Account information. Example:: { "id": "a1b2c3d

(self, account_id)

Source from the content-addressed store, hash-verified

41 self.session = requests.Session()
42
43 def get_account(self, account_id):
44 """ Get information for a single account.
45
46 Use this endpoint when you know the account_id.
47
48 Args:
49 account_id (str): Account id for account you want to get.
50
51 Returns:
52 dict: Account information. Example::
53 {
54 "id": "a1b2c3d4",
55 "balance": "1.100",
56 "holds": "0.100",
57 "available": "1.00",
58 "currency": "USD"
59 }
60 """
61 return self._send_message('get', '/accounts/' + account_id)
62
63 def get_accounts(self):
64 """ Get a list of trading all accounts.

Callers 2

get_accountsMethod · 0.95
test_get_accountsMethod · 0.80

Calls 1

_send_messageMethod · 0.80

Tested by 1

test_get_accountsMethod · 0.64