mirror of
https://github.com/floor-licker/polyfill-rs.git
synced 2026-08-25 02:18:08 +00:00
feat: migrate CLOB client to V2-only trading
This commit is contained in:
+9
-11
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user