{"action":"opened","number":1669,"pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669","id":173410573,"html_url":"https://github.com/QuantConnect/Lean/pull/1669","diff_url":"https://github.com/QuantConnect/Lean/pull/1669.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/1669.patch","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1669","number":1669,"state":"open","locked":false,"title":"Fix IB GetHistory with multiple API calls","user":{"login":"StefanoRaggi","id":7236689,"avatar_url":"https://avatars1.githubusercontent.com/u/7236689?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanoRaggi","html_url":"https://github.com/StefanoRaggi","followers_url":"https://api.github.com/users/StefanoRaggi/followers","following_url":"https://api.github.com/users/StefanoRaggi/following{/other_user}","gists_url":"https://api.github.com/users/StefanoRaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanoRaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanoRaggi/subscriptions","organizations_url":"https://api.github.com/users/StefanoRaggi/orgs","repos_url":"https://api.github.com/users/StefanoRaggi/repos","events_url":"https://api.github.com/users/StefanoRaggi/events{/privacy}","received_events_url":"https://api.github.com/users/StefanoRaggi/received_events","type":"User","site_admin":false},"body":"\r\n#### Description\r\nTwo bugs have been fixed in `InteractiveBrokersBrokerage.GetHistory` with multiple IB API requests:\r\n- the `ManualResetEvent` used in the method was not being manually reset in the loop: it has been replaced with an `AutoResetEvent`\r\n- multiple blocks are now concatenated properly\r\n\r\n#### Related Issue\r\nFixes #1637\r\n\r\n#### Motivation and Context\r\nThe `InteractiveBrokersBrokerage.GetHistory` method was returning less data points than expected.\r\n\r\n#### Requires Documentation Change\r\nNo\r\n\r\n#### How Has This Been Tested?\r\nUnit test included.\r\n\r\n#### Types of changes\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Non-functional change (xml comments/documentation/ect)\r\n\r\n#### Checklist:\r\n- [x] My code follows the code style of this project.\r\n- [x] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n- [x] My branch follows the naming convention `bug-<issue#>-<description` or `feature-<issue#>-<description>`","created_at":"2018-03-07T10:30:29Z","updated_at":"2018-03-07T10:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669/commits","review_comments_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669/comments","review_comment_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1669/comments","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/c7ff3c2d0634afa299b63076e14bf44e6b57b10c","head":{"label":"StefanoRaggi:bug-1637-ib-history-multiple-api-calls","ref":"bug-1637-ib-history-multiple-api-calls","sha":"c7ff3c2d0634afa299b63076e14bf44e6b57b10c","user":{"login":"StefanoRaggi","id":7236689,"avatar_url":"https://avatars1.githubusercontent.com/u/7236689?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanoRaggi","html_url":"https://github.com/StefanoRaggi","followers_url":"https://api.github.com/users/StefanoRaggi/followers","following_url":"https://api.github.com/users/StefanoRaggi/following{/other_user}","gists_url":"https://api.github.com/users/StefanoRaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanoRaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanoRaggi/subscriptions","organizations_url":"https://api.github.com/users/StefanoRaggi/orgs","repos_url":"https://api.github.com/users/StefanoRaggi/repos","events_url":"https://api.github.com/users/StefanoRaggi/events{/privacy}","received_events_url":"https://api.github.com/users/StefanoRaggi/received_events","type":"User","site_admin":false},"repo":{"id":36553432,"name":"Lean","full_name":"StefanoRaggi/Lean","owner":{"login":"StefanoRaggi","id":7236689,"avatar_url":"https://avatars1.githubusercontent.com/u/7236689?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanoRaggi","html_url":"https://github.com/StefanoRaggi","followers_url":"https://api.github.com/users/StefanoRaggi/followers","following_url":"https://api.github.com/users/StefanoRaggi/following{/other_user}","gists_url":"https://api.github.com/users/StefanoRaggi/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanoRaggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanoRaggi/subscriptions","organizations_url":"https://api.github.com/users/StefanoRaggi/orgs","repos_url":"https://api.github.com/users/StefanoRaggi/repos","events_url":"https://api.github.com/users/StefanoRaggi/events{/privacy}","received_events_url":"https://api.github.com/users/StefanoRaggi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StefanoRaggi/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect","fork":true,"url":"https://api.github.com/repos/StefanoRaggi/Lean","forks_url":"https://api.github.com/repos/StefanoRaggi/Lean/forks","keys_url":"https://api.github.com/repos/StefanoRaggi/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StefanoRaggi/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StefanoRaggi/Lean/teams","hooks_url":"https://api.github.com/repos/StefanoRaggi/Lean/hooks","issue_events_url":"https://api.github.com/repos/StefanoRaggi/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/StefanoRaggi/Lean/events","assignees_url":"https://api.github.com/repos/StefanoRaggi/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/StefanoRaggi/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/StefanoRaggi/Lean/tags","blobs_url":"https://api.github.com/repos/StefanoRaggi/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StefanoRaggi/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StefanoRaggi/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/StefanoRaggi/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StefanoRaggi/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/StefanoRaggi/Lean/languages","stargazers_url":"https://api.github.com/repos/StefanoRaggi/Lean/stargazers","contributors_url":"https://api.github.com/repos/StefanoRaggi/Lean/contributors","subscribers_url":"https://api.github.com/repos/StefanoRaggi/Lean/subscribers","subscription_url":"https://api.github.com/repos/StefanoRaggi/Lean/subscription","commits_url":"https://api.github.com/repos/StefanoRaggi/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/StefanoRaggi/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/StefanoRaggi/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/StefanoRaggi/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/StefanoRaggi/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/StefanoRaggi/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StefanoRaggi/Lean/merges","archive_url":"https://api.github.com/repos/StefanoRaggi/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StefanoRaggi/Lean/downloads","issues_url":"https://api.github.com/repos/StefanoRaggi/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/StefanoRaggi/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/StefanoRaggi/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/StefanoRaggi/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StefanoRaggi/Lean/labels{/name}","releases_url":"https://api.github.com/repos/StefanoRaggi/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/StefanoRaggi/Lean/deployments","created_at":"2015-05-30T10:20:39Z","updated_at":"2016-10-23T13:35:14Z","pushed_at":"2018-03-07T10:16:09Z","git_url":"git://github.com/StefanoRaggi/Lean.git","ssh_url":"git@github.com:StefanoRaggi/Lean.git","clone_url":"https://github.com/StefanoRaggi/Lean.git","svn_url":"https://github.com/StefanoRaggi/Lean","homepage":"https://lean.quantconnect.com","size":203886,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"QuantConnect:master","ref":"master","sha":"09f209fce1f07196f0e32bb8edd7b866c7516049","user":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars0.githubusercontent.com/u/3912814?v=4","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"repo":{"id":27251463,"name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars0.githubusercontent.com/u/3912814?v=4","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantConnect/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#)","fork":false,"url":"https://api.github.com/repos/QuantConnect/Lean","forks_url":"https://api.github.com/repos/QuantConnect/Lean/forks","keys_url":"https://api.github.com/repos/QuantConnect/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantConnect/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantConnect/Lean/teams","hooks_url":"https://api.github.com/repos/QuantConnect/Lean/hooks","issue_events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/QuantConnect/Lean/events","assignees_url":"https://api.github.com/repos/QuantConnect/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/QuantConnect/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/QuantConnect/Lean/tags","blobs_url":"https://api.github.com/repos/QuantConnect/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantConnect/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantConnect/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantConnect/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantConnect/Lean/languages","stargazers_url":"https://api.github.com/repos/QuantConnect/Lean/stargazers","contributors_url":"https://api.github.com/repos/QuantConnect/Lean/contributors","subscribers_url":"https://api.github.com/repos/QuantConnect/Lean/subscribers","subscription_url":"https://api.github.com/repos/QuantConnect/Lean/subscription","commits_url":"https://api.github.com/repos/QuantConnect/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantConnect/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantConnect/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/QuantConnect/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantConnect/Lean/merges","archive_url":"https://api.github.com/repos/QuantConnect/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantConnect/Lean/downloads","issues_url":"https://api.github.com/repos/QuantConnect/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/QuantConnect/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantConnect/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantConnect/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantConnect/Lean/labels{/name}","releases_url":"https://api.github.com/repos/QuantConnect/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/QuantConnect/Lean/deployments","created_at":"2014-11-28T04:20:19Z","updated_at":"2018-03-07T06:59:26Z","pushed_at":"2018-03-06T23:41:10Z","git_url":"git://github.com/QuantConnect/Lean.git","ssh_url":"git@github.com:QuantConnect/Lean.git","clone_url":"https://github.com/QuantConnect/Lean.git","svn_url":"https://github.com/QuantConnect/Lean","homepage":"http://lean.io","size":204022,"stargazers_count":1485,"watchers_count":1485,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":857,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":857,"open_issues":100,"watchers":1485,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/1669"},"issue":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/1669"},"comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/1669/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/1669/commits"},"statuses":{"href":"https://api.github.com/repos/QuantConnect/Lean/statuses/c7ff3c2d0634afa299b63076e14bf44e6b57b10c"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":44,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"StefanoRaggi"}}