Skip to main content
RapidDev - Software Development Agency
retool-integrationsREST API Resource

How to Integrate Retool with Coinbase API

Connect Retool to the Coinbase API using a REST API Resource with OAuth 2.0 or API key and secret authentication. Point the resource at Coinbase's base URL, configure your credentials, then build queries against the accounts, transactions, and prices endpoints. The result is a crypto portfolio dashboard that shows real-time holdings, historical trades, and live price data for your team.

What you'll learn

  • How to configure a Coinbase API key or OAuth 2.0 application for server-side access
  • How to set up a REST API Resource in Retool pointed at Coinbase's API base URL
  • How to query accounts, transactions, and live crypto prices from Retool
  • How to build a portfolio value dashboard with Chart components using Coinbase data
  • How to use JavaScript transformers to calculate portfolio totals and format crypto amounts
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate16 min read30 minutesPaymentLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to the Coinbase API using a REST API Resource with OAuth 2.0 or API key and secret authentication. Point the resource at Coinbase's base URL, configure your credentials, then build queries against the accounts, transactions, and prices endpoints. The result is a crypto portfolio dashboard that shows real-time holdings, historical trades, and live price data for your team.

Quick facts about this guide
FactValue
ToolCoinbase API
CategoryPayment
MethodREST API Resource
DifficultyIntermediate
Time required30 minutes
Last updatedApril 2026

Build a Crypto Portfolio Management Dashboard in Retool

Coinbase provides one of the most accessible APIs in the crypto industry, offering endpoints for account balances, transaction history, buy/sell records, and live price feeds. For operations and finance teams that need to monitor organizational cryptocurrency holdings, a Retool dashboard connected to the Coinbase API is far more efficient than logging into the Coinbase web interface — especially when the portfolio data needs to sit alongside other financial data from Stripe, your accounting system, or a PostgreSQL database.

The most common internal tool use case is a read-only portfolio dashboard: a summary of all Coinbase accounts (Bitcoin, Ethereum, USDC, and other supported assets), their current native balances, and their USD equivalents calculated using live spot prices. A second Table or Chart can show the 30-day transaction history — buys, sells, sends, and receives — filtered by asset type or date range. This gives finance teams a real-time snapshot without granting full Coinbase account access to team members.

For organizations that programmatically manage crypto treasury — buying stablecoins when revenue comes in, or converting crypto received from customers — a Retool app can surface the full transaction ledger and trigger buy or sell operations via action buttons, with confirmation modals and audit logging to a connected database. Retool's server-side proxy ensures that Coinbase API credentials remain server-side even when the action buttons are exposed to internal users.

Integration method

REST API Resource

Coinbase's REST API exposes accounts, transactions, buys, sells, prices, and exchange rates through standard HTTP endpoints. Retool connects via a REST API Resource using either OAuth 2.0 (recommended for user-specific data) or API key plus secret authentication. Because Retool proxies all requests server-side, Coinbase credentials never reach the browser, eliminating CORS issues and protecting sensitive API secrets. A JavaScript transformer reshapes response data for Retool's Table, Chart, and Stat components.

Prerequisites

  • A Coinbase account (individual or organizational) with API access enabled
  • A Coinbase API key and secret generated from Coinbase Settings → API → New API Key, with the appropriate permission scopes selected (wallet:accounts:read, wallet:transactions:read, wallet:buys:read)
  • A Retool account with permission to create Resources
  • Basic familiarity with REST API concepts (base URLs, authentication headers, query parameters)
  • Understanding of which Coinbase accounts and assets your dashboard needs to display

Step-by-step guide

1

Generate a Coinbase API key with the correct permission scopes

Coinbase supports two authentication methods: API key plus secret (simpler, recommended for organizational accounts) and OAuth 2.0 (required for accessing data across multiple user accounts). For a single-organization portfolio dashboard, API key authentication is the right choice. Log in to your Coinbase account and navigate to Settings → API. Click New API Key. Give the key a descriptive name like 'Retool Portfolio Dashboard'. Under Permissions, select only the scopes your dashboard requires. For a read-only portfolio dashboard, enable: wallet:accounts:read (to list accounts and balances), wallet:transactions:read (to fetch transaction history), wallet:buys:read, and wallet:sells:read. If your Retool app needs to initiate transactions, additionally enable wallet:buys:create and wallet:sells:create — but only for apps used by authorized team members. Under Accounts, choose 'All' to access all wallets or select specific accounts. Complete the two-factor authentication step. Coinbase will display the API key and API secret only once at this point — copy both immediately and store them in a password manager. The API secret cannot be retrieved again; if lost, a new key must be generated. Note that Coinbase API keys also require a Client ID — this is visible on the API key detail page. You will need the API key, API secret, and the base URL https://api.coinbase.com for configuring the Retool resource.

