Skip to content

Commit 8d43b1b

Browse files
Fix formatting issues in Solana TWAP documentation
Co-Authored-By: Tejas Badadare <[email protected]>
1 parent 0c8893d commit 8d43b1b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pages/price-feeds/use-real-time-data/solana.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ pub fn sample_with_twap(
285285
twap_window_seconds,
286286
&feed_id,
287287
)?;
288-
288+
289289
// Sample output:
290290
// The TWAP price is (7160106530699 ± 5129162301) * 10^-8
291291
msg!("The TWAP price is ({} ± {}) * 10^{}", price.price, price.conf, price.exponent);
@@ -308,16 +308,13 @@ import { HermesClient } from "@pythnetwork/hermes-client";
308308
// The URL below is a public Hermes instance operated by the Pyth Data Association.
309309
// Hermes is also available from several third-party providers listed here:
310310
// https://docs.pyth.network/price-feeds/api-instances-and-providers/hermes
311-
const hermesClient = new HermesClient(
312-
"https://hermes.pyth.network/",
313-
{}
314-
);
311+
const hermesClient = new HermesClient("https://hermes.pyth.network/", {});
315312

316313
// Specify the price feed ID and the TWAP window in seconds (maximum 600 seconds)
317314
const twapWindowSeconds = 300; // 5 minutes
318315
const twapUpdateData = await hermesClient.getLatestTwaps(
319316
["0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"], // BTC/USD feed ID
320-
twapWindowSeconds,
317+
twapWindowSeconds,
321318
{ encoding: "base64" }
322319
);
323320

0 commit comments

Comments
 (0)