-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
To successfully enable the client funder, I had to do it myself using the .set_funder function. It doesn't seem like this is the recommended flow, but this is the only way I could get order submission working without "not enough balance" errors.
let funder = env_var("POLY_FUNDER");
let base_url = env_var("POLY_API_URL");
let private_key = env_var("POLY_PRIVATE_KEY");
let l1_client = ClobClient::with_l1_headers(&base_url, &private_key, 137);
let creds = l1_client.create_or_derive_api_key(None).await?;
let mut client = ClobClient::with_l2_headers(&base_url, &private_key, 137, creds.clone());
let _ = client.set_funder(&funder); // should be integrated into constructor
client.set_api_creds(creds.clone());Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels