Skip to content

Commit 1f7f06e

Browse files
committed
Update Readme, docs, outputs to replace twap with ema_price
1 parent da8fe42 commit 1f7f06e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

pyth-sdk-solana/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ status .......... Trading
150150
num_publishers .. 19
151151
price ........... 291958500000 x 10^-8
152152
conf ............ 163920000 x 10^-8
153-
twap ............ 291343470000 x 10^-8
154-
twac ............ 98874533 x 10^-8
153+
ema_price ....... 291343470000 x 10^-8
154+
ema_conf ........ 98874533 x 10^-8
155155
```
156156

157157
For an example of using Solana Account structure please run:
@@ -179,8 +179,8 @@ product_account .. 6MEwdxe4g1NeAF9u6KDG14anJpFsVEa2cvr5H6iriFZ8
179179
num_qt ....... 1
180180
valid_slot ... 91340924
181181
publish_slot . 91340925
182-
twap ......... 7426390900
183-
twac ......... 2259870
182+
ema_price .... 7426390900
183+
ema_conf ..... 2259870
184184
```
185185

186186
## Development

pyth-sdk-solana/examples/eth_price.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ fn main() {
4242
let maybe_ema_price = eth_price.get_ema_price();
4343
match maybe_ema_price {
4444
Some(ema_price) => {
45-
println!("twap ............ {} x 10^{}", ema_price.price, ema_price.expo);
46-
println!("twac ............ {} x 10^{}", ema_price.conf, ema_price.expo);
45+
println!("ema_price ....... {} x 10^{}", ema_price.price, ema_price.expo);
46+
println!("ema_conf ........ {} x 10^{}", ema_price.conf, ema_price.expo);
4747
}
4848
None => {
49-
println!("twap ............ unavailable");
50-
println!("twac ............ unavailable");
49+
println!("ema_price ....... unavailable");
50+
println!("ema_conf ........ unavailable");
5151
}
5252
}
5353

pyth-sdk-solana/examples/get_accounts.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ fn main() {
101101
let maybe_ema_price = price.get_ema_price();
102102
match maybe_ema_price {
103103
Some(ema_price) => {
104-
println!(" twap ......... {} x 10^{}", ema_price.price, ema_price.expo);
105-
println!(" twac ......... {} x 10^{}", ema_price.conf, ema_price.expo);
104+
println!(" ema_price .... {} x 10^{}", ema_price.price, ema_price.expo);
105+
println!(" ema_conf ..... {} x 10^{}", ema_price.conf, ema_price.expo);
106106
}
107107
None => {
108-
println!(" twap ......... unavailable");
109-
println!(" twac ......... unavailable");
108+
println!(" ema_price .... unavailable");
109+
println!(" ema_conf ..... unavailable");
110110
}
111111
}
112112

pyth-sdk/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Price {
9797

9898
/**
9999
* Get the exponential moving average price (ema_price) and a confidence interval on the result.
100-
* Returns `None` if the twap is currently unavailable.
100+
* Returns `None` if the ema price is currently unavailable.
101101
*
102102
* At the moment, the confidence interval returned by this method is computed in
103103
* a somewhat questionable way, so we do not recommend using it for high-value applications.

0 commit comments

Comments
 (0)