https://github.com/coinbase/cdpcurl
https://github.com/coinbase/cdpcurl
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/coinbase/cdpcurl
- Owner: coinbase
- Created: 2024-04-29T18:33:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-07T02:49:56.000Z (about 1 year ago)
- Last Synced: 2025-03-24T10:38:47.674Z (about 1 year ago)
- Language: Go
- Size: 40 KB
- Stars: 22
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cdpcurl
`cdpcurl` is a tool that allows you to make HTTP requests to the Coinbase API with your CDP (Coinbase Developer Platform) API key. It is a wrapper around curl that automatically adds the necessary headers to authenticate your requests.
## Installation via Homebrew
```
brew tap coinbase/cdpcurl
brew install cdpcurl
```
## Installation via Go
`go install github.com/coinbase/cdpcurl@latest`
## Example Usage
### Get account balance of BTC with Sign In With Coinbase API
```
cdpcurl -k ~/Downloads/cdp_api_key.json 'https://api.coinbase.com/v2/accounts/BTC'
```
### Get the latest price of BTC with Advanced Trading API
```
cdpcurl -k ~/Downloads/cdp_api_key.json 'https://api.coinbase.com/api/v3/brokerage/products/BTC-USDC'
```
### Create a wallet on Base Sepolia with Platform API
```
cdpcurl -k ~/Downloads/cdp_api_key.json -X POST -d '{"wallet": {"network_id": "base-sepolia"}}' 'https://api.developer.coinbase.com/platform/v1/wallets'
```