{"action":"created","issue":{"url":"https://api.github.com/repos/timmolter/XChange/issues/1139","repository_url":"https://api.github.com/repos/timmolter/XChange","labels_url":"https://api.github.com/repos/timmolter/XChange/issues/1139/labels{/name}","comments_url":"https://api.github.com/repos/timmolter/XChange/issues/1139/comments","events_url":"https://api.github.com/repos/timmolter/XChange/issues/1139/events","html_url":"https://github.com/timmolter/XChange/issues/1139","id":122872837,"number":1139,"title":"Trouble with Kraken exchange advanced orders","user":{"login":"zygon4","id":2008823,"avatar_url":"https://avatars.githubusercontent.com/u/2008823?v=3","gravatar_id":"","url":"https://api.github.com/users/zygon4","html_url":"https://github.com/zygon4","followers_url":"https://api.github.com/users/zygon4/followers","following_url":"https://api.github.com/users/zygon4/following{/other_user}","gists_url":"https://api.github.com/users/zygon4/gists{/gist_id}","starred_url":"https://api.github.com/users/zygon4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zygon4/subscriptions","organizations_url":"https://api.github.com/users/zygon4/orgs","repos_url":"https://api.github.com/users/zygon4/repos","events_url":"https://api.github.com/users/zygon4/events{/privacy}","received_events_url":"https://api.github.com/users/zygon4/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/timmolter/XChange/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T03:39:18Z","updated_at":"2016-03-04T17:39:33Z","closed_at":null,"body":"I'm attempting to generate and execute a \"KrakenStandardOrder\" that uses an advanced order.\r\n\r\nE.g.\r\n\r\nKrakenStandardOrder stopProfitLimit = KrakenStandardOrder.getStopLossProfitLimitOrderBuilder(CurrencyPair.BTC_EUR, KrakenType.SELL, \"#1\", \"#1\", BigDecimal.valueOf(.01)).buildOrder();\r\n\r\nAnd I'm getting:\r\n\r\nException in thread \"main\" com.xeiam.xchange.exceptions.ExchangeException: [EGeneral:Invalid arguments:ordertype]\r\n\r\nAny ideas? Using the same KrakenStandardOrder I can issue vanilla market and limit orders.\r\n\r\nMy hypothesis is: the KrakenOrderType enum defines the order types as underscored values. \"STOP_LOSS_PROFIT\", \"TRAILING_STOP\", \"MARKET\", etc. The KrakenOrderType toString() lowercases the values before they go to the wire, however it does not turn the underscores back into hyphens.  You can see the fromString perform the one-way translation. \"MARKET\" and \"LIMIT\" orders probably work because there is no hyphens."},"comment":{"url":"https://api.github.com/repos/timmolter/XChange/issues/comments/192375383","html_url":"https://github.com/timmolter/XChange/issues/1139#issuecomment-192375383","issue_url":"https://api.github.com/repos/timmolter/XChange/issues/1139","id":192375383,"user":{"login":"zygon4","id":2008823,"avatar_url":"https://avatars.githubusercontent.com/u/2008823?v=3","gravatar_id":"","url":"https://api.github.com/users/zygon4","html_url":"https://github.com/zygon4","followers_url":"https://api.github.com/users/zygon4/followers","following_url":"https://api.github.com/users/zygon4/following{/other_user}","gists_url":"https://api.github.com/users/zygon4/gists{/gist_id}","starred_url":"https://api.github.com/users/zygon4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zygon4/subscriptions","organizations_url":"https://api.github.com/users/zygon4/orgs","repos_url":"https://api.github.com/users/zygon4/repos","events_url":"https://api.github.com/users/zygon4/events{/privacy}","received_events_url":"https://api.github.com/users/zygon4/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T17:39:33Z","updated_at":"2016-03-04T17:39:33Z","body":"I never went beyond this initial triage but I strongly suspect this was the issue.  We need to add a parallel underbar-to-hypthen translation in KrakenOrderType to be congruent."}}