Skip to content

Commit

Permalink
Fixed some failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
soulmachine committed Jul 19, 2022
1 parent e37b32a commit 96d7126
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions crypto-crawler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crypto-crawler"
version = "4.5.4"
version = "4.5.5"
authors = ["soulmachine <soulmachine@gmail.com>"]
edition = "2021"
description = "A rock-solid cryprocurrency crawler."
Expand All @@ -11,19 +11,19 @@ keywords = ["cryptocurrency", "blockchain", "trading"]
[dependencies]
crypto-markets = "1.3.2"
crypto-market-type = "1.1.1"
crypto-msg-parser = "2.6.5"
crypto-msg-parser = "2.6.6"
crypto-msg-type = "1.0.8"
crypto-pair = "2.2.12"
crypto-rest-client = "0.9.4"
crypto-rest-client = "0.9.5"
crypto-ws-client = "4.11.8"
fslock = "0.2.1"
once_cell = "1.13.0"
log = "0.4.17"
rand = "0.8.5"
reqwest = { version = "0.11.11", features = ["blocking", "gzip"] }
serde = { version = "1.0.138", features = ["derive"] }
serde = { version = "1.0.139", features = ["derive"] }
serde_json = "1.0.82"
tokio = { version = "1.19.2", features = ["macros", "rt-multi-thread", "sync", "time"] }
tokio = { version = "1.20.0", features = ["macros", "rt-multi-thread", "sync", "time"] }

[dev_dependencies]
env_logger = "0.9"
Expand Down
12 changes: 6 additions & 6 deletions crypto-msg-parser/tests/okx_v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ mod trade {
.unwrap()
);

assert_eq!(trade.quantity_base, 0.1 * 4.0);
assert_eq!(trade.quantity_quote, 0.1 * 4.0 * 0.1545);
assert_eq!(trade.quantity_base, 1.0 * 4.0);
assert_eq!(trade.quantity_quote, 1.0 * 4.0 * 0.1545);
assert_eq!(trade.quantity_contract, Some(4.0));
assert_eq!(trade.side, TradeSide::Buy);

Expand All @@ -202,8 +202,8 @@ mod trade {
.unwrap()
);

assert_eq!(trade.quantity_base, 0.1 * 10.0);
assert_eq!(trade.quantity_quote, 0.1 * 10.0 * 0.0255);
assert_eq!(trade.quantity_base, 1.0 * 10.0);
assert_eq!(trade.quantity_quote, 1.0 * 10.0 * 0.0255);
assert_eq!(trade.quantity_contract, Some(10.0));
assert_eq!(trade.side, TradeSide::Sell);
}
Expand Down Expand Up @@ -481,8 +481,8 @@ mod l2_event {
assert_eq!(orderbook.timestamp, 1622726335745);

assert_eq!(orderbook.asks[0].price, 0.0015);
assert_eq!(orderbook.asks[0].quantity_base, 0.1 * 906.0);
assert_eq!(orderbook.asks[0].quantity_quote, 0.1 * 906.0 * 0.0015);
assert_eq!(orderbook.asks[0].quantity_base, 1.0 * 906.0);
assert_eq!(orderbook.asks[0].quantity_quote, 1.0 * 906.0 * 0.0015);
assert_eq!(orderbook.asks[0].quantity_contract.unwrap(), 906.0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion crypto-rest-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crypto-rest-client"
version = "0.9.4"
version = "0.9.5"
authors = ["soulmachine <soulmachine@gmail.com>"]
edition = "2021"
description = "An RESTful client for all cryptocurrency exchanges."
Expand Down
2 changes: 1 addition & 1 deletion crypto-rest-client/src/exchanges/zb/zb_spot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::super::utils::http_get;
use crate::error::Result;
use std::collections::BTreeMap;

const BASE_URL: &str = "https://api.zbex.site";
const BASE_URL: &str = "https://api.zb.com";

/// The RESTful client for ZB spot market.
///
Expand Down

0 comments on commit 96d7126

Please sign in to comment.