{"action":"created","comment":{"url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/comments/186849472","pull_request_review_id":118511507,"id":186849472,"diff_hunk":"@@ -77,136 +77,129 @@ def bid(self, pair, price, size, *args, market=False, **kwargs):\n \n     def _place_order(self, pair, price, size, side, market=None, **kwargs):\n         \"\"\"Place an order with the given parameters.\"\"\"\n-        payload = {'amount': size, 'price': price}\n-        payload.update(kwargs)\n-        if market:\n-            return self.request('%s/market/%s/' % (side, pair), authenticate=True, params=payload)\n-        return self.request('%s/%s/' % (side, pair), authenticate=True, params=payload)\n+        kwargs.update({'amount': size, 'price': price})\n+        suffix = 'market/' if market else ''\n+        return self.request('%s/%s%s/' % (side, suffix, pair), authenticate=True, params=kwargs)\n \n     @format_with(BitstampFormattedResponse)\n     def order_status(self, order_id, *args, **kwargs):\n         \"\"\"Return the order status for the given order's ID.\"\"\"\n-        payload = {'id': order_id}\n-        payload.update(kwargs)\n-        return self.request('api/order_status/', authenticate=True, params=payload)\n+        kwargs.update({'id': order_id})\n+        return self.request('api/order_status/', authenticate=True, params=kwargs)\n \n     @format_with(BitstampFormattedResponse)\n     def open_orders(self, *args, pair=None, **kwargs):\n         \"\"\"Return all open orders.\"\"\"\n-        if pair:\n-            return self.request('open_orders/%s/' % pair, authenticate=True, params=kwargs)\n-        return self.request('open_orders/all/', authenticate=True, params=kwargs)\n+        suffix = pair or 'all'\n+        return self.request('open_orders/%s/' % suffix, authenticate=True, params=kwargs)\n \n     @format_with(BitstampFormattedResponse)\n     def cancel_order(self, *order_ids, **kwargs):\n         \"\"\"Cancel existing order(s) with the given id(s).\"\"\"\n         results = []\n-        payload = kwargs\n         for oid in order_ids:\n-            payload.update({'id': oid})\n-            r = self.request('cancel_order/', authenticate=True, params=payload)\n+            kwargs.update({'id': oid})\n+            r = self.request('cancel_order/', authenticate=True, params=kwargs)\n             results.append(r)\n         return results if len(results) > 1 else results[0]\n \n     @format_with(BitstampFormattedResponse)\n-    def wallet(self, *args, **kwargs):\n+    def wallet(self, *args, pair=None, **kwargs):\n         \"\"\"Return account's wallet.\"\"\"\n-        if 'pair' in kwargs:\n+        endpoint = 'balance/'\n+        if pair:\n             try:\n-                pair = kwargs['pair'].format_for(self.name).lower()\n+                pair = pair.format_for(self.name).lower()\n             except AttributeError:\n-                pair = kwargs['pair']\n-\n-            return self.request('balance/%s/' % pair, authenticate=True, params=kwargs)\n-        return self.request('balance/', authenticate=True, params=kwargs)\n+                pair = pair\n+            endpoint += pair + '/'\n+        return self.request(endpoint, authenticate=True, params=kwargs)\n \n     ###########################\n     # Exchange Specific Methods\n     ###########################\n \n     @check_and_format_pair\n-    def hourly_ticker(self, pair, **kwargs):\n+    def hourly_ticker(self, pair):","path":"bitex/interface/bitstamp.py","position":77,"original_position":69,"commit_id":"8bde778e822d202a303829d02e88777563dfb167","original_commit_id":"60da6609dba9dec9eb0bf11409af9a70cde3e74a","user":{"login":"firepol","id":1702718,"avatar_url":"https://avatars1.githubusercontent.com/u/1702718?v=4","gravatar_id":"","url":"https://api.github.com/users/firepol","html_url":"https://github.com/firepol","followers_url":"https://api.github.com/users/firepol/followers","following_url":"https://api.github.com/users/firepol/following{/other_user}","gists_url":"https://api.github.com/users/firepol/gists{/gist_id}","starred_url":"https://api.github.com/users/firepol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firepol/subscriptions","organizations_url":"https://api.github.com/users/firepol/orgs","repos_url":"https://api.github.com/users/firepol/repos","events_url":"https://api.github.com/users/firepol/events{/privacy}","received_events_url":"https://api.github.com/users/firepol/received_events","type":"User","site_admin":false},"body":"Actually, checking again the official bitstamp API, v2 **requires** the pair parameter.\r\n\r\nhttps://www.bitstamp.net/api/#ticker-hour","created_at":"2018-05-08T20:01:18Z","updated_at":"2018-05-08T20:01:18Z","html_url":"https://github.com/Crypto-toolbox/bitex/pull/184#discussion_r186849472","pull_request_url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/comments/186849472"},"html":{"href":"https://github.com/Crypto-toolbox/bitex/pull/184#discussion_r186849472"},"pull_request":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184"}},"in_reply_to_id":186629429},"pull_request":{"url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184","id":183569420,"html_url":"https://github.com/Crypto-toolbox/bitex/pull/184","diff_url":"https://github.com/Crypto-toolbox/bitex/pull/184.diff","patch_url":"https://github.com/Crypto-toolbox/bitex/pull/184.patch","issue_url":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/184","number":184,"state":"open","locked":false,"title":"Fix several bitstamp API issues","user":{"login":"firepol","id":1702718,"avatar_url":"https://avatars1.githubusercontent.com/u/1702718?v=4","gravatar_id":"","url":"https://api.github.com/users/firepol","html_url":"https://github.com/firepol","followers_url":"https://api.github.com/users/firepol/followers","following_url":"https://api.github.com/users/firepol/following{/other_user}","gists_url":"https://api.github.com/users/firepol/gists{/gist_id}","starred_url":"https://api.github.com/users/firepol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firepol/subscriptions","organizations_url":"https://api.github.com/users/firepol/orgs","repos_url":"https://api.github.com/users/firepol/repos","events_url":"https://api.github.com/users/firepol/events{/privacy}","received_events_url":"https://api.github.com/users/firepol/received_events","type":"User","site_admin":false},"body":"Fix calls to endpoints beginning with \"api/\".\r\nAllow to get all user_transactions at once (pair is optional!).\r\nAllow to get deposit address and to withdraw BCH.\r\nAdd missing withdrawal_requests method.\r\nRemove inexistent withdrawal_request method (withdraw exists already).\r\nFix transfer_sub_to_main and transfer_main_to_sub endpoints.\r\nVarious DRY-ups, clean-ups, code style improvements.","created_at":"2018-04-23T22:00:12Z","updated_at":"2018-05-08T20:01:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f25f4753f1ed9ec4426ecb504ddd11bf5a6925dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184/commits","review_comments_url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184/comments","review_comment_url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/184/comments","statuses_url":"https://api.github.com/repos/Crypto-toolbox/bitex/statuses/8bde778e822d202a303829d02e88777563dfb167","head":{"label":"firepol:bitstamp-fixes","ref":"bitstamp-fixes","sha":"8bde778e822d202a303829d02e88777563dfb167","user":{"login":"firepol","id":1702718,"avatar_url":"https://avatars1.githubusercontent.com/u/1702718?v=4","gravatar_id":"","url":"https://api.github.com/users/firepol","html_url":"https://github.com/firepol","followers_url":"https://api.github.com/users/firepol/followers","following_url":"https://api.github.com/users/firepol/following{/other_user}","gists_url":"https://api.github.com/users/firepol/gists{/gist_id}","starred_url":"https://api.github.com/users/firepol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firepol/subscriptions","organizations_url":"https://api.github.com/users/firepol/orgs","repos_url":"https://api.github.com/users/firepol/repos","events_url":"https://api.github.com/users/firepol/events{/privacy}","received_events_url":"https://api.github.com/users/firepol/received_events","type":"User","site_admin":false},"repo":{"id":127424861,"name":"bitex","full_name":"firepol/bitex","owner":{"login":"firepol","id":1702718,"avatar_url":"https://avatars1.githubusercontent.com/u/1702718?v=4","gravatar_id":"","url":"https://api.github.com/users/firepol","html_url":"https://github.com/firepol","followers_url":"https://api.github.com/users/firepol/followers","following_url":"https://api.github.com/users/firepol/following{/other_user}","gists_url":"https://api.github.com/users/firepol/gists{/gist_id}","starred_url":"https://api.github.com/users/firepol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firepol/subscriptions","organizations_url":"https://api.github.com/users/firepol/orgs","repos_url":"https://api.github.com/users/firepol/repos","events_url":"https://api.github.com/users/firepol/events{/privacy}","received_events_url":"https://api.github.com/users/firepol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/firepol/bitex","description":"Crypto-currency Exchange API Framework","fork":true,"url":"https://api.github.com/repos/firepol/bitex","forks_url":"https://api.github.com/repos/firepol/bitex/forks","keys_url":"https://api.github.com/repos/firepol/bitex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firepol/bitex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firepol/bitex/teams","hooks_url":"https://api.github.com/repos/firepol/bitex/hooks","issue_events_url":"https://api.github.com/repos/firepol/bitex/issues/events{/number}","events_url":"https://api.github.com/repos/firepol/bitex/events","assignees_url":"https://api.github.com/repos/firepol/bitex/assignees{/user}","branches_url":"https://api.github.com/repos/firepol/bitex/branches{/branch}","tags_url":"https://api.github.com/repos/firepol/bitex/tags","blobs_url":"https://api.github.com/repos/firepol/bitex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firepol/bitex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firepol/bitex/git/refs{/sha}","trees_url":"https://api.github.com/repos/firepol/bitex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firepol/bitex/statuses/{sha}","languages_url":"https://api.github.com/repos/firepol/bitex/languages","stargazers_url":"https://api.github.com/repos/firepol/bitex/stargazers","contributors_url":"https://api.github.com/repos/firepol/bitex/contributors","subscribers_url":"https://api.github.com/repos/firepol/bitex/subscribers","subscription_url":"https://api.github.com/repos/firepol/bitex/subscription","commits_url":"https://api.github.com/repos/firepol/bitex/commits{/sha}","git_commits_url":"https://api.github.com/repos/firepol/bitex/git/commits{/sha}","comments_url":"https://api.github.com/repos/firepol/bitex/comments{/number}","issue_comment_url":"https://api.github.com/repos/firepol/bitex/issues/comments{/number}","contents_url":"https://api.github.com/repos/firepol/bitex/contents/{+path}","compare_url":"https://api.github.com/repos/firepol/bitex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firepol/bitex/merges","archive_url":"https://api.github.com/repos/firepol/bitex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firepol/bitex/downloads","issues_url":"https://api.github.com/repos/firepol/bitex/issues{/number}","pulls_url":"https://api.github.com/repos/firepol/bitex/pulls{/number}","milestones_url":"https://api.github.com/repos/firepol/bitex/milestones{/number}","notifications_url":"https://api.github.com/repos/firepol/bitex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firepol/bitex/labels{/name}","releases_url":"https://api.github.com/repos/firepol/bitex/releases{/id}","deployments_url":"https://api.github.com/repos/firepol/bitex/deployments","created_at":"2018-03-30T12:17:40Z","updated_at":"2018-03-30T12:17:42Z","pushed_at":"2018-05-08T17:46:07Z","git_url":"git://github.com/firepol/bitex.git","ssh_url":"git@github.com:firepol/bitex.git","clone_url":"https://github.com/firepol/bitex.git","svn_url":"https://github.com/firepol/bitex","homepage":"","size":3513,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Crypto-toolbox:dev","ref":"dev","sha":"ba0ecb14a1944c4228b538db94730a2d56d7daef","user":{"login":"Crypto-toolbox","id":35163019,"avatar_url":"https://avatars1.githubusercontent.com/u/35163019?v=4","gravatar_id":"","url":"https://api.github.com/users/Crypto-toolbox","html_url":"https://github.com/Crypto-toolbox","followers_url":"https://api.github.com/users/Crypto-toolbox/followers","following_url":"https://api.github.com/users/Crypto-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/Crypto-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/Crypto-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crypto-toolbox/subscriptions","organizations_url":"https://api.github.com/users/Crypto-toolbox/orgs","repos_url":"https://api.github.com/users/Crypto-toolbox/repos","events_url":"https://api.github.com/users/Crypto-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/Crypto-toolbox/received_events","type":"Organization","site_admin":false},"repo":{"id":61048235,"name":"bitex","full_name":"Crypto-toolbox/bitex","owner":{"login":"Crypto-toolbox","id":35163019,"avatar_url":"https://avatars1.githubusercontent.com/u/35163019?v=4","gravatar_id":"","url":"https://api.github.com/users/Crypto-toolbox","html_url":"https://github.com/Crypto-toolbox","followers_url":"https://api.github.com/users/Crypto-toolbox/followers","following_url":"https://api.github.com/users/Crypto-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/Crypto-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/Crypto-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crypto-toolbox/subscriptions","organizations_url":"https://api.github.com/users/Crypto-toolbox/orgs","repos_url":"https://api.github.com/users/Crypto-toolbox/repos","events_url":"https://api.github.com/users/Crypto-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/Crypto-toolbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Crypto-toolbox/bitex","description":"Crypto-currency Exchange API Framework","fork":false,"url":"https://api.github.com/repos/Crypto-toolbox/bitex","forks_url":"https://api.github.com/repos/Crypto-toolbox/bitex/forks","keys_url":"https://api.github.com/repos/Crypto-toolbox/bitex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Crypto-toolbox/bitex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Crypto-toolbox/bitex/teams","hooks_url":"https://api.github.com/repos/Crypto-toolbox/bitex/hooks","issue_events_url":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/events{/number}","events_url":"https://api.github.com/repos/Crypto-toolbox/bitex/events","assignees_url":"https://api.github.com/repos/Crypto-toolbox/bitex/assignees{/user}","branches_url":"https://api.github.com/repos/Crypto-toolbox/bitex/branches{/branch}","tags_url":"https://api.github.com/repos/Crypto-toolbox/bitex/tags","blobs_url":"https://api.github.com/repos/Crypto-toolbox/bitex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Crypto-toolbox/bitex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Crypto-toolbox/bitex/git/refs{/sha}","trees_url":"https://api.github.com/repos/Crypto-toolbox/bitex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Crypto-toolbox/bitex/statuses/{sha}","languages_url":"https://api.github.com/repos/Crypto-toolbox/bitex/languages","stargazers_url":"https://api.github.com/repos/Crypto-toolbox/bitex/stargazers","contributors_url":"https://api.github.com/repos/Crypto-toolbox/bitex/contributors","subscribers_url":"https://api.github.com/repos/Crypto-toolbox/bitex/subscribers","subscription_url":"https://api.github.com/repos/Crypto-toolbox/bitex/subscription","commits_url":"https://api.github.com/repos/Crypto-toolbox/bitex/commits{/sha}","git_commits_url":"https://api.github.com/repos/Crypto-toolbox/bitex/git/commits{/sha}","comments_url":"https://api.github.com/repos/Crypto-toolbox/bitex/comments{/number}","issue_comment_url":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/comments{/number}","contents_url":"https://api.github.com/repos/Crypto-toolbox/bitex/contents/{+path}","compare_url":"https://api.github.com/repos/Crypto-toolbox/bitex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Crypto-toolbox/bitex/merges","archive_url":"https://api.github.com/repos/Crypto-toolbox/bitex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Crypto-toolbox/bitex/downloads","issues_url":"https://api.github.com/repos/Crypto-toolbox/bitex/issues{/number}","pulls_url":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls{/number}","milestones_url":"https://api.github.com/repos/Crypto-toolbox/bitex/milestones{/number}","notifications_url":"https://api.github.com/repos/Crypto-toolbox/bitex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Crypto-toolbox/bitex/labels{/name}","releases_url":"https://api.github.com/repos/Crypto-toolbox/bitex/releases{/id}","deployments_url":"https://api.github.com/repos/Crypto-toolbox/bitex/deployments","created_at":"2016-06-13T15:37:13Z","updated_at":"2018-05-08T08:17:33Z","pushed_at":"2018-05-08T17:46:08Z","git_url":"git://github.com/Crypto-toolbox/bitex.git","ssh_url":"git@github.com:Crypto-toolbox/bitex.git","clone_url":"https://github.com/Crypto-toolbox/bitex.git","svn_url":"https://github.com/Crypto-toolbox/bitex","homepage":"","size":3504,"stargazers_count":317,"watchers_count":317,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":119,"open_issues":24,"watchers":317,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184"},"html":{"href":"https://github.com/Crypto-toolbox/bitex/pull/184"},"issue":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/184"},"comments":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/issues/184/comments"},"review_comments":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184/comments"},"review_comment":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/pulls/184/commits"},"statuses":{"href":"https://api.github.com/repos/Crypto-toolbox/bitex/statuses/8bde778e822d202a303829d02e88777563dfb167"}},"author_association":"NONE"}}
{"actor":{"display_login":"firepol"}}