Title: Bug - on_replace_order · Issue #33 · BookmapAPI/python-api · GitHub
Open Graph Title: Bug - on_replace_order · Issue #33 · BookmapAPI/python-api
X Title: Bug - on_replace_order · Issue #33 · BookmapAPI/python-api
Description: There's a bug in the on_replace_order function. When a change is made to the same price, the size of the price is added instead of being updated. Because the dict side_dicts is not update between thoses 2 lines old_price_level_size = sid...
Open Graph Description: There's a bug in the on_replace_order function. When a change is made to the same price, the size of the price is added instead of being updated. Because the dict side_dicts is not update between t...
X Description: There's a bug in the on_replace_order function. When a change is made to the same price, the size of the price is added instead of being updated. Because the dict side_dicts is not update betwe...
Opengraph URL: https://github.com/BookmapAPI/python-api/issues/33
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug - on_replace_order","articleBody":"There's a bug in the on_replace_order function.\n\nWhen a change is made to the same price, the size of the price is added instead of being updated.\n\nBecause the dict side_dicts is not update between thoses 2 lines\n```[python]\nold_price_level_size = side_dicts[old_price] - old_size\nnew_price_level_size = (side_dicts[new_price] if new_price in side_dicts else 0) + new_size\n```\n### Fix : \n```\n old_price_level_size = side_dicts[old_price] - old_size\n new_price_level_size = (side_dicts[new_price] if new_price in side_dicts else 0) + new_size\n on_depth(mbp_book, is_order_bid, old_price, old_price_level_size)\n on_depth(mbp_book, is_order_bid, new_price, new_price_level_size)\n```\nto\n```\n old_price_level_size = side_dicts[old_price] - old_size\n on_depth(mbp_book, is_order_bid, old_price, old_price_level_size)\n new_price_level_size = (side_dicts[new_price] if new_price in side_dicts else 0) + new_size\n on_depth(mbp_book, is_order_bid, new_price, new_price_level_size)\n```","author":{"url":"https://github.com/florent1080","@type":"Person","name":"florent1080"},"datePublished":"2025-05-27T07:54:02Z","url":"https://github.com/BookmapAPI/python-api/issues/33"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:31b083fb-0f3c-9903-e3a5-f60d5ac55474 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5DA:1752F1:2B0A402:37C5D8F:6B040B4A |
| html-safe-nonce | 9da34cc28bec356316789b04f2ae9c75d9b063b562405053ea47116b0d08d5ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNURBOjE3NTJGMToyQjBBNDAyOjM3QzVEOEY6NkIwNDBCNEEiLCJ2aXNpdG9yX2lkIjoiNzYyMTg2MzMxNjQxNjM5MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 97697651b210cf293378abe9fd4162801e66d88ea0fbf799a93a5e37f80e75c3 |
| hovercard-subject-tag | issue:3092993222 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/BookmapAPI/python-api/33/issue_layout |
| twitter:image | https://opengraph.githubassets.com/10bb9be1fcdea4add8de60cc7b5091bea73790ee2acb82cc42c1d54312b56fb0/BookmapAPI/python-api/issues/33 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/10bb9be1fcdea4add8de60cc7b5091bea73790ee2acb82cc42c1d54312b56fb0/BookmapAPI/python-api/issues/33 |
| og:image:alt | There's a bug in the on_replace_order function. When a change is made to the same price, the size of the price is added instead of being updated. Because the dict side_dicts is not update between t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | florent1080 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/BookmapAPI/python-api git https://github.com/BookmapAPI/python-api.git |
| octolytics-dimension-user_id | 25076219 |
| octolytics-dimension-user_login | BookmapAPI |
| octolytics-dimension-repository_id | 536529076 |
| octolytics-dimension-repository_nwo | BookmapAPI/python-api |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 536529076 |
| octolytics-dimension-repository_network_root_nwo | BookmapAPI/python-api |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width