feat: migrate CLOB client to V2-only trading

This commit is contained in:
floor-licker
2026-04-24 12:48:30 -03:00
parent 0ad1915d2a
commit e78ae17286
24 changed files with 1281 additions and 463 deletions
+9 -11
View File
@@ -94,21 +94,19 @@ impl PolyfillDemo {
/// Create a new demo
pub fn new() -> Result<Self> {
// Create basic client
let client = ClobClient::new("https://clob.polymarket.com");
// Create advanced client with configuration
let _config = ClientConfig {
base_url: "https://clob.polymarket.com".to_string(),
chain_id: 137, // Polygon
private_key: None, // Would be set in production
api_credentials: None, // Would be set in production
max_slippage: Some(dec!(0.01)), // 1% max slippage
fee_rate: Some(dec!(0.02)), // 2% fee rate
let config = ClientConfig {
base_url: "https://clob-v2.polymarket.com".to_string(),
chain: 137,
private_key: None,
api_credentials: None,
builder_code: None,
timeout: Some(Duration::from_secs(30)),
max_connections: Some(100),
};
let client = ClobClient::new(&config.base_url);
let advanced_client = PolyfillClient::new("https://clob.polymarket.com");
// Create advanced client with configuration
let advanced_client = PolyfillClient::from_config(config.clone())?;
// Create order book manager
let book_manager = OrderBookManager::new(100);