[INFO] cloning repository https://github.com/leosysd/JY_RUST [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/leosysd/JY_RUST" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fleosysd%2FJY_RUST", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fleosysd%2FJY_RUST'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 62779cdd4a0e1604918f53b932b1f7045a1140e4 [INFO] checking leosysd/JY_RUST against master#656ccbe796ff98def9b555c118e1620c5389e3b2 for pr-133502-24 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fleosysd%2FJY_RUST" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/leosysd/JY_RUST [INFO] finished tweaking git repo https://github.com/leosysd/JY_RUST [INFO] tweaked toml for git repo https://github.com/leosysd/JY_RUST written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/leosysd/JY_RUST on toolchain 656ccbe796ff98def9b555c118e1620c5389e3b2 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+656ccbe796ff98def9b555c118e1620c5389e3b2" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/leosysd/JY_RUST already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+656ccbe796ff98def9b555c118e1620c5389e3b2" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded log v0.4.30 [INFO] [stderr] Downloaded zerocopy-derive v0.8.49 [INFO] [stderr] Downloaded zerocopy v0.8.49 [INFO] [stderr] Downloaded hyper v1.10.0 [INFO] [stderr] Downloaded polymarket_client_sdk_v2 v0.6.0-canary.1 [INFO] [stderr] Downloaded alloy v1.8.3 [INFO] [stderr] Downloaded bitcoin_hashes v0.14.100 [INFO] [stderr] Downloaded bitcoin-io v0.1.100 [INFO] [stderr] Downloaded alloy-transport v1.8.3 [INFO] [stderr] Downloaded alloy-json-rpc v1.8.3 [INFO] [stderr] Downloaded const-hex v1.19.1 [INFO] [stderr] Downloaded alloy-transport-http v1.8.3 [INFO] [stderr] Downloaded alloy-signer-local v1.8.3 [INFO] [stderr] Downloaded alloy-signer v1.8.3 [INFO] [stderr] Downloaded alloy-network-primitives v1.8.3 [INFO] [stderr] Downloaded alloy-network v1.8.3 [INFO] [stderr] Downloaded alloy-rpc-types-eth v1.8.3 [INFO] [stderr] Downloaded alloy-consensus v1.8.3 [INFO] [stderr] Downloaded alloy-tx-macros v1.8.3 [INFO] [stderr] Downloaded alloy-rpc-types-any v1.8.3 [INFO] [stderr] Downloaded alloy-provider v1.8.3 [INFO] [stderr] Downloaded alloy-rpc-client v1.8.3 [INFO] [stderr] Downloaded alloy-consensus-any v1.8.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3d5ced03c013a94a2f102a4510f48a6e9184255caf5fd8244f58017bde7f5210" "sleep" "infinity", kill_on_drop: false }` [INFO] [stdout] 364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036 [INFO] running `Command { std: "docker" "start" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036" "/opt/rustwide/cargo-home/bin/cargo" "+656ccbe796ff98def9b555c118e1620c5389e3b2" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-w" "/opt/rustwide/workdir" "--user" "0:0" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036" "/opt/rustwide/cargo-home/bin/cargo" "+656ccbe796ff98def9b555c118e1620c5389e3b2" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Compiling ruint-macro v1.2.1 [INFO] [stderr] Checking keccak v0.2.0 [INFO] [stderr] Checking rustc-hash v2.1.2 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking hashbrown v0.17.1 [INFO] [stderr] Checking digest v0.11.3 [INFO] [stderr] Checking const-hex v1.19.1 [INFO] [stderr] Compiling alloy-rlp-derive v0.3.15 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking ff v0.13.1 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling darling_core v0.23.0 [INFO] [stderr] Compiling serde_json v1.0.150 [INFO] [stderr] Compiling typenum v1.20.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking sha3 v0.11.0 [INFO] [stderr] Checking group v0.13.0 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling macro-string v0.2.0 [INFO] [stderr] Compiling syn-solidity v1.6.0 [INFO] [stderr] Checking socket2 v0.6.4 [INFO] [stderr] Checking mio v1.2.1 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking either v1.16.0 [INFO] [stderr] Checking tinystr v0.8.3 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Compiling auto_impl v1.3.0 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-bigint v0.5.5 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking log v0.4.30 [INFO] [stderr] Checking icu_locale_core v2.2.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking aws-lc-rs v1.17.0 [INFO] [stderr] Checking zerotrie v0.2.4 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sec1 v0.7.3 [INFO] [stderr] Checking pkcs8 v0.10.2 [INFO] [stderr] Checking rfc6979 v0.4.0 [INFO] [stderr] Checking alloy-rlp v0.3.15 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking http v1.4.1 [INFO] [stderr] Compiling hybrid-array v0.4.12 [INFO] [stderr] Checking tokio v1.52.3 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Compiling rustls v0.23.40 [INFO] [stderr] Compiling zerocopy v0.8.49 [INFO] [stderr] Checking icu_collections v2.2.0 [INFO] [stderr] Checking ruint v1.18.0 [INFO] [stderr] Checking indexmap v2.14.0 [INFO] [stderr] Checking icu_provider v2.2.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Compiling crypto-common v0.2.2 [INFO] [stderr] Compiling block-buffer v0.12.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking icu_properties v2.2.0 [INFO] [stderr] Checking icu_normalizer v2.2.0 [INFO] [stderr] Checking winnow v1.0.3 [INFO] [stderr] Checking elliptic-curve v0.13.8 [INFO] [stderr] Compiling siphasher v1.0.3 [INFO] [stderr] Checking nybbles v0.4.8 [INFO] [stderr] Checking ecdsa v0.16.9 [INFO] [stderr] Checking futures-utils-wasm v0.1.0 [INFO] [stderr] Compiling prettyplease v0.2.37 [INFO] [stderr] Compiling phf_shared v0.13.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling darling_macro v0.23.0 [INFO] [stderr] Compiling phf_generator v0.13.1 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Compiling darling v0.23.0 [INFO] [stderr] Checking k256 v0.13.4 [INFO] [stderr] Compiling serde_with_macros v3.20.0 [INFO] [stderr] Compiling alloy-tx-macros v1.8.3 [INFO] [stderr] Compiling rust_decimal v1.42.0 [INFO] [stderr] Compiling phf_macros v0.13.1 [INFO] [stderr] Checking alloy-sol-type-parser v1.6.0 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking idna_adapter v1.2.2 [INFO] [stderr] Checking dashmap v6.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking tempfile v3.27.0 [INFO] [stderr] Compiling alloy-sol-macro-input v1.6.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking serde_html_form v0.4.0 [INFO] [stderr] Checking uuid v1.23.1 [INFO] [stderr] Checking serde_with v3.20.0 [INFO] [stderr] Compiling bon-macros v3.9.1 [INFO] [stderr] Compiling alloy-sol-macro-expander v1.6.0 [INFO] [stderr] Checking phf v0.13.1 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking secrecy v0.10.3 [INFO] [stderr] Compiling strum_macros v0.28.0 [INFO] [stderr] Compiling rust_decimal_macros v1.40.0 [INFO] [stderr] Checking dialoguer v0.11.0 [INFO] [stderr] Checking sha3 v0.10.9 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking alloy-primitives v1.6.0 [INFO] [stderr] Checking rustls-webpki v0.103.13 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking tracing-subscriber v0.3.23 [INFO] [stderr] Checking alloy-serde v1.8.3 [INFO] [stderr] Checking alloy-eip7702 v0.6.3 [INFO] [stderr] Checking alloy-eip2124 v0.2.0 [INFO] [stderr] Checking alloy-eip2930 v0.2.3 [INFO] [stderr] Checking alloy-eip7928 v0.3.7 [INFO] [stderr] Checking alloy-trie v0.9.5 [INFO] [stderr] Checking alloy-json-abi v1.6.0 [INFO] [stderr] Checking alloy-signer v1.8.3 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Compiling alloy-sol-macro v1.6.0 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking alloy-sol-types v1.6.0 [INFO] [stderr] Checking alloy-eips v1.8.3 [INFO] [stderr] Checking h2 v0.4.14 [INFO] [stderr] Checking bon v3.9.1 [INFO] [stderr] Checking tower-http v0.6.11 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.6 [INFO] [stderr] Checking alloy-consensus v1.8.3 [INFO] [stderr] Checking alloy-json-rpc v1.8.3 [INFO] [stderr] Checking alloy-dyn-abi v1.6.0 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking rustls-platform-verifier v0.7.0 [INFO] [stderr] Checking tungstenite v0.24.0 [INFO] [stderr] Checking alloy-core v1.6.0 [INFO] [stderr] Checking tokio-tungstenite v0.24.0 [INFO] [stderr] Checking hyper v1.10.0 [INFO] [stderr] Checking alloy-network-primitives v1.8.3 [INFO] [stderr] Checking alloy-consensus-any v1.8.3 [INFO] [stderr] Checking alloy-rpc-types-eth v1.8.3 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking hyper-rustls v0.27.9 [INFO] [stderr] Checking reqwest v0.13.4 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking alloy-rpc-types-any v1.8.3 [INFO] [stderr] Checking alloy-network v1.8.3 [INFO] [stderr] Checking alloy-signer-local v1.8.3 [INFO] [stderr] Checking alloy v1.8.3 [INFO] [stderr] Checking polymarket_client_sdk_v2 v0.6.0-canary.1 [INFO] [stderr] Checking jy-bot v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `price_to_beat` [INFO] [stdout] --> src/cli/../strategy/order_maker.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | price_to_beat: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_price_to_beat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price_to_beat` [INFO] [stdout] --> src/cli/../strategy/order_maker.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | price_to_beat: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_price_to_beat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/cli/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub clob_v2_api_url: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 11 | pub gamma_api_url: String, [INFO] [stdout] 12 | pub chain_id: u64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 13 | pub signature_type: u8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 14 | pub private_key: Option, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 15 | pub deposit_wallet: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub dry_run: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub market_ws_url: String, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub order_shares: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 26 | pub min_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | pub max_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | pub min_lock_profit: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub fee_rate: Decimal, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 30 | pub max_entry_delay_sec: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 31 | pub min_seconds_left: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub lock_min_profit_factor: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 36 | /// 追单价格上限:main_ask 高于此值不再追单 [INFO] [stdout] 37 | pub trend_chase_max_price: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 38 | /// 强制锁线(秒):剩余 ≤ 此值触发强制处理 [INFO] [stdout] 39 | pub force_lock_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 40 | /// 强制亏损模式:"smooth"=按趋势顺势加注锁利;"lock"=旧行为等额对锁(锁亏) [INFO] [stdout] 41 | pub force_loss_mode: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 42 | /// 磨平预算倍数:smooth 模式顺势加注最多再花 entry成本 × 此值 [INFO] [stdout] 43 | pub smooth_budget_mult: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub stop_loss_factor: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | /// 早止损价格上限:对面 ask > 此值(天价)则不锁、裸持到结算,避免高价接盘放大亏损。 [INFO] [stdout] 48 | pub stop_loss_max_opp: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub stop_loss_max_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub entry_strategy: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub order_mode: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub ev_solo_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 68 | /// 入场价下限:太便宜(<此值)往往是方向已成定局、赔率差,跳过。 [INFO] [stdout] 69 | pub ev_solo_min_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 70 | /// 单边份额。 [INFO] [stdout] 71 | pub ev_solo_qty: f64, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub ev_solo_min_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub ev_solo_flow_gate: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub zscore_use_binance_dir: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub zscore_min_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 86 | pub zscore_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub zscore_min_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 88 | pub zscore_flow_gate: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub sniper_move_usd: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 95 | /// 速度窗口(秒):0=相对开盘价累计;>0=最近 N 秒内变动(纯速度,更抓快突破)。 [INFO] [stdout] 96 | pub sniper_window_sec: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 97 | /// 限价闸(灵魂):仅当对应方向 ask<此值才买。盘口已反应(ask 高)则放弃这盘。 [INFO] [stdout] 98 | pub sniper_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 99 | /// 单边份额。 [INFO] [stdout] 100 | pub sniper_qty: f64, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub sniper_buy_limit: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub accum_qty: f64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 108 | /// 首笔定方向阈值:|z|≥此值才开首笔主腿。 [INFO] [stdout] 109 | pub accum_entry_z: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 110 | /// 临近结算停建:剩余秒≤此值不再下单。 [INFO] [stdout] 111 | pub accum_force_seconds: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 112 | /// 追涨档(谁涨追谁,升序):任一边 ask≥某档且未追过 → 追买那边 accum_qty 份。 [INFO] [stdout] 113 | pub accum_chase_levels: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 114 | /// 补仓档(谁跌补谁,降序):任一边 ask≤某档且未补过 → 计算模块补那边(份额算出)。 [INFO] [stdout] 115 | pub accum_dip_levels: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 116 | /// 计算模块:主腿方向赢的结算 PnL 目标(补到 ≥此值)。 [INFO] [stdout] 117 | pub accum_target_win: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 118 | /// 计算模块:主腿方向输的最大亏损(补到结算 PnL ≥ −此值)。 [INFO] [stdout] 119 | pub accum_max_loss: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 120 | /// 晚场顺势补救:剩余秒<此值才触发(临结算市场已收敛区)。 [INFO] [stdout] 121 | pub accum_rescue_secs: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 122 | /// 晚场补救收敛带下/上限:某边 ask∈(lo,hi) 视为"市场已选定该边"。 [INFO] [stdout] 123 | pub accum_rescue_lo: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 124 | pub accum_rescue_hi: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 125 | /// 晚场补救:顺势补强势边到"该边赢结算 PnL >此值"(cap 不限)。 [INFO] [stdout] 126 | pub accum_rescue_goal: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub maker_quote_ttl_secs: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 131 | /// 盘口移动超过几个 0.01 tick 就撤旧挂新(cancel/replace 判断)。 [INFO] [stdout] 132 | pub maker_replace_ticks: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 133 | /// zquote 看涨侧挂单价。 [INFO] [stdout] 134 | pub zquote_up_px: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 135 | /// zquote 看跌侧挂单价。 [INFO] [stdout] 136 | pub zquote_dn_px: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub poll_ms: u64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 140 | pub state_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 141 | pub signal_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 142 | pub log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub book_record_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub z_record_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 150 | /// 录制输出目录:每天一个 quant_book-YYYYMMDD.jsonl [INFO] [stdout] 151 | pub book_record_dir: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 152 | /// 旧版单文件逐秒盘口日志(quant_book.jsonl,仅当前盘)。默认关:已被 tick 采集器取代。 [INFO] [stdout] 153 | pub book_legacy_log_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `seconds_left` and `token_for` are never used [INFO] [stdout] --> src/cli/../clob.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl Market { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 21 | pub fn seconds_left(&self) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn token_for(&self, outcome: &str) -> Option<&str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderBook` is never constructed [INFO] [stdout] --> src/cli/../clob.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `best_ask` and `best_bid` are never used [INFO] [stdout] --> src/cli/../clob.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl OrderBook { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 45 | pub fn best_ask(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn best_bid(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `BookCache` is never used [INFO] [stdout] --> src/cli/../clob.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | pub type BookCache = Arc>>; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_book_cache` is never used [INFO] [stdout] --> src/cli/../clob.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn new_book_cache() -> BookCache { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `clob_api` is never read [INFO] [stdout] --> src/cli/../clob.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct ClobClient { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 60 | http: reqwest::Client, [INFO] [stdout] 61 | pub clob_api: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `fetch_winning_outcome` and `fetch_book` are never used [INFO] [stdout] --> src/cli/../clob.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 66 | impl ClobClient { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn fetch_winning_outcome(&self, slug: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 161 | pub async fn fetch_book(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_book` is never used [INFO] [stdout] --> src/cli/../clob.rs:209:8 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn parse_book(v: &serde_json::Value) -> OrderBook { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BINANCE_WS` is never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:7:7 [INFO] [stdout] | [INFO] [stdout] 7 | const BINANCE_WS: &str = "wss://data-stream.binance.vision/ws/btcusdt@aggTrade"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `HISTORY_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const HISTORY_SEC: i64 = 350; // 狙击需取开盘价(盘最长300s):存够整盘+buffer [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TradePoint` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct TradePoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FlowSignal` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct FlowSignal { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BinanceFeed` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct BinanceFeed { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 38 | impl BinanceFeed { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 39 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn updated_handle(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn at_ts(&self, target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn at_ts_tol(&self, target_ts: i64, tol_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn snapshot(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn flow(&self, now: i64, window_sec: i64) -> FlowSignal { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub fn run(self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | async fn connect_once(&self) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 118 | fn handle(&self, text: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RTDS_URL` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const RTDS_URL: &str = "wss://ws-live-data.polymarket.com"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `HISTORY_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const HISTORY_SEC: i64 = 420; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `AT_TS_TOLERANCE_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | const AT_TS_TOLERANCE_SEC: i64 = 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PricePoint` is never constructed [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct PricePoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChainlinkFeed` is never constructed [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct ChainlinkFeed { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ChainlinkFeed { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 30 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn updated_handle(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn at_ts(&self, target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn snapshot(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn run(self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | async fn connect_once(&self) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | fn handle(&self, text: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `up_avg_full`, `down_avg_full`, `add_trade`, `pnl_if_down_wins`, `worst_pnl`, and `worst_pnl_if_add` are never used [INFO] [stdout] --> src/cli/../position.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 89 | impl MarketPosition { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 100 | pub fn up_avg_full(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn down_avg_full(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn add_trade(&mut self, trade: TradeRecord) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | pub fn pnl_if_down_wins(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | pub fn worst_pnl(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | pub fn worst_pnl_if_add(&self, side: &str, price: f64, shares: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SmartStateStore` is never constructed [INFO] [stdout] --> src/cli/../state.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct SmartStateStore { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../state.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 12 | impl SmartStateStore { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 13 | pub async fn load(path: PathBuf) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn get_or_create(&mut self, slug: &str, end_ts: i64) -> &mut MarketPosition { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn get(&self, slug: &str) -> Option<&MarketPosition> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn open_order_slugs(&self) -> Vec<(String, i64)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn pending_settlement(&self) -> Vec<(String, MarketPosition)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn summary(&self) -> Summary { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | pub async fn save(&self) -> Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Summary` is never constructed [INFO] [stdout] --> src/cli/../state.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | pub struct Summary { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Fill` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct Fill { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `simulated` is never used [INFO] [stdout] --> src/cli/../executor.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 40 | impl Fill { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 41 | fn simulated(price: f64, shares: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderExecutor` is never used [INFO] [stdout] --> src/cli/../executor.rs:72:10 [INFO] [stdout] | [INFO] [stdout] 72 | pub enum OrderExecutor { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../executor.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 82 | impl OrderExecutor { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 83 | /// 根据配置构建执行器。LIVE 模式会在此完成认证(派生 API creds)。 [INFO] [stdout] 84 | pub async fn new(config: &Config) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub async fn buy(&self, token_id: &str, price: f64, shares: f64, limit_price: Option) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | pub async fn buy_fak(&self, token_id: &str, price: f64, shares: f64, limit_price: Option) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn buy_with(&self, token_id: &str, price: f64, shares: f64, limit_price: Option, order_type: OrderType) -> Result Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 363 | pub async fn query_order(&self, order_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 388 | pub async fn maker_fills(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 417 | pub async fn cancel(&self, order_id: &str) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 431 | pub async fn list_open_orders(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 466 | pub async fn usdc_balance(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 485 | pub async fn best_bid_ask(&self, token_id: &str) -> Result<(f64, f64)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 508 | pub async fn fee_rate_bps(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenOrderInfo` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:523:12 [INFO] [stdout] | [INFO] [stdout] 523 | pub struct OpenOrderInfo { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderState` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:535:12 [INFO] [stdout] | [INFO] [stdout] 535 | pub struct OrderState { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_sig_type` is never used [INFO] [stdout] --> src/cli/../executor.rs:548:4 [INFO] [stdout] | [INFO] [stdout] 548 | fn map_sig_type(t: u8) -> SignatureType { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Recorder` is never constructed [INFO] [stdout] --> src/cli/../recorder.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Recorder { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `spawn` and `record` are never used [INFO] [stdout] --> src/cli/../recorder.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Recorder { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 22 | /// 创建采集器并 spawn 后台 writer。dir 不存在会自动创建。 [INFO] [stdout] 23 | pub fn spawn(dir: PathBuf) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn record(&self, line: String) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `writer_loop` is never used [INFO] [stdout] --> src/cli/../recorder.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | async fn writer_loop(dir: PathBuf, mut rx: mpsc::UnboundedReceiver) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_day` is never used [INFO] [stdout] --> src/cli/../recorder.rs:80:4 [INFO] [stdout] | [INFO] [stdout] 80 | fn beijing_day() -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Inner` is never constructed [INFO] [stdout] --> src/cli/../ws.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct Inner { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarketWs` is never constructed [INFO] [stdout] --> src/cli/../ws.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct MarketWs(Arc); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../ws.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl MarketWs { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 27 | pub fn new(url: &str, cache: BookCache, recorder: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub async fn wait_book_update(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub async fn ensure_subscribed(&self, token_ids: &[String]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn run(&self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | async fn connect_once(&self) -> anyhow::Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | async fn send_subscribe( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | async fn handle_message(&self, text: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `book_snapshot_line` is never used [INFO] [stdout] --> src/cli/../ws.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | fn book_snapshot_line(asset_id: &str, ts_ms: i64, book: &OrderBook) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_price_change` is never used [INFO] [stdout] --> src/cli/../ws.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn apply_price_change(book: &mut crate::clob::OrderBook, event: &serde_json::Value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_WIN_SHORT` is never used [INFO] [stdout] --> src/cli/../zscore.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const MOM_WIN_SHORT: i64 = 2; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_WIN_LONG` is never used [INFO] [stdout] --> src/cli/../zscore.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const MOM_WIN_LONG: i64 = 5; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_W_SHORT` is never used [INFO] [stdout] --> src/cli/../zscore.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const MOM_W_SHORT: f64 = 0.60; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_W_LONG` is never used [INFO] [stdout] --> src/cli/../zscore.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const MOM_W_LONG: f64 = 0.30; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `DirSource` is never used [INFO] [stdout] --> src/cli/../zscore.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | pub enum DirSource { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZSignal` is never constructed [INFO] [stdout] --> src/cli/../zscore.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct ZSignal { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `direction` is never used [INFO] [stdout] --> src/cli/../zscore.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ZSignal { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 43 | /// z ≥ 0.15 买 Up,z ≤ -0.15 买 Down,|z| < 0.15 不入场 [INFO] [stdout] 44 | pub fn direction(&self) -> Option<&'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZScoreModel` is never constructed [INFO] [stdout] --> src/cli/../zscore.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | pub struct ZScoreModel { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../zscore.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl ZScoreModel { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 57 | pub fn new(chainlink: ChainlinkFeed, binance: BinanceFeed) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 62 | pub fn chainlink_at(&self, ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn chainlink_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | pub fn binance_at(&self, ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn binance_at_tol(&self, ts: i64, tol_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn binance_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn binance_flow(&self, now: i64, window_sec: i64) -> crate::feeds::FlowSignal { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn binance_momentum(&self, now: i64, window_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn compute(&self, price_to_beat: f64, seconds_left: i64, dir_src: DirSource) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute_basis60` is never used [INFO] [stdout] --> src/cli/../zscore.rs:196:4 [INFO] [stdout] | [INFO] [stdout] 196 | fn compute_basis60(now: i64, cl: &[PricePoint], bn: &[TradePoint]) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute_sigma120` is never used [INFO] [stdout] --> src/cli/../zscore.rs:212:4 [INFO] [stdout] | [INFO] [stdout] 212 | fn compute_sigma120(now: i64, bn: &[TradePoint]) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normal_cdf` is never used [INFO] [stdout] --> src/cli/../zscore.rs:233:8 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn normal_cdf(z: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `calib` and `threshold` are never read [INFO] [stdout] --> src/cli/../model.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct LgbModel { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 49 | calib: Option<(Vec, Vec)>, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 50 | /// 下注阈值(meta.json):校准概率 ≥ 此值才算"模型建议下注"。 [INFO] [stdout] 51 | pub threshold: f64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `predict_proba` and `calibrate` are never used [INFO] [stdout] --> src/cli/../model.rs:102:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl LgbModel { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn predict_proba(&self, feat: &Value) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | fn calibrate(&self, p: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `price_nearest` is never used [INFO] [stdout] --> src/cli/../momentum.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn price_nearest(bn: &[TradePoint], target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `momentum_on` is never used [INFO] [stdout] --> src/cli/../momentum.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn momentum_on(bn: &[TradePoint], now: i64, window_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ARB_THRESHOLD` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const ARB_THRESHOLD: f64 = 0.995; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TREND_STEP` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | pub(crate) const TREND_STEP: f64 = 0.05; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_TREND_TRADES` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) const MAX_TREND_TRADES: usize = 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TREND_WORST_PNL_FLOOR_FACTOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | pub(crate) const TREND_WORST_PNL_FLOOR_FACTOR: f64 = 6.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REBALANCE_MIN_IMPROVE_FACTOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:32:18 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) const REBALANCE_MIN_IMPROVE_FACTOR: f64 = 0.2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LOTTERY_MAX_PRICE` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) const LOTTERY_MAX_PRICE: f64 = 0.10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MICRO_DIVISOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | pub(crate) const MICRO_DIVISOR: f64 = 4.0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENTRY_MIN_SECONDS_LEFT` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | pub(crate) const ENTRY_MIN_SECONDS_LEFT: i64 = 60; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SETTLEMENT_CHECK_INTERVAL` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | const SETTLEMENT_CHECK_INTERVAL: i64 = 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `strategy_order_shares` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:43:15 [INFO] [stdout] | [INFO] [stdout] 43 | pub(crate) fn strategy_order_shares(shares: f64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SmartStrategy` is never constructed [INFO] [stdout] --> src/cli/../strategy/smart.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct SmartStrategy { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AccumLeg` is never constructed [INFO] [stdout] --> src/cli/../strategy/smart.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | pub struct AccumLeg { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `model_mtime` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn model_mtime(dir: &std::path::Path) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ideal_path` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:130:4 [INFO] [stdout] | [INFO] [stdout] 130 | fn ideal_path(p: &std::path::Path) -> PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:138:18 [INFO] [stdout] | [INFO] [stdout] 137 | impl SmartStrategy { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 138 | pub async fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub async fn run_once(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 333 | async fn get_or_fetch_market(&mut self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 354 | fn maybe_reload_shadow(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 366 | pub(crate) async fn do_buy( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 437 | pub(crate) async fn do_lock( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 486 | pub(crate) fn order_shares(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 491 | pub(crate) async fn write_signal(&self, v: &serde_json::Value) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `record_trade` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:501:15 [INFO] [stdout] | [INFO] [stdout] 501 | pub(crate) fn record_trade( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_time` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:532:4 [INFO] [stdout] | [INFO] [stdout] 532 | fn beijing_time(ts: i64) -> String { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_now` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:539:15 [INFO] [stdout] | [INFO] [stdout] 539 | pub(crate) fn beijing_now() -> String { beijing_time(chrono::Utc::now().timestamp()) } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `place_order` is never used [INFO] [stdout] --> src/cli/../strategy/order_market.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 5 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn place_order( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `do_buy_maker`, `do_buy_maker_at`, and `harvest_makers` are never used [INFO] [stdout] --> src/cli/../strategy/order_maker.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn do_buy_maker( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub(crate) async fn do_buy_maker_at( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) async fn harvest_makers(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `decide_waiting` and `decide_holding` are never used [INFO] [stdout] --> src/cli/../strategy/strat_zscore.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 12 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub(crate) async fn decide_waiting( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) async fn decide_holding( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_ev_solo` is never used [INFO] [stdout] --> src/cli/../strategy/strat_ev_solo.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn decide_ev_solo( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_sniper` is never used [INFO] [stdout] --> src/cli/../strategy/strat_sniper.rs:11:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 11 | pub(crate) async fn decide_sniper( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `decide_accum`, `accum_pnl`, `accum_calc_qty`, and `accum_buy` are never used [INFO] [stdout] --> src/cli/../strategy/strat_accum.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 17 | pub(crate) async fn decide_accum( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 166 | pub(crate) fn accum_pnl(&mut self, slug: &str, end_ts: i64, main_dir: &str) -> (f64, f64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | pub(crate) fn accum_calc_qty(&mut self, slug: &str, end_ts: i64, main_dir: &str, side: &str, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | pub(crate) async fn accum_buy(&mut self, market: &Market, dir: &str, price: f64, shares: f64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_zquote` is never used [INFO] [stdout] --> src/cli/../strategy/strat_zquote.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 13 | pub(crate) async fn decide_zquote( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `check_settlements` is never used [INFO] [stdout] --> src/cli/../strategy/settlement.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn check_settlements(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `record_train_sample`, `build_features`, `add_book_depth`, and `write_token_map` are never used [INFO] [stdout] --> src/cli/../strategy/features.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn record_train_sample(&self, market: &Market, up_ask: f64, dn_ask: f64, seconds_left: i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub(crate) fn build_features( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub(crate) async fn add_book_depth(&self, feat: &mut serde_json::Value, market: &Market) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub(crate) async fn write_token_map(&self, market: &Market) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `reconcile_on_startup` is never used [INFO] [stdout] --> src/cli/../strategy/reconcile.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn reconcile_on_startup(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/cli/../config.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub clob_v2_api_url: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 11 | pub gamma_api_url: String, [INFO] [stdout] 12 | pub chain_id: u64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 13 | pub signature_type: u8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 14 | pub private_key: Option, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 15 | pub deposit_wallet: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub dry_run: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub market_ws_url: String, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub order_shares: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 26 | pub min_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | pub max_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | pub min_lock_profit: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub fee_rate: Decimal, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 30 | pub max_entry_delay_sec: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 31 | pub min_seconds_left: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub lock_min_profit_factor: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 36 | /// 追单价格上限:main_ask 高于此值不再追单 [INFO] [stdout] 37 | pub trend_chase_max_price: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 38 | /// 强制锁线(秒):剩余 ≤ 此值触发强制处理 [INFO] [stdout] 39 | pub force_lock_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 40 | /// 强制亏损模式:"smooth"=按趋势顺势加注锁利;"lock"=旧行为等额对锁(锁亏) [INFO] [stdout] 41 | pub force_loss_mode: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 42 | /// 磨平预算倍数:smooth 模式顺势加注最多再花 entry成本 × 此值 [INFO] [stdout] 43 | pub smooth_budget_mult: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub stop_loss_factor: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | /// 早止损价格上限:对面 ask > 此值(天价)则不锁、裸持到结算,避免高价接盘放大亏损。 [INFO] [stdout] 48 | pub stop_loss_max_opp: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub stop_loss_max_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub entry_strategy: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub order_mode: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub ev_solo_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 68 | /// 入场价下限:太便宜(<此值)往往是方向已成定局、赔率差,跳过。 [INFO] [stdout] 69 | pub ev_solo_min_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 70 | /// 单边份额。 [INFO] [stdout] 71 | pub ev_solo_qty: f64, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub ev_solo_min_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub ev_solo_flow_gate: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub zscore_use_binance_dir: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub zscore_min_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 86 | pub zscore_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub zscore_min_seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 88 | pub zscore_flow_gate: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub sniper_move_usd: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 95 | /// 速度窗口(秒):0=相对开盘价累计;>0=最近 N 秒内变动(纯速度,更抓快突破)。 [INFO] [stdout] 96 | pub sniper_window_sec: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 97 | /// 限价闸(灵魂):仅当对应方向 ask<此值才买。盘口已反应(ask 高)则放弃这盘。 [INFO] [stdout] 98 | pub sniper_max_ask: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 99 | /// 单边份额。 [INFO] [stdout] 100 | pub sniper_qty: f64, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub sniper_buy_limit: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub accum_qty: f64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 108 | /// 首笔定方向阈值:|z|≥此值才开首笔主腿。 [INFO] [stdout] 109 | pub accum_entry_z: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 110 | /// 临近结算停建:剩余秒≤此值不再下单。 [INFO] [stdout] 111 | pub accum_force_seconds: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 112 | /// 追涨档(谁涨追谁,升序):任一边 ask≥某档且未追过 → 追买那边 accum_qty 份。 [INFO] [stdout] 113 | pub accum_chase_levels: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 114 | /// 补仓档(谁跌补谁,降序):任一边 ask≤某档且未补过 → 计算模块补那边(份额算出)。 [INFO] [stdout] 115 | pub accum_dip_levels: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 116 | /// 计算模块:主腿方向赢的结算 PnL 目标(补到 ≥此值)。 [INFO] [stdout] 117 | pub accum_target_win: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 118 | /// 计算模块:主腿方向输的最大亏损(补到结算 PnL ≥ −此值)。 [INFO] [stdout] 119 | pub accum_max_loss: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 120 | /// 晚场顺势补救:剩余秒<此值才触发(临结算市场已收敛区)。 [INFO] [stdout] 121 | pub accum_rescue_secs: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 122 | /// 晚场补救收敛带下/上限:某边 ask∈(lo,hi) 视为"市场已选定该边"。 [INFO] [stdout] 123 | pub accum_rescue_lo: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 124 | pub accum_rescue_hi: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 125 | /// 晚场补救:顺势补强势边到"该边赢结算 PnL >此值"(cap 不限)。 [INFO] [stdout] 126 | pub accum_rescue_goal: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 130 | pub maker_quote_ttl_secs: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 131 | /// 盘口移动超过几个 0.01 tick 就撤旧挂新(cancel/replace 判断)。 [INFO] [stdout] 132 | pub maker_replace_ticks: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 133 | /// zquote 看涨侧挂单价。 [INFO] [stdout] 134 | pub zquote_up_px: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 135 | /// zquote 看跌侧挂单价。 [INFO] [stdout] 136 | pub zquote_dn_px: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub poll_ms: u64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 140 | pub state_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 141 | pub signal_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 142 | pub log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub book_record_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub z_record_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] 150 | /// 录制输出目录:每天一个 quant_book-YYYYMMDD.jsonl [INFO] [stdout] 151 | pub book_record_dir: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 152 | /// 旧版单文件逐秒盘口日志(quant_book.jsonl,仅当前盘)。默认关:已被 tick 采集器取代。 [INFO] [stdout] 153 | pub book_legacy_log_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `seconds_left` and `token_for` are never used [INFO] [stdout] --> src/cli/../clob.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl Market { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 21 | pub fn seconds_left(&self) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn token_for(&self, outcome: &str) -> Option<&str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderBook` is never constructed [INFO] [stdout] --> src/cli/../clob.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct OrderBook { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `best_ask` and `best_bid` are never used [INFO] [stdout] --> src/cli/../clob.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl OrderBook { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 45 | pub fn best_ask(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn best_bid(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `BookCache` is never used [INFO] [stdout] --> src/cli/../clob.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | pub type BookCache = Arc>>; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_book_cache` is never used [INFO] [stdout] --> src/cli/../clob.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn new_book_cache() -> BookCache { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `clob_api` is never read [INFO] [stdout] --> src/cli/../clob.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct ClobClient { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 60 | http: reqwest::Client, [INFO] [stdout] 61 | pub clob_api: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `fetch_winning_outcome` and `fetch_book` are never used [INFO] [stdout] --> src/cli/../clob.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 66 | impl ClobClient { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 94 | pub async fn fetch_winning_outcome(&self, slug: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 161 | pub async fn fetch_book(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_book` is never used [INFO] [stdout] --> src/cli/../clob.rs:209:8 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn parse_book(v: &serde_json::Value) -> OrderBook { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BINANCE_WS` is never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:7:7 [INFO] [stdout] | [INFO] [stdout] 7 | const BINANCE_WS: &str = "wss://data-stream.binance.vision/ws/btcusdt@aggTrade"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `HISTORY_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const HISTORY_SEC: i64 = 350; // 狙击需取开盘价(盘最长300s):存够整盘+buffer [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TradePoint` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct TradePoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FlowSignal` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct FlowSignal { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BinanceFeed` is never constructed [INFO] [stdout] --> src/cli/../feeds/binance.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct BinanceFeed { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../feeds/binance.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 38 | impl BinanceFeed { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 39 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn updated_handle(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn at_ts(&self, target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn at_ts_tol(&self, target_ts: i64, tol_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn snapshot(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn flow(&self, now: i64, window_sec: i64) -> FlowSignal { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub fn run(self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | async fn connect_once(&self) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 118 | fn handle(&self, text: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RTDS_URL` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const RTDS_URL: &str = "wss://ws-live-data.polymarket.com"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `HISTORY_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const HISTORY_SEC: i64 = 420; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `AT_TS_TOLERANCE_SEC` is never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | const AT_TS_TOLERANCE_SEC: i64 = 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PricePoint` is never constructed [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct PricePoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChainlinkFeed` is never constructed [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct ChainlinkFeed { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../feeds/chainlink.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ChainlinkFeed { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 30 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn updated_handle(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn at_ts(&self, target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn snapshot(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn run(self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | async fn connect_once(&self) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | fn handle(&self, text: &str) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `taker_fee` is never used [INFO] [stdout] --> src/cli/../position.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn taker_fee(price: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `full_cost_per_share` is never used [INFO] [stdout] --> src/cli/../position.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn full_cost_per_share(price: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../position.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 89 | impl MarketPosition { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 90 | pub fn new(slug: &str, end_ts: i64, price_to_beat: f64) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 100 | pub fn up_avg_full(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn down_avg_full(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn add_trade(&mut self, trade: TradeRecord) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub fn pnl_if_up_wins(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | pub fn pnl_if_down_wins(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 142 | pub fn settle_pnl(&self, winner: &str) -> f64 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | pub fn worst_pnl(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | pub fn worst_pnl_if_add(&self, side: &str, price: f64, shares: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SmartStateStore` is never constructed [INFO] [stdout] --> src/cli/../state.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct SmartStateStore { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../state.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 12 | impl SmartStateStore { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 13 | pub async fn load(path: PathBuf) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn get_or_create(&mut self, slug: &str, end_ts: i64) -> &mut MarketPosition { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn get(&self, slug: &str) -> Option<&MarketPosition> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn open_order_slugs(&self) -> Vec<(String, i64)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn pending_settlement(&self) -> Vec<(String, MarketPosition)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn summary(&self) -> Summary { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | pub async fn save(&self) -> Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Summary` is never constructed [INFO] [stdout] --> src/cli/../state.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | pub struct Summary { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Fill` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct Fill { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `simulated` is never used [INFO] [stdout] --> src/cli/../executor.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 40 | impl Fill { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 41 | fn simulated(price: f64, shares: f64) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normalize_order_shares` is never used [INFO] [stdout] --> src/cli/../executor.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn normalize_order_shares(shares: f64) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `clob_price_string` is never used [INFO] [stdout] --> src/cli/../executor.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn clob_price_string(price: f64) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OrderExecutor` is never used [INFO] [stdout] --> src/cli/../executor.rs:72:10 [INFO] [stdout] | [INFO] [stdout] 72 | pub enum OrderExecutor { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../executor.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 82 | impl OrderExecutor { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 83 | /// 根据配置构建执行器。LIVE 模式会在此完成认证(派生 API creds)。 [INFO] [stdout] 84 | pub async fn new(config: &Config) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub async fn buy(&self, token_id: &str, price: f64, shares: f64, limit_price: Option) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | pub async fn buy_fak(&self, token_id: &str, price: f64, shares: f64, limit_price: Option) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | async fn buy_with(&self, token_id: &str, price: f64, shares: f64, limit_price: Option, order_type: OrderType) -> Result Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 363 | pub async fn query_order(&self, order_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 388 | pub async fn maker_fills(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 417 | pub async fn cancel(&self, order_id: &str) -> Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 431 | pub async fn list_open_orders(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 466 | pub async fn usdc_balance(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 485 | pub async fn best_bid_ask(&self, token_id: &str) -> Result<(f64, f64)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 508 | pub async fn fee_rate_bps(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenOrderInfo` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:523:12 [INFO] [stdout] | [INFO] [stdout] 523 | pub struct OpenOrderInfo { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OrderState` is never constructed [INFO] [stdout] --> src/cli/../executor.rs:535:12 [INFO] [stdout] | [INFO] [stdout] 535 | pub struct OrderState { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_sig_type` is never used [INFO] [stdout] --> src/cli/../executor.rs:548:4 [INFO] [stdout] | [INFO] [stdout] 548 | fn map_sig_type(t: u8) -> SignatureType { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Recorder` is never constructed [INFO] [stdout] --> src/cli/../recorder.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Recorder { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `spawn` and `record` are never used [INFO] [stdout] --> src/cli/../recorder.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Recorder { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 22 | /// 创建采集器并 spawn 后台 writer。dir 不存在会自动创建。 [INFO] [stdout] 23 | pub fn spawn(dir: PathBuf) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn record(&self, line: String) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `writer_loop` is never used [INFO] [stdout] --> src/cli/../recorder.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | async fn writer_loop(dir: PathBuf, mut rx: mpsc::UnboundedReceiver) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_day` is never used [INFO] [stdout] --> src/cli/../recorder.rs:80:4 [INFO] [stdout] | [INFO] [stdout] 80 | fn beijing_day() -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Inner` is never constructed [INFO] [stdout] --> src/cli/../ws.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct Inner { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MarketWs` is never constructed [INFO] [stdout] --> src/cli/../ws.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct MarketWs(Arc); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../ws.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl MarketWs { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 27 | pub fn new(url: &str, cache: BookCache, recorder: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub async fn wait_book_update(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub async fn ensure_subscribed(&self, token_ids: &[String]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn run(&self) -> tokio::task::JoinHandle<()> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | async fn connect_once(&self) -> anyhow::Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | async fn send_subscribe( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | async fn handle_message(&self, text: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `book_snapshot_line` is never used [INFO] [stdout] --> src/cli/../ws.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | fn book_snapshot_line(asset_id: &str, ts_ms: i64, book: &OrderBook) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_price_change` is never used [INFO] [stdout] --> src/cli/../ws.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn apply_price_change(book: &mut crate::clob::OrderBook, event: &serde_json::Value) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_WIN_SHORT` is never used [INFO] [stdout] --> src/cli/../zscore.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const MOM_WIN_SHORT: i64 = 2; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_WIN_LONG` is never used [INFO] [stdout] --> src/cli/../zscore.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const MOM_WIN_LONG: i64 = 5; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_W_SHORT` is never used [INFO] [stdout] --> src/cli/../zscore.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const MOM_W_SHORT: f64 = 0.60; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MOM_W_LONG` is never used [INFO] [stdout] --> src/cli/../zscore.rs:11:7 [INFO] [stdout] | [INFO] [stdout] 11 | const MOM_W_LONG: f64 = 0.30; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `DirSource` is never used [INFO] [stdout] --> src/cli/../zscore.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | pub enum DirSource { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZSignal` is never constructed [INFO] [stdout] --> src/cli/../zscore.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct ZSignal { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `direction` is never used [INFO] [stdout] --> src/cli/../zscore.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ZSignal { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 43 | /// z ≥ 0.15 买 Up,z ≤ -0.15 买 Down,|z| < 0.15 不入场 [INFO] [stdout] 44 | pub fn direction(&self) -> Option<&'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZScoreModel` is never constructed [INFO] [stdout] --> src/cli/../zscore.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 51 | pub struct ZScoreModel { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../zscore.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl ZScoreModel { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 57 | pub fn new(chainlink: ChainlinkFeed, binance: BinanceFeed) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 62 | pub fn chainlink_at(&self, ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn chainlink_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | pub fn binance_at(&self, ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn binance_at_tol(&self, ts: i64, tol_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | pub fn binance_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn binance_flow(&self, now: i64, window_sec: i64) -> crate::feeds::FlowSignal { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn binance_momentum(&self, now: i64, window_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 106 | pub fn compute(&self, price_to_beat: f64, seconds_left: i64, dir_src: DirSource) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute_basis60` is never used [INFO] [stdout] --> src/cli/../zscore.rs:196:4 [INFO] [stdout] | [INFO] [stdout] 196 | fn compute_basis60(now: i64, cl: &[PricePoint], bn: &[TradePoint]) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute_sigma120` is never used [INFO] [stdout] --> src/cli/../zscore.rs:212:4 [INFO] [stdout] | [INFO] [stdout] 212 | fn compute_sigma120(now: i64, bn: &[TradePoint]) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normal_cdf` is never used [INFO] [stdout] --> src/cli/../zscore.rs:233:8 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn normal_cdf(z: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Tree` is never constructed [INFO] [stdout] --> src/cli/../model.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Tree { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `eval` is never used [INFO] [stdout] --> src/cli/../model.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Tree { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 26 | fn eval(&self, x: &[f64]) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LgbModel` is never constructed [INFO] [stdout] --> src/cli/../model.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct LgbModel { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `load`, `vectorize`, `predict_raw_proba`, `predict_proba`, and `calibrate` are never used [INFO] [stdout] --> src/cli/../model.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl LgbModel { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 55 | /// 从模型目录加载。缺 model.txt / meta.json 或解析不出树则返回 None(影子静默跳过)。 [INFO] [stdout] 56 | pub fn load(model_dir: &Path) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | fn vectorize(&self, feat: &Value) -> Option> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn predict_raw_proba(&self, feat: &Value) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn predict_proba(&self, feat: &Value) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | fn calibrate(&self, p: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_model_txt` is never used [INFO] [stdout] --> src/cli/../model.rs:133:4 [INFO] [stdout] | [INFO] [stdout] 133 | fn parse_model_txt(text: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nums_usize` is never used [INFO] [stdout] --> src/cli/../model.rs:164:4 [INFO] [stdout] | [INFO] [stdout] 164 | fn nums_usize(s: Option<&String>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nums_i32` is never used [INFO] [stdout] --> src/cli/../model.rs:168:4 [INFO] [stdout] | [INFO] [stdout] 168 | fn nums_i32(s: Option<&String>) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nums_f64` is never used [INFO] [stdout] --> src/cli/../model.rs:172:4 [INFO] [stdout] | [INFO] [stdout] 172 | fn nums_f64(s: Option<&String>) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_tree` is never used [INFO] [stdout] --> src/cli/../model.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | fn build_tree(m: &std::collections::HashMap) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `price_nearest` is never used [INFO] [stdout] --> src/cli/../momentum.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn price_nearest(bn: &[TradePoint], target_ts: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `momentum_on` is never used [INFO] [stdout] --> src/cli/../momentum.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn momentum_on(bn: &[TradePoint], now: i64, window_sec: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ARB_THRESHOLD` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const ARB_THRESHOLD: f64 = 0.995; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TREND_STEP` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | pub(crate) const TREND_STEP: f64 = 0.05; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_TREND_TRADES` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) const MAX_TREND_TRADES: usize = 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `TREND_WORST_PNL_FLOOR_FACTOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | pub(crate) const TREND_WORST_PNL_FLOOR_FACTOR: f64 = 6.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `REBALANCE_MIN_IMPROVE_FACTOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:32:18 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) const REBALANCE_MIN_IMPROVE_FACTOR: f64 = 0.2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LOTTERY_MAX_PRICE` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) const LOTTERY_MAX_PRICE: f64 = 0.10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MICRO_DIVISOR` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | pub(crate) const MICRO_DIVISOR: f64 = 4.0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENTRY_MIN_SECONDS_LEFT` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | pub(crate) const ENTRY_MIN_SECONDS_LEFT: i64 = 60; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SETTLEMENT_CHECK_INTERVAL` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | const SETTLEMENT_CHECK_INTERVAL: i64 = 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `strategy_order_shares` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:43:15 [INFO] [stdout] | [INFO] [stdout] 43 | pub(crate) fn strategy_order_shares(shares: f64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SmartStrategy` is never constructed [INFO] [stdout] --> src/cli/../strategy/smart.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct SmartStrategy { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AccumLeg` is never constructed [INFO] [stdout] --> src/cli/../strategy/smart.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | pub struct AccumLeg { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `model_mtime` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn model_mtime(dir: &std::path::Path) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ideal_path` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:130:4 [INFO] [stdout] | [INFO] [stdout] 130 | fn ideal_path(p: &std::path::Path) -> PathBuf { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:138:18 [INFO] [stdout] | [INFO] [stdout] 137 | impl SmartStrategy { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 138 | pub async fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | pub async fn run_once(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 333 | async fn get_or_fetch_market(&mut self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 354 | fn maybe_reload_shadow(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 366 | pub(crate) async fn do_buy( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 437 | pub(crate) async fn do_lock( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 486 | pub(crate) fn order_shares(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 491 | pub(crate) async fn write_signal(&self, v: &serde_json::Value) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `record_trade` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:501:15 [INFO] [stdout] | [INFO] [stdout] 501 | pub(crate) fn record_trade( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_time` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:532:4 [INFO] [stdout] | [INFO] [stdout] 532 | fn beijing_time(ts: i64) -> String { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `beijing_now` is never used [INFO] [stdout] --> src/cli/../strategy/smart.rs:539:15 [INFO] [stdout] | [INFO] [stdout] 539 | pub(crate) fn beijing_now() -> String { beijing_time(chrono::Utc::now().timestamp()) } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `place_order` is never used [INFO] [stdout] --> src/cli/../strategy/order_market.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 5 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn place_order( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `do_buy_maker`, `do_buy_maker_at`, and `harvest_makers` are never used [INFO] [stdout] --> src/cli/../strategy/order_maker.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn do_buy_maker( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub(crate) async fn do_buy_maker_at( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) async fn harvest_makers(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `decide_waiting` and `decide_holding` are never used [INFO] [stdout] --> src/cli/../strategy/strat_zscore.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 12 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub(crate) async fn decide_waiting( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub(crate) async fn decide_holding( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_ev_solo` is never used [INFO] [stdout] --> src/cli/../strategy/strat_ev_solo.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn decide_ev_solo( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_sniper` is never used [INFO] [stdout] --> src/cli/../strategy/strat_sniper.rs:11:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 11 | pub(crate) async fn decide_sniper( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `decide_accum`, `accum_pnl`, `accum_calc_qty`, and `accum_buy` are never used [INFO] [stdout] --> src/cli/../strategy/strat_accum.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 7 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 17 | pub(crate) async fn decide_accum( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 166 | pub(crate) fn accum_pnl(&mut self, slug: &str, end_ts: i64, main_dir: &str) -> (f64, f64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | pub(crate) fn accum_calc_qty(&mut self, slug: &str, end_ts: i64, main_dir: &str, side: &str, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | pub(crate) async fn accum_buy(&mut self, market: &Market, dir: &str, price: f64, shares: f64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `decide_zquote` is never used [INFO] [stdout] --> src/cli/../strategy/strat_zquote.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 13 | pub(crate) async fn decide_zquote( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `check_settlements` is never used [INFO] [stdout] --> src/cli/../strategy/settlement.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn check_settlements(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `record_train_sample`, `build_features`, `add_book_depth`, and `write_token_map` are never used [INFO] [stdout] --> src/cli/../strategy/features.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 9 | pub(crate) async fn record_train_sample(&self, market: &Market, up_ask: f64, dn_ask: f64, seconds_left: i64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub(crate) fn build_features( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | pub(crate) async fn add_book_depth(&self, feat: &mut serde_json::Value, market: &Market) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub(crate) async fn write_token_map(&self, market: &Market) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `reconcile_on_startup` is never used [INFO] [stdout] --> src/cli/../strategy/reconcile.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 6 | impl SmartStrategy { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub(crate) async fn reconcile_on_startup(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price_to_beat` [INFO] [stdout] --> src/strategy/order_maker.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | price_to_beat: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_price_to_beat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `tick_size`, `min_order_size`, and `neg_risk` are never read [INFO] [stdout] --> src/clob.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct OrderBook { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 39 | pub tick_size: Decimal, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 40 | pub min_order_size: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 41 | pub neg_risk: bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OrderBook` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `best_bid` is never used [INFO] [stdout] --> src/clob.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl OrderBook { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn best_bid(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `clob_api` is never read [INFO] [stdout] --> src/clob.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct ClobClient { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 60 | http: reqwest::Client, [INFO] [stdout] 61 | pub clob_api: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fetch_book` is never used [INFO] [stdout] --> src/clob.rs:161:18 [INFO] [stdout] | [INFO] [stdout] 66 | impl ClobClient { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 161 | pub async fn fetch_book(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/config.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | pub chain_id: u64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub min_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | pub max_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | pub min_lock_profit: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub fee_rate: Decimal, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 30 | pub max_entry_delay_sec: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 31 | pub min_seconds_left: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub sniper_buy_limit: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 142 | pub log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub book_legacy_log_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `maker_fills`, `best_bid_ask`, and `fee_rate_bps` are never used [INFO] [stdout] --> src/executor.rs:388:18 [INFO] [stdout] | [INFO] [stdout] 82 | impl OrderExecutor { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 388 | pub async fn maker_fills(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 485 | pub async fn best_bid_ask(&self, token_id: &str) -> Result<(f64, f64)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 508 | pub async fn fee_rate_bps(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_size` and `size_matched` are never read [INFO] [stdout] --> src/executor.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 523 | pub struct OpenOrderInfo { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 529 | pub original_size: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 530 | pub size_matched: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenOrderInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `status`, `size`, and `price` are never read [INFO] [stdout] --> src/executor.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 535 | pub struct OrderState { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 536 | /// live / matched / canceled / unmatched / delayed / unknown [INFO] [stdout] 537 | pub status: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 538 | /// 原始下单份额 [INFO] [stdout] 539 | pub size: f64, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 543 | pub price: f64, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OrderState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `latest` is never used [INFO] [stdout] --> src/feeds/chainlink.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ChainlinkFeed { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `book_log_file` and `last_book_log_ts` are never read [INFO] [stdout] --> src/strategy/smart.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct SmartStrategy { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 65 | pub book_log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 66 | /// 盘口日志节流:上次写入的 unix 秒(POLL_MS<1000 时避免重复写同一秒)。 [INFO] [stdout] 67 | pub last_book_log_ts: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seconds_left` is never read [INFO] [stdout] --> src/zscore.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct ZSignal { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 39 | pub seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ZSignal` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `chainlink_latest` is never used [INFO] [stdout] --> src/zscore.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl ZScoreModel { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn chainlink_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `price_to_beat` [INFO] [stdout] --> src/strategy/order_maker.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | price_to_beat: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_price_to_beat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `tick_size`, `min_order_size`, and `neg_risk` are never read [INFO] [stdout] --> src/clob.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct OrderBook { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 39 | pub tick_size: Decimal, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 40 | pub min_order_size: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 41 | pub neg_risk: bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OrderBook` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `best_bid` is never used [INFO] [stdout] --> src/clob.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl OrderBook { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn best_bid(&self) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `clob_api` is never read [INFO] [stdout] --> src/clob.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 59 | pub struct ClobClient { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 60 | http: reqwest::Client, [INFO] [stdout] 61 | pub clob_api: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `fetch_book` is never used [INFO] [stdout] --> src/clob.rs:161:18 [INFO] [stdout] | [INFO] [stdout] 66 | impl ClobClient { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 161 | pub async fn fetch_book(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/config.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | pub chain_id: u64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub min_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 27 | pub max_entry_price: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 28 | pub min_lock_profit: Decimal, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub fee_rate: Decimal, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 30 | pub max_entry_delay_sec: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 31 | pub min_seconds_left: u64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub sniper_buy_limit: f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 142 | pub log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub book_legacy_log_enabled: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `maker_fills`, `best_bid_ask`, and `fee_rate_bps` are never used [INFO] [stdout] --> src/executor.rs:388:18 [INFO] [stdout] | [INFO] [stdout] 82 | impl OrderExecutor { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 388 | pub async fn maker_fills(&self) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 485 | pub async fn best_bid_ask(&self, token_id: &str) -> Result<(f64, f64)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 508 | pub async fn fee_rate_bps(&self, token_id: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `original_size` and `size_matched` are never read [INFO] [stdout] --> src/executor.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 523 | pub struct OpenOrderInfo { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 529 | pub original_size: f64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 530 | pub size_matched: f64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenOrderInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `status`, `size`, and `price` are never read [INFO] [stdout] --> src/executor.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 535 | pub struct OrderState { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 536 | /// live / matched / canceled / unmatched / delayed / unknown [INFO] [stdout] 537 | pub status: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 538 | /// 原始下单份额 [INFO] [stdout] 539 | pub size: f64, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 543 | pub price: f64, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OrderState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `latest` is never used [INFO] [stdout] --> src/feeds/chainlink.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl ChainlinkFeed { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn latest(&self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `book_log_file` and `last_book_log_ts` are never read [INFO] [stdout] --> src/strategy/smart.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 50 | pub struct SmartStrategy { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 65 | pub book_log_file: PathBuf, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 66 | /// 盘口日志节流:上次写入的 unix 秒(POLL_MS<1000 时避免重复写同一秒)。 [INFO] [stdout] 67 | pub last_book_log_ts: i64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seconds_left` is never read [INFO] [stdout] --> src/zscore.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct ZSignal { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 39 | pub seconds_left: i64, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ZSignal` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `chainlink_latest` is never used [INFO] [stdout] --> src/zscore.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 56 | impl ZScoreModel { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 67 | pub fn chainlink_latest(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 11s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: proc-macro-error2 v2.0.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 5` [INFO] running `Command { std: "docker" "inspect" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036", kill_on_drop: false }` [INFO] [stdout] 364e1a6ed44795fdbaea90ff6a7dfa8bbf774ca07dc621819c334cd37b1d7036