idx-cli/crates/idx-core/Cargo.toml
hermes b5ae9b98de feat: Stockbit login for the order book, live quotes and daily history
Opt-in, with the user's own Stockbit session from a pasted
credentialStorage cookie (or IDX_STOCKBIT_REFRESH_TOKEN):

- idx stockbit login/status/logout; session file 0600, tokens never shown
- rotating refresh under a cross-process lock; one refresh+retry on 401
- stocks orderbook: depth with lots and orders, OHLC, value, foreign flow
- --provider stockbit quotes from the session API when logged in
- --history-provider stockbit, and auto under the stockbit provider for
  5d-1y daily windows
- MCP get_orderbook and stockbit_status (17 tools)

Endpoints, units and recorded responses from fzn0x/idx (MIT).
2026-10-23 08:35:57 +00:00

39 lines
1.3 KiB
TOML

[package]
name = "idx-core"
description = "Data layer for Indonesian stock market (IDX) market, financial, and ownership data"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "../../README.md"
keywords = ["idx", "stocks", "indonesia", "finance"]
categories = ["finance"]
include = ["/Cargo.toml", "/LICENSE", "/src/**", "/tests/fixtures/**"]
[features]
default = ["ownership"]
ownership = ["dep:rusqlite", "dep:quick-xml", "dep:sha2", "dep:zip"]
# Derives clap::ValueEnum on enums frontends expose as CLI arguments.
clap = ["dep:clap"]
# Fixture-backed mock provider (IDX_USE_MOCK_PROVIDER) for tests only.
testing = []
[dependencies]
clap = { workspace = true, optional = true }
ureq.workspace = true
serde.workspace = true
serde_json.workspace = true
toml.workspace = true
directories = "5"
chrono.workspace = true
thiserror = "2"
fastrand = "2"
# Decodes a Stockbit session JWT's expiry (`exp`); never verifies or signs.
base64 = "0.22"
rusqlite = { workspace = true, optional = true }
quick-xml = { version = "0.37", optional = true }
sha2 = { workspace = true, optional = true }
zip = { workspace = true, optional = true }
scraper = { version = "0.27", default-features = false }