Skip to content

Commit b8b90a4

Browse files
committed
Prepare for publishing.
1 parent d6522af commit b8b90a4

File tree

9 files changed

+172
-90
lines changed

9 files changed

+172
-90
lines changed

Cargo.lock

Lines changed: 153 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
name = "market-view"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "Market analyzing instrument. Correctly manages local orderbook using websockets depth updates."
6+
license = "MIT"
57

68
[dependencies]
79
rust_decimal = "1.36.0"
810
rust_decimal_macros = "1.36.0"
9-
serde = { version = "1.0.213", features = ["derive"] }
10-
serde_json = "1.0.132"
11+
serde = { version = "1.0.217", features = ["derive"] }
12+
serde_json = "1.0.135"
1113
futures = "0.3.31"
12-
tokio = { version = "1.41.1", features = ["full"] }
13-
http = "1.1.0"
14-
reqwest = { version = "0.12.9", features = [
14+
tokio = { version = "1.43.0", features = ["full"] }
15+
http = "1.2.0"
16+
reqwest = { version = "0.12.12", features = [
1517
"rustls-tls-native-roots", "cookies", "zstd", "brotli", "gzip", "json", "stream", "socks", "hickory-dns"
1618
] }
17-
tokio-websockets = { version = "0.10.1", features = [
19+
tokio-websockets = { version = "0.11.0", features = [
1820
"simd", "client", "rustls-platform-verifier", "rustls-tls12", "aws_lc_rs", "rand"
1921
] }
20-
backon = { git = "https://github.com/Xuanwo/backon.git" }
22+
backon = { version = "1.3.0", git = "https://github.com/Xuanwo/backon.git" }

src/book.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mod tests {
9494
use rust_decimal_macros::dec;
9595

9696
#[test]
97-
fn it_works() {
97+
fn side() {
9898
let mut side = Side::<false>::new(3);
9999

100100
let order0_5 = Order { price: dec!(0.5), size: dec!(43.94) };

src/exchanges/binance/spot/difference.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn apply_event(book: &Arc<Mutex<Book>>, event: EventPayload) {
5555
}
5656
}
5757

58-
/// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#how-to-manage-a-local-order-book-correctly
58+
/// <https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#how-to-manage-a-local-order-book-correctly>
5959
///
6060
/// ### Snapshot and Event Flow
6161
///
@@ -172,8 +172,8 @@ async fn run_pair(
172172
}
173173
}
174174

175-
/// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams \
176-
/// https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream
175+
/// <https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams> \
176+
/// <https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream>
177177
pub(super) async fn run_connection(
178178
config: &SystemConfig,
179179
books: &HashMap<Pair, Arc<Mutex<Book>>>,

src/exchanges/binance/spot/info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ struct RateLimit {
1919
rateLimitType: String,
2020
}
2121

22-
/// https://developers.binance.com/docs/binance-spot-api-docs/rest-api/limits \
23-
/// https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#exchange-information
22+
/// <https://developers.binance.com/docs/binance-spot-api-docs/rest-api/limits> \
23+
/// <https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#exchange-information>
2424
pub(super) async fn get_rate_limits_tbs() -> reqwest::Result<(Arc<TokenBucket>, Arc<TokenBucket>)> {
2525
let exchange_info = reqwest::Client::new()
2626
.get("https://data-api.binance.vision/api/v3/exchangeInfo")

src/exchanges/binance/spot/pairs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Symbol {
1515
quoteAsset: String,
1616
}
1717

18-
/// https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#exchange-information
18+
/// <https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#exchange-information>
1919
pub async fn get_pairs() -> reqwest::Result<Vec<Pair>> {
2020
let exchange_info = reqwest::Client::new()
2121
.get("https://data-api.binance.vision/api/v3/exchangeInfo")

src/exchanges/binance/spot/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub(super) struct Snapshot {
1212
pub(super) asks: Vec<Update>,
1313
}
1414

15-
/// https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#order-book
15+
/// <https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#order-book>
1616
pub(super) async fn get_snapshot(
1717
pair: &Pair,
1818
size: usize,

src/hashmap_chunks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ mod tests {
3636
use super::*;
3737

3838
#[test]
39-
fn it_works() {
39+
fn hashmap_chunks() {
4040
let map = HashMap::from([
4141
(1, 2),
4242
(3, 4),

src/pair.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mod tests {
2727
use super::*;
2828

2929
#[test]
30-
fn it_works() {
30+
fn pair() {
3131
let pair = Pair { ba: String::from("btc"), qa: String::from("usdt") };
3232

3333
assert_eq!(pair.fused(), "btcusdt");

0 commit comments

Comments
 (0)