File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,8 @@ status .......... Trading
150
150
num_publishers .. 19
151
151
price ........... 291958500000 x 10^-8
152
152
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
155
155
```
156
156
157
157
For an example of using Solana Account structure please run:
@@ -179,8 +179,8 @@ product_account .. 6MEwdxe4g1NeAF9u6KDG14anJpFsVEa2cvr5H6iriFZ8
179
179
num_qt ....... 1
180
180
valid_slot ... 91340924
181
181
publish_slot . 91340925
182
- twap ..... .... 7426390900
183
- twac .... ..... 2259870
182
+ ema_price .... 7426390900
183
+ ema_conf ..... 2259870
184
184
```
185
185
186
186
## Development
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ fn main() {
42
42
let maybe_ema_price = eth_price. get_ema_price ( ) ;
43
43
match maybe_ema_price {
44
44
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) ;
47
47
}
48
48
None => {
49
- println ! ( "twap ..... ....... unavailable" ) ;
50
- println ! ( "twac .... ........ unavailable" ) ;
49
+ println ! ( "ema_price ....... unavailable" ) ;
50
+ println ! ( "ema_conf ........ unavailable" ) ;
51
51
}
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ fn main() {
101
101
let maybe_ema_price = price. get_ema_price ( ) ;
102
102
match maybe_ema_price {
103
103
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) ;
106
106
}
107
107
None => {
108
- println ! ( " twap ..... .... unavailable" ) ;
109
- println ! ( " twac .... ..... unavailable" ) ;
108
+ println ! ( " ema_price .... unavailable" ) ;
109
+ println ! ( " ema_conf ..... unavailable" ) ;
110
110
}
111
111
}
112
112
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ impl Price {
97
97
98
98
/**
99
99
* 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.
101
101
*
102
102
* At the moment, the confidence interval returned by this method is computed in
103
103
* a somewhat questionable way, so we do not recommend using it for high-value applications.
You can’t perform that action at this time.
0 commit comments