| Crates.io | prime_sdk_rs |
| lib.rs | prime_sdk_rs |
| version | 0.1.0 |
| created_at | 2025-09-16 19:17:18.940286+00 |
| updated_at | 2025-09-16 19:17:18.940286+00 |
| description | A library to help call Coinbase Prime Api |
| homepage | |
| repository | https://github.com/coinbase-samples/prime_sdk_rs |
| max_upload_size | |
| id | 1842242 |
| size | 1,105,668 |
A Rust SDK for interacting with the Coinbase Prime REST APIs, built on top of the core_rs library.
The prime_sdk_rs crate provides a high-level, type-safe, and async interface for Coinbase Prime APIs. It includes generated types and services for all major API endpoints, as well as example programs to help you get started.
Add the library to your project using Cargo:
cargo add prime_sdk_rs
Or add it manually to your Cargo.toml:
[dependencies]
prime_sdk_rs = "0.1.0"
git clone git@github.com:coinbase-samples/prime_sdk_rs.git
cd prime_sdk_rs
Create a .env file in the project root to store your API credentials and configuration. Example:
PRIME_CREDENTIALS='{"AccessKey": "", "SecretKey": "", "Passphrase": ""}'
PORTFOLIO_ID='d7a7abc5-xxxx-xxxx-xxxx-9252a740a3c8'
ENTITY_ID='ba65079e-xxxx-xxxx-xxxx-89041fa232b1'
Note: The actual variable names and usage may depend on your integration. Refer to your application or integration code for the required variables.
To build the SDK, ensure you have Rust installed (Rust 1.61+ recommended):
cargo build
A variety of example programs are provided in the examples/ directory. All examples can be run using the provided shell script:
./run_example.sh <example_path>
For example, to run the portfolio listing example:
./run_example.sh examples/portfolios/list_portfolios.rs
This project is licensed under the Apache-2.0 license.