Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Integration] Pyth #46

Open
jacobcreech opened this issue Dec 3, 2021 · 11 comments
Open

[Integration] Pyth #46

jacobcreech opened this issue Dec 3, 2021 · 11 comments
Labels
Reference Reference for the Cookbook

Comments

@jacobcreech
Copy link
Collaborator

Would be great to have at least the following:

  • Get data feed from pyth
  • Poll for more data
@maxrobot
Copy link
Contributor

maxrobot commented Dec 4, 2021

Is this for on- or off-chain purposes?

@jacobcreech jacobcreech changed the title [Recipe] Pyth [Integration] Pyth Dec 9, 2021
@jacobcreech
Copy link
Collaborator Author

@maxrobot On chain as well as client side on how to retrieve the info

@sunguru98
Copy link
Contributor

Would love to take on this @Jacob-CG :)

@sunguru98
Copy link
Contributor

I'm guessing we have to write a snippet over on chain (to get the data and like assign to a state), and also a seperate script for fetching the updated account data and reflect over the client side?

@jacobcreech
Copy link
Collaborator Author

@sunguru98 yes, that'll work

@jacobcreech jacobcreech added the Reference Reference for the Cookbook label Feb 28, 2022
@pratikbuilds
Copy link
Contributor

Hey @jacobcreech I explored Pyth few days ago and would like to work on this Issue. This is the Repo that i created for as an example to learn pyth. REPO

@jacobcreech
Copy link
Collaborator Author

@0xPratik This is great! Would love pyth to be added the new integrations section.

@dhruvja
Copy link

dhruvja commented Jul 24, 2022

Hey @jacobcreech , I would like to add more snippets and content regarding pyth and would like to work on this issue.

@jacobcreech
Copy link
Collaborator Author

@dhruvja Sounds good depending on what they are. Ultimately integrations should be focused on getting the accounts + using those accounts in CPI

@dhruvja
Copy link

dhruvja commented Jul 25, 2022

@jacobcreech i think we should update the anchor code for pyth integration. I think as per the latest version, this is the method to get the current price feed.

        let price_account_info = &mut ctx.accounts.asset_price_record;
        let price_feed = load_price_feed_from_account_info( &price_account_info ).unwrap();
        let current_price = price_feed.get_current_price().unwrap();

@mubarizkyc
Copy link

@jacobcreech recent method to fetch price https://github.com/mubarizkyc/solpyth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reference Reference for the Cookbook
Projects
None yet
Development

No branches or pull requests

6 participants