Title: Issue · GitHub
Open Graph Title: Issue · flattrade/pythonAPI
X Title: Issue · flattrade/pythonAPI
Description: Contribute to flattrade/pythonAPI development by creating an account on GitHub.
Open Graph Description: Contribute to flattrade/pythonAPI development by creating an account on GitHub.
X Description: Contribute to flattrade/pythonAPI development by creating an account on GitHub.
Opengraph URL: https://github.com/flattrade/pythonAPI
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"place_basket: try/except outside for-loop drops all but last future result","articleBody":"## Problem\r\n`place_basket` in `api_helper.py` appends only the last future's result to `result`; all other order responses are silently discarded.\r\n\r\n## Cite\r\n`api_helper.py` lines 55-63. The `for future in concurrent.futures.as_completed(...)` body is only line 56 (`url = future_to_url[future]`). The `try/except/else` block at lines 57-63 is dedented one level, so it executes once after the loop, using the last-bound `future` from the loop variable.\r\n\r\n```python\r\nfor future in concurrent.futures.as_completed(future_to_url):\r\n url = future_to_url[future]\r\ntry:\r\n result.append(future.result())\r\nexcept Exception as exc:\r\n ...\r\n```\r\n\r\n## Expected\r\nOne appended result (and `resp_ok`/`resp_err` increment) per submitted order.\r\n\r\n## Actual\r\n`len(result) == 1` regardless of `len(orders)`. `resp_ok`/`resp_err` computed but never returned, and only reflect one future.\r\n\r\n## Fix\r\nIndent lines 57-63 into the `for` body.\r\n\r\n## Environment\r\nRepo `main` @ commit HEAD 2026-04-16; `requirements.txt` pins `norenrestapi-0.0.30`, `pandas`, `requests`, `websocket_client`, `pyyaml`. Python 3.x.\r\n\r\nThanks for maintaining flattrade/pythonAPI!","author":{"url":"https://github.com/chirag127","@type":"Person","name":"chirag127"},"datePublished":"2026-07-04T06:04:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/21/pythonAPI/issues/21"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:0c552b15-5113-b211-0ce3-4aabf5796c1d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C3E:9CFFD:43A30DA:5EB2F1D:6A5FBB21 |
| html-safe-nonce | 8ae50f0b8d1b5bb0ca5089f942dcb09023cb69ef7359c38434081bd5f14f4ad2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzNFOjlDRkZEOjQzQTMwREE6NUVCMkYxRDo2QTVGQkIyMSIsInZpc2l0b3JfaWQiOiI0NDY5NzAxNzkzMDQ1MDAzMDQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 443d585c578fe9141518fa29afa0432f57992bb82841b595ae2f96b6f87ee7c1 |
| hovercard-subject-tag | repository:523390098 |
| 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/flattrade/pythonAPI/issues/21 |
| twitter:image | https://opengraph.githubassets.com/deaab42cd2b1e5c9e43ed07dadbd0d2236f026e100ffe45aed7dcbcf4b2b069e/flattrade/pythonAPI |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/deaab42cd2b1e5c9e43ed07dadbd0d2236f026e100ffe45aed7dcbcf4b2b069e/flattrade/pythonAPI |
| og:image:alt | Contribute to flattrade/pythonAPI development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0cfc367faf9c4c774d2a903897aa214c786247c4f45ffcee48cda2b819fb0c8 |
| turbo-cache-control | no-cache |
| go-import | github.com/flattrade/pythonAPI git https://github.com/flattrade/pythonAPI.git |
| octolytics-dimension-user_id | 101879416 |
| octolytics-dimension-user_login | flattrade |
| octolytics-dimension-repository_id | 523390098 |
| octolytics-dimension-repository_nwo | flattrade/pythonAPI |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 523390098 |
| octolytics-dimension-repository_network_root_nwo | flattrade/pythonAPI |
| 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 | 94569c859bc88d6bf7de7e0ce3f2a11cd529a131 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width