Crates.io | cbadv |
lib.rs | cbadv |
version | 2.0.1 |
source | src |
created_at | 2023-06-27 18:12:33.035603 |
updated_at | 2024-12-02 22:32:06.300136 |
description | Asynchronous Coinbase Advanced REST and WebSocket API |
homepage | https://github.com/Ohkthx/cbadv-rs |
repository | https://github.com/Ohkthx/cbadv-rs |
max_upload_size | |
id | 901508 |
size | 425,909 |
The cbadv-rs crate provides high-performance, asynchronous access to the Coinbase Advanced REST and WebSocket APIs. This project includes features to securely configure API keys and secrets, making it suitable for developers seeking robust API integration.
This project is currently a work-in-progress. While the crate is usable, API changes or updates may occur as Coinbase Advanced evolves. Please thoroughly test before using in production.
To get started, add this crate to your project using cargo add cbadv
or manually add the following to your Cargo.toml
:
[dependencies]
cbadv = { git = "https://github.com/ohkthx/cbadv-rs", branch = "main" }
features = ["config"]
).Full API documentation is available at docs.rs. You can also find helpful information on crates.io.
Client: use cbadv::{WebSocketClient, WebSocketClientBuilder}
client.connect
client.subscribe
client.unsubscribe
client.listen
Channel::STATUS
: StatusChannel::CANDLES
: CandlesChannel::TICKER
: TickerChannel::TICKER_BATCH
: Ticker BatchChannel::LEVEL2
: Level 2 Market DataChannel::USER
: User-Specific UpdatesChannel::MARKET_TRADES
: Market TradesChannel::HEARTBEATS
: Hearbeat (maintains connection.)Channel::FUTURES_BALANCE_SUMMARY
: Balance Summary for Futures.Client: use cbadv::{RestClient, RestClientBuilder}
client.account
):
client.account.get_bulk
client.account.get
client.product
):
client.product.best_bid_ask
client.product.product_book
client.product.get_bulk
client.product.get
client.product.candles
client.product.ticker
client.order
):
client.order.create
client.order.edit
client.order.preview_edit
client.order.preview_create
client.order.cancel
client.order.get_bulk
client.order.fills
client.order.get
client.order.close_position
client.fee
):
client.fee.get
client.convert
):
client.convert.create_quote
client.convert.get
client.convert.commit
client.portfolio
):
client.portfolio.create
client.portfolio.get_all
client.portfolio.get
client.portfolio.edit
client.portfolio.delete
client.portfolio.move_funds
client.payment
)
client.payment.get_all
client.payment.get
client.data
)
client.data.key_permissions
client.public
):
client.public.time
client.public.product_book
client.public.products
client.public.product
client.public.candles
client.public.ticker
To enable the configuration feature, include it in your Cargo.toml
:
[dependencies]
cbadv = { version = "*", features = ["config"] }
Set up config.toml
with your API credentials. A sample file can be found at config.toml.sample
. See the custom configuration example for advanced setups.
Explore the examples directory for usage scenarios.
Contributions are welcome! Fork the repository, create a feature branch, and submit a pull request.
Support this project via cryptocurrency donations:
Ethereum (ETH): 0x7d75f6a9c021fcc70691fec73368198823fb0f60
Bitcoin (BTC): bc1q75w3cgutug8qdxw3jlmqnkjlv9alt3jr7ftha0
Binance (BNB): 0x7d75f6a9c021fcc70691fec73368198823fb0f60