Skip to content

Implement Streaming API client for python 3#14

Closed
adamhicks wants to merge 8 commits into
luno:masterfrom
adamhicks:streamingapi
Closed

Implement Streaming API client for python 3#14
adamhicks wants to merge 8 commits into
luno:masterfrom
adamhicks:streamingapi

Conversation

@adamhicks

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread examples/stream.py Outdated
Comment thread examples/stream.py Outdated
Comment thread luno_python/api_types.py Outdated
Comment thread luno_python/stream_client.py Outdated
@codecov

codecov Bot commented Jul 9, 2019

Copy link
Copy Markdown

Codecov Report

Merging #14 into master will decrease coverage by 28.58%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #14       +/-   ##
===========================================
- Coverage   59.44%   30.85%   -28.59%     
===========================================
  Files           4        6        +2     
  Lines         143      269      +126     
===========================================
- Hits           85       83        -2     
- Misses         58      186      +128
Impacted Files Coverage Δ
luno_python/client.py 35.8% <ø> (ø) ⬆️
luno_python/stream_client.py 0% <0%> (ø)
luno_python/api_types.py 0% <0%> (ø)
luno_python/base_client.py 87.71% <0%> (-3.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c68655...b2b051d. Read the comment docs.

neilgarb
neilgarb previously approved these changes Jul 9, 2019
@YinYin-blip

YinYin-blip commented Nov 20, 2021

Copy link
Copy Markdown
Contributor

There might be a critical bug in the streamingapi of this merge. Please check out the pull request before merging: adamhicks#2

@YinYin-blip YinYin-blip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unresolved comments.

self._bids = {b.order_id: b for b in bids}
self._asks = {a.order_id: a for a in asks}
self._sequence = first['sequence']
self._trades = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this variable used anywhere?


def _process_delete(self, delete_update: dict):
order_id = delete_update['order_id']
self._asks.pop(order_id, None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not self._asks.pop(order_id) ? Raising a KeyError if order_id is not found might be preferred.

def _process_delete(self, delete_update: dict):
order_id = delete_update['order_id']
self._asks.pop(order_id, None)
self._bids.pop(order_id, None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
4 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@echarrod
echarrod deleted the branch luno:master June 28, 2024 15:51
@echarrod echarrod closed this Jun 28, 2024
@YinYin-blip YinYin-blip mentioned this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants