[package]
edition = "2024"
rust-version = "1.88.0"
name = "polymarket-client-sdk"
version = "0.4.3"
authors = [
"Polymarket Engineering <engineering@polymarket.com>",
"Chaz Byrnes <chaz@polymarket.com>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Polymarket CLOB (Central Limit Order Book) API client SDK"
readme = "README.md"
keywords = [
"polymarket",
"clob",
"orderbook",
"trading",
"prediction-market",
]
categories = [
"api-bindings",
"cryptography::cryptocurrencies",
"finance",
"web-programming::http-client",
]
license = "MIT"
repository = "https://github.com/polymarket/rs-clob-client"
[package.metadata.docs.rs]
all-features = true
[features]
bridge = []
clob = []
ctf = [
"alloy/contract",
"alloy/providers",
]
data = []
default = []
gamma = []
heartbeats = [
"dep:tokio",
"dep:tokio-util",
]
rfq = []
rtds = [
"dep:backoff",
"dep:tokio",
"dep:tokio-tungstenite",
]
tracing = [
"dep:tracing",
"dep:serde_ignored",
"dep:serde_path_to_error",
]
ws = [
"dep:backoff",
"dep:bitflags",
"dep:tokio",
"dep:tokio-tungstenite",
]
[lib]
name = "polymarket_client_sdk"
path = "src/lib.rs"
[[example]]
name = "approvals"
path = "examples/approvals.rs"
required-features = ["tracing"]
[[example]]
name = "async"
path = "examples/clob/async.rs"
required-features = ["clob"]
[[example]]
name = "authenticated"
path = "examples/clob/authenticated.rs"
required-features = ["clob"]
[[example]]
name = "aws_authenticated"
path = "examples/clob/aws_authenticated.rs"
required-features = ["clob"]
[[example]]
name = "bridge"
path = "examples/bridge.rs"
required-features = [
"bridge",
"tracing",
]
[[example]]
name = "builder_authenticated"
path = "examples/clob/builder_authenticated.rs"
required-features = ["clob"]
[[example]]
name = "check_approvals"
path = "examples/check_approvals.rs"
required-features = ["tracing"]
[[example]]
name = "ctf"
path = "examples/ctf.rs"
required-features = [
"ctf",
"tracing",
]
[[example]]
name = "data"
path = "examples/data.rs"
required-features = [
"data",
"tracing",
]
[[example]]
name = "gamma"
path = "examples/gamma/client.rs"
required-features = [
"gamma",
"tracing",
]
[[example]]
name = "gamma_streaming"
path = "examples/gamma/streaming.rs"
required-features = [
"gamma",
"tracing",
]
[[example]]
name = "heartbeats"
path = "examples/clob/heartbeats.rs"
required-features = [
"clob",
"heartbeats",
"tracing",
]
[[example]]
name = "rfq_quotes"
path = "examples/clob/rfq/quotes.rs"
required-features = [
"clob",
"rfq",
]
[[example]]
name = "rfq_requests"
path = "examples/clob/rfq/requests.rs"
required-features = [
"clob",
"rfq",
]
[[example]]
name = "rtds_crypto_prices"
path = "examples/rtds_crypto_prices.rs"
required-features = [
"rtds",
"tracing",
]
[[example]]
name = "streaming"
path = "examples/clob/streaming.rs"
required-features = [
"clob",
"tracing",
]
[[example]]
name = "unauthenticated"
path = "examples/clob/unauthenticated.rs"
required-features = [
"clob",
"tracing",
]
[[example]]
name = "websocket_orderbook"
path = "examples/clob/ws/orderbook.rs"
required-features = [
"clob",
"ws",
]
[[example]]
name = "websocket_unsubscribe"
path = "examples/clob/ws/unsubscribe.rs"
required-features = [
"clob",
"ws",
]
[[example]]
name = "websocket_user"
path = "examples/clob/ws/user.rs"
required-features = [
"clob",
"ws",
]
[[test]]
name = "auth"
path = "tests/auth.rs"
[[test]]
name = "bridge"
path = "tests/bridge.rs"
[[test]]
name = "clob"
path = "tests/clob.rs"
[[test]]
name = "ctf"
path = "tests/ctf.rs"
[[test]]
name = "data"
path = "tests/data.rs"
[[test]]
name = "gamma"
path = "tests/gamma.rs"
[[test]]
name = "order"
path = "tests/order.rs"
[[test]]
name = "rfq"
path = "tests/rfq.rs"
[[test]]
name = "websocket"
path = "tests/websocket.rs"
[[bench]]
name = "clob_order_operations"
path = "benches/clob_order_operations.rs"
harness = false
required-features = ["clob"]
[[bench]]
name = "deserialize_clob"
path = "benches/deserialize_clob.rs"
harness = false
required-features = ["clob"]
[[bench]]
name = "deserialize_websocket"
path = "benches/deserialize_websocket.rs"
harness = false
required-features = [
"clob",
"ws",
]
[dependencies.alloy]
version = "1.6.3"
features = [
"dyn-abi",
"reqwest",
"reqwest-rustls-tls",
"serde",
"signer-local",
"signers",
"sol-types",
]
default-features = false
[dependencies.async-stream]
version = "0.3.6"
[dependencies.async-trait]
version = "0.1.89"
[dependencies.backoff]
version = "0.4.0"
optional = true
[dependencies.base64]
version = "0.22.1"
[dependencies.bitflags]
version = "2.11.0"
optional = true
[dependencies.bon]
version = "3.9.0"
[dependencies.chrono]
version = "0.4.44"
features = ["serde"]
[dependencies.dashmap]
version = "6.1.0"
[dependencies.futures]
version = "0.3.32"
[dependencies.hmac]
version = "0.12.1"
[dependencies.phf]
version = "0.13.1"
features = ["macros"]
[dependencies.rand]
version = "0.10.0"
[dependencies.reqwest]
version = "0.13.2"
features = [
"json",
"query",
"rustls",
]
[dependencies.rust_decimal]
version = "1.40.0"
features = ["serde"]
[dependencies.rust_decimal_macros]
version = "1.40.0"
[dependencies.secrecy]
version = "0.10"
features = ["serde"]
[dependencies.serde]
version = "1.0.228"
[dependencies.serde_html_form]
version = "0.4"
[dependencies.serde_ignored]
version = "0.1"
optional = true
[dependencies.serde_json]
version = "1.0.149"
[dependencies.serde_path_to_error]
version = "0.1"
optional = true
[dependencies.serde_repr]
version = "0.1.20"
[dependencies.serde_with]
version = "3.16.1"
features = [
"chrono_0_4",
"json",
]
[dependencies.sha2]
version = "0.10.9"
[dependencies.strum_macros]
version = "0.28.0"
[dependencies.tokio]
version = "1.49.0"
features = [
"rt-multi-thread",
"macros",
]
optional = true
[dependencies.tokio-tungstenite]
version = "0.28.0"
features = ["rustls-tls-native-roots"]
optional = true
[dependencies.tokio-util]
version = "0.7.18"
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.url]
version = "2.5.8"
[dependencies.uuid]
version = "1.21.0"
features = [
"serde",
"v4",
"v7",
]
[dev-dependencies.alloy]
version = "1.6.3"
features = [
"contract",
"providers",
"reqwest",
"signer-aws",
"signer-local",
]
default-features = false
[dev-dependencies.anyhow]
version = "1.0.102"
[dev-dependencies.aws-config]
version = "1.8.13"
[dev-dependencies.aws-sdk-kms]
version = "1.99.0"
[dev-dependencies.criterion]
version = "0.8.2"
features = ["html_reports"]
[dev-dependencies.futures-util]
version = "0.3.31"
[dev-dependencies.httpmock]
version = "0.8.3"
[dev-dependencies.tokio]
version = "1.49.0"
features = [
"rt-multi-thread",
"macros",
]
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[lints.clippy]
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
assertions_on_result_states = "warn"
clone_on_ref_ptr = "warn"
create_dir = "warn"
dbg_macro = "warn"
doc_include_without_cfg = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
exhaustive_enums = "warn"
exhaustive_structs = "warn"
exit = "warn"
filetype_is_file = "warn"
float_arithmetic = "warn"
get_unwrap = "warn"
if_then_some_else_none = "warn"
impl_trait_in_params = "warn"
infinite_loop = "warn"
large_include_file = "warn"
let_underscore_untyped = "warn"
map_err_ignore = "warn"
map_with_unused_argument_over_ranges = "warn"
missing_assert_message = "warn"
missing_errors_doc = "allow"
module_name_repetitions = "warn"
multiple_crate_versions = "allow"
multiple_inherent_impl = "warn"
mutex_atomic = "warn"
mutex_integer = "warn"
needless_raw_strings = "warn"
non_zero_suggestions = "warn"
pathbuf_init_then_push = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "warn"
rc_buffer = "warn"
redundant_test_prefix = "warn"
redundant_type_annotations = "warn"
ref_patterns = "warn"
renamed_function_params = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
same_name_method = "warn"
self_named_module_files = "warn"
similar_names = "allow"
single_char_lifetime_names = "warn"
str_to_string = "warn"
string_add = "warn"
string_slice = "warn"
todo = "warn"
too_many_lines = "allow"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unneeded_field_pattern = "warn"
unseparated_literal_suffix = "warn"
unused_trait_names = "warn"
unwrap_used = "warn"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[profile.bench]
lto = "thin"
codegen-units = 1