Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

fixed query exchange state ticker #11

Closed
wants to merge 1 commit into from

Conversation

ianjw11
Copy link

@ianjw11 ianjw11 commented Aug 5, 2018

Query exchange state wasn't returning the market under 'M'.

I noticed in the threaded version you're putting it under 'ticker' is there a reason for this? Probably makes sense to unify.....

@@ -195,6 +195,7 @@ def disconnect(self):
async def _is_query_invoke(self, kwargs):
if 'R' in kwargs and type(kwargs['R']) is not bool:
invoke = self.invokes[int(kwargs['I'])]['invoke']
ticker = self.invokes[int(kwargs['I'])].get('ticker')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be omitted from here because private methods also pass through _is_query_invoke and this would put the api keys in the payload.

Should replace line 207, i.e msg['ticker']=self.invokes[int(kwargs['I'])].get('ticker')

@@ -203,6 +204,7 @@ def disconnect(self):
msg = await process_message(kwargs['R'])
if msg is not None:
msg['invoke_type'] = invoke
msg['M'] = ticker
Copy link
Owner

@slazarov slazarov Aug 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg['ticker']=self.invokes[int(kwargs['I'])].get('ticker')

I don't use ['M'] for the reason given in here.

@slazarov
Copy link
Owner

slazarov commented Aug 5, 2018

Hi, the threaded version is a few commits ahead. I've made some recommendations to your PR. Once we concluded them, we can commit the changes.

I use 'ticker' because the official endpoint doesn't yield the market ('M') and I want to distinguish it, i.e it's not a native property. Also described in here.

@slazarov
Copy link
Owner

Part of changes added in d3b29cf. Closing.

@slazarov slazarov closed this Aug 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants