{"action":"created","comment":{"url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/comments/34028236","id":34028236,"diff_hunk":"@@ -0,0 +1,478 @@\n+// meXBT API client\n+package mexbt\n+\n+import (\n+\t\"bytes\"\n+\t\"crypto/hmac\"\n+\t\"crypto/sha256\"\n+\t\"encoding/hex\"\n+\t\"encoding/json\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"strconv\"\n+\t\"strings\"\n+\t\"time\"\n+)\n+\n+const (\n+\t// CreateOrder() sides\n+\tSIDE_BUY  = \"buy\"\n+\tSIDE_SELL = \"sell\"\n+\n+\t// Product pairs\n+\tBTCUSD = \"BTCUSD\"\n+\tBTCMXN = \"BTCMXN\"\n+\n+\t// CreateOrder() types\n+\tORDER_TYPE_MARKET = 1\n+\tORDER_TYPE_LIMIT  = 0\n+\n+\t// Modify() modes\n+\tMODIFY_BUMP    = 0\n+\tMODIFY_EXECUTE = 1\n+)\n+\n+var (\n+\t// Set to true to connect to sandbox API\n+\tSandbox = false\n+)\n+\n+type tickerRequest struct {\n+\tPair string `json:\"productPair\"`\n+}\n+\n+type request struct {\n+}\n+\n+type tradesByDateRequest struct {\n+\tIns       string `json:\"ins\"`\n+\tStartDate int    `json:\"startDate\"`\n+\tEndDate   int    `json:\"endDate\"`\n+}\n+\n+type tradesRequest struct {\n+\tIns        string `json:\"ins\"`\n+\tStartIndex int    `json:\"startIndex\"`\n+\tCount      int    `json:\"count\"`\n+}\n+\n+type accountTradesRequest struct {\n+\tStartIndex int `json:\"startIndex\"`\n+\tCount      int `json:\"count\"`\n+\tsignedRequest\n+}\n+\n+type orderbookRequest struct {\n+\tProductPair string `json:\"productPair\"`\n+}\n+\n+type signedRequest struct {\n+\tApiKey   string `json:\"apiKey\"`\n+\tApiNonce int64  `json:\"apiNonce\"`\n+\tApiSig   string `json:\"apiSig\"`\n+\tIns      string `json:\"ins\"`\n+}\n+\n+type createOrderRequest struct {\n+\tsignedRequest\n+\tSide      string  `json:\"side\"`\n+\tOrderType int     `json:\"orderType\"`\n+\tQty       float64 `json:\"qty,string\"`\n+\tPx        float64 `json:\"px,string\"`\n+}\n+\n+type withdrawRequest struct {\n+\tsignedRequest\n+\tAmount        float64 `json:\"amount\"`","path":"mexbt.go","position":86,"original_position":86,"commit_id":"2e6afc76f24c8d64f976d2cc378d8ea0d4cc6b56","original_commit_id":"2e6afc76f24c8d64f976d2cc378d8ea0d4cc6b56","user":{"login":"williamcoates","id":50446,"avatar_url":"https://avatars.githubusercontent.com/u/50446?v=3","gravatar_id":"","url":"https://api.github.com/users/williamcoates","html_url":"https://github.com/williamcoates","followers_url":"https://api.github.com/users/williamcoates/followers","following_url":"https://api.github.com/users/williamcoates/following{/other_user}","gists_url":"https://api.github.com/users/williamcoates/gists{/gist_id}","starred_url":"https://api.github.com/users/williamcoates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamcoates/subscriptions","organizations_url":"https://api.github.com/users/williamcoates/orgs","repos_url":"https://api.github.com/users/williamcoates/repos","events_url":"https://api.github.com/users/williamcoates/events{/privacy}","received_events_url":"https://api.github.com/users/williamcoates/received_events","type":"User","site_admin":false},"body":"Unfortunately the amount has to be a string for this call. This can be only tested in production currently :(","created_at":"2015-07-07T10:54:47Z","updated_at":"2015-07-07T10:54:47Z","html_url":"https://github.com/meXBT/mexbt-go/pull/2#discussion_r34028236","pull_request_url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/comments/34028236"},"html":{"href":"https://github.com/meXBT/mexbt-go/pull/2#discussion_r34028236"},"pull_request":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2","id":39142663,"html_url":"https://github.com/meXBT/mexbt-go/pull/2","diff_url":"https://github.com/meXBT/mexbt-go/pull/2.diff","patch_url":"https://github.com/meXBT/mexbt-go/pull/2.patch","issue_url":"https://api.github.com/repos/meXBT/mexbt-go/issues/2","number":2,"state":"open","locked":false,"title":"API realization","user":{"login":"derlaft","id":852606,"avatar_url":"https://avatars.githubusercontent.com/u/852606?v=3","gravatar_id":"","url":"https://api.github.com/users/derlaft","html_url":"https://github.com/derlaft","followers_url":"https://api.github.com/users/derlaft/followers","following_url":"https://api.github.com/users/derlaft/following{/other_user}","gists_url":"https://api.github.com/users/derlaft/gists{/gist_id}","starred_url":"https://api.github.com/users/derlaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derlaft/subscriptions","organizations_url":"https://api.github.com/users/derlaft/orgs","repos_url":"https://api.github.com/users/derlaft/repos","events_url":"https://api.github.com/users/derlaft/events{/privacy}","received_events_url":"https://api.github.com/users/derlaft/received_events","type":"User","site_admin":false},"body":"Seems to be ready","created_at":"2015-07-03T02:59:57Z","updated_at":"2015-07-07T10:54:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fd785536db00b1e0b2edb8497547452d128f655","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2/commits","review_comments_url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2/comments","review_comment_url":"https://api.github.com/repos/meXBT/mexbt-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meXBT/mexbt-go/issues/2/comments","statuses_url":"https://api.github.com/repos/meXBT/mexbt-go/statuses/2e6afc76f24c8d64f976d2cc378d8ea0d4cc6b56","head":{"label":"derlaft:master","ref":"master","sha":"2e6afc76f24c8d64f976d2cc378d8ea0d4cc6b56","user":{"login":"derlaft","id":852606,"avatar_url":"https://avatars.githubusercontent.com/u/852606?v=3","gravatar_id":"","url":"https://api.github.com/users/derlaft","html_url":"https://github.com/derlaft","followers_url":"https://api.github.com/users/derlaft/followers","following_url":"https://api.github.com/users/derlaft/following{/other_user}","gists_url":"https://api.github.com/users/derlaft/gists{/gist_id}","starred_url":"https://api.github.com/users/derlaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derlaft/subscriptions","organizations_url":"https://api.github.com/users/derlaft/orgs","repos_url":"https://api.github.com/users/derlaft/repos","events_url":"https://api.github.com/users/derlaft/events{/privacy}","received_events_url":"https://api.github.com/users/derlaft/received_events","type":"User","site_admin":false},"repo":{"id":38468681,"name":"mexbt-go","full_name":"derlaft/mexbt-go","owner":{"login":"derlaft","id":852606,"avatar_url":"https://avatars.githubusercontent.com/u/852606?v=3","gravatar_id":"","url":"https://api.github.com/users/derlaft","html_url":"https://github.com/derlaft","followers_url":"https://api.github.com/users/derlaft/followers","following_url":"https://api.github.com/users/derlaft/following{/other_user}","gists_url":"https://api.github.com/users/derlaft/gists{/gist_id}","starred_url":"https://api.github.com/users/derlaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derlaft/subscriptions","organizations_url":"https://api.github.com/users/derlaft/orgs","repos_url":"https://api.github.com/users/derlaft/repos","events_url":"https://api.github.com/users/derlaft/events{/privacy}","received_events_url":"https://api.github.com/users/derlaft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derlaft/mexbt-go","description":"Go client library for the meXBT exchange","fork":true,"url":"https://api.github.com/repos/derlaft/mexbt-go","forks_url":"https://api.github.com/repos/derlaft/mexbt-go/forks","keys_url":"https://api.github.com/repos/derlaft/mexbt-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derlaft/mexbt-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derlaft/mexbt-go/teams","hooks_url":"https://api.github.com/repos/derlaft/mexbt-go/hooks","issue_events_url":"https://api.github.com/repos/derlaft/mexbt-go/issues/events{/number}","events_url":"https://api.github.com/repos/derlaft/mexbt-go/events","assignees_url":"https://api.github.com/repos/derlaft/mexbt-go/assignees{/user}","branches_url":"https://api.github.com/repos/derlaft/mexbt-go/branches{/branch}","tags_url":"https://api.github.com/repos/derlaft/mexbt-go/tags","blobs_url":"https://api.github.com/repos/derlaft/mexbt-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derlaft/mexbt-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derlaft/mexbt-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/derlaft/mexbt-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derlaft/mexbt-go/statuses/{sha}","languages_url":"https://api.github.com/repos/derlaft/mexbt-go/languages","stargazers_url":"https://api.github.com/repos/derlaft/mexbt-go/stargazers","contributors_url":"https://api.github.com/repos/derlaft/mexbt-go/contributors","subscribers_url":"https://api.github.com/repos/derlaft/mexbt-go/subscribers","subscription_url":"https://api.github.com/repos/derlaft/mexbt-go/subscription","commits_url":"https://api.github.com/repos/derlaft/mexbt-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/derlaft/mexbt-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/derlaft/mexbt-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/derlaft/mexbt-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/derlaft/mexbt-go/contents/{+path}","compare_url":"https://api.github.com/repos/derlaft/mexbt-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derlaft/mexbt-go/merges","archive_url":"https://api.github.com/repos/derlaft/mexbt-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derlaft/mexbt-go/downloads","issues_url":"https://api.github.com/repos/derlaft/mexbt-go/issues{/number}","pulls_url":"https://api.github.com/repos/derlaft/mexbt-go/pulls{/number}","milestones_url":"https://api.github.com/repos/derlaft/mexbt-go/milestones{/number}","notifications_url":"https://api.github.com/repos/derlaft/mexbt-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derlaft/mexbt-go/labels{/name}","releases_url":"https://api.github.com/repos/derlaft/mexbt-go/releases{/id}","created_at":"2015-07-03T02:55:33Z","updated_at":"2015-07-03T02:55:46Z","pushed_at":"2015-07-05T18:47:54Z","git_url":"git://github.com/derlaft/mexbt-go.git","ssh_url":"git@github.com:derlaft/mexbt-go.git","clone_url":"https://github.com/derlaft/mexbt-go.git","svn_url":"https://github.com/derlaft/mexbt-go","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"meXBT:master","ref":"master","sha":"32ee57e99a6fa6a7030199598e10666581b2f711","user":{"login":"meXBT","id":8752211,"avatar_url":"https://avatars.githubusercontent.com/u/8752211?v=3","gravatar_id":"","url":"https://api.github.com/users/meXBT","html_url":"https://github.com/meXBT","followers_url":"https://api.github.com/users/meXBT/followers","following_url":"https://api.github.com/users/meXBT/following{/other_user}","gists_url":"https://api.github.com/users/meXBT/gists{/gist_id}","starred_url":"https://api.github.com/users/meXBT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meXBT/subscriptions","organizations_url":"https://api.github.com/users/meXBT/orgs","repos_url":"https://api.github.com/users/meXBT/repos","events_url":"https://api.github.com/users/meXBT/events{/privacy}","received_events_url":"https://api.github.com/users/meXBT/received_events","type":"Organization","site_admin":false},"repo":{"id":38362715,"name":"mexbt-go","full_name":"meXBT/mexbt-go","owner":{"login":"meXBT","id":8752211,"avatar_url":"https://avatars.githubusercontent.com/u/8752211?v=3","gravatar_id":"","url":"https://api.github.com/users/meXBT","html_url":"https://github.com/meXBT","followers_url":"https://api.github.com/users/meXBT/followers","following_url":"https://api.github.com/users/meXBT/following{/other_user}","gists_url":"https://api.github.com/users/meXBT/gists{/gist_id}","starred_url":"https://api.github.com/users/meXBT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meXBT/subscriptions","organizations_url":"https://api.github.com/users/meXBT/orgs","repos_url":"https://api.github.com/users/meXBT/repos","events_url":"https://api.github.com/users/meXBT/events{/privacy}","received_events_url":"https://api.github.com/users/meXBT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meXBT/mexbt-go","description":"Go client library for the meXBT exchange","fork":false,"url":"https://api.github.com/repos/meXBT/mexbt-go","forks_url":"https://api.github.com/repos/meXBT/mexbt-go/forks","keys_url":"https://api.github.com/repos/meXBT/mexbt-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meXBT/mexbt-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meXBT/mexbt-go/teams","hooks_url":"https://api.github.com/repos/meXBT/mexbt-go/hooks","issue_events_url":"https://api.github.com/repos/meXBT/mexbt-go/issues/events{/number}","events_url":"https://api.github.com/repos/meXBT/mexbt-go/events","assignees_url":"https://api.github.com/repos/meXBT/mexbt-go/assignees{/user}","branches_url":"https://api.github.com/repos/meXBT/mexbt-go/branches{/branch}","tags_url":"https://api.github.com/repos/meXBT/mexbt-go/tags","blobs_url":"https://api.github.com/repos/meXBT/mexbt-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meXBT/mexbt-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meXBT/mexbt-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/meXBT/mexbt-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meXBT/mexbt-go/statuses/{sha}","languages_url":"https://api.github.com/repos/meXBT/mexbt-go/languages","stargazers_url":"https://api.github.com/repos/meXBT/mexbt-go/stargazers","contributors_url":"https://api.github.com/repos/meXBT/mexbt-go/contributors","subscribers_url":"https://api.github.com/repos/meXBT/mexbt-go/subscribers","subscription_url":"https://api.github.com/repos/meXBT/mexbt-go/subscription","commits_url":"https://api.github.com/repos/meXBT/mexbt-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/meXBT/mexbt-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/meXBT/mexbt-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/meXBT/mexbt-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/meXBT/mexbt-go/contents/{+path}","compare_url":"https://api.github.com/repos/meXBT/mexbt-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meXBT/mexbt-go/merges","archive_url":"https://api.github.com/repos/meXBT/mexbt-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meXBT/mexbt-go/downloads","issues_url":"https://api.github.com/repos/meXBT/mexbt-go/issues{/number}","pulls_url":"https://api.github.com/repos/meXBT/mexbt-go/pulls{/number}","milestones_url":"https://api.github.com/repos/meXBT/mexbt-go/milestones{/number}","notifications_url":"https://api.github.com/repos/meXBT/mexbt-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meXBT/mexbt-go/labels{/name}","releases_url":"https://api.github.com/repos/meXBT/mexbt-go/releases{/id}","created_at":"2015-07-01T09:38:16Z","updated_at":"2015-07-01T09:38:16Z","pushed_at":"2015-07-05T18:47:55Z","git_url":"git://github.com/meXBT/mexbt-go.git","ssh_url":"git@github.com:meXBT/mexbt-go.git","clone_url":"https://github.com/meXBT/mexbt-go.git","svn_url":"https://github.com/meXBT/mexbt-go","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2"},"html":{"href":"https://github.com/meXBT/mexbt-go/pull/2"},"issue":{"href":"https://api.github.com/repos/meXBT/mexbt-go/issues/2"},"comments":{"href":"https://api.github.com/repos/meXBT/mexbt-go/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meXBT/mexbt-go/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/meXBT/mexbt-go/statuses/2e6afc76f24c8d64f976d2cc378d8ea0d4cc6b56"}}}}