'How to get a list of Coinbase CryptoCurrency Coins

I've been trying to figure out a way to get a list of all the Coins that Coinbase has listed (not necessarily for trade) but can't figure it out, in the early days it was easy as you could just login and see the list of 4 basic coins that were supported (and could hard code those values in a program and/or script).

But now they have a list of many coins listed, some as I understand, which are not available to actually trade but are listed for educational purposes (as stated on their site when looking at such coins).

I was wondering if anyone has figured out a way to get a list those coins (all supported and simply listed) perhaps with a tag of which are actually supported for trade.

I looked at the API and the REST API (using a simple GET request over HTTPS or using cURL for testing) has the following endpoints:

curl https://api.coinbase.com/v2/currencies - This lists all the Fiat currencies.

and:

curl https://api.pro.coinbase.com/products - This lists all the supported trading pairs (which is not what I'm looking for....)

Any ideas, short of logging in and parsing the html? (which could break since the site can be reformatted etc at any time).

Any help would be greatly appreciated!



Solution 1:[1]

perhaps not really what you asked, but you could also use https://api.pro.coinbase.com/currencies

import requests
import json

uri = 'https://api.pro.coinbase.com/currencies'
response = requests.get(uri).json()

for i in range(len(response)):
    if response[i]['details']['type'] == 'crypto':
        print(response[i]['id])

This will return the coins available for trading.

Solution 2:[2]

The following code:

import requests
    
uri = 'https://api.pro.coinbase.com/currencies'
response = requests.get(uri).json()

for i in range(len(response)):
    if response[i]['details']['type'] == 'crypto':
        print(response[i]['id'])

Will provide this output:

COTI
BTC
ETH
LTC
BCH
ZEC
XTZ
XRP
XLM
EOS
ALGO
DASH
ATOM
CGLD
FIL
ADA
ICP
SOL
DOT
DOGE
OXT
KNC
MIR
REP
COMP
NMR
ACH
BAND
ZRX
BAT
LOOM
UNI
YFI
LRC
CVC
DNT
MANA
GNT
REN
LINK
BAL
ETC
USDC
RLC
DAI
WBTC
NU
AAVE
SNX
BNT
GRT
SUSHI
MLN
ANKR
CRV
STORJ
SKL
AMP
1INCH
ENJ
NKN
OGN
FORTH
GTC
TRB
CTSI
MKR
UMA
USDT
CHZ
SHIB
BOND
LPT
QNT
KEEP
CLV
MASK
MATIC
OMG
POLY
FARM
FET
PAX
RLY
PLA
RAI
IOTX
ORN
AXS
QUICK
TRIBE
UST
REQ
TRU
WLUNA

Solution 3:[3]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NemoMeMeliorEst
Solution 2 Flair
Solution 3 soko8