DPosts: 15 · Reputation: 29
Hey everyone...
I'm stuck trying to figure out some old code that uses an outdated API. Here’s the snippet:
listfile="\n".join(f'wget -qO- https://chain.so/api/v2/get_tx_spent/BTC/{line.rstrip()[:]} > index.data' for line in myfile)
Can anyone help me understand what data this is pulling from a block explorer? Like, is it getting transaction hashes or all transactions for a specific wallet?
MrPosts: 401 · Reputation: 35
So, that v2 endpoint is no longer supported on chain.so. The `get_tx_spent` function was designed to get transactions tied to a specific address. It has been replaced by the `transactions` endpoint now.
You can check the API docs for more info. The old responses included transaction hashes and details like amounts and signatures too.
DPosts: 15 · Reputation: 29
Thanks a lot, that makes sense!
Now I can try to recreate that request using a different block explorer since chain.so wants $150 a month for access to their API key...
What a hassle!