Coinbase smart home integration, free and open source

Your Coinbase wallets, their value and the crypto exchange rates in Gladys (view-only key).
Follow your Coinbase account in Gladys: the balance of each wallet, its value in your currency, the total of the account, and the exchange rates you choose (BTC, ETH, SOL…).
The account is read with a view-only API key: the integration can see balances, never trade, send or withdraw anything. Without a key, only the public exchange rates are read. Not affiliated with Coinbase.
Developed without a Coinbase account: the integration was tested against the public rates of Coinbase and a simulation of its account API that follows the documentation (signed requests checked). Feedback welcome.
What you get
- One device per non-empty wallet (
Coinbase BTC Wallet): balance (available plus on hold) and value in the valuation currency, with their history. - One total device: the value of the whole account.
- One device per followed rate (
BTC/EUR (Coinbase)): one unit of the currency in the other. - A dashboard widget: the total, the wallets with their value, the followed rates. Each block can be hidden.
- A scene trigger: the balance of a wallet changed (deposit, purchase, sale, reward, withdrawal).
- Two scene actions: read the account as a sentence, read any rate.
Requirements
- Gladys Assistant 5.1 or later.
- Internet access from the Gladys host (the integration reads
api.coinbase.com). - For the account: a Coinbase account and a view-only API key (below). The rates need nothing.
Configuration
Create a view-only API key
- Open the Coinbase Developer Platform, signed in with your Coinbase account, then API keys → Secret API keys → Create API key.
- Give it a name (
Gladys), choose the portfolio to read, and tick View only. Never Trade, never Transfer: Gladys does not need them, and the integration refuses a key that has them. - Choose the ECDSA signature algorithm: the Coinbase App documentation asks for it. An Ed25519 key is accepted too (the official Coinbase SDK signs with it), without guarantee.
- Copy the key name
organizations/…/apiKeys/…(or the ID, a UUID, of an Ed25519 key) and the private key, shown only once. You can also download the JSON file and paste its whole content as private key.
The integration will never need more than View: a key that can move funds would be a risk if your Gladys were ever compromised.
Settings
| Setting | What it does |
|---|---|
| API key name | organizations/…/apiKeys/… (ECDSA), or the ID (UUID) of an Ed25519 key. Empty: rates only. |
| API private key | The secret of the key (the whole PEM block, or Ed25519 in base64), or the downloaded JSON file. |
| Valuation currency | EUR, USD, GBP, CHF, CAD, AUD or JPY: the wallets and the total are valued in it. EUR by default. |
| Followed rates | Separated by commas, 20 at most: BTC (in the valuation currency), ETH-USD, BTC-ETH. |
| Refresh interval | 1 to 60 minutes (5 by default). |
| Language | Names of the features (at their creation) and texts sent to the scenes. French by default. |
Save, then open the Discover tab of the integration and create the devices you want. The Test the key and read the account button reads everything at once and says what the key can see.
Devices
| Device | Feature | Unit |
|---|---|---|
| Wallet | Balance | bitcoin, ethereum, litecoin, dogecoin, euro, dollar, pound, else none |
| Wallet | Value | the valuation currency (euro, dollar, pound, else none) |
| Total | Total value | the valuation currency |
| Followed rate | Rate | the quote currency |
A wallet emptied after its creation goes on showing 0. Changing the valuation currency changes the unit of
the values (Gladys proposes to update the devices) and creates new rate devices (BTC/USD is not
BTC/EUR).
Dashboard widget
Add the Coinbase widget to a dashboard. It shows the total, the wallets largest first (8 at most, the name given in Gladys once created; tap a row for the available balance, the amount on hold and the rate) and the followed rates. In the widget settings, Blocks shown hides the total, the wallets or the rates: keep only the rates on a screen visitors can see.
Scene trigger
Coinbase: balance changed, with two optional filters: the direction (goes up, goes down) and the currency
(BTC). Variables: currency, wallet name, change in the currency, new balance, change and new value in the
valuation currency, and a ready-made sentence. The currency filter is written in capitals (BTC, not btc). The balances are kept in the integration's storage, so a
change made while Gladys was stopped is reported once at the restart. The first reading of a key is the
starting point and fires nothing.
Scene actions
- Coinbase: read the account: the total and each wallet as one sentence, the total as a number.
- Coinbase: read a rate: any rate, followed or not (
SOL,ETH-USD), as a number and a sentence.
Scene examples
- When the BTC balance goes up, send a message with the variable "Sentence to send or read".
- Every Monday at 8:00, read the account aloud with the "read the account" action.
- When the BTC/EUR rate goes above 60,000, send a message (a condition on the rate device).
Privacy and security
- The private key is a secret field: Gladys never shows it again. The integration never writes it to its logs nor to its storage.
- Its storage (
/data) only keeps a hash of the key name and the last balance of each wallet. - Only three addresses of
api.coinbase.comare read: the exchange rates, the key permissions and the wallets. Nothing is ever written to Coinbase. - A key that can trade or transfer is refused, and the account is not read with it.
Data source, terms and limits of use
The data comes from the Coinbase API: the public exchange rates of the
Coinbase App (/v2/exchange-rates, 10,000 requests an hour per address) and the Advanced Trade account
endpoints (30 requests a second per key). A reading makes one request per quote currency, plus two signed
ones with a key: far below the limits. The rates are indicative, not for trading. Use subject to the
Coinbase terms. Not affiliated with Coinbase.
Troubleshooting
- "Coinbase refuses the API key": check the key name (the full ID) and the private key, and that the key was not deleted. The clock of the Gladys host must be on time (the signature is valid two minutes).
- "This API key can trade or transfer funds": create a new key with View only.
- "The API key cannot be read": paste the private key again, whole; pasting the JSON file works too.
- A wallet is missing: only the non-empty wallets of the portfolio chosen for the key are offered.
- A value shows "–": Coinbase gives no rate for this currency in the valuation currency; the total does not count it.
- Detailed logs: set
LOG_LEVEL=debugon the integration.
Limits
- One portfolio: the one the key was created for.
- Staked amounts and assets outside the Coinbase App wallets (Coinbase Wallet app, vaults of other portfolios) are not counted.
- No order, no history of transactions, no price alert of its own (use a scene condition on a rate device).
- Developed without a Coinbase account: feedback welcome on the forum or in the issues.
Configuration settings
These are the settings Coinbase asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| View-only API key | section | No | Optional: without a key, only the exchange rates are read. In the CDP portal, create a Secret API key (ECDSA) with the View permission only, never Trade nor Transfer: a key that can trade or transfer is refused. |
| API key name | string | No | The key name organizations/…/apiKeys/… of an ECDSA key (recommended), or the ID of an Ed25519 key. |
| API private key | secret | No | The secret shown once at creation (the whole EC PEM block of an ECDSA key, or Ed25519 in base64). The downloaded JSON file can be pasted too. |
| Valuation currency | select | No | The wallets and the total are valued in this currency, at the Coinbase rate. |
| Followed rates | string | No | Separated by commas, 20 at most: BTC (in the valuation currency), ETH-USD, BTC-ETH. One device each. |
| Refresh interval | select | No | A few requests per reading, far below the Coinbase limits. |
| Language of the texts | select | No | Names of the features (at their creation) and texts sent to the scenes. |
How to install Coinbase in Gladys
- In Gladys, open Integrations: Coinbase appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-coinbase:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-coinbase.
Coinbase requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Coinbase is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation