Skip to content

Instantly share code, notes, and snippets.

View rhettre's full-sized avatar

Rhett Reisman rhettre

View GitHub Profile
@rhettre
rhettre / coinbase_deposits.py
Last active May 4, 2025 23:49
This Python script contains an AWS Lambda function designed to automate deposits into Coinbase accounts. It was created in response to the retirement of the Coinbase Pro API, which previously facilitated deposit automation. The script leverages the Coinbase Wallet API to list payment methods and initiate deposits in USD. Users can customize the …
import json
import hmac
import hashlib
import time
import requests
from requests.auth import AuthBase
import os
with open(os.path.join(os.path.dirname(__file__), 'config.json')) as config_file:
config = json.load(config_file)
@rhettre
rhettre / coinbase_withdrawals.py
Last active January 31, 2025 21:20
This Python script contains an AWS Lambda function designed to automate withdrawals from Coinbase accounts. It was created in response to the retirement of the Coinbase Pro API, which previously facilitated withdrawal automation. The script leverages the Coinbase Wallet API to list payment methods and initiate crypto withdrawals. Users can custo…
import json
import hmac
import hashlib
import time
import requests
from requests.auth import AuthBase
import os
with open(os.path.join(os.path.dirname(__file__), 'config.json')) as config_file:
config = json.load(config_file)
@rhettre
rhettre / coinbase_config.json
Created April 1, 2023 22:21
Sample config.json for Coinbase Withdrawals and Deposits
{
"API_KEY": "",
"API_SECRET": "",
"DEPOSIT_ID": "",
"PAYMENT_METHOD": "",
"DEPOSIT_AMOUNT": 10,
"DEPOSIT_CURRENCY": "USD",
"BTC_ADDRESS": "",
"WITHDRAW_CURRENCY": "BTC",
"WITHDRAWAL_ID": "",
@rhettre
rhettre / coinbase_advanced_trade_sheet.py
Last active April 18, 2025 01:49
Automates the import of Coinbase transactions into a Google Sheet for cost basis tracking.
import json
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime, timezone
from coinbase_advanced_trader import coinbase_client
from coinbase_advanced_trader.config import set_api_credentials
# Link to Base Spreadsheet - https://docs.google.com/spreadsheets/d/1VYuy5cSnZiQqF4yp6_sVFpLXXXszCGEiMh-Z37mKims/edit?usp=sharing
COINBASE_PUBLIC_KEY = ''
COINBASE_PRIVATE_KEY = ''