Created
February 28, 2024 07:43
-
-
Save multidis/24c131f27139570dd1ce75d18c523496 to your computer and use it in GitHub Desktop.
Coinbase Pro fills statement export does not work as of Feb 2024 (just in time for tax prep!). Infinite wheel on the front-end, 500 status response from the API. Old Pro API still works and allows exporting fills to compute taxable transactions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Problem | |
## https://www.reddit.com/r/CoinBase/comments/18b1oqe/comment/krtzg2n/ | |
## As a workaround, use old API (as of 2024-02) | |
## https://github.com/danpaquin/coinbasepro-python | |
## (Python 3.7) pip install cbpro | |
import json | |
import cbpro | |
# supply API credentials | |
auth_client = cbpro.AuthenticatedClient(key, secret, passphrase) | |
# modify product_id as needed | |
fills_gen = auth_client.get_fills(product_id="BTC-USD") | |
all_fills = list(fills_gen) | |
with open("fills.json", 'w') as outfile: | |
json.dump(all_fills, outfile) | |
## use fills.json to compute taxable transactions etc. Import into pandas if easier. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment