MCPcopy Create free account

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

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

↓ 51 callersFunctionbook
(bids: &[(f64, f64)], asks: &[(f64, f64)])
src/bot/runtime.rs:1101
↓ 47 callersFunctionmarket
(id: u64)
src/bot/runtime.rs:1108
↓ 28 callersMethodlen
(&self)
src/service/position_store.rs:84
↓ 24 callersMethodget
(&self, token_id: &str)
src/service/position_store.rs:76
↓ 24 callersMethodtake
Cross the spread for `shares`, no worse than `limit`, all or nothing. `yes_book` is the market's Yes-quoted book.
src/bot/runtime.rs:364
↓ 21 callersMethodget
(&self, id: u64)
src/bot/quoting.rs:39
↓ 18 callersMethodinsert
(&self, info: MarketInfo)
src/service/market_cache.rs:91
↓ 17 callersMethodbest_ask
(&self)
src/models.rs:98
↓ 15 callersMethodis_empty
(&self)
src/service/position_store.rs:88
↓ 14 callersMethodbest_bid
(&self)
src/models.rs:95
↓ 12 callersFunctionpaper
()
src/bot/runtime.rs:1136
↓ 11 callersMethodrest
Rest a limit order. Returns its id, or why it wasn't sent.
src/bot/runtime.rs:452
↓ 9 callersFunctionshares_for
Shares `usd` buys at `price`, rounded down to the hundredth.
src/bot/runtime.rs:52
↓ 9 callersFunctiontoken_book
`yes_book` as seen by `token`.
src/bot/runtime.rs:746
↓ 8 callersMethodbooks
(&self, ids: &[u64])
src/service/predict_fun.rs:929
↓ 8 callersFunctiondrive
Run `strategy` until Ctrl-C, keeping the broker's books straight around it.
src/bot/runtime.rs:985
↓ 8 callersFunctionmarket_amounts
Walk the book for `quantity_wei` shares, as the SDK's MARKET helper does with no slippage: the signed ratio is the worst level reached. Unlike the SDK
src/service/predict_fun.rs:404
↓ 8 callersFunctionwei
(v: &str)
src/service/predict_fun.rs:1755
↓ 7 callersFunctionbasket_quotes
Bids on both outcomes, one tick inside the touch. Stops adding to a side once it's ahead of the other by more than the largest tilt allows. Every leg
src/bot/directional_arb.rs:101
↓ 7 callersMethodholding
(&self, token: &str)
src/bot/runtime.rs:296
↓ 7 callersFunctionlive
(venue: &Arc<FakeVenue>)
src/bot/runtime.rs:1194
↓ 7 callersMethodobserve
Fetch `ids` plus every market the broker is tracking, and show the broker those books.
src/bot/quoting.rs:45
↓ 7 callersMethodremember_market
(&self, market: &ApiMarket)
src/service/predict_fun.rs:588
↓ 7 callersFunctiontradable
The strategy bots' view of a market, with its event's schedule when known.
src/service/predict_fun.rs:747
↓ 6 callersFunctioncfg
()
src/bot/directional_arb.rs:171
↓ 6 callersFunctioncheck
(filters: &FiltersConfig, market: &MarketInfo)
src/service/eligibility.rs:23
↓ 6 callersFunctionclient
(funder: &str, signature_type: Option<&str>)
src/service/clob.rs:1184
↓ 6 callersFunctiondecimal_to_wei_exact
Amounts in API responses are already integer wei.
src/service/predict_fun.rs:983
↓ 6 callersMethodlive_trading_allowed
(&self)
src/config.rs:640
↓ 6 callersFunctionmarket
(slug: &str, category: Option<&str>, tags: &[&str])
src/service/eligibility.rs:81
↓ 6 callersMethodmarket_for_token
(&self, token_id: &str)
src/service/predict_fun.rs:580
↓ 6 callersMethodmarkets
(&self)
src/bot/runtime.rs:938
↓ 6 callersFunctionmm_quotes
Bid and offer for one market. A long Yes position lowers both quotes, and a long No position raises them.
src/bot/market_maker.rs:62
↓ 6 callersFunctionparams
(neg_risk: bool, position_book: bool)
src/service/clob.rs:1193
↓ 6 callersMethodparse
(raw: &str)
src/service/clob.rs:103
↓ 6 callersFunctionpos
(entry: f64, tp: f64, sl: f64, side: Side)
src/service/position_monitor.rs:268
↓ 6 callersFunctionsdk_book
()
src/service/predict_fun.rs:1829
↓ 6 callersMethodsign_fields
(&self, f: &OrderFields, params: &BookParams)
src/service/clob.rs:459
↓ 6 callersFunctionwei_to_f64
(v: U256)
src/service/predict_fun.rs:337
↓ 5 callersMethodcancel
Ask to remove orders. Returns the ones refused for now, which stay working.
src/bot/runtime.rs:543
↓ 5 callersFunctioncfg
(strategy: CopyStrategy)
src/service/strategy.rs:90
↓ 5 callersFunctioncfg
()
src/bot/market_maker.rs:128
↓ 5 callersFunctionclean
(price: f64)
src/bot/runtime.rs:39
↓ 5 callersFunctionf64_to_wei
(v: f64)
src/service/predict_fun.rs:330
↓ 5 callersFunctionfarm_quotes
Flat: bid inside a wide spread. Holding: offer inside the ask, never below cost plus a tick, so each round trip that completes makes money.
src/bot/spread_farming.rs:114
↓ 5 callersFunctionfields
(side: Side, expiration: u64)
src/service/clob.rs:1197
↓ 5 callersMethodget
(&self, path: &str)
src/service/predict_fun.rs:569
↓ 5 callersMethodholdings
(&self)
src/bot/runtime.rs:300
↓ 5 callersMethodmid
(&self)
src/models.rs:102
↓ 5 callersMethodmirrored
The other outcome's view of a Yes-quoted book: a Yes bid at `p` is a No ask at `1 - p`, and vice versa.
src/models.rs:132
↓ 5 callersMethodopen
(&self, pos: OpenPosition)
src/service/position_store.rs:57
↓ 5 callersFunctionorder_amounts
(shares: f64, price: f64, side: Side, tick: f64)
src/service/clob.rs:236
↓ 5 callersMethodremove
(&self, ids: &[String])
src/bot/runtime.rs:1179
↓ 5 callersFunctionround
(now: DateTime<Utc>, secs: i64)
src/bot/arbitrage.rs:222
↓ 5 callersFunctionsize_for_trade
(cfg: &StrategyConfig, trade: &WhaleTrade)
src/service/strategy.rs:26
↓ 5 callersMethodstatus
Honest status for the TUI. Nothing has traded live through this engine yet.
src/bot/mod.rs:56
↓ 4 callersMethodallowed
Does the operator's allow/block list let this market through?
src/bot/runtime.rs:877
↓ 4 callersMethodavg_price
(&self)
src/bot/runtime.rs:88
↓ 4 callersMethodbook
(&self, market_id: u64)
src/service/predict_fun.rs:573
↓ 4 callersFunctioncfg
()
src/service/risk_guard.rs:129
↓ 4 callersFunctioncfg
()
src/bot/spread_farming.rs:157
↓ 4 callersFunctiondigital_up
Chance the price ends above `strike`, under a driftless lognormal model.
src/service/spot.rs:192
↓ 4 callersMethodis_halted
(&self)
src/bot/runtime.rs:288
↓ 4 callersFunctionis_quotable
Whether a market may carry quotes now. A market with no known end stays in.
src/bot/runtime.rs:971
↓ 4 callersMethodobserve
Feed a fresh book: updates marks and the loss limit, and on a dry run simulates fills and expiry.
src/bot/runtime.rs:592
↓ 4 callersFunctionpos
(slug: &str, cat: &str, tags: &[&str], usd: f64)
src/service/position_store.rs:126
↓ 4 callersMethodquote
Quote every chosen market as `wanted` says, and pull orders anywhere the strategy no longer wants to be.
src/bot/quoting.rs:201
↓ 4 callersMethodremember
(&mut self, markets: &[TradableMarket])
src/bot/quoting.rs:33
↓ 4 callersMethodrequest
( &self, method: Method, path: &str, bearer: Option<&str>, body: Optio
src/service/predict_fun.rs:558
↓ 4 callersMethodsummary
(&self)
src/bot/runtime.rs:218
↓ 4 callersMethodtaker_fee
Taker fee per share at `price`. Makers pay none.
src/service/venue.rs:78
↓ 4 callersFunctiontrade
(notional: f64, shares: f64)
src/service/strategy.rs:104
↓ 3 callersFunctionapi_market
(outcomes: serde_json::Value, status: &str, trading: &str)
src/service/predict_fun.rs:2140
↓ 3 callersMethodapply_fill
( &mut self, market_id: u64, token: &str, side: Side, shares: f64,
src/bot/runtime.rs:180
↓ 3 callersMethodauthed_request
`query` isn't covered by the signature, only the path is.
src/service/clob.rs:712
↓ 3 callersFunctionbest_gap
The better way to buy both outcomes across the two venues, if it locks in at least `min_edge` after fees and has room for a minimum-size order on both
src/bot/cross_market_arb.rs:197
↓ 3 callersFunctioncheck
`check-venue` for Polymarket. Reads public data and signs a sample order locally. Nothing is posted. `sign_in` also creates or derives API credentials
src/service/clob.rs:871
↓ 3 callersMethodcreds
API credentials from the config, or else created (or derived, if they already exist) with an L1 signature.
src/service/clob.rs:655
↓ 3 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:39
↓ 3 callersMethoddomain_for
(&self, params: &BookParams)
src/service/clob.rs:441
↓ 3 callersMethodensure_clob_v2
The exchange addresses are also what the copy-trading feed watches, so a config from before CLOB V2 would sign rejected orders and see no trades.
src/config.rs:137
↓ 3 callersMethodexecute
(&self, trade: &WhaleTrade)
src/service/order_executor.rs:90
↓ 3 callersMethodis_live
(&self)
src/bot/runtime.rs:284
↓ 3 callersMethodis_yes
(&self, token: &str)
src/service/venue.rs:86
↓ 3 callersFunctionlimit_amounts
The SDK's `getLimitOrderAmounts`: three significant digits of price, five of quantity.
src/service/predict_fun.rs:450
↓ 3 callersFunctionmonitor_once
( pos: &OpenPosition, positions: &PositionStore, venue: &dyn OrderVenue, midprice: &dyn Midpri
src/service/position_monitor.rs:80
↓ 3 callersFunctionorder_body
`POST /orders` body. Expiration, side and signature type are JSON integers here even though the other numeric fields are strings.
src/service/predict_fun.rs:1597
↓ 3 callersFunctionpick_snipe
The outcome priced in the near-certain band, if either is and its best ask has room for the order.
src/bot/resolution_sniper.rs:152
↓ 3 callersMethodpoll
New trades, oldest first.
src/service/predict_fun.rs:1064
↓ 3 callersMethodrefresh
True when the list was just re-read.
src/bot/runtime.rs:928
↓ 3 callersFunctionround_entry
The side worth buying in a live round, if either clears `min_edge` after fees.
src/bot/arbitrage.rs:172
↓ 3 callersMethodsecs_left
(&self, now: DateTime<Utc>)
src/service/venue.rs:82
↓ 3 callersMethodseed_from_venue
Count what the wallet already holds toward the limits, so a restart can't double them. Those positions are never sold by a strategy, including ones fr
src/bot/runtime.rs:327
↓ 3 callersFunctionsigner
()
src/service/predict_fun.rs:1733
↓ 3 callersFunctionsnap_up
(price: f64, tick: f64)
src/bot/runtime.rs:47
↓ 3 callersFunctionspawn
Spawns the monitor task. The handle lets the caller observe shutdown independently of the main bot loop.
src/service/position_monitor.rs:38
↓ 3 callersMethodspread
(&self)
src/models.rs:106
↓ 3 callersMethodstep
Take up the latest choice, if a scan has finished since the last tick, and read books for the chosen markets and anything still open from an earlier c
src/bot/quoting.rs:190
↓ 3 callersFunctionvector_order
()
src/service/predict_fun.rs:1737
↓ 3 callersFunctionwhale_legs
Project a match onto the legs `whale` took part in, keyed for dedupe.
src/service/predict_fun.rs:948
next →1–100 of 533, ranked by callers