[package]
edition = "2024"
rust-version = "1.85"
name = "rust-okx"
version = "0.6.4"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Async Rust client for the OKX v5 REST API"
homepage = "https://github.com/fwqaaq/rust-okx"
documentation = "https://docs.rs/rust-okx"
readme = "README.md"
keywords = [
"okx",
"crypto",
"trading",
"rest",
"async",
]
categories = [
"api-bindings",
"asynchronous",
"finance",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/fwqaaq/rust-okx"
[package.metadata.docs.rs]
features = [
"websocket",
"rust-decimal",
]
[features]
cli = [
"websocket",
"dep:ratatui",
"dep:crossterm",
"dep:anyhow",
"dep:dotenvy",
"dep:clap",
"dep:toml",
]
default = ["reqwest"]
reqwest = ["dep:reqwest"]
rust-decimal = ["dep:rust_decimal"]
websocket = [
"dep:tokio-tungstenite",
"dep:futures-util",
"dep:tokio",
]
[lib]
name = "rust_okx"
path = "src/lib.rs"
[[bin]]
name = "okx-cli"
path = "src/bin/okx_cli/main.rs"
required-features = ["cli"]
[[example]]
name = "dca_bot"
path = "examples/dca_bot.rs"
required-features = ["websocket"]
[[example]]
name = "funding"
path = "examples/funding.rs"
[[example]]
name = "login"
path = "examples/login.rs"
[[example]]
name = "trade_live"
path = "examples/trade_live.rs"
[[example]]
name = "ws_business"
path = "examples/ws_business.rs"
required-features = ["websocket"]
[[example]]
name = "ws_private"
path = "examples/ws_private.rs"
required-features = ["websocket"]
[[example]]
name = "ws_public"
path = "examples/ws_public.rs"
required-features = ["websocket"]
[[test]]
name = "account"
path = "tests/account.rs"
[[test]]
name = "api_coverage"
path = "tests/api_coverage.rs"
[[test]]
name = "convert"
path = "tests/convert.rs"
[[test]]
name = "finance"
path = "tests/finance.rs"
[[test]]
name = "funding"
path = "tests/funding.rs"
[[test]]
name = "lifecycle_demo"
path = "tests/lifecycle_demo.rs"
[[test]]
name = "market"
path = "tests/market.rs"
[[test]]
name = "public_data"
path = "tests/public_data.rs"
[[test]]
name = "sub_account"
path = "tests/sub_account.rs"
[[test]]
name = "trade"
path = "tests/trade.rs"
[[test]]
name = "ws"
path = "tests/ws.rs"
[[test]]
name = "ws_private"
path = "tests/ws_private.rs"
[[test]]
name = "ws_public"
path = "tests/ws_public.rs"
[dependencies.anyhow]
version = "1"
optional = true
[dependencies.base64]
version = "0.22"
[dependencies.bytes]
version = "1"
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true
[dependencies.crossterm]
version = "0.28"
features = ["event-stream"]
optional = true
[dependencies.dotenvy]
version = "0.15"
optional = true
[dependencies.futures-util]
version = "0.3"
features = [
"sink",
"std",
]
optional = true
default-features = false
[dependencies.hmac]
version = "0.13"
[dependencies.http]
version = "1"
[dependencies.ratatui]
version = "0.29"
optional = true
[dependencies.reqwest]
version = "0.13.4"
features = [
"rustls",
"system-proxy",
]
optional = true
default-features = false
[dependencies.rust_decimal]
version = "1"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.serde_urlencoded]
version = "0.7"
[dependencies.sha2]
version = "0.11"
[dependencies.thiserror]
version = "2"
[dependencies.time]
version = "0.3.49"
[dependencies.tokio]
version = "1"
features = [
"time",
"rt",
"rt-multi-thread",
"net",
"sync",
"macros",
]
optional = true
[dependencies.tokio-tungstenite]
version = "0.24"
features = [
"connect",
"rustls-tls-webpki-roots",
]
optional = true
default-features = false
[dependencies.toml]
version = "0.8"
optional = true
[dev-dependencies.bytes]
version = "1"
[dev-dependencies.dotenvy]
version = "0.15"
[dev-dependencies.http]
version = "1"
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt",
"rt-multi-thread",
"net",
"time",
]