How to publish price using libpc? test_publish.cpp incomplete?
bobinspace opened this issue · 0 comments
I want to publish EUR/USD price. From the docs at
https://github.com/pyth-network/pyth-client/blob/main/doc/getting_started.md,
After building pyth-client, I should:
- Run the proxy via
pyth_tx -r $KHOST - Run the test publisher program via
test_publish -k $KDIR -r $KHOST -t $THOST
Now, from what I understand, I am supposed to expect thetest_publish::on_responsecallbacks to be triggered when the test publisher program receives a message frompyth_tx, and then inside that callback, there's the chance for me to publish the price (I haven't figured out exactly how yet).
Q1: However, I notice that test_publish::on_response never ever gets called. Why?
Digging some more into the test_publish.cpp code, I notice that test_connect's pub1_ and pub2_ members are created but never used, and that test_connect::get_price is not implemented. So these missing parts (unused member, unimplemented method) seem to suggest that test_publish.cpp is incomplete, specifically missing parts on how to actually publish price. Also, putting the missing implementations aside, are the SYMBOL1 and SYMBOL2 in the construction of the 2 test_publish objects arbitrary, or must they correspond to existing instruments in the solana network?
Q2: Exactly, how should one publish price, for say, EUR/USD, step-by-step, using libpc? I tried to understand the docs and reading the sources but it doesn't seem so clear.