Skip to content

Commit db9114a

Browse files
committed
fix(okx): use openapi.okx.com as REST base URL
Switch the REST endpoint from www.okx.com to openapi.okx.com and refresh Cargo.lock for the rustls dependency.
1 parent 830aa32 commit db9114a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/truefix-okx-client/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub enum Environment {
8080
}
8181

8282
impl Environment {
83-
const OKX_REST_BASE: &str = "https://www.okx.com";
83+
const OKX_REST_BASE: &str = "https://openapi.okx.com";
8484
const LIVE_PUBLIC_WS: &str = "wss://ws.okx.com:8443/ws/v5/public";
8585
const LIVE_PRIVATE_WS: &str = "wss://ws.okx.com:8443/ws/v5/private";
8686
const LIVE_BUSINESS_WS: &str = "wss://ws.okx.com:8443/ws/v5/business";
@@ -201,7 +201,7 @@ mod tests {
201201
#[test]
202202
fn standard_environments_expose_documented_endpoints() {
203203
let demo = Environment::Demo;
204-
assert_eq!(demo.rest_base(), "https://www.okx.com");
204+
assert_eq!(demo.rest_base(), "https://openapi.okx.com");
205205
assert_eq!(
206206
demo.public_ws_url(),
207207
"wss://wspap.okx.com:8443/ws/v5/public"
@@ -216,7 +216,7 @@ mod tests {
216216
);
217217

218218
let live = Environment::Live(LiveTradingConfirmation::acknowledge_risk());
219-
assert_eq!(live.rest_base(), "https://www.okx.com");
219+
assert_eq!(live.rest_base(), "https://openapi.okx.com");
220220
assert_eq!(live.public_ws_url(), "wss://ws.okx.com:8443/ws/v5/public");
221221
assert_eq!(live.private_ws_url(), "wss://ws.okx.com:8443/ws/v5/private");
222222
assert_eq!(

0 commit comments

Comments
 (0)