6 stable releases
1.0.5 | Jun 25, 2023 |
---|---|
1.0.3 | Jun 22, 2023 |
#40 in #requires
33 downloads per month
66KB
1.5K
SLoC
upbit-api on rust
this crate is dependant on sqlx, tokio, postgres this crate also requires openssl-sys package
Set access key and secret key
use rust_upbit_api::*;
rust_upbit_api::set_access_key("");
rust_upbit_api::set_secret_key("");
Apis
use rust_upbit_api::*;
let asdf = api::get_order_state(None, None).await.unwrap();
let asdf = api::order_by_price("KRW-ETH", OrdSide::BID, 5000.0, 1_435_085.0, OrdType::LIMIT, None).await.unwrap();
let asdf = api::OrderbookInfo::get_orderbook_info("KRW-ETH").await;
let asdf = api::TickerSnapshot::request("KRW-ETH").await;
let asdf = api::TradeRecent::request("KRW-ETH", None, 3, "0".to_string(), None).await;
let asdf = api::MarketState::request(true).await;
let asdf = api::CandleChartMinute::request_candle("KRW-ETH", None, 50, CandleMinute::Min10).await.unwrap();
let asdf = api::CandleChartDay::request_candle("KRW-ETH", 10, None, None).await;
let asdf = api::CandleChartWeek::request_candle("KRW-ETH", 10, None).await;
Problem
If you have trouble installing with this error: failed to run custom build command for openssl-sys vX.X.XX
,
try
macOS
$ brew install openssl@1.1
Arch Linux
$ sudo pacman -S pkg-config openssl
Debian and Ubuntu
$ sudo apt-get install pkg-config libssl-dev
Fedora
$ sudo dnf install pkg-config openssl-devel
referenced from https://github.com/sfackler/rust-openssl/issues/855#issuecomment-450057552
Dependencies
~25–40MB
~720K SLoC