Closed peervm closed 7 years ago
Hello Peer,
Pyrfa.marketPricePause(symbols) and Pyrfa.marketPriceResume(symbols)
requires the input parameter as strings for example: p.marketPricePause("JPY=") p.marketPriceResume("JPY=")
you can also pause/resume multiple rics using "," for example
p.marketPricePause("JPY=,EUR=")
Best regards, Ukrit H.
On Mon, Apr 17, 2017 at 9:07 AM, Peer VM notifications@github.com wrote:
Hi,
Can you provide working examples of marketPricePause() and marketPriceResume() please.
I am unable to make the call as per the documentation and the stubs below don't help much.
Thanks, Peer
Boost.Python.ArgumentError: Python argument types in Pyrfa.marketPriceResume(Pyrfa) did not match C++ signature: marketPriceResume(class Pyrfa {lvalue}, class boost::python::api::object)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/devcartel/pyrfa/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQ4J0fhrSiDLu_cEAqGluDpdenWkMiQks5rwslygaJpZM4M-ziV .
There is a working example on GitHub https://github.com/devcartel/pyrfa/blob/master/examples/conflate.py
Thanks guys. The conflate.py example has pauseAll() and resumeAll() which works fine for me.
I'm using 8.1.0 on Python 3.6 win64 but this code doesn't work; p.marketPricePause("JPY=") p.marketPriceResume("JPY=") where p is an instance of the pyrfa.pyrfa.Pyrfa class.
It says method signature error;
did not match C++ signature: marketPriceResume(class Pyrfa {lvalue}, class boost::python::api::object)
I can see the signature looks the for all methods;
Expected usage:
@peervm Can you check the PyRFA version on your machine? Looks like you are loading older version of PyRFA. PyRFA supports pause and resume from version 8.0.0.1.
@peervm We just did a test on Python 3.6 windows 64 and it works fine.
Result:
Try with below code:
import pyrfa
exec(open('./utils/every.py').read())
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.marketPriceRequest("JPY=")
p.dispatchEventQueue(1000)
p.marketPricePause("JPY=")
def getConflatedUpdate():
p.marketPriceResume("JPY=")
updates = p.dispatchEventQueue(10)
p.marketPricePause("JPY=")
if updates:
print("")
for u in updates:
print(u['SERVICE'] + " - " + u['RIC'])
for k,v in u.items():
if type(v) is float:
print("%15s %g" % (k,v))
else:
print("%15s %s" % (k,v))
print("")
loop = every(10, getConflatedUpdate)
end = False
try:
while not end:
pass
except KeyboardInterrupt:
loop.stop()
end = True
Installing RFA libraries on win7 machine installs into difference and confusing paths and this caused a conflict.
I haven't fixed the issue locally yet, but it is almost certainly the root cause.
Thanks for your assistance and amazing response time.
Got everything working now. But just for future reference, another mistake I made was to use snapshot mode. Obviously pause\resume only works for setInteractionType("stream").
Hi,
Can you provide working examples of marketPricePause() and marketPriceResume() please.
I am unable to make the call as per the documentation and the stubs below don't help much.
Thanks, Peer
Boost.Python.ArgumentError: Python argument types in Pyrfa.marketPriceResume(Pyrfa) did not match C++ signature: marketPriceResume(class Pyrfa {lvalue}, class boost::python::api::object)