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
+4 -4
View File
@@ -11,7 +11,7 @@ fn benchmark_real_simplified_markets(c: &mut Criterion) {
c.bench_function("real_fetch_simplified_markets", |b| {
b.iter(|| {
rt.block_on(async {
let client = ClobClient::new("https://clob.polymarket.com");
let client = ClobClient::new("https://clob-v2.polymarket.com");
// This is the real network request + JSON parsing
let result = client.get_sampling_simplified_markets(None).await;
@@ -28,7 +28,7 @@ fn benchmark_real_markets(c: &mut Criterion) {
c.bench_function("real_fetch_markets", |b| {
b.iter(|| {
rt.block_on(async {
let client = ClobClient::new("https://clob.polymarket.com");
let client = ClobClient::new("https://clob-v2.polymarket.com");
// This is the real network request + JSON parsing
let result = client.get_sampling_markets(None).await;
@@ -52,7 +52,7 @@ fn benchmark_real_order_creation(c: &mut Criterion) {
c.bench_function("real_create_order_eip712", |b| {
b.iter(|| {
rt.block_on(async {
let client = ClobClient::new("https://clob.polymarket.com");
let client = ClobClient::new("https://clob-v2.polymarket.com");
// Set up credentials
if let Ok(_key) = std::env::var("POLYMARKET_PRIVATE_KEY") {
@@ -69,7 +69,7 @@ fn benchmark_real_order_creation(c: &mut Criterion) {
);
// This is the real EIP-712 signing + network request
let result = client.create_order(&order_args, None, None, None).await;
let result = client.create_order(&order_args, None).await;
black_box(result)
})
})