Get Spot Prices and Filter Coinbase Assets

4 months ago
25

This Python script retrieves cryptocurrency asset listings from both Binance and Coinbase, filters them to include only those with valid identifiers, and then fetches real-time USD spot prices for these shared assets using the Coinbase public API. It leverages direct requests calls to query prices, logs the entire process—including valid and invalid results—to a timestamped file, and calculates overall runtime for performance insights. The streamlined approach ensures you get a clear view of which assets are supported across both exchanges, their current USD values, and any potential issues during the retrieval process.

https://github.com/PythonCryptoDev369/trade/blob/cb1a6b1dbe11ab16b60abd7c92ad03e56607a70b/trade.py

BTC -> bc1qm9f4qt0fvmf08x9fq7kaw0jm9p470cvhvv9amj
ETH -> 0x168973848BC0f159f0cac1313564176002e4d93D
XRP -> rsCmjwyXKg4QjLFwKcNUnyc7nCr6m6ti22

Loading 4 comments...