Skip to main content
Base URL: https://sandbox.cdp.coinbase.com

Prerequisites

Before you begin, make sure you have:
  • A CDP account with access to the CDP Portal
  • A terminal with cdpcurl installed (or Postman)

1. Create Sandbox API keys

1

Access CDP Portal Sandbox

Navigate to the CDP Portal Sandbox
2

Select your project

Choose the project you want to create Sandbox credentials for
3

Create Sandbox API key

  • Go to API Keys section
  • Click Create API Key
  • Select Sandbox as the environment
  • Choose appropriate permissions (Accounts, Transfers, Payment Methods, etc.)
  • Download the API key JSON file and save it securely
Important:
  • Never commit API keys to version control. Store them securely in environment variables or a secrets manager.
  • Do not use real personal data in the Sandbox environment.

2. Install cdpcurl

cdpcurl is a command-line tool that handles JWT authentication automatically—just point it at your downloaded API key file and it takes care of signing requests for you. Install via Homebrew:
brew tap coinbase/cdpcurl    # Add the CDP tap to Homebrew
brew install cdpcurl          # Install the tool
Or install via Go:
go install github.com/coinbase/cdpcurl@latest
Set your API key path:
export CDP_API_KEY=~/Downloads/cdp_api_key.json
This lets you use $CDP_API_KEY in all commands instead of typing the full path each time.

3. Create and fund an account

Create a Sandbox account and add test balances through the Portal UI:
1

Access your account

Navigate to Portal Accounts in Sandbox
2

Create account

Name the account (e.g., “My Test Account”)
3

Edit test assets

Add a balance to your account. Currently we support USD, USDC, USDT (e.g., set USD to $1000)
Sandbox account showing test balances for USD, USDT, and USDC
All balances are simulated within the Sandbox environment—no blockchain or testnet connectivity. You cannot fund accounts by sending real or testnet crypto.

4. Verify balance(s)

Run the following to verify your account balance:
cdpcurl -k $CDP_API_KEY \
  'https://sandbox.cdp.coinbase.com/platform/v2/accounts/YOUR_ACCOUNT_ID' | sed '1d' | jq
List all your accountIDs:
cdpcurl -k $CDP_API_KEY \
  'https://sandbox.cdp.coinbase.com/platform/v2/accounts' | sed '1d' | jq -r '.accounts[].accountId'

5. Alternative: Test with Postman

Prefer a GUI? See the Postman guide for setup instructions.

Next steps

Now that you’re set up, explore the resource guides to test specific features:

Transitioning to Production

When you’re ready to move from Sandbox to Production:
  • Complete integration testing: Ensure all features work correctly in Sandbox
  • Create Production API keys: Generate Production credentials in the CDP Portal
  • Update configuration: Switch from sandbox.cdp.coinbase.com to api.cdp.coinbase.com
  • Start with small transactions: Begin with small test transactions to verify everything works
  • Set up monitoring: Configure alerting for failed transactions and API errors