Pro tip: Create a dedicated Coinbase API key for your Retool integration with the minimum required scopes rather than reusing an existing key. This makes it easy to revoke access independently if needed and provides a clear audit trail in Coinbase's API key management interface.

Expected result: A Coinbase API key and secret are generated with the wallet:accounts:read and wallet:transactions:read scopes, and both values are securely saved.

2

Configure the REST API Resource in Retool

In Retool, navigate to the Resources tab (the plug icon in the left sidebar or via the top navigation). Click Add Resource and select REST API from the resource type list. Give the resource a clear name like 'Coinbase API'. Set the Base URL to https://api.coinbase.com. For authentication, Coinbase's API key authentication uses a combination of headers that must be sent with every request: CB-ACCESS-KEY (your API key), CB-ACCESS-TIMESTAMP (current Unix timestamp), CB-ACCESS-SIGN (HMAC-SHA256 signature of timestamp + method + path + body), and CB-VERSION (API version date). Because the CB-ACCESS-SIGN header requires a computed HMAC signature that changes per request, you cannot configure it as a static header in the resource. Instead, configure the resource with the static headers: add CB-ACCESS-KEY as a default header with your API key value, and CB-VERSION with the value 2016-02-18. Store your API secret in a Retool Configuration Variable named COINBASE_API_SECRET (Settings → Configuration Variables, mark as secret). The CB-ACCESS-TIMESTAMP and CB-ACCESS-SIGN headers must be computed per-request using a JavaScript query or transformer. For simpler testing, note that Coinbase's prices and exchange rates endpoints are public and do not require authentication — begin with those to verify connectivity before adding auth header computation to your main queries. Click Save Resource after configuring the base URL and static headers.

coinbase_headers.js
1// JavaScript query to compute Coinbase HMAC signature headers
2// Run this before authenticated queries and reference its output
3const timestamp = Math.floor(Date.now() / 1000).toString();
4const method = 'GET';
5const path = '/v2/accounts';
6const body = '';
7const message = timestamp + method + path + body;
8
9// Note: Use Retool's built-in crypto or a Workflow for HMAC computation
10// This pattern runs as a JavaScript query to generate headers dynamically
11return {
12 'CB-ACCESS-KEY': retoolContext.configVars.COINBASE_API_KEY,
13 'CB-ACCESS-TIMESTAMP': timestamp,
14 'CB-ACCESS-SIGN': '{{ computedSignature }}',
15 'CB-VERSION': '2016-02-18'
16};

Pro tip: Coinbase's spot price endpoints (GET /v2/prices/{currency_pair}/spot) require no authentication and are an excellent way to test that your resource base URL is correctly configured before setting up authenticated requests for account data.

Expected result: The Coinbase API resource is configured in Retool with the correct base URL and API key header. Test queries to /v2/prices/BTC-USD/spot return the current Bitcoin price without authentication errors.

3

Build queries for accounts and live prices

With the resource configured, create the core data queries your dashboard needs. In the Retool app editor, open the Code panel and create a new query named 'getAccounts'. Select the Coinbase API resource. Set Method to GET and Path to /v2/accounts. Add URL parameters: limit → 100 (to retrieve all accounts in one call). To handle the HMAC authentication requirement, create a preceding JavaScript query named 'computeAuthHeaders' that generates the timestamp and signature. In practice for read-only dashboards, many teams use a Retool Workflow running on a schedule to fetch and cache account data into a Retool Configuration Variable or Retool Database table, which sidesteps the per-request HMAC requirement. For live price queries, create a query named 'getBtcPrice'. Set Method to GET and Path to /v2/prices/BTC-USD/spot — this endpoint requires no authentication. Duplicate this query for ETH-USD, SOL-USD, and any other assets your dashboard tracks. Create a JavaScript query named 'calculatePortfolioValue' that references the getAccounts and price queries: it maps each account's native balance to the corresponding spot price and computes total USD portfolio value. Add a transformer to getAccounts that normalizes the paginated response — Coinbase wraps results in a data array with a pagination object. The transformer should return data.data mapped to cleaner objects with id, name, currency.code, balance.amount, and balance.currency.

