| Crates.io | crypto_trading |
| lib.rs | crypto_trading |
| version | 0.2.2 |
| created_at | 2025-05-02 05:50:57.810808+00 |
| updated_at | 2025-06-29 08:41:58.463173+00 |
| description | Easy Binance API Wrapping Crate |
| homepage | |
| repository | https://github.com/wangki-kyu/crypto_trading |
| max_upload_size | |
| id | 1657303 |
| size | 98,242 |
crypto_trading is a wrapping library that allows you to easily use Binance's price information and various APIs.
you need to set up a .env file.
.env fileBINANCE_SECRET_KEY and BINANCE_API_KEYdotenv::dotenv().ok();
use crypto_trading::{adapter::common::BinanceCommon, port::binance_port::CommonPort};
#[tokio::main]
async fn main() {
dotenv::dotenv().ok();
let binance_common = BinanceCommon::new();
let klines = binance_common.get_kline("BTCUSDT", "1m", None).await.unwrap();
println!("{:?}", klines);
}
Refer to the Binance API site. https://developers.binance.com/docs/derivatives/usds-margined-futures/general-info
common
trade
users
In the future, i will develop a way to wrap various APIs so that they can be used easily.