Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits
/ functions
Functions
533 in github.com/HarrierOnChain/Prediction-Markets-Trading-Bot-Toolkits
⨍
Functions
533
◇
Types & classes
160
↓ 1 callers
Method
id
(&self)
src/bot/runtime.rs:1154
↓ 1 callers
Method
imbalance
Size imbalance over the top `levels`, from -1 (all asks) to 1 (all bids).
src/models.rs:121
↓ 1 callers
Function
in_window
Open, uncontested and due to end soon. A market with no known end can't be called near resolution, whatever its price.
src/bot/resolution_sniper.rs:136
↓ 1 callers
Function
is_listable
(market: &TradableMarket, include_props: bool, filter: Option<&str>)
src/bot/sports_execution.rs:114
↓ 1 callers
Method
is_strict
True when at least one allow list is populated — strict allowlist mode.
src/config.rs:206
↓ 1 callers
Method
known
(&self)
src/bot/quoting.rs:183
↓ 1 callers
Method
l1_request
(&self, method: Method, path: &str)
src/service/clob.rs:693
↓ 1 callers
Function
level
(price: f64, size: f64)
src/bot/runtime.rs:1097
↓ 1 callers
Function
limit_price_for
(trade: &WhaleTrade, cfg: &AppConfig)
src/service/order_executor.rs:306
↓ 1 callers
Method
live_rounds
Up/down rounds worth looking at now. Mainnet lists them under recurring series, with the live round first. Testnet has no series, only categories.
src/service/predict_fun.rs:597
↓ 1 callers
Method
mark_seen
(&mut self, key: String)
src/service/predict_fun.rs:1132
↓ 1 callers
Function
market
(json: &str)
src/service/polymarket_read.rs:145
↓ 1 callers
Method
market_exposure
(&self, market_id: u64)
src/bot/runtime.rs:158
↓ 1 callers
Method
markets
(&self, query: &MarketQuery)
src/service/predict_fun.rs:827
↓ 1 callers
Method
microprice
Mid weighted toward the thinner side of the touch, where price tends to go.
src/models.rs:111
↓ 1 callers
Method
midprice
(&self, token_id: &str)
src/service/predict_fun.rs:725
↓ 1 callers
Method
midprice
(&self, _: &str)
src/service/position_monitor.rs:213
↓ 1 callers
Method
name
(&self)
src/bot/arbitrage.rs:61
↓ 1 callers
Function
normal_cdf
Standard normal CDF (Abramowitz & Stegun 26.2.17).
src/service/spot.rs:179
↓ 1 callers
Function
one_book
(ctx: &Ctx, market: &TradableMarket)
src/bot/sports_execution.rs:230
↓ 1 callers
Method
open_usd_by_category
(&self, category: &str)
src/service/position_store.rs:92
↓ 1 callers
Method
open_usd_by_tag
(&self, tag: &str)
src/service/position_store.rs:106
↓ 1 callers
Function
order_filled_topic
Topic-0 selector for `OrderFilled`, derived once at compile time via the `sol!` macro.
src/service/parse.rs:32
↓ 1 callers
Method
order_state
(&self, hash: &str)
src/bot/runtime.rs:1183
↓ 1 callers
Function
order_type_for
(side: Side)
src/service/order_executor.rs:315
↓ 1 callers
Function
order_type_str
(t: OrderType)
src/service/clob.rs:1009
↓ 1 callers
Function
pad_address_to_topic
(addr: &str)
src/bot/copy_trading.rs:283
↓ 1 callers
Method
paper_fills
(&self, state: &mut State, market: &TradableMarket, yes_book: &BookSnapshot)
src/bot/runtime.rs:604
↓ 1 callers
Function
parse_avg_price
The spec types this as a string without a scale, and it hasn't been seen live. A value that can't be read counts as the full $1 a share, which oversta
src/service/predict_fun.rs:1538
↓ 1 callers
Function
parse_command
(line: &str)
src/bot/sports_execution.rs:85
↓ 1 callers
Function
parse_log
(v: &Value)
src/service/onchain.rs:119
↓ 1 callers
Function
pick_quotable
The markets most worth quoting: open, not contested, with a two-sided book whose spread is at least `min_spread` and no more than `max_spread`, and at
src/bot/runtime.rs:947
↓ 1 callers
Method
place
( &self, planned: &PlannedOrder, _expiration_secs: u64, live: bool, )
src/service/predict_fun.rs:1389
↓ 1 callers
Method
place
(&self, planned: &PlannedOrder, _: u64, _: bool)
src/service/position_monitor.rs:196
↓ 1 callers
Method
place
(&self, p: &PlannedOrder, _: u64, _: bool)
src/service/order_executor.rs:358
↓ 1 callers
Method
place
(&self, p: &PlannedOrder, _: u64, _: bool)
src/bot/runtime.rs:1157
↓ 1 callers
Method
poll_delayed_fill
Shares filled on an order the CLOB accepted as `delayed`. `None` if it still hasn't settled after a few polls.
src/service/clob.rs:614
↓ 1 callers
Method
positions
(&self)
src/bot/runtime.rs:1189
↓ 1 callers
Method
post_limit
(&self, order: &LimitOrder, _: bool)
src/bot/runtime.rs:1171
↓ 1 callers
Method
post_order
Post a signed order. A response with `success: false` is an error, so a rejected order can never be recorded as an open position.
src/service/clob.rs:583
↓ 1 callers
Method
preflight
Run before going live, so a problem stops the bot at startup instead of surfacing on the first copied trade.
src/service/clob.rs:364
↓ 1 callers
Function
reconcile
Bring a market's working orders in line with `wanted`.
src/bot/runtime.rs:797
↓ 1 callers
Method
record_open
(&self, market: &MarketInfo, planned: &PlannedOrder)
src/service/order_executor.rs:257
↓ 1 callers
Method
reduce
Take `shares` off a position after a partial exit.
src/service/position_store.rs:66
↓ 1 callers
Function
report
(result: TakeResult)
src/bot/sports_execution.rs:251
↓ 1 callers
Function
resolve_wallet
Works out who holds the funds and how orders prove it. A funder that isn't the signer can be one of three wallet types, and a wrong guess gets every o
src/service/clob.rs:119
↓ 1 callers
Function
round_payout
What one Up share pays. An exact tie pays half.
src/service/predict_fun.rs:794
↓ 1 callers
Function
run_once
( ws_url: &str, filter: &LogFilter, tx: &mpsc::Sender<RawLog>, )
src/service/onchain.rs:59
↓ 1 callers
Function
run_polymarket
(cfg: AppConfig)
src/bot/copy_trading.rs:62
↓ 1 callers
Function
run_predict_fun
(cfg: AppConfig)
src/bot/copy_trading.rs:135
↓ 1 callers
Method
samples
(&self)
src/service/spot.rs:169
↓ 1 callers
Function
scan
Read the whole market list and choose. Takes a while on a venue with thousands of markets, which is why it doesn't run on the quoting loop: quotes wou
src/bot/quoting.rs:78
↓ 1 callers
Function
side_str
(side: Side)
src/service/clob.rs:1002
↓ 1 callers
Method
sign_for_deposit_wallet
The nested typed-data signature a deposit wallet checks through EIP-1271.
src/service/clob.rs:509
↓ 1 callers
Method
sign_in
Exchange a signed message for a JWT. The message includes acceptance of Predict's Terms of Service, which is why nothing signs it except a live run or
src/service/predict_fun.rs:1238
↓ 1 callers
Function
signal
Which outcome the imbalance says to buy, if it's strong and the spread is narrow enough to be worth crossing.
src/bot/orderbook_imbalance.rs:210
↓ 1 callers
Method
snapshot
(&self)
src/service/position_store.rs:80
↓ 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
Method
tick
(&mut self, ctx: &Ctx)
src/bot/arbitrage.rs:65
↓ 1 callers
Function
tick_of
`decimalPrecision` is the number of price decimals a market accepts.
src/service/predict_fun.rs:742
↓ 1 callers
Function
tilt_ratio
How much bigger the favoured side should be: 1 at the threshold, reaching `max_tilt_ratio` at three times the threshold.
src/bot/directional_arb.rs:86
↓ 1 callers
Function
to_f64_with_decimals
(v: U256, decimals: u32)
src/service/parse.rs:110
↓ 1 callers
Function
to_snapshot
(asks: &[(f64, f64)], bids: &[(f64, f64)])
src/service/predict_fun.rs:804
↓ 1 callers
Method
token
(&self)
src/service/predict_fun.rs:1278
↓ 1 callers
Function
token_for
(market: &TradableMarket, outcome: &Outcome)
src/bot/sports_execution.rs:223
↓ 1 callers
Function
topic_to_address
(topic: &str)
src/service/parse.rs:102
↓ 1 callers
Method
total_exposure
(&self)
src/bot/runtime.rs:174
↓ 1 callers
Method
tp_sl_for
(&self, market: &MarketInfo)
src/service/order_executor.rs:279
↓ 1 callers
Method
tradable_for_token
Whatever the adapter knows about the market holding `token_id`.
src/service/predict_fun.rs:633
↓ 1 callers
Function
trade
(shares: f64)
src/service/risk_guard.rs:139
↓ 1 callers
Method
trading_address
The address orders trade from, and the identity the API authenticates.
src/service/predict_fun.rs:1181
↓ 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_to_shares
Convert a USD amount + limit price into an integer number of shares (rounded down).
src/utils.rs:11
↓ 1 callers
Method
venue
Return the underlying venue client (for the position monitor's exit path).
src/service/order_executor.rs:82
↓ 1 callers
Method
vol
(&self, floor: f64)
src/service/spot.rs:173
↓ 1 callers
Function
walk
Walk `levels` for `shares`, refusing a partial fill or one past `limit`. Returns the average price.
src/bot/runtime.rs:239
↓ 1 callers
Method
with_target
(client: Arc<PredictFunClient>, target: FeedTarget)
src/service/predict_fun.rs:1051
↓ 1 callers
Function
worth_following
Following only makes sense near the whale's price and below the near-certain zone, where there's little left to gain.
src/bot/whale_signal.rs:170
Function
a_book_in_line_with_spot_is_left_alone
()
src/bot/arbitrage.rs:250
Function
a_leg_too_thin_for_the_venue_minimum_is_no_opportunity
()
src/bot/cross_market_arb.rs:279
Function
a_market_past_its_end_is_closed_even_if_the_api_says_open
()
src/service/predict_fun.rs:2179
Function
a_no_limit_read_from_the_book_is_an_exact_price
()
src/bot/runtime.rs:1232
Function
a_quote_that_would_cross_is_refused
()
src/bot/runtime.rs:1335
Function
a_separate_funder_needs_a_stated_wallet_type
()
src/service/clob.rs:1389
Function
a_tag_with_a_null_level_still_parses_and_classifies
()
src/service/predict_fun.rs:2223
Function
a_tight_spread_is_left_alone
()
src/bot/spread_farming.rs:172
Function
adaptive_decays_with_size
()
src/service/strategy.rs:147
Function
amounts_cope_with_float_noise_and_fine_ticks
()
src/service/clob.rs:1304
Function
amounts_follow_the_tick_in_the_orders_favour
()
src/service/clob.rs:1295
Function
amounts_round_size_down_to_two_decimals
()
src/service/clob.rs:1312
Function
at_the_money_is_a_coin_flip_and_moves_with_spot
()
src/service/spot.rs:218
Function
auth_message_signature_matches_ethers
()
src/service/predict_fun.rs:1804
Method
authed
( &self, method: Method, path: &str, body: Option<&Value>, )
src/service/predict_fun.rs:1319
Function
base64_round_trip_known
()
src/service/clob.rs:1442
Function
books_come_back_best_first
()
src/service/polymarket_read.rs:214
Function
buys_down_through_the_mirrored_book_when_spot_has_fallen
()
src/bot/arbitrage.rs:241
Function
buys_no_through_the_mirror_when_yes_is_nearly_dead
()
src/bot/resolution_sniper.rs:191
Function
buys_up_when_spot_has_moved_and_the_book_hasnt
()
src/bot/arbitrage.rs:231
Function
buys_yes_at_a_near_certain_price
()
src/bot/resolution_sniper.rs:184
← previous
next →
201–300 of 533, ranked by callers