1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Thin client for the CoW Protocol orderbook HTTP API.
//!
//! The first endpoint implemented here is [`OrderBookApi::quote`],
//! which mirrors the `getQuote` flow exposed by `@cowprotocol/cow-sdk`
//! and `cow-py`. The request and response shapes reflect the
//! production orderbook OpenAPI as of 2026-05.
use Duration;
/// Default per-request timeout, enforced by both bundled transports
/// (reqwest natively, browser `fetch` on wasm32). A stuck or hostile
/// orderbook cannot hold a caller's task open longer; on native targets,
/// override it by passing a pre-configured client to
/// `OrderBookApi::with_client`. Exposed feature-independently so
/// out-of-tree [`HttpTransport`](crate::transport::HttpTransport)
/// backends can reuse it without pulling in the `http-client` stack.
pub const DEFAULT_HTTP_TIMEOUT: Duration = from_secs;
/// Maximum HTTP response body. Larger payloads return
/// [`Error::ResponseTooLarge`] before allocating. Exposed
/// feature-independently so out-of-tree
/// [`HttpTransport`](crate::transport::HttpTransport) backends can reuse
/// it without pulling in the `http-client` stack.
///
/// [`Error::ResponseTooLarge`]: crate::Error::ResponseTooLarge
pub const MAX_RESPONSE_BYTES: usize = 8 * 1024 * 1024;
/// Marker types used by this module's type-state builders
/// ([`QuoteRequestBuilder`], `OrderBookApiBuilder`) to track required
/// fields.
pub use *;
pub use *;
pub use ;
pub use OrderBookApi;
pub use ;
pub use OrderBookApiBuilder;