{"action":"created","comment":{"url":"https://api.github.com/repos/santiment/sanbase2/pulls/comments/243251962","pull_request_review_id":186970588,"id":243251962,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzI1MTk2Mg==","diff_hunk":"@@ -26,8 +26,34 @@ defmodule Sanbase.Model.ExchangeAddress do\n     |> unique_constraint(:address)\n   end\n \n+  @doc ~s\"List all exchange addresses\"\n+  @spec list_all() :: list(String.t())\n   def list_all() do\n     Repo.all(__MODULE__)\n     |> Enum.map(fn %__MODULE__{address: address} -> address end)\n   end\n+\n+  @doc ~s\"List all exchange names\"\n+  @spec list_all_exchanges() :: list(String.t())\n+  def list_all_exchanges() do","path":"lib/sanbase/model/exchange_address.ex","position":13,"original_position":13,"commit_id":"d3e81af6b3c5e3111bf9c76dc050827b53d12939","original_commit_id":"d3e81af6b3c5e3111bf9c76dc050827b53d12939","user":{"login":"tspenov","id":122794,"node_id":"MDQ6VXNlcjEyMjc5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/122794?v=4","gravatar_id":"","url":"https://api.github.com/users/tspenov","html_url":"https://github.com/tspenov","followers_url":"https://api.github.com/users/tspenov/followers","following_url":"https://api.github.com/users/tspenov/following{/other_user}","gists_url":"https://api.github.com/users/tspenov/gists{/gist_id}","starred_url":"https://api.github.com/users/tspenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tspenov/subscriptions","organizations_url":"https://api.github.com/users/tspenov/orgs","repos_url":"https://api.github.com/users/tspenov/repos","events_url":"https://api.github.com/users/tspenov/events{/privacy}","received_events_url":"https://api.github.com/users/tspenov/received_events","type":"User","site_admin":false},"body":"yeah `exchange_names` sounds better, also agree that `list_all` should return list of `__MODULE__`. But I think uniqueness is better practice to be in the query with `distinct`","created_at":"2018-12-20T12:19:15Z","updated_at":"2018-12-20T12:19:15Z","html_url":"https://github.com/santiment/sanbase2/pull/848#discussion_r243251962","pull_request_url":"https://api.github.com/repos/santiment/sanbase2/pulls/848","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/comments/243251962"},"html":{"href":"https://github.com/santiment/sanbase2/pull/848#discussion_r243251962"},"pull_request":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/848"}},"in_reply_to_id":243229583},"pull_request":{"url":"https://api.github.com/repos/santiment/sanbase2/pulls/848","id":234296841,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0Mjk2ODQx","html_url":"https://github.com/santiment/sanbase2/pull/848","diff_url":"https://github.com/santiment/sanbase2/pull/848.diff","patch_url":"https://github.com/santiment/sanbase2/pull/848.patch","issue_url":"https://api.github.com/repos/santiment/sanbase2/issues/848","number":848,"state":"open","locked":false,"title":"Add exchange volume api","user":{"login":"tspenov","id":122794,"node_id":"MDQ6VXNlcjEyMjc5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/122794?v=4","gravatar_id":"","url":"https://api.github.com/users/tspenov","html_url":"https://github.com/tspenov","followers_url":"https://api.github.com/users/tspenov/followers","following_url":"https://api.github.com/users/tspenov/following{/other_user}","gists_url":"https://api.github.com/users/tspenov/gists{/gist_id}","starred_url":"https://api.github.com/users/tspenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tspenov/subscriptions","organizations_url":"https://api.github.com/users/tspenov/orgs","repos_url":"https://api.github.com/users/tspenov/repos","events_url":"https://api.github.com/users/tspenov/events{/privacy}","received_events_url":"https://api.github.com/users/tspenov/received_events","type":"User","site_admin":false},"body":"List all exchanges:\r\n```\r\n{ allExchanges }\r\n```\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"allExchanges\": [\r\n      \"StarBit\",\r\n      \"DDEX\",\r\n      \"ShapeShift\",\r\n      \"Bilaxy\",\r\n      \"Yobit\",\r\n      \"COSS\",\r\n      \"Tidex tokens\",\r\n      \"Indodax\",\r\n      \"CoinBene\",\r\n      \"Kraken\",\r\n      \"YoBit\",\r\n     ...\r\n]\r\n}\r\n}\r\n```\r\n\r\nGet exchange in/out volume for a given exchange:\r\n```graphql\r\n{\r\n  exchangeVolume(\r\n    exchange:\"Bitfinex\",\r\n    from:\"2018-11-20T00:00:00Z\",\r\n    to:\"2018-11-28T00:00:00Z\") {\r\n    \r\n    datetime,\r\n    exchangeInflow,\r\n    exchangeOutflow\r\n  }\r\n}\r\n```\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"exchangeVolume\": [\r\n      {\r\n        \"datetime\": \"2018-11-20T00:00:00Z\",\r\n        \"exchangeInflow\": 31302985.286791388,\r\n        \"exchangeOutflow\": 21375196.928917754\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-21T00:00:00Z\",\r\n        \"exchangeInflow\": 9305794.544514699,\r\n        \"exchangeOutflow\": 11865416.470193278\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-22T00:00:00Z\",\r\n        \"exchangeInflow\": 1869233.3175404922,\r\n        \"exchangeOutflow\": 10149200.337983582\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-23T00:00:00Z\",\r\n        \"exchangeInflow\": 16151397.920319388,\r\n        \"exchangeOutflow\": 8036358.857381285\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-24T00:00:00Z\",\r\n        \"exchangeInflow\": 7501403.44171947,\r\n        \"exchangeOutflow\": 5815005.249321977\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-25T00:00:00Z\",\r\n        \"exchangeInflow\": 28467808.17673707,\r\n        \"exchangeOutflow\": 7974032.029678876\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-26T00:00:00Z\",\r\n        \"exchangeInflow\": 9129825.742878968,\r\n        \"exchangeOutflow\": 6761136.759500962\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-27T00:00:00Z\",\r\n        \"exchangeInflow\": 6362990.9915780965,\r\n        \"exchangeOutflow\": 10673524.057566423\r\n      },\r\n      {\r\n        \"datetime\": \"2018-11-28T00:00:00Z\",\r\n        \"exchangeInflow\": 6524534.175788566,\r\n        \"exchangeOutflow\": 1135402.0117541507\r\n      }\r\n    ]\r\n  }\r\n}\r\n```","created_at":"2018-11-28T14:29:31Z","updated_at":"2018-12-20T12:19:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"415cde4122fa64c42b02b9ca41227dfc57af2a47","assignee":null,"assignees":[],"requested_reviewers":[{"login":"valo","id":47639,"node_id":"MDQ6VXNlcjQ3NjM5","avatar_url":"https://avatars2.githubusercontent.com/u/47639?v=4","gravatar_id":"","url":"https://api.github.com/users/valo","html_url":"https://github.com/valo","followers_url":"https://api.github.com/users/valo/followers","following_url":"https://api.github.com/users/valo/following{/other_user}","gists_url":"https://api.github.com/users/valo/gists{/gist_id}","starred_url":"https://api.github.com/users/valo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valo/subscriptions","organizations_url":"https://api.github.com/users/valo/orgs","repos_url":"https://api.github.com/users/valo/repos","events_url":"https://api.github.com/users/valo/events{/privacy}","received_events_url":"https://api.github.com/users/valo/received_events","type":"User","site_admin":false},{"login":"Partysun","id":522287,"node_id":"MDQ6VXNlcjUyMjI4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/522287?v=4","gravatar_id":"","url":"https://api.github.com/users/Partysun","html_url":"https://github.com/Partysun","followers_url":"https://api.github.com/users/Partysun/followers","following_url":"https://api.github.com/users/Partysun/following{/other_user}","gists_url":"https://api.github.com/users/Partysun/gists{/gist_id}","starred_url":"https://api.github.com/users/Partysun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Partysun/subscriptions","organizations_url":"https://api.github.com/users/Partysun/orgs","repos_url":"https://api.github.com/users/Partysun/repos","events_url":"https://api.github.com/users/Partysun/events{/privacy}","received_events_url":"https://api.github.com/users/Partysun/received_events","type":"User","site_admin":false},{"login":"LucoLe","id":5284935,"node_id":"MDQ6VXNlcjUyODQ5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/5284935?v=4","gravatar_id":"","url":"https://api.github.com/users/LucoLe","html_url":"https://github.com/LucoLe","followers_url":"https://api.github.com/users/LucoLe/followers","following_url":"https://api.github.com/users/LucoLe/following{/other_user}","gists_url":"https://api.github.com/users/LucoLe/gists{/gist_id}","starred_url":"https://api.github.com/users/LucoLe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucoLe/subscriptions","organizations_url":"https://api.github.com/users/LucoLe/orgs","repos_url":"https://api.github.com/users/LucoLe/repos","events_url":"https://api.github.com/users/LucoLe/events{/privacy}","received_events_url":"https://api.github.com/users/LucoLe/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/santiment/sanbase2/pulls/848/commits","review_comments_url":"https://api.github.com/repos/santiment/sanbase2/pulls/848/comments","review_comment_url":"https://api.github.com/repos/santiment/sanbase2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/santiment/sanbase2/issues/848/comments","statuses_url":"https://api.github.com/repos/santiment/sanbase2/statuses/d3e81af6b3c5e3111bf9c76dc050827b53d12939","head":{"label":"santiment:add-exchange-volume-api","ref":"add-exchange-volume-api","sha":"d3e81af6b3c5e3111bf9c76dc050827b53d12939","user":{"login":"santiment","id":24846876,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODQ2ODc2","avatar_url":"https://avatars1.githubusercontent.com/u/24846876?v=4","gravatar_id":"","url":"https://api.github.com/users/santiment","html_url":"https://github.com/santiment","followers_url":"https://api.github.com/users/santiment/followers","following_url":"https://api.github.com/users/santiment/following{/other_user}","gists_url":"https://api.github.com/users/santiment/gists{/gist_id}","starred_url":"https://api.github.com/users/santiment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiment/subscriptions","organizations_url":"https://api.github.com/users/santiment/orgs","repos_url":"https://api.github.com/users/santiment/repos","events_url":"https://api.github.com/users/santiment/events{/privacy}","received_events_url":"https://api.github.com/users/santiment/received_events","type":"Organization","site_admin":false},"repo":{"id":106712767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY3MTI3Njc=","name":"sanbase2","full_name":"santiment/sanbase2","private":false,"owner":{"login":"santiment","id":24846876,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODQ2ODc2","avatar_url":"https://avatars1.githubusercontent.com/u/24846876?v=4","gravatar_id":"","url":"https://api.github.com/users/santiment","html_url":"https://github.com/santiment","followers_url":"https://api.github.com/users/santiment/followers","following_url":"https://api.github.com/users/santiment/following{/other_user}","gists_url":"https://api.github.com/users/santiment/gists{/gist_id}","starred_url":"https://api.github.com/users/santiment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiment/subscriptions","organizations_url":"https://api.github.com/users/santiment/orgs","repos_url":"https://api.github.com/users/santiment/repos","events_url":"https://api.github.com/users/santiment/events{/privacy}","received_events_url":"https://api.github.com/users/santiment/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/santiment/sanbase2","description":"The source code of the Sanbase application in Santiment LLC","fork":false,"url":"https://api.github.com/repos/santiment/sanbase2","forks_url":"https://api.github.com/repos/santiment/sanbase2/forks","keys_url":"https://api.github.com/repos/santiment/sanbase2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/santiment/sanbase2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/santiment/sanbase2/teams","hooks_url":"https://api.github.com/repos/santiment/sanbase2/hooks","issue_events_url":"https://api.github.com/repos/santiment/sanbase2/issues/events{/number}","events_url":"https://api.github.com/repos/santiment/sanbase2/events","assignees_url":"https://api.github.com/repos/santiment/sanbase2/assignees{/user}","branches_url":"https://api.github.com/repos/santiment/sanbase2/branches{/branch}","tags_url":"https://api.github.com/repos/santiment/sanbase2/tags","blobs_url":"https://api.github.com/repos/santiment/sanbase2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/santiment/sanbase2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/santiment/sanbase2/git/refs{/sha}","trees_url":"https://api.github.com/repos/santiment/sanbase2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/santiment/sanbase2/statuses/{sha}","languages_url":"https://api.github.com/repos/santiment/sanbase2/languages","stargazers_url":"https://api.github.com/repos/santiment/sanbase2/stargazers","contributors_url":"https://api.github.com/repos/santiment/sanbase2/contributors","subscribers_url":"https://api.github.com/repos/santiment/sanbase2/subscribers","subscription_url":"https://api.github.com/repos/santiment/sanbase2/subscription","commits_url":"https://api.github.com/repos/santiment/sanbase2/commits{/sha}","git_commits_url":"https://api.github.com/repos/santiment/sanbase2/git/commits{/sha}","comments_url":"https://api.github.com/repos/santiment/sanbase2/comments{/number}","issue_comment_url":"https://api.github.com/repos/santiment/sanbase2/issues/comments{/number}","contents_url":"https://api.github.com/repos/santiment/sanbase2/contents/{+path}","compare_url":"https://api.github.com/repos/santiment/sanbase2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/santiment/sanbase2/merges","archive_url":"https://api.github.com/repos/santiment/sanbase2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/santiment/sanbase2/downloads","issues_url":"https://api.github.com/repos/santiment/sanbase2/issues{/number}","pulls_url":"https://api.github.com/repos/santiment/sanbase2/pulls{/number}","milestones_url":"https://api.github.com/repos/santiment/sanbase2/milestones{/number}","notifications_url":"https://api.github.com/repos/santiment/sanbase2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/santiment/sanbase2/labels{/name}","releases_url":"https://api.github.com/repos/santiment/sanbase2/releases{/id}","deployments_url":"https://api.github.com/repos/santiment/sanbase2/deployments","created_at":"2017-10-12T15:42:11Z","updated_at":"2018-12-20T11:01:06Z","pushed_at":"2018-12-20T11:13:53Z","git_url":"git://github.com/santiment/sanbase2.git","ssh_url":"git@github.com:santiment/sanbase2.git","clone_url":"https://github.com/santiment/sanbase2.git","svn_url":"https://github.com/santiment/sanbase2","homepage":"https://app.santiment.net","size":13457,"stargazers_count":36,"watchers_count":36,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6,"open_issues":6,"watchers":36,"default_branch":"master"}},"base":{"label":"santiment:master","ref":"master","sha":"73f9372a601208b8cfa4db3e268358d498f66cb9","user":{"login":"santiment","id":24846876,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODQ2ODc2","avatar_url":"https://avatars1.githubusercontent.com/u/24846876?v=4","gravatar_id":"","url":"https://api.github.com/users/santiment","html_url":"https://github.com/santiment","followers_url":"https://api.github.com/users/santiment/followers","following_url":"https://api.github.com/users/santiment/following{/other_user}","gists_url":"https://api.github.com/users/santiment/gists{/gist_id}","starred_url":"https://api.github.com/users/santiment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiment/subscriptions","organizations_url":"https://api.github.com/users/santiment/orgs","repos_url":"https://api.github.com/users/santiment/repos","events_url":"https://api.github.com/users/santiment/events{/privacy}","received_events_url":"https://api.github.com/users/santiment/received_events","type":"Organization","site_admin":false},"repo":{"id":106712767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY3MTI3Njc=","name":"sanbase2","full_name":"santiment/sanbase2","private":false,"owner":{"login":"santiment","id":24846876,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODQ2ODc2","avatar_url":"https://avatars1.githubusercontent.com/u/24846876?v=4","gravatar_id":"","url":"https://api.github.com/users/santiment","html_url":"https://github.com/santiment","followers_url":"https://api.github.com/users/santiment/followers","following_url":"https://api.github.com/users/santiment/following{/other_user}","gists_url":"https://api.github.com/users/santiment/gists{/gist_id}","starred_url":"https://api.github.com/users/santiment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiment/subscriptions","organizations_url":"https://api.github.com/users/santiment/orgs","repos_url":"https://api.github.com/users/santiment/repos","events_url":"https://api.github.com/users/santiment/events{/privacy}","received_events_url":"https://api.github.com/users/santiment/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/santiment/sanbase2","description":"The source code of the Sanbase application in Santiment LLC","fork":false,"url":"https://api.github.com/repos/santiment/sanbase2","forks_url":"https://api.github.com/repos/santiment/sanbase2/forks","keys_url":"https://api.github.com/repos/santiment/sanbase2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/santiment/sanbase2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/santiment/sanbase2/teams","hooks_url":"https://api.github.com/repos/santiment/sanbase2/hooks","issue_events_url":"https://api.github.com/repos/santiment/sanbase2/issues/events{/number}","events_url":"https://api.github.com/repos/santiment/sanbase2/events","assignees_url":"https://api.github.com/repos/santiment/sanbase2/assignees{/user}","branches_url":"https://api.github.com/repos/santiment/sanbase2/branches{/branch}","tags_url":"https://api.github.com/repos/santiment/sanbase2/tags","blobs_url":"https://api.github.com/repos/santiment/sanbase2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/santiment/sanbase2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/santiment/sanbase2/git/refs{/sha}","trees_url":"https://api.github.com/repos/santiment/sanbase2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/santiment/sanbase2/statuses/{sha}","languages_url":"https://api.github.com/repos/santiment/sanbase2/languages","stargazers_url":"https://api.github.com/repos/santiment/sanbase2/stargazers","contributors_url":"https://api.github.com/repos/santiment/sanbase2/contributors","subscribers_url":"https://api.github.com/repos/santiment/sanbase2/subscribers","subscription_url":"https://api.github.com/repos/santiment/sanbase2/subscription","commits_url":"https://api.github.com/repos/santiment/sanbase2/commits{/sha}","git_commits_url":"https://api.github.com/repos/santiment/sanbase2/git/commits{/sha}","comments_url":"https://api.github.com/repos/santiment/sanbase2/comments{/number}","issue_comment_url":"https://api.github.com/repos/santiment/sanbase2/issues/comments{/number}","contents_url":"https://api.github.com/repos/santiment/sanbase2/contents/{+path}","compare_url":"https://api.github.com/repos/santiment/sanbase2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/santiment/sanbase2/merges","archive_url":"https://api.github.com/repos/santiment/sanbase2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/santiment/sanbase2/downloads","issues_url":"https://api.github.com/repos/santiment/sanbase2/issues{/number}","pulls_url":"https://api.github.com/repos/santiment/sanbase2/pulls{/number}","milestones_url":"https://api.github.com/repos/santiment/sanbase2/milestones{/number}","notifications_url":"https://api.github.com/repos/santiment/sanbase2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/santiment/sanbase2/labels{/name}","releases_url":"https://api.github.com/repos/santiment/sanbase2/releases{/id}","deployments_url":"https://api.github.com/repos/santiment/sanbase2/deployments","created_at":"2017-10-12T15:42:11Z","updated_at":"2018-12-20T11:01:06Z","pushed_at":"2018-12-20T11:13:53Z","git_url":"git://github.com/santiment/sanbase2.git","ssh_url":"git@github.com:santiment/sanbase2.git","clone_url":"https://github.com/santiment/sanbase2.git","svn_url":"https://github.com/santiment/sanbase2","homepage":"https://app.santiment.net","size":13457,"stargazers_count":36,"watchers_count":36,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6,"open_issues":6,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/848"},"html":{"href":"https://github.com/santiment/sanbase2/pull/848"},"issue":{"href":"https://api.github.com/repos/santiment/sanbase2/issues/848"},"comments":{"href":"https://api.github.com/repos/santiment/sanbase2/issues/848/comments"},"review_comments":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/848/comments"},"review_comment":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/santiment/sanbase2/pulls/848/commits"},"statuses":{"href":"https://api.github.com/repos/santiment/sanbase2/statuses/d3e81af6b3c5e3111bf9c76dc050827b53d12939"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tspenov"}}