Repository navigation
Mimic Pyth Pro latest price endpoint - #169
Conversation
b0513b8 to
0ec3a92
Compare
|
I'm not entirely sure if this is what we want/need but it might be sufficient if we're mindful of the limitations. If I remember correctly the original idea of this was to enable the module to serve as a drop in replacement of a 'regular' Pyth Pro REST proxy. All Fast data proxies for Pyth Pro are currently using the REST interface so there are some latency concerns there. This implementation only provides support for a single route so we'd have to make sure that this is the only thing existing OPs are using and be mindful that future OPs can't use any other REST endpoints. |
Currently Injective seems to be the only one using Pyth Pro DP. While the DP is configured to support any paths, the only path that is being used is the |
In that case it could be worth considering to update the OP and injective data proxy.. Then remove all Pyth Pro REST references from the oracle-programs and from now on only use the Websocket module? What's your take? |
If we're allowed to do that, yeah that would certainly be preferable to this PR. I assumed @jasperdg implemented this because modifying the OP and injective DP was not an option |
0ec3a92 to
2d56581
Compare
7734392 to
009d1c9
Compare
|
Any update on this PR? |
009d1c9 to
c9c2fe7
Compare
Pyth Lazer module now provides POST body-based request handling that mimics Pyth Pro's POST `/v1/latest_price` endpoint if fetchFromModule is not configured.
c9c2fe7 to
b462bbb
Compare
I am thinking to spin up a new data proxy to test using the existing OP inputs, and, if this works, we replace our Pyth Pro DP deployments with this. From the OP's perspective, nothing should change. |
Motivation
Injective OP is currently using POST
/v1/latest_priceREST endpoint of Pyth Pro through standard upstream module. This PR provides a way to mimic that endpoint through the Pyth Lazer module.Explanation of Changes
We make
fetchFromModuleoptional for Pyth Lazer module route schema. If it is omitted in the route configuration, the module will use this new POST body-based request handling.Testing
Related PRs and Issues
Supersedes #137