Skip to content
  • Documentacion

Start Here

8
  • What’s TradeAdapter
  • How TradeAdapter works
  • Supported Platforms & Brokers
  • Requirements
  • Quick Start
  • Indicator vs Strategy
  • Strategy Example
  • Safety & Risk Disclaimer

Direct API

15
  • Overview
  • Binance Guide
  • Binance US Guide
  • Bybit Guide
  • MEXC Guide
  • Kucoin Guide
  • Kraken Guide
  • Coinbase Guide
  • OKX Guide
  • BingX Guide
  • Bitget Guide
  • Gate.io Guide
  • Alpaca Guide
  • Capital Guide
  • OANDA Guide

MetaTrader

6
  • Overview
  • MT4 Setup
  • MT5 Setup
  • TradingView Alerts
  • EA Settings
  • Symbol alignment

FAQ

7
  • Overview
  • Binance
  • Bybit
  • Bitget
  • TradingView
  • Metatrader
  • Other
View Categories
  • Home
  • Docs
  • Direct API
  • Coinbase Guide

Coinbase Guide

Coinbase Guide

Connect TradingView to Coinbase Spot using TradeAdapter’s direct API integration. This guide covers strategy-based alerts with the Message Generator.

Video walkthrough #

Coinbase + TradingView setup

1 — Create Coinbase API keys #

Coinbase uses the Coinbase Developer Platform (CDP) for API keys. Create a key with Trade permission and optionally restrict it to the TradeAdapter IP.

  1. Log in to Coinbase Developer Platform

    Go to the Coinbase Developer Platform (CDP) and sign in with your Coinbase account.

  2. Open API keys

    Navigate to Access → API keys and click to create a new API key.

  3. Configure the key

    In the Create API key dialog set: an API key nickname (e.g. TradeAdapter), the Portfolio (e.g. Default), Permission level to include Trade (View and Transfer as needed), and add Allowlist IPs with 35.75.198.16 so only TradeAdapter can use this key.

  4. Create & download

    Click Create & Download, complete 2-factor authentication with your CDP 2FA code, and save the JSON file. The file contains your API Key Name and Private Key — you will paste these into the alert message as coinbase_api_key and coinbase_api_secret.

  5. Optional: copy from the popup

    In the final popup you can copy the API Key Name and Private Key (they are also in the JSON). Read the warning and click Got it to finish. Never share the Private Key.

2 — Select the Coinbase symbol in TradingView #

Open TradingView and search for the symbol using the COINBASE prefix. Coinbase supports Spot only; ensure you pick a Spot symbol that exists on Coinbase (e.g. COINBASE:BTCUSD, COINBASE:ETHUSD).

Important

The {{ticker}} placeholder sends this exact symbol to Coinbase. The symbol must match a supported Spot product (e.g. BTC-USD, ETH-USDC). Check the Coinbase Spot Symbols list for Product ID, min size, and price step.

3 — Add your strategy #

This guide covers strategy alerts only. Load your Pine Script strategy onto the chart so it generates the trading signals.

Open Pine Editor, paste your strategy code, and click “Add to chart”. Open the Strategy Tester tab to confirm backtest results and that orders are generated.

Not sure if you have a strategy or an indicator? See Indicator vs Strategy. For indicator-based alerts on Coinbase, use the same message structure but set order_action and size manually; the Message Generator linked below is for strategy.

4 — Configure order size #

Coinbase enforces symbol-specific rules (min size, size step, price step). Configure your strategy’s position size so that {{strategy.order.contracts}} meets the symbol’s minimum and step. For Limit orders, ensure {{strategy.order.price}} respects the price step.

Reference

Coinbase Spot Symbols — Min Size, Size Step, Price Step per product.

5 — Create the TradingView alert #

Press Alt + A (or the alarm clock icon) to create a new alert on your strategy.

Strategy → one alert

Under Condition, select your strategy and set trigger to “Order fills only”. TradingView fills action, size, and price via {{strategy.order.action}}, {{strategy.order.contracts}}, and {{strategy.order.price}}.

Required: Webhook URL + Message

In Notifications, enable Webhook URL and paste your personal webhook from your TradeAdapter profile. Paste the JSON message (below) in the Message field. You can build it with the Coinbase Message Generator.

Alert message (Strategy) #

Use this template for strategy-based alerts. Replace the placeholder values with your API key and secret; keep the TradingView placeholders as-is.

Strategy → Coinbase Message
{
    "coinbase_api_key": "PUT YOUR COINBASE API KEY HERE",
    "coinbase_api_secret": "PUT YOUR COINBASE PRIVATE KEY HERE",
    "real_order": "No",
    "order_type": "Market",
    "order_market": "Spot",
    "exchange": "coinbase",
    "ticker": "{{ticker}}",
    "time": "{{timenow}}",
    "order_contracts": "{{strategy.order.contracts}}",
    "order_action": "{{strategy.order.action}}",
    "order_price": "{{strategy.order.price}}"
}

Open Coinbase Message Generator (Strategy)

Message fields explained #

Field Description
coinbase_api_key Your Coinbase API Key Name from CDP (from the JSON download or the creation popup).
coinbase_api_secret Your Coinbase Private Key from the JSON file. Store it securely and never share it.
real_order "Yes" sends real orders to Coinbase. "No" sends test orders via TradeAdapter only (no live trades).
order_type "Market" or "Limit". For Limit orders, order_price is used as the limit price.
order_market Must be "Spot" for Coinbase (Spot only).
exchange Must be "coinbase" so TradeAdapter routes the order to Coinbase.
ticker The TradingView symbol from {{ticker}} (e.g. COINBASE:BTCUSD).
time Alert time from TradingView ({{timenow}}).
order_contracts Position size from your strategy ({{strategy.order.contracts}}).
order_action "BUY" or "SELL". Use {{strategy.order.action}} for strategies.
order_price Price from the strategy ({{strategy.order.price}}), used for Limit orders.

6 — Execute & monitor #

  1. Start with test orders

    Set "real_order": "No" and trigger a few alerts. Check MyTrades to see how TradeAdapter interprets your signals.

  2. Verify on Coinbase

    When you set "real_order": "Yes", monitor your Coinbase account to confirm orders execute as expected.

  3. Recreate alerts after changes

    If you change strategy parameters or the message, delete and recreate the TradingView alert so the new values are applied.

Important notes #

🔑
API security — Never share your Private Key. Use a key with Trade permission only and no withdrawal rights. Restrict by IP (35.75.198.16) so only TradeAdapter can use the key.
🧮
Respect symbol specs — Check Coinbase Spot Symbols for min size, size step, and price step; test with small orders before scaling.
🔄
Recreate alerts after changes — If you change strategy parameters or message fields, delete and recreate the TradingView alert.
📈
Monitor MyTrades — Use TradeAdapter’s MyTrades to verify what orders are being sent.

Need a different exchange?
All setup guides
Updated on February 25, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Kraken GuideOKX Guide
Table of Contents
  • Video walkthrough
  • 1 — Create Coinbase API keys
  • 2 — Select the Coinbase symbol in TradingView
  • 3 — Add your strategy
  • 4 — Configure order size
  • 5 — Create the TradingView alert
  • Alert message (Strategy)
  • Message fields explained
  • 6 — Execute & monitor
  • Important notes
© 2026 • Built with GeneratePress