Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits
/ functions
Functions
178 in github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits
⨍
Functions
178
◇
Types & classes
69
↓ 25 callers
Method
len
(&self)
src/service/position_store.rs:73
↓ 17 callers
Method
get
(&self, token_id: &str)
src/service/position_store.rs:65
↓ 15 callers
Function
useT
()
landing/src/messages.tsx:1142
↓ 7 callers
Function
check
(filters: &FiltersConfig, market: &MarketInfo)
src/service/eligibility.rs:23
↓ 7 callers
Function
pos
(slug: &str, cat: &str, tags: &[&str], usd: f64)
src/service/position_store.rs:115
↓ 6 callers
Function
market
(slug: &str, category: Option<&str>, tags: &[&str])
src/service/eligibility.rs:81
↓ 6 callers
Method
open
(&self, pos: OpenPosition)
src/service/position_store.rs:57
↓ 5 callers
Function
cfg
(strategy: CopyStrategy)
src/service/strategy.rs:90
↓ 5 callers
Function
size_for_trade
(cfg: &StrategyConfig, trade: &WhaleTrade)
src/service/strategy.rs:26
↓ 4 callers
Function
cfg
()
src/service/risk_guard.rs:129
↓ 4 callers
Function
ci_eq
(a: &str, b: &str)
src/service/order_executor.rs:306
↓ 4 callers
Function
ci_eq
(a: &str, b: &str)
src/service/eligibility.rs:71
↓ 4 callers
Function
pos
(entry: f64, tp: f64, sl: f64, side: Side)
src/service/position_monitor.rs:166
↓ 4 callers
Function
sha256
(input: &[u8])
src/service/clob.rs:360
↓ 4 callers
Function
to_f64_with_decimals
(v: U256, decimals: u32)
src/service/parse.rs:114
↓ 4 callers
Function
trade
(notional: f64, shares: f64)
src/service/strategy.rs:104
↓ 3 callers
Function
adaptive_percent
Smooth interpolation: pct goes from `adaptive_max_percent` at zero notional down to `adaptive_min_percent` as notional grows past `adaptive_threshold_
src/service/strategy.rs:74
↓ 3 callers
Method
check_fast
Synchronous, in-memory only. Call before any network I/O.
src/service/risk_guard.rs:59
↓ 3 callers
Function
clamp_price
Misc small helpers. Clamp a Polymarket limit price to the venue's valid band [0.01, 0.99] and round to the 0.001 tick.
src/utils.rs:5
↓ 3 callers
Method
close
(&self, token_id: &str)
src/service/position_store.rs:61
↓ 3 callers
Method
insert
(&self, info: MarketInfo)
src/service/market_cache.rs:89
↓ 3 callers
Method
is_empty
(&self)
src/service/position_store.rs:77
↓ 3 callers
Function
parse_market
(m: &serde_json::Value)
src/service/market_cache.rs:142
↓ 3 callers
Function
run
(cfg: AppConfig)
src/ui/mod.rs:40
↓ 3 callers
Function
setLang
(next: Lang)
landing/src/i18n.tsx:31
↓ 3 callers
Function
useLang
()
landing/src/i18n.tsx:49
↓ 2 callers
Method
build_signed_order
Build, sign, and prepare an order without posting it. Useful for unit tests and dry-run logging.
src/service/clob.rs:149
↓ 2 callers
Function
ci_eq
(a: &str, b: &str)
src/service/position_store.rs:105
↓ 2 callers
Method
fetch_markets_url
(&self, url: &str)
src/service/market_cache.rs:124
↓ 2 callers
Function
hmac_sha256
(key: &[u8], msg: &[u8])
src/service/clob.rs:333
↓ 2 callers
Method
live_trading_allowed
(&self)
src/config.rs:251
↓ 2 callers
Method
peek
(&self, slug: &str)
src/service/market_cache.rs:78
↓ 2 callers
Method
pnl_pct
Current unrealised P&L percentage given a midprice quote. For BUY entries (long the outcome), gain = +(midprice - entry) / entry. For SELL entries (r
src/service/position_store.rs:35
↓ 2 callers
Method
post_order
Post a fully signed order to `/order`. Requires L2 API credentials.
src/service/clob.rs:212
↓ 2 callers
Method
record_open
(&self, market: &MarketInfo, planned: &PlannedOrder)
src/service/order_executor.rs:241
↓ 2 callers
Function
spawn
Spawns the monitor task. The handle lets the caller observe shutdown independently of the main bot loop.
src/service/position_monitor.rs:38
↓ 2 callers
Function
trade
(shares: f64)
src/service/risk_guard.rs:139
↓ 1 callers
Method
as_u8
(self)
src/models.rs:12
↓ 1 callers
Function
base64_url_no_pad
(data: &[u8])
src/service/clob.rs:430
↓ 1 callers
Function
bot_detail
(kind: BotKind)
src/ui/mod.rs:189
↓ 1 callers
Function
build_filter
(cfg: &AppConfig, whale: &str)
src/bot/copy_trading.rs:161
↓ 1 callers
Method
by_token_id
Resolve a CLOB token id (either YES or NO leg) to its full market info. First consults the in-memory token-index; on miss, queries Gamma.
src/service/market_cache.rs:67
↓ 1 callers
Function
check_exit
(pos: &OpenPosition, midprice: f64)
src/service/position_monitor.rs:25
↓ 1 callers
Method
check_exposure
(&self, market: &MarketInfo, want_usd: f64)
src/service/order_executor.rs:200
↓ 1 callers
Method
check_with_book
Phase two, after the caller has fetched the book.
src/service/risk_guard.rs:98
↓ 1 callers
Method
clob
Return the underlying CLOB client (for the position monitor's exit path).
src/service/order_executor.rs:81
↓ 1 callers
Function
connect
()
landing/src/components/LiveSignalSection.tsx:110
↓ 1 callers
Method
contains_token
Returns true if this market metadata describes the given outcome token.
src/service/market_cache.rs:29
↓ 1 callers
Function
decode_whale_trade
Returns `Ok(Some(trade))` if the log was an `OrderFilled` involving the given whale address (as maker), `Ok(None)` if it was not relevant, or `Err` on
src/service/parse.rs:37
↓ 1 callers
Method
depth_usd
USD-equivalent depth on a given side within `levels` from the top.
src/models.rs:100
↓ 1 callers
Function
draw
(f: &mut Frame, cfg: &AppConfig, state: &mut ListState)
src/ui/mod.rs:109
↓ 1 callers
Method
execute
(&self, trade: &WhaleTrade)
src/service/order_executor.rs:89
↓ 1 callers
Method
fetch_by_slug
(&self, slug: &str)
src/service/market_cache.rs:97
↓ 1 callers
Method
fetch_by_token
(&self, token_id: &str)
src/service/market_cache.rs:107
↓ 1 callers
Method
flip
(self)
src/models.rs:19
↓ 1 callers
Function
hmac_sha256_base64url
HMAC-SHA256 over `data` keyed by `secret`, returned as url-safe base64 without padding — the exact format Polymarket requires.
src/service/clob.rs:324
↓ 1 callers
Method
is_production
(self)
src/bot/mod.rs:52
↓ 1 callers
Method
is_strict
True when at least one allow list is populated — strict allowlist mode.
src/config.rs:151
↓ 1 callers
Method
l2_headers
Build the L2 HMAC auth headers Polymarket expects on signed endpoints.
src/service/clob.rs:247
↓ 1 callers
Function
limit_price_for
(trade: &WhaleTrade, cfg: &AppConfig)
src/service/order_executor.rs:290
↓ 1 callers
Method
midprice
(&self, token_id: &str)
src/service/midprice.rs:38
↓ 1 callers
Function
monitor_once
( pos: &OpenPosition, positions: &PositionStore, clob: &ClobClient, midprice: &dyn MidpriceSou
src/service/position_monitor.rs:80
↓ 1 callers
Method
open_usd_by_category
(&self, category: &str)
src/service/position_store.rs:81
↓ 1 callers
Method
open_usd_by_tag
(&self, tag: &str)
src/service/position_store.rs:95
↓ 1 callers
Function
order_filled_topic
Topic-0 selector for `OrderFilled`, derived once at compile time via the `sol!` macro.
src/service/parse.rs:30
↓ 1 callers
Function
order_type_for
(side: Side)
src/service/order_executor.rs:299
↓ 1 callers
Function
order_type_str
(t: OrderType)
src/service/clob.rs:300
↓ 1 callers
Function
pad_address_to_topic
(addr: &str)
src/bot/copy_trading.rs:178
↓ 1 callers
Function
parse_log
(v: &Value)
src/service/onchain.rs:119
↓ 1 callers
Function
parse_private_key
(raw: &str)
src/service/clob.rs:308
↓ 1 callers
Function
run_once
( ws_url: &str, filter: &LogFilter, tx: &mpsc::Sender<RawLog>, )
src/service/onchain.rs:59
↓ 1 callers
Function
side_str
(side: Side)
src/service/clob.rs:293
↓ 1 callers
Method
snapshot
(&self)
src/service/position_store.rs:69
↓ 1 callers
Function
spawn_subscription
Spawns a task that maintains a Polygon WS connection and forwards matching logs into `tx`. Returns the JoinHandle so the caller can await shutdown.
src/service/onchain.rs:33
↓ 1 callers
Function
topic_to_address
(topic: &str)
src/service/parse.rs:106
↓ 1 callers
Method
tp_sl_for
(&self, market: &MarketInfo)
src/service/order_executor.rs:263
↓ 1 callers
Method
trip
Manual trip — e.g. when a book fetch fails, prefer tripping to firing blind.
src/service/risk_guard.rs:110
↓ 1 callers
Function
ui_loop
(term: &mut Terminal<B>, cfg: AppConfig)
src/ui/mod.rs:55
↓ 1 callers
Function
usd_and_share_amounts
(shares: f64, price: f64, side: Side)
src/service/clob.rs:281
↓ 1 callers
Function
usd_to_shares
Convert a USD amount + limit price into an integer number of shares (rounded down).
src/utils.rs:11
↓ 1 callers
Function
venueLogo
(domain: string)
landing/src/bots.ts:53
↓ 1 callers
Function
venueRepoUrl
(repo: string)
landing/src/bots.ts:52
Function
App
()
landing/src/App.tsx:12
Function
ArrowIcon
()
landing/src/components/Hero.tsx:66
Function
BotCard
({ bot, index }: { bot: BotMeta; index: number })
landing/src/components/BotCard.tsx:5
Function
BotsSection
()
landing/src/components/BotsSection.tsx:5
Function
CtaSection
()
landing/src/components/CtaSection.tsx:4
Function
EngineSection
()
landing/src/components/EngineSection.tsx:3
Function
Footer
()
landing/src/components/Footer.tsx:4
Function
GitHubIcon
()
landing/src/components/Nav.tsx:80
Function
GitHubIcon
()
landing/src/components/Hero.tsx:74
Function
GitHubIcon
()
landing/src/components/CtaSection.tsx:53
Function
Hero
()
landing/src/components/Hero.tsx:4
Function
HowItWorksSection
()
landing/src/components/HowItWorksSection.tsx:4
Function
LangProvider
({ children }: { children: ReactNode })
landing/src/i18n.tsx:28
Function
LangToggle
()
landing/src/components/Nav.tsx:42
Function
LiveSignalSection
()
landing/src/components/LiveSignalSection.tsx:24
Function
Nav
()
landing/src/components/Nav.tsx:5
Function
Pillar
({ title, body }: { title: string; body: string })
landing/src/components/CtaSection.tsx:44
Function
PriceTicker
({ price, direction, change24h, }: { price: number | null; direction: TickDir; change24h: number |
landing/src/components/LiveSignalSection.tsx:220
next →
1–100 of 178, ranked by callers