Skip to content

Commit 9dedddf

Browse files
committed
add the interval to jrpc proto
1 parent f4fed98 commit 9dedddf

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

Cargo.lock

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

lazer/sdk/rust/protocol/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-lazer-protocol"
3-
version = "0.10.0"
3+
version = "0.10.1"
44
edition = "2021"
55
description = "Pyth Lazer SDK - protocol types."
66
license = "Apache-2.0"

lazer/sdk/rust/protocol/src/jrpc.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ pub enum UpdateParams {
3737
best_ask_price: Option<Price>,
3838
},
3939
#[serde(rename = "funding_rate")]
40-
FundingRateUpdate { price: Option<Price>, rate: Rate },
40+
FundingRateUpdate {
41+
price: Option<Price>,
42+
rate: Rate,
43+
funding_rate_interval: Option<Duration>,
44+
},
4145
}
4246

4347
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
@@ -273,7 +277,8 @@ mod tests {
273277
"update": {
274278
"type": "funding_rate",
275279
"price": 1234567890,
276-
"rate": 1234567891
280+
"rate": 1234567891,
281+
"funding_rate_interval": 28800
277282
}
278283
},
279284
"id": 1
@@ -288,6 +293,7 @@ mod tests {
288293
update: UpdateParams::FundingRateUpdate {
289294
price: Some(Price::from_integer(1234567890, 0).unwrap()),
290295
rate: Rate::from_integer(1234567891, 0).unwrap(),
296+
funding_rate_interval: Duration::from_secs(28800).into(),
291297
},
292298
}),
293299
id: Some(1),
@@ -325,6 +331,7 @@ mod tests {
325331
update: UpdateParams::FundingRateUpdate {
326332
price: None,
327333
rate: Rate::from_integer(1234567891, 0).unwrap(),
334+
funding_rate_interval: None,
328335
},
329336
}),
330337
id: Some(1),

0 commit comments

Comments
 (0)