Crates.io | cbadv |
lib.rs | cbadv |
version | 1.3.0 |
source | src |
created_at | 2023-06-27 18:12:33.035603 |
updated_at | 2023-10-19 19:18:14.97916 |
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 | 198,115 |
The objective of this crate is to grant asynchronous access to the CoinBase Advanced REST and WebSocket API. Included with the crate are ways to organize your API Keys and Secrets inside of a configuration file. This project is current a work-in-progress. Changes between versions can vary greatly as this API becomes more refined and adapts to CoinBase Advances changing state. I ask you to understand that I am not liable for any issues you may encounter while this project is in this state and encourage you to verify and test before committing to using this yourself in a serious manner. Contributions are encouraged! The API reference can be seen at CoinBase Advanced API. If you wish to add this to your project, either use Most of the documentation can be accessed by clicking the following link: docs.rs. That documentation is automatically generated and also accessible from crates.io. Client: Status [Channel::STATUS] Candles [Channel::CANDLES] Ticker [Channel::TICKER] Ticker Batch [Channel::TICKER_BATCH] Level2 [Channel::LEVEL2] User [Channel::USER] Market Trades [Channel::MARKET_TRADES] Client: These functions were created to cover common functionality but not initially part of the CoinBase Advanced API. They may require several API requests to accomplish their results. Test all endpoints that are currently untested. Configuration requires you to add the 'config' feature ( Copy the Custom configurations can be created with additional sections beyond just Example of enabled Check above in the Covered API requests section for possibly covered examples. All examples are located at cbadv-rs/examples directory. Wallet addresses are provided below, or click the badges above!
Asynchronous CoinBase Advanced API
cargo add cbadv
or add the following line to your dependencies section in Cargo.toml:[dependencies]
cbadv = { git = "https://github.com/ohkthx/cbadv-rs", branch = "main" }
Features
features = ["config"]
Documentation
Covered API requests
WebSocket API
use cbadv::websocket::WebSocketClient
REST API
use cbadv::rest::RestClient
Added Requests and Features
TODO
Configuration Feature
features = ["config"]
) to your Cargo.toml
. The default configuration is unusable due to the API requiring a Key and Secret. You can create, modify, and delete API Keys and Secrets with this link.config.toml.sample
to config.toml
and add in your API information. The config.toml
file will automatically be read on launch to access your accounts API information. Unlike the depreciated CoinBase Pro API, there's no longer access to Public API endpoints. All access requires authentication. The key and secret is authentication requirements for HTTP requests to be properly signed and accepted by CoinBase.[coinbase]
. See custom_config.toml.sample for an example of the configuration file. An example of how to implement and create a custom configuration file can be seen in custom_config.rs.config
feature in Cargo.toml
.[dependencies]
cbadv = { version = "*", features = ["config"] }
Examples
Tips Appreciated!
Ethereum (ETH): 0x7d75f6a9c021fcc70691fec73368198823fb0f60
Bitcoin (BTC): bc1q75w3cgutug8qdxw3jlmqnkjlv9alt3jr7ftha0
Binance (BNB): 0x7d75f6a9c021fcc70691fec73368198823fb0f60