CoinbaseSdk.Prime
0.4.0
dotnet add package CoinbaseSdk.Prime --version 0.4.0
NuGet\Install-Package CoinbaseSdk.Prime -Version 0.4.0
<PackageReference Include="CoinbaseSdk.Prime" Version="0.4.0" />
<PackageVersion Include="CoinbaseSdk.Prime" Version="0.4.0" />
<PackageReference Include="CoinbaseSdk.Prime" />
paket add CoinbaseSdk.Prime --version 0.4.0
#r "nuget: CoinbaseSdk.Prime, 0.4.0"
#:package CoinbaseSdk.Prime@0.4.0
#addin nuget:?package=CoinbaseSdk.Prime&version=0.4.0
#tool nuget:?package=CoinbaseSdk.Prime&version=0.4.0
Coinbase Prime .NET SDK
Overview
The Coinbase Prime .NET SDK is a sample library that demonstrates the structure of a Coinbase Prime driver for the REST APIs.
License
The Coinbase Prime .NET SDK sample library is free and open source and released under the Apache License, Version 2.0.
The application and code are only available for demonstration purposes.
Installation
dotnet add package CoinbaseSdk.Prime --version x.y.z
Configuration
Create a .env file with your API credentials:
cp .env.example .env
Required environment variables:
PRIME_ACCESS_KEY=your-access-key
PRIME_PASSPHRASE=your-passphrase
PRIME_SIGNING_KEY=your-signing-key
Usage
Initialize the client using environment variables:
var client = CoinbasePrimeClient.FromEnv();
var activitiesService = new ActivitiesService(client);
var request = new GetActivityRequest(activityId);
var response = activitiesService.GetActivity(request);
Examples
Run examples from the PrimeExample project:
# List available examples
dotnet run --project src/CoinbaseSdk/PrimeExample list
# Run examples via Program.cs
dotnet run --project src/CoinbaseSdk/PrimeExample ListPortfolios
dotnet run --project src/CoinbaseSdk/PrimeExample GetPortfolio --portfolioId <portfolio-id>
dotnet run --project src/CoinbaseSdk/PrimeExample ListAssets --entityId <entity-id>
# Run standalone file-based examples (.NET 10+)
dotnet run --file src/CoinbaseSdk/PrimeExample/examples/activities/GetActivity.cs -- --activityId <activity-id>
# Or with executable permissions on Unix:
./src/CoinbaseSdk/PrimeExample/examples/activities/GetActivity.cs --activityId <activity-id>
Set optional environment variables for convenience:
PRIME_ENTITY_ID=your-entity-id
PRIME_PORTFOLIO_ID=your-portfolio-id
JSON Serialization
The SDK relies entirely on the shared CoinbaseSdk.Core.Serialization.JsonUtility defaults for all request/response payloads. Those defaults already include camelCase property names, tolerant enum handling (via NullOnUnknownEnumConverter), and ISO-8601 timestamps backed by UtcIso8601DateTimeOffsetConverter.
Global overrides have been removed to keep the serialization surface deterministic across packages. If you need custom behavior, create your own JsonSerializerOptions instance and pass it through a custom IJsonUtility implementation (or a derived CoinbaseClient) for your application-specific calls instead of mutating global state.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- CoinbaseSdk.Core (>= 0.1.0)
- DotNetEnv (>= 3.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.