Package Information
Documentation
n8n-nodes-coinbase-brokerage
n8n community node for Coinbase Advanced Trade (Brokerage) API, generated from OpenAPI using @devlikeapro/n8n-openapi-node.
Local dev
- Node.js >= 20 recommended
- pnpm or npm
Steps:
- Install deps
- Build
- Link into n8n's custom directory
Commands
# install
pnpm install
# build
pnpm run build
# link into n8n (~/.n8n/custom)
pnpm link --global
cd ~/.n8n/custom
npm init -y
pnpm link --global @mcnug/n8n-nodes-coinbase-brokerage
# start n8n
n8n start
In n8n, search for "Coinbase Brokerage" node.
Authentication
Use Coinbase Developer Platform (CDP) API keys:
- API Key ID (looks like
organizations/.../apiKeys/...) - ES256 Private Key (PEM)
Private Key Format
The private key can be provided in two formats:
Multi-line format (recommended):
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg...
-----END PRIVATE KEY-----
.env format (single-line with literal \n):
-----BEGIN PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg...\n-----END PRIVATE KEY-----
Both formats are automatically handled - the node will convert literal \n to actual newlines.
Credentials Options
- Environment: Production or Sandbox
- Custom Base URL: Optional override (defaults to the selected environment)
- Enable Debug Logging: When on, prints non-sensitive details about the JWT to n8n logs
Tested endpoint for credentials: GET /api/v3/brokerage/key_permissions.
Debug logging
To troubleshoot 401s:
- Edit your Coinbase credentials and enable "Enable Debug Logging".
- Run a simple node, e.g., Operation: Key Permissions.
- Check n8n server logs and copy the single debug line that looks like:
[n8n-nodes-coinbase-brokerage][debug] { "tag":"coinbase-advtrade-auth", ... }
Where to find logs:
- Docker:
docker logs <n8n-container> -f - n8n Desktop: View > Toggle Developer Tools > Console
- Self-hosted (systemd/pm2): check the process stdout/stderr logs
What we log (never your private key):
- environment, baseURL, method, endpoint url
- absolute URL used to compute JWT uri (query not included in uri per Coinbase docs)
- jwtUri value (e.g.,
GET api.coinbase.com/api/v3/brokerage/key_permissions) - JWT header
kid(apiKey) and payload times (nbf,exp,ttl) - Base64 header and a short preview of payload (no signature)
Share that JSON blob here so we can pinpoint any mismatch.
Publishing
- Set package name to your npm scope if needed
npm publishorpnpm publish(ensure files are built intodist/)
Credits
- https://github.com/devlikeapro/n8n-openapi-node# n8n-nodes-coinbase-brokerage
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init in bun v1.2.22. Bun is a fast all-in-one JavaScript runtime.