MCPcopy Create free account

hub / github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits / functions

Functions178 in github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits

↓ 25 callersMethodlen
(&self)
src/service/position_store.rs:73
↓ 17 callersMethodget
(&self, token_id: &str)
src/service/position_store.rs:65
↓ 15 callersFunctionuseT
()
landing/src/messages.tsx:1142
↓ 7 callersFunctioncheck
(filters: &FiltersConfig, market: &MarketInfo)
src/service/eligibility.rs:23
↓ 7 callersFunctionpos
(slug: &str, cat: &str, tags: &[&str], usd: f64)
src/service/position_store.rs:115
↓ 6 callersFunctionmarket
(slug: &str, category: Option<&str>, tags: &[&str])
src/service/eligibility.rs:81
↓ 6 callersMethodopen
(&self, pos: OpenPosition)
src/service/position_store.rs:57
↓ 5 callersFunctioncfg
(strategy: CopyStrategy)
src/service/strategy.rs:90
↓ 5 callersFunctionsize_for_trade
(cfg: &StrategyConfig, trade: &WhaleTrade)
src/service/strategy.rs:26
↓ 4 callersFunctioncfg
()
src/service/risk_guard.rs:129
↓ 4 callersFunctionci_eq
(a: &str, b: &str)
src/service/order_executor.rs:306
↓ 4 callersFunctionci_eq
(a: &str, b: &str)
src/service/eligibility.rs:71
↓ 4 callersFunctionpos
(entry: f64, tp: f64, sl: f64, side: Side)
src/service/position_monitor.rs:166
↓ 4 callersFunctionsha256
(input: &[u8])
src/service/clob.rs:360
↓ 4 callersFunctionto_f64_with_decimals
(v: U256, decimals: u32)
src/service/parse.rs:114
↓ 4 callersFunctiontrade
(notional: f64, shares: f64)
src/service/strategy.rs:104
↓ 3 callersFunctionadaptive_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 callersMethodcheck_fast
Synchronous, in-memory only. Call before any network I/O.
src/service/risk_guard.rs:59
↓ 3 callersFunctionclamp_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 callersMethodclose
(&self, token_id: &str)
src/service/position_store.rs:61
↓ 3 callersMethodinsert
(&self, info: MarketInfo)
src/service/market_cache.rs:89
↓ 3 callersMethodis_empty
(&self)
src/service/position_store.rs:77
↓ 3 callersFunctionparse_market
(m: &serde_json::Value)
src/service/market_cache.rs:142
↓ 3 callersFunctionrun
(cfg: AppConfig)
src/ui/mod.rs:40
↓ 3 callersFunctionsetLang
(next: Lang)
landing/src/i18n.tsx:31
↓ 3 callersFunctionuseLang
()
landing/src/i18n.tsx:49
↓ 2 callersMethodbuild_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 callersFunctionci_eq
(a: &str, b: &str)
src/service/position_store.rs:105
↓ 2 callersMethodfetch_markets_url
(&self, url: &str)
src/service/market_cache.rs:124
↓ 2 callersFunctionhmac_sha256
(key: &[u8], msg: &[u8])
src/service/clob.rs:333
↓ 2 callersMethodlive_trading_allowed
(&self)
src/config.rs:251
↓ 2 callersMethodpeek
(&self, slug: &str)
src/service/market_cache.rs:78
↓ 2 callersMethodpnl_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 callersMethodpost_order
Post a fully signed order to `/order`. Requires L2 API credentials.
src/service/clob.rs:212
↓ 2 callersMethodrecord_open
(&self, market: &MarketInfo, planned: &PlannedOrder)
src/service/order_executor.rs:241
↓ 2 callersFunctionspawn
Spawns the monitor task. The handle lets the caller observe shutdown independently of the main bot loop.
src/service/position_monitor.rs:38
↓ 2 callersFunctiontrade
(shares: f64)
src/service/risk_guard.rs:139
↓ 1 callersMethodas_u8
(self)
src/models.rs:12
↓ 1 callersFunctionbase64_url_no_pad
(data: &[u8])
src/service/clob.rs:430
↓ 1 callersFunctionbot_detail
(kind: BotKind)
src/ui/mod.rs:189
↓ 1 callersFunctionbuild_filter
(cfg: &AppConfig, whale: &str)
src/bot/copy_trading.rs:161
↓ 1 callersMethodby_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 callersFunctioncheck_exit
(pos: &OpenPosition, midprice: f64)
src/service/position_monitor.rs:25
↓ 1 callersMethodcheck_exposure
(&self, market: &MarketInfo, want_usd: f64)
src/service/order_executor.rs:200
↓ 1 callersMethodcheck_with_book
Phase two, after the caller has fetched the book.
src/service/risk_guard.rs:98
↓ 1 callersMethodclob
Return the underlying CLOB client (for the position monitor's exit path).
src/service/order_executor.rs:81
↓ 1 callersFunctionconnect
()
landing/src/components/LiveSignalSection.tsx:110
↓ 1 callersMethodcontains_token
Returns true if this market metadata describes the given outcome token.
src/service/market_cache.rs:29
↓ 1 callersFunctiondecode_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 callersMethoddepth_usd
USD-equivalent depth on a given side within `levels` from the top.
src/models.rs:100
↓ 1 callersFunctiondraw
(f: &mut Frame, cfg: &AppConfig, state: &mut ListState)
src/ui/mod.rs:109
↓ 1 callersMethodexecute
(&self, trade: &WhaleTrade)
src/service/order_executor.rs:89
↓ 1 callersMethodfetch_by_slug
(&self, slug: &str)
src/service/market_cache.rs:97
↓ 1 callersMethodfetch_by_token
(&self, token_id: &str)
src/service/market_cache.rs:107
↓ 1 callersMethodflip
(self)
src/models.rs:19
↓ 1 callersFunctionhmac_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 callersMethodis_production
(self)
src/bot/mod.rs:52
↓ 1 callersMethodis_strict
True when at least one allow list is populated — strict allowlist mode.
src/config.rs:151
↓ 1 callersMethodl2_headers
Build the L2 HMAC auth headers Polymarket expects on signed endpoints.
src/service/clob.rs:247
↓ 1 callersFunctionlimit_price_for
(trade: &WhaleTrade, cfg: &AppConfig)
src/service/order_executor.rs:290
↓ 1 callersMethodmidprice
(&self, token_id: &str)
src/service/midprice.rs:38
↓ 1 callersFunctionmonitor_once
( pos: &OpenPosition, positions: &PositionStore, clob: &ClobClient, midprice: &dyn MidpriceSou
src/service/position_monitor.rs:80
↓ 1 callersMethodopen_usd_by_category
(&self, category: &str)
src/service/position_store.rs:81
↓ 1 callersMethodopen_usd_by_tag
(&self, tag: &str)
src/service/position_store.rs:95
↓ 1 callersFunctionorder_filled_topic
Topic-0 selector for `OrderFilled`, derived once at compile time via the `sol!` macro.
src/service/parse.rs:30
↓ 1 callersFunctionorder_type_for
(side: Side)
src/service/order_executor.rs:299
↓ 1 callersFunctionorder_type_str
(t: OrderType)
src/service/clob.rs:300
↓ 1 callersFunctionpad_address_to_topic
(addr: &str)
src/bot/copy_trading.rs:178
↓ 1 callersFunctionparse_log
(v: &Value)
src/service/onchain.rs:119
↓ 1 callersFunctionparse_private_key
(raw: &str)
src/service/clob.rs:308
↓ 1 callersFunctionrun_once
( ws_url: &str, filter: &LogFilter, tx: &mpsc::Sender<RawLog>, )
src/service/onchain.rs:59
↓ 1 callersFunctionside_str
(side: Side)
src/service/clob.rs:293
↓ 1 callersMethodsnapshot
(&self)
src/service/position_store.rs:69
↓ 1 callersFunctionspawn_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 callersFunctiontopic_to_address
(topic: &str)
src/service/parse.rs:106
↓ 1 callersMethodtp_sl_for
(&self, market: &MarketInfo)
src/service/order_executor.rs:263
↓ 1 callersMethodtrip
Manual trip — e.g. when a book fetch fails, prefer tripping to firing blind.
src/service/risk_guard.rs:110
↓ 1 callersFunctionui_loop
(term: &mut Terminal<B>, cfg: AppConfig)
src/ui/mod.rs:55
↓ 1 callersFunctionusd_and_share_amounts
(shares: f64, price: f64, side: Side)
src/service/clob.rs:281
↓ 1 callersFunctionusd_to_shares
Convert a USD amount + limit price into an integer number of shares (rounded down).
src/utils.rs:11
↓ 1 callersFunctionvenueLogo
(domain: string)
landing/src/bots.ts:53
↓ 1 callersFunctionvenueRepoUrl
(repo: string)
landing/src/bots.ts:52
FunctionApp
()
landing/src/App.tsx:12
FunctionArrowIcon
()
landing/src/components/Hero.tsx:66
FunctionBotCard
({ bot, index }: { bot: BotMeta; index: number })
landing/src/components/BotCard.tsx:5
FunctionBotsSection
()
landing/src/components/BotsSection.tsx:5
FunctionCtaSection
()
landing/src/components/CtaSection.tsx:4
FunctionEngineSection
()
landing/src/components/EngineSection.tsx:3
FunctionFooter
()
landing/src/components/Footer.tsx:4
FunctionGitHubIcon
()
landing/src/components/Nav.tsx:80
FunctionGitHubIcon
()
landing/src/components/Hero.tsx:74
FunctionGitHubIcon
()
landing/src/components/CtaSection.tsx:53
FunctionHero
()
landing/src/components/Hero.tsx:4
FunctionHowItWorksSection
()
landing/src/components/HowItWorksSection.tsx:4
FunctionLangProvider
({ children }: { children: ReactNode })
landing/src/i18n.tsx:28
FunctionLangToggle
()
landing/src/components/Nav.tsx:42
FunctionLiveSignalSection
()
landing/src/components/LiveSignalSection.tsx:24
FunctionNav
()
landing/src/components/Nav.tsx:5
FunctionPillar
({ title, body }: { title: string; body: string })
landing/src/components/CtaSection.tsx:44
FunctionPriceTicker
({ price, direction, change24h, }: { price: number | null; direction: TickDir; change24h: number |
landing/src/components/LiveSignalSection.tsx:220
next →1–100 of 178, ranked by callers