accounts_transformer.js
1// Transformer: normalize Coinbase accounts response
2const accounts = data.data || [];
3return accounts
4 .filter(account => parseFloat(account.balance.amount) > 0)
5 .map(account => ({
6 id: account.id,
7 name: account.name,
8 currency: account.currency.code,
9 balance: parseFloat(account.balance.amount).toFixed(8),
10 balance_currency: account.balance.currency,
11 native_balance: parseFloat(account.native_balance.amount).toFixed(2),
12 native_currency: account.native_balance.currency,
13 updated_at: new Date(account.updated_at).toLocaleDateString()
14 }));

Pro tip: Set the getAccounts query to run on page load and configure an auto-refresh interval of 60 seconds for the price queries. Coinbase's API rate limits are 10,000 requests per hour for authenticated endpoints — periodic refresh of prices and account data is well within this limit.

Expected result: The getAccounts query returns a normalized list of Coinbase accounts with balances, and price queries return current spot prices for each tracked cryptocurrency.

4

Build transaction history queries with filtering

Transaction history is queried per account through Coinbase's paginated transactions endpoint. Create a query named 'getTransactions'. Set Method to GET and Path to /v2/accounts/{{ accountsTable.selectedRow.id }}/transactions. Add URL parameters: limit → {{ paginationComponent.pageSize || 50 }}, starting_after → {{ paginationComponent.page > 1 ? lastTransactionId.value : '' }}, expand[] → buy, expand[] → sell. The expand parameter hydrates buy and sell objects inline, avoiding separate API calls to retrieve transaction details. Create a transformer named 'normalizeTransactions' that maps the response data array. Each transaction object contains type (buy, sell, send, receive, trade), amount (native crypto), native_amount (in USD or local currency), created_at, and status. The transformer should humanize these: format the date, convert amounts to readable numbers, capitalize the type, and add a color property based on transaction type (green for buy/receive, red for sell/send). Add a Select component named 'txTypeFilter' with options for All, buy, sell, send, receive. Modify the transformer to filter by txTypeFilter.value when it is not empty. Add a DatePicker component named 'txDateRange' and filter transactions where new Date(tx.created_at) falls within the selected range. For the initial implementation, fetch the most recent 50 transactions per account and filter client-side in the transformer — this avoids the complexity of Coinbase's cursor-based pagination while still showing meaningful history for most accounts.

transactions_transformer.js
1// Transformer: normalize and filter Coinbase transactions
2const transactions = data.data || [];
3const typeFilter = txTypeFilter.value;
4const dateStart = txDateRange.value?.[0] ? new Date(txDateRange.value[0]) : null;
5const dateEnd = txDateRange.value?.[1] ? new Date(txDateRange.value[1]) : null;
6
7const TYPE_COLORS = {
8 buy: 'green', sell: 'red', send: 'orange',
9 receive: 'blue', trade: 'purple'
10};
11
12return transactions
13 .filter(tx => !typeFilter || tx.type === typeFilter)
14 .filter(tx => {
15 if (!dateStart || !dateEnd) return true;
16 const d = new Date(tx.created_at);
17 return d >= dateStart && d <= dateEnd;
18 })
19 .map(tx => ({
20 id: tx.id,
21 type: tx.type.charAt(0).toUpperCase() + tx.type.slice(1),
22 amount: `${parseFloat(tx.amount.amount).toFixed(8)} ${tx.amount.currency}`,
23 usd_value: `$${parseFloat(tx.native_amount.amount).toFixed(2)}`,
24 status: tx.status,
25 date: new Date(tx.created_at).toLocaleString(),
26 color: TYPE_COLORS[tx.type] || 'gray'
27 }));

Pro tip: For complex integrations combining Coinbase portfolio data with transaction history, internal database reconciliation, and multi-account management across multiple Coinbase accounts, RapidDev's team can help architect and build your Retool crypto operations solution.

Expected result: Selecting an account in the accounts table populates a transaction history table filtered by type and date range, showing normalized crypto amounts and USD equivalents.

5

Build the portfolio dashboard UI

Assemble the Retool dashboard using the queries built in the previous steps. At the top, add a row of Stat components: one for Total Portfolio Value (reference the calculatePortfolioValue JavaScript query output), one for Number of Accounts ({{ getAccounts.data.length }}), and one for Today's Date. Below the stats, add a Table component named 'accountsTable' with Data set to {{ getAccounts.data }}. Configure columns: Currency (tag-styled with the currency code as the label), Balance, USD Value, and Last Updated. Enable row selection on this table — selecting a row will trigger the getTransactions query to load that account's transaction history. In the right panel or lower section, add a second Table named 'transactionsTable' with Data bound to {{ normalizeTransactions.data }}. Add a Select component for transaction type filtering and a DateRangePicker for date filtering above this table. Add a Pie Chart to the right of the accounts table showing portfolio allocation by asset: use the getAccounts.data as the dataset with currency as the category field and native_balance as the value field. Add a Refresh button at the top right that triggers all data queries simultaneously using event handlers. Use Retool's conditional column formatting on the transactionsTable to color the 'type' column based on the transaction type — green for Buy and Receive, red for Sell and Send.

