-
Notifications
You must be signed in to change notification settings - Fork 16
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
Examples: marketPricePause() and marketPriceResume() #25
Comments
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 ***@***.***> 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
<#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; It says method signature error; |
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)
The text was updated successfully, but these errors were encountered: