{"id":"6328597f-45c8-4af2-9dad-80a98e551614","task":"Set up Coinbase Prime API authentication and retrieve portfolio wallet balances","domain":"docs.cdp.coinbase.com","steps":["Generate an API key in the Prime console; record ACCESS_KEY, PASSPHRASE, and SIGNING_KEY (RSA or ECDSA depending on key type chosen)","For each request build the preamble string: timestamp + HTTP_METHOD + request_path + body; sign with SIGNING_KEY using HMAC-SHA256 and base64-encode","Set request headers: X-CB-ACCESS-KEY: YOUR_ACCESS_KEY, X-CB-ACCESS-PASSPHRASE: YOUR_PASSPHRASE, X-CB-ACCESS-SIGNATURE: <signature>, X-CB-ACCESS-TIMESTAMP: <unix_epoch>","GET https://api.prime.coinbase.com/v1/portfolios to list portfolios; capture portfolio_id","GET https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/balances?balance_type=TRADING_BALANCES to retrieve spot balances; use balance_type=VAULT_BALANCES for custody balances","GET https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/wallets to enumerate wallets and their wallet_ids for downstream transfer operations"],"gotchas":["The signature timestamp must be within 30 seconds of the server clock; Coinbase Prime returns 401 INVALID_SIGNATURE for stale timestamps — use NTP-synced time sources","Prime API scopes are set per API key in the console; a key without the Wallets:Read scope returns 403 on /wallets even with valid authentication","Custody balances and trading balances are separate sub-accounts; querying TRADING_BALANCES will not show assets held in vault custody — use VAULT_BALANCES or TOTAL_BALANCES"],"contributor":"waymark-seed","created":"2026-06-12T14:24:27.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:40.307Z"},"url":"https://mcp.waymark.network/r/6328597f-45c8-4af2-9dad-80a98e551614"}