Pro tip: Add a 'Copy Account ID' button in the accounts table row actions that copies the Coinbase account ID to clipboard using Retool's copyToClipboard() utility. This is useful when team members need to reference the account ID for other operations or API calls.

Expected result: A complete portfolio dashboard displays all Coinbase accounts with balances and USD values, a pie chart of asset allocation, and a filterable transaction history that updates when a different account is selected.

Common use cases

Build a crypto portfolio summary dashboard for the finance team

Create a Retool dashboard that lists all Coinbase accounts with their native asset balances and USD equivalents. Include a summary stat bar showing total portfolio value, a Chart of portfolio composition by asset, and a date-range selector for filtering the transaction feed. Allow finance team members to view holdings without accessing the Coinbase account directly.

Retool Prompt

Build a Retool dashboard connected to Coinbase API. Show all accounts in a Table with columns: currency, native balance, USD value. Add a Stat component showing total portfolio USD value. Add a Pie Chart showing asset allocation. Below that, show a Table of recent transactions filterable by account and date.

Copy this prompt to try it in Retool

Build a transaction audit log panel for accounting reconciliation

Create a Retool panel that pulls all transactions across all Coinbase accounts for a selected date range, shows the type (buy, sell, send, receive), asset, native amount, USD amount at time of transaction, and a notes field. Export the filtered view to CSV for accounting system import. Combine with your internal PostgreSQL order table to reconcile crypto payments against sales records.

Retool Prompt

Build a Retool transaction audit panel for Coinbase. A date range picker filters transactions. A Select component filters by transaction type (buy/sell/send/receive). Show results in a Table with currency, type, amount, USD value, and timestamp. Include a CSV export button.

Copy this prompt to try it in Retool

Build a live crypto price monitor with exchange rate alerts

Create a Retool app that displays live spot prices for Bitcoin, Ethereum, and other tracked currencies against USD, EUR, and GBP. Refresh prices automatically every 30 seconds using Retool's query interval setting. Add conditional formatting to highlight assets that have moved more than 5% from a baseline stored in a Configuration Variable, giving the ops team instant visibility into significant market movements.

Retool Prompt

Build a Retool price monitor using Coinbase's prices API. Show a Table of spot prices for BTC, ETH, SOL, USDC against USD. Configure the query to auto-refresh every 30 seconds. Add conditional row coloring: green if price is above baseline, red if below. Include a Chart showing 24h price trend using historical price data.

Copy this prompt to try it in Retool

Troubleshooting

401 Unauthorized on authenticated Coinbase API requests — 'invalid api key'

Cause: The CB-ACCESS-KEY header is missing, the API key has been revoked, or the API key was generated for a different account environment. Coinbase also returns 401 if the HMAC signature headers are missing entirely.

Solution: Verify that the CB-ACCESS-KEY header is correctly set in the Retool resource's default headers section. Check that the API key is still active in Coinbase Settings → API — revoked or expired keys must be regenerated. Ensure you are using the API key (not the API secret) as the value of CB-ACCESS-KEY. For public endpoints like /v2/prices/{pair}/spot, no authentication headers are required — test these first to confirm basic resource connectivity.

403 Forbidden — 'two-factor authentication required' or 'missing permission'

Cause: The API key was not granted the required permission scope, or the Coinbase account has 2FA restrictions on API access that block programmatic calls without a 2FA step.

Solution: Navigate to Coinbase Settings → API, select your API key, and verify that the required scopes (wallet:accounts:read, wallet:transactions:read) are enabled. If the scope list shows the correct permissions, check whether your Coinbase account has additional security policies that restrict API usage. Generate a new API key with explicit scope selection, completing the 2FA challenge during key creation. Ensure the api key has access to the 'All' accounts option and not a restricted account subset.

Empty accounts list returned — no accounts display in the Retool table

Cause: The getAccounts query returns a paginated response where accounts with zero balances may be filtered out by the transformer, or the API key was scoped to specific accounts rather than 'All'.

Solution: Remove the balance filter from the transformer temporarily to see all accounts including zero-balance ones: comment out the .filter(account => parseFloat(account.balance.amount) > 0) line. If accounts appear without the filter, the issue is that your test accounts have zero balances. If no accounts appear at all, regenerate the API key with 'All' accounts access rather than individual account selection. Also verify the URL parameter limit is set to 100 to retrieve all accounts in a single response.

