Portal Community

Advanced Trade

appsettings.json

Advanced Trade reads its API origin from a CoinbaseAdvancedTrade section, bound lazily against IConfiguration:

"CoinbaseAdvancedTrade": {
  "BaseURL": "https://api.coinbase.com"
}
KeyTypeRequiredDescription
BaseURLtextNoBare API origin. Defaults to https://api.coinbase.com. Deliberately does not include the /api/v3/brokerage path — HttpClient discards a BaseAddress's path whenever the relative request URI starts with / (every path here does), so the versioned prefix is applied explicitly by CoinbaseAdvancedTradeApiClient instead.

Credential

A single vault credential, referenced by the standard credentialId config key on every operation, resolved via ReadCredentialKeyValuePrimaryAsync:

FieldDescription
Key ID (username)The CDP API Key ID.
Private key (password)The matching EC (P-256) private key material, used to sign each request's CDP auth JWT (hand-rolled ES256 signer, no external JWT package).

Server Wallet

appsettings.json

"CoinbaseServerWallet": {
  "BaseURL": "https://api.cdp.coinbase.com"
}
KeyTypeRequiredDescription
BaseURLtextNoBare API origin. Defaults to https://api.cdp.coinbase.com. Same path-stripping reasoning as Advanced Trade — the versioned /platform/v2 prefix is applied explicitly by CoinbaseServerWalletApiClient.
Unconfirmed REST paths: the exact CDP REST paths and the X-Wallet-Auth JWT claim shape were not independently re-verified against live CDP docs in the design pass. See Roadmap.

Dual Credential

Server Wallet needs two independent vault credentials, because Coinbase's own TEE — not this node — holds the blockchain private key:

Config KeyCredential TypeDescription
credentialIdCDP API KeySame Key ID + EC P-256 private key pair as Advanced Trade, resolved the same way (ReadCredentialKeyValuePrimaryAsync).
walletSecretCredentialIdWallet SecretA second, independently-configured vault entry holding a single opaque string — the CDP Wallet Secret. Registered internally under a "walletSecret" alias via a RegisterCredentialsFromConfig override, the same flat-picker mechanism the framework's destinationCredentialID pattern uses for dual-endpoint operations.
Which operations need the Wallet Secret? Every fund-moving operation (transfer/*, swap/execute) requires it — confirmed. Five more operations (account/requestFaucet, solanaAccount/requestFaucet, policy/create, policy/update, policy/delete) also require it today under a fail-closed policy, because their live requirement wasn't independently confirmed against CDP docs at design time — see each resource page for the exact marker.

Registration (both variants)

Each variant ships its own INodeExecutorDependency:

A ProjectReference alone does not register either node. The composition root (BizFirst.Ai.Platform.Web.Server.Core/DependencyInjection/Ai/ServiceCollectionExtensionsForAI.cs, Plugins_RegisterAllNodes()) is a hardcoded list of new {X}Dependency().RegisterDefaults(services) calls. Both new CoinbaseAdvancedTradeDependency().RegisterDefaults(services); and new CoinbaseServerWalletDependency().RegisterDefaults(services); must be added there or the node types won't appear in the workflow designer even though the packages are referenced.

Project Layout

Six .NET projects in total — three per variant, following the same Domain / Services / ExecutionNode split used across this codebase:

ProjectResponsibility
BizFirst.Integration.CoinbaseAdvancedTrade.DomainPure data contracts — shared value types and per-operation result records (Ok(...)/Fail(errorCode, errorMessage) convention). No logic, no I/O.
BizFirst.Integration.CoinbaseAdvancedTrade.ServicesHTTP integration layer: API client, CDP auth JWT signer (hand-rolled ES256), 429 rate-limit handler, error mapper, and the 7 resource services.
BizFirst.Ai.ExecutionNodes.Blockchain.CoinbaseAdvancedTradeThe executor — operation routing, config parsing, credential resolution, one feature partial per operation.
BizFirst.Integration.CoinbaseServerWallet.DomainPure data contracts for CDP Server Wallet v2 — same conventions as the Advanced Trade Domain project.
BizFirst.Integration.CoinbaseServerWallet.ServicesHTTP integration layer: dual-JWT API client, dual JWT signer, 429 handler, error mapper, and the 7 resource services.
BizFirst.Ai.ExecutionNodes.Blockchain.CoinbaseServerWalletThe executor — dual-credential resolution, operation routing, one feature partial per operation.