MCPcopy Create free account

hub / github.com/ConteurShadow/Polymarket-Trading-Bot-Rust / functions

Functions284 in github.com/ConteurShadow/Polymarket-Trading-Bot-Rust

↓ 1 callersFunctionupdate_balance_allowance
Update balance/allowance cache. asset_type: "Collateral" or "Conditional".
src/clob_sdk.rs:472
↓ 1 callersMethodwait_for_relayer_transaction
Wait for relayer transaction to be confirmed (like TypeScript SDK's response.wait()) Polls the relayer status endpoint until transaction reaches STATE
src/api.rs:1419
Methodapprove_individual_tokens
Fallback: Approve individual tokens (ETH Up/Down, BTC Up/Down) with large allowance This is used when setApprovalForAll fails via relayer Triggers SDK
src/api.rs:1497
Methodask_price
(&self)
src/models.rs:63
Methodauthenticate
Authenticate with Polymarket CLOB API at startup (creates CLOB client via clob_sdk). Equivalent to TypeScript CLOB V2: `new ClobClient({ host, chain,
src/api.rs:404
Functionboth_zero
()
src/merge.rs:74
Functionbottom_rule
()
src/term_ui.rs:118
Methodbuilder_relayer_signature
Builder Relayer HMAC: message = timestamp(ms) + method + path + body, signature = base64url. Must match Polymarket builder-signing-sdk for relayer aut
src/api.rs:455
Methodcheck_market_closure
Check and settle trades when markets close For momentum strategy: If token wasn't sold, it will be worth $1 if Up won, $0 if Down won
src/trader.rs:3275
Methodcleanup_old_abandoned_trades
Clean up old abandoned trades (trades from previous periods that failed redemption) This prevents the pending_trades list from growing indefinitely
src/trader.rs:223
Methodclear_limit_order_tracking
Clear limit order tracking for a specific period to allow re-entry after a sell This is called when a limit sell order fills, allowing the bot to plac
src/detector.rs:597
Methodclear_period_trackers
Clear price trackers for a specific period (when period ends)
src/simulation.rs:398
Functionclient_destroy
Destroy client. Call when done with the handle.
src/clob_sdk.rs:292
Methodclob_signer_error_hint
Add concrete context for CLOB signer validation failures.
src/api.rs:173
Methodcreate_order
Create an order (buy or sell)
src/bin/test_predict_fun.rs:248
Methoddefault
()
src/config.rs:173
Methoddetect_limit_order_opportunities
Detect limit order opportunities: At min_elapsed_minutes, return both Up and Down tokens for limit buy orders Strategy: Place limit buy orders for bot
src/detector.rs:353
Methoddetect_opportunities
Detect momentum opportunities: Check BTC and ETH tokens (BTC/ETH Up/Down) for price >= trigger_price after min_elapsed_minutes Strategy: Buy BTC/ETH t
src/detector.rs:257
Functiondollar_pair_styled
Bid/ask pair like `$0.65/$0.67` — higher contrast; cool tones for Up, warm for Down.
src/term_ui.rs:86
Functionenabled_markets_label
(enable_eth: bool, enable_solana: bool, enable_xrp: bool)
src/bin/main_dual_limit_045_same_size.rs:2884
Functionequal_amounts
()
src/merge.rs:44
Methodextract_timestamp_from_slug
Extract timestamp from market slug (e.g., "eth-updown-15m-1767796200" -> 1767796200)
src/monitor.rs:757
Methodfetch_token_price
( &self, token_id: &Option<String>, market_name: &str, outcome: &str, )
src/monitor.rs:717
Functionfind_token_market
( api: &PolymarketApi, _token_id: &str, description: &str, )
src/bin/test_redeem.rs:247
Functionfind_token_market_manual
( api: &PolymarketApi, token_id: &str, btc_condition_id: Option<&str>, eth_condition_id: Optio
src/bin/test_redeem.rs:280
Functionfmt_btc_book
One market row for the live quote line (plain text matches `price_log_line` slices).
src/term_ui.rs:421
Functionfmt_oracle_tail
Chainlink / price-to-beat suffix (plain body already has leading `|`).
src/term_ui.rs:538
Functionfmt_trailing_note
(line: &str)
src/term_ui.rs:542
Functionformat_sim_fills
(up_filled: bool, down_filled: bool)
src/term_ui.rs:736
Functionformat_sim_head
(market: &str, m: u64, s: u64)
src/term_ui.rs:681
Functionformat_sim_prices
( up_bid: f64, up_ask: f64, up_at_limit: bool, down_bid: f64, down_ask: f64, down_at_l
src/term_ui.rs:694
Functionformat_sim_tag_line
`SIM [BTC] …` status for `log_println!`.
src/term_ui.rs:765
Functionformat_trend_insufficient
(label: &str, min_samples: usize)
src/term_ui.rs:674
Functionformat_trend_row
( label: &str, direction_label: &str, strength: f64, price_change: f64, slope: f64, du
src/term_ui.rs:600
Functionfractional
()
src/merge.rs:80
Methodfrom_config
(config: &Config)
src/api.rs:138
Methodget_hedge_trades_for_period
Get hedge trades (individual or standard) for a given period. Returns (condition_id, token_id, token_type) for each hedge position we hold.
src/trader.rs:247
Methodget_pending_reentry_limit_trade
Get a pending re-entry limit trade (keyed by `"{period}_{token_id}_reentry_limit"`)
src/trader.rs:302
Methodget_trend_for_hedge
Get trend information for hedge decision making
src/simulation.rs:309
Functioninit_history_file
Initialize the global history file writer (called by main.rs)
src/lib.rs:26
Methodis_simulation
(&self)
src/trader.rs:25
Methodis_token_uptrending
Check if a token is uptrending
src/simulation.rs:292
Methodload
(path: &PathBuf)
src/config.rs:232
Methodload_api_credentials_from_env
()
src/api.rs:148
Functionlog_trading_event
(event: &str)
src/bin/main_dual_limit_045_5m_btc.rs:76
Functionlog_trading_event
(event: &str)
src/bin/main_dual_limit_045_same_size.rs:113
Functionmain
()
src/bin/main_dual_limit_045_5m_btc.rs:93
Functionmain
()
src/bin/main_trailing.rs:198
Functionmain
()
src/bin/test_redeem.rs:31
Functionmain
()
src/bin/test_sell.rs:37
Functionmain
()
src/bin/test_merge.rs:158
Functionmain
()
src/bin/test_cash_balance.rs:16
Functionmain
()
src/bin/test_limit_order.rs:37
Functionmain
()
src/bin/test_allowance.rs:48
Functionmain
()
src/bin/backtest.rs:9
Functionmain
()
src/bin/test_multiple_orders.rs:56
Functionmain
()
src/bin/test_predict_fun.rs:294
Functionmain
()
src/bin/main_dual_limit_045_same_size.rs:218
Methodmark_position_closed
Mark position as closed (for stop-loss re-entry)
src/trader.rs:479
Methodmark_token_bought
Mark that we bought a specific token in this period
src/detector.rs:581
Functionmore_down_than_up
()
src/merge.rs:56
Functionmore_up_than_down
()
src/merge.rs:50
Functionneg_risk
Get neg_risk for token. Returns true/false.
src/clob_sdk.rs:526
Methodnew
(api: Arc<PolymarketApi>, config: TradingConfig, simulation_mode: bool, detector: Option<Arc<PriceDetector>>)
src/trader.rs:33
Methodnew
(log_file_path: &str)
src/simulation.rs:54
Methodnew
(trigger_price: f64, max_buy_price: f64, min_elapsed_minutes: u64, min_time_remaining_seconds: u64, enable_eth
src/detector.rs:99
Methodnew
Create a new MarketMonitor. enable_eth_trading, enable_solana_trading, enable_xrp_trading: if Some(false), that market is omitted from the one-line pr
src/monitor.rs:66
Methodnew
( gamma_url: String, clob_url: String, private_key: Option<String>, proxy_wall
src/api.rs:109
Methodnew
(base_url: String)
src/bin/test_predict_fun.rs:74
Functionopen_first_loadable_library
()
src/clob_sdk.rs:81
Methodplace_hedge_sell_orders_with_retry
Place hedge sell orders: standard hedge = 5 orders (4 at $0.93, 1 at $0.98); early/individual = 1 order at $0.98. Called from a background task after
src/trader.rs:54
Methodplace_order_hmac
(&self, order: &OrderRequest)
src/api.rs:1704
Methodprint_trade_summary
Print summary of all trades (for testing/verification)
src/trader.rs:3795
Methodreset_period
Reset when new period starts
src/detector.rs:587
Methodset_position_sell_price
Update sell price for a position (when limit sell order is placed)
src/simulation.rs:657
Functionsim_divider
()
src/term_ui.rs:592
Functiontick_size
Get tick size for token (e.g. "0.01").
src/clob_sdk.rs:494
Functiontop_rule
()
src/term_ui.rs:112
Functiontrend_banner
(elapsed_m: u64, elapsed_s: u64)
src/term_ui.rs:564
Functiontrend_banner_end
()
src/term_ui.rs:584
Methodwrite
(&mut self, buf: &[u8])
src/bin/main_dual_limit_045_5m_btc.rs:39
Methodwrite
(&mut self, buf: &[u8])
src/bin/main_dual_limit_045_same_size.rs:75
Functionzero_down
()
src/merge.rs:68
Functionzero_up
()
src/merge.rs:62
← previous201–284 of 284, ranked by callers