typescript
1// Temporarily remove balance filter to debug empty accounts
2const accounts = data.data || [];
3return accounts.map(account => ({
4 id: account.id,
5 name: account.name,
6 currency: account.currency.code,
7 balance: parseFloat(account.balance.amount).toFixed(8),
8 native_balance: parseFloat(account.native_balance.amount).toFixed(2)
9}));

Price queries return stale data or always show the same value

Cause: Retool's query caching is enabled with a long cache duration, causing the price query to return cached results rather than fetching fresh spot prices from Coinbase.

Solution: In the price query settings, navigate to the Advanced tab and set the cache duration to 0 to disable caching, or to 30 seconds for a reasonable refresh interval. Alternatively, enable 'Run query on interval' in the query settings and set the interval to 30000 milliseconds (30 seconds). Coinbase's spot price endpoint updates frequently and caching for longer than 60 seconds will show meaningfully stale crypto prices.

Best practices

  • Generate dedicated Coinbase API keys for each Retool app with the minimum required scopes — read-only dashboards should never have wallet:buys:create or wallet:sells:create scopes
  • Store Coinbase API key and secret in Retool Configuration Variables marked as secrets rather than as plain text resource headers — secrets are restricted to resource configurations and never exposed to the browser
  • Use Retool Workflows for any write operations (buy, sell) with approval logic that logs the action, the requesting user, and the timestamp to a Retool Database table before executing the Coinbase API call
  • Configure auto-refresh intervals on price queries (30-60 seconds) while keeping account balance queries on a longer interval (5 minutes) to stay well within Coinbase's 10,000 requests per hour rate limit
  • Add confirmation Modal components to any buy or sell action buttons — crypto transactions are irreversible and the confirmation step protects against accidental clicks
  • Implement client-side filtering and sorting in transformers rather than making additional API calls for each filter change — Coinbase's paginated responses work best when fetched once and filtered in memory for typical portfolio sizes
  • Display USD values alongside native crypto amounts in all tables and charts — internal stakeholders need dollar values, not just BTC or ETH quantities, for financial reporting
  • Use Retool's built-in number formatting to display crypto balances with 8 decimal places (satoshi precision) and USD values with 2 decimal places to maintain accuracy while keeping the UI readable

Alternatives

Frequently asked questions

Does Retool have a native Coinbase connector?

No, Retool does not have a native Coinbase connector. You connect via a REST API Resource using Coinbase's versioned REST API. The setup takes about 30 minutes and gives you access to all Coinbase API endpoints including accounts, transactions, prices, and exchange rates. Retool's server-side proxy handles all requests, keeping your API credentials secure.

How do I handle Coinbase's HMAC signature requirement in Retool?

Coinbase's authenticated endpoints require a CB-ACCESS-SIGN header containing an HMAC-SHA256 signature computed from the request timestamp, HTTP method, path, and body. In Retool, implement this as a JavaScript query that runs before your authenticated queries, computing the signature using a Retool Workflow or JavaScript. For read-only portfolio dashboards, another approach is to use a Retool Workflow running on a schedule to cache account data into a Retool Database table, eliminating per-request signature computation from the app layer.

Can I use Retool to trigger Coinbase buy or sell orders?

Yes, with appropriate API key scopes (wallet:buys:create, wallet:sells:create) and by configuring your Retool app with confirmation modals and access controls. Best practice is to route these write operations through a Retool Workflow with an approval step and audit logging rather than triggering them directly from app buttons, given the irreversible nature of crypto transactions.

What Coinbase API rate limits should I be aware of when building Retool dashboards?

Coinbase's API enforces 10,000 requests per hour for authenticated endpoints and stricter limits on some endpoints. For a typical portfolio dashboard with 5-10 team members, configure price queries to auto-refresh every 60 seconds and account queries every 5 minutes. This keeps total request volume well within limits. If you receive 429 rate limit responses, add longer refresh intervals to your queries and consider caching frequently-read data in a Retool Database table.

Can I connect multiple Coinbase accounts to a single Retool dashboard?

Yes, by creating multiple REST API Resources in Retool — one per Coinbase account, each with its own API key. In the dashboard UI, use a Select component to let users choose which account they are viewing, and reference the selected resource dynamically using Retool's resource switching. Alternatively, if all accounts belong to the same Coinbase organization, a single API key with 'All' accounts access returns all account balances through one request.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Retool integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.