1from coinbase.wallet.client
import Client
5api_key = os.getenv(
'COINBASE_API_KEY')
6api_secret = os.getenv(
'COINBASE_API_SECRET')
10 client = Client(api_key, api_secret)
11 accounts = client.get_accounts()
13 for account
in accounts[
'data']:
14 print(
"Fetching orders for account:", account[
'name'])
15 transactions = client.get_transactions(account[
'id'])
16 for transaction
in transactions[
'data']:
17 print(
"Order ID: ", transaction[
'id'],
18 "Amount: ", transaction[
'amount'][
'amount'],
19 "Currency: ", transaction[
'amount'][
'currency'])