Crates.io | rust_upbit_api |
lib.rs | rust_upbit_api |
version | 1.0.5 |
source | src |
created_at | 2023-06-22 12:36:41.418857 |
updated_at | 2023-06-25 03:33:01.726695 |
description | rust_upbit_api |
homepage | |
repository | |
max_upload_size | |
id | 897286 |
size | 65,802 |
upbit-api on rust
this crate is dependant on sqlx, tokio, postgres this crate also requires openssl-sys package
use rust_upbit_api::*;
rust_upbit_api::set_access_key("");
rust_upbit_api::set_secret_key("");
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;
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