mirror of
https://github.com/floor-licker/polyfill-rs.git
synced 2026-08-12 20:18:05 +00:00
chore: default live CLOB host to production
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ impl Default for TestConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
host: env::var("POLYMARKET_HOST")
|
||||
.unwrap_or_else(|_| "https://clob-v2.polymarket.com".to_string()),
|
||||
.unwrap_or_else(|_| "https://clob.polymarket.com".to_string()),
|
||||
chain: env::var("POLYMARKET_CHAIN_ID")
|
||||
.unwrap_or_else(|_| "137".to_string())
|
||||
.parse()
|
||||
|
||||
@@ -6,7 +6,7 @@ use polyfill_rs::{ClientConfig, ClobClient, OrderArgs, Side};
|
||||
use rust_decimal_macros::dec;
|
||||
use std::env;
|
||||
|
||||
const HOST: &str = "https://clob-v2.polymarket.com";
|
||||
const HOST: &str = "https://clob.polymarket.com";
|
||||
const CHAIN_ID: u64 = 137;
|
||||
|
||||
fn load_env_vars() -> (String, Option<String>, Option<String>, Option<String>) {
|
||||
|
||||
@@ -13,7 +13,7 @@ async fn test_post_order_authentication() {
|
||||
env::var("POLYMARKET_PRIVATE_KEY").expect("POLYMARKET_PRIVATE_KEY must be set in .env");
|
||||
|
||||
let bootstrap = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key.clone()),
|
||||
..ClientConfig::default()
|
||||
@@ -26,7 +26,7 @@ async fn test_post_order_authentication() {
|
||||
.await
|
||||
.expect("Failed to create API key");
|
||||
let client = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key),
|
||||
api_credentials: Some(creds),
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
use polyfill_rs::{ClobClient, PricesHistoryInterval};
|
||||
|
||||
const HOST: &str = "https://clob-v2.polymarket.com";
|
||||
const HOST: &str = "https://clob.polymarket.com";
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[ignore]
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::env;
|
||||
|
||||
fn build_bootstrap_client(private_key: &str) -> ClobClient {
|
||||
ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key.to_string()),
|
||||
..ClientConfig::default()
|
||||
@@ -30,7 +30,7 @@ async fn test_create_api_key_simple() {
|
||||
println!("Successfully created/derived API key");
|
||||
println!(" API Key created (len={})", creds.api_key.len());
|
||||
let client = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key),
|
||||
api_credentials: Some(creds),
|
||||
@@ -77,7 +77,7 @@ async fn test_get_api_keys() {
|
||||
.await
|
||||
.expect("Failed to create API key");
|
||||
let client = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key),
|
||||
api_credentials: Some(creds),
|
||||
@@ -118,7 +118,7 @@ async fn test_get_trades() {
|
||||
.await
|
||||
.expect("Failed to create API key");
|
||||
let client = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key),
|
||||
api_credentials: Some(creds),
|
||||
@@ -159,7 +159,7 @@ async fn test_get_notifications() {
|
||||
.await
|
||||
.expect("Failed to create API key");
|
||||
let client = ClobClient::from_config(ClientConfig {
|
||||
base_url: "https://clob-v2.polymarket.com".to_string(),
|
||||
base_url: "https://clob.polymarket.com".to_string(),
|
||||
chain: 137,
|
||||
private_key: Some(private_key),
|
||||
api_credentials: Some(creds),
|
||||
|
||||
@@ -14,7 +14,7 @@ use polyfill_rs::{
|
||||
use std::env;
|
||||
use std::time::Duration;
|
||||
|
||||
const HOST: &str = "https://clob-v2.polymarket.com";
|
||||
const HOST: &str = "https://clob.polymarket.com";
|
||||
const WS_MARKET_URL: &str = "wss://ws-subscriptions-clob.polymarket.com/ws/market";
|
||||
const WS_USER_URL: &str = "wss://ws-subscriptions-clob.polymarket.com/ws/user";
|
||||
const CHAIN_ID: u64 = 137;
|
||||
|
||||
Reference in New Issue
Block a user