{"action":"created","comment":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/192086275","pull_request_review_id":124789072,"id":192086275,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjA4NjI3NQ==","diff_hunk":"@@ -0,0 +1,707 @@\n+﻿/*\n+Copyright(c) 2016 Markus Trenkwalder\n+\n+Permission is hereby granted, free of charge, to any person obtaining\n+a copy of this software and associated documentation files (the\n+\"Software\"), to deal in the Software without restriction, including\n+without limitation the rights to use, copy, modify, merge, publish,\n+distribute, sublicense, and/or sell copies of the Software, and to\n+permit persons to whom the Software is furnished to do so, subject to\n+the following conditions:\n+\n+The above copyright notice and this permission notice shall be\n+included in all copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n+*/\n+\n+using Newtonsoft.Json;\n+using Newtonsoft.Json.Linq;\n+using System;\n+using System.Collections.Generic;\n+using System.Globalization;\n+using System.IO;\n+using System.Linq;\n+using System.Net;\n+using System.Security.Cryptography;\n+using System.Text;\n+using System.Threading;\n+using NodaTime;\n+using QuantConnect.Data;\n+using QuantConnect.Data.Market;\n+using QuantConnect.Interfaces;\n+using QuantConnect.Logging;\n+using QuantConnect.Packets;\n+using QuantConnect.Securities;\n+using QuantConnect.Util;\n+using QuantConnect.Orders;\n+using RestSharp;\n+using HistoryRequest = QuantConnect.Data.HistoryRequest;\n+using Order = QuantConnect.Orders.Order;\n+\n+namespace QuantConnect.Brokerages.Kraken\n+{\n+    using DataType;\n+\n+    public class KrakenApi : Brokerage, IDataQueueHandler\n+    {\n+\n+        KrakenRestApi _restApi;\n+\n+        private static readonly TimeSpan SubscribeDelay = TimeSpan.FromMilliseconds(250);\n+        private DateTime _lastSubscribeRequestUtcTime = DateTime.MinValue;\n+        private bool _subscriptionsPending;\n+\n+\n+        private bool _isConnected;\n+        private Thread _connectionMonitorThread;\n+        private volatile bool _connectionLost;\n+        private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();\n+\n+        /// <summary>\n+        /// The UTC time of the last received heartbeat message\n+        /// </summary>\n+        protected DateTime LastHeartbeatUtcTime;\n+\n+        /// <summary>\n+        /// A lock object used to synchronize access to LastHeartbeatUtcTime\n+        /// </summary>\n+        protected readonly object LockerConnectionMonitor = new object();\n+\n+        /// <summary>\n+        /// The list of ticks received\n+        /// </summary>\n+        protected readonly List<Tick> Ticks = new List<Tick>();\n+\n+        /// <summary>\n+        /// The list of currently subscribed symbols\n+        /// </summary>\n+        protected HashSet<Symbol> SubscribedSymbols = new HashSet<Symbol>();\n+\n+        /// <summary>\n+        /// A lock object used to synchronize access to subscribed symbols\n+        /// </summary>\n+        protected readonly object LockerSubscriptions = new object();\n+\n+        /// <summary>\n+        /// The symbol mapper\n+        /// </summary>\n+        protected KrakenSymbolMapper SymbolMapper;\n+\n+        protected IRestClient RateClient;\n+        /// <summary>\n+        /// Initializes a new instance of the <see cref=\"Kraken\"/> class.\n+        /// </summary>\n+        /// <param name=\"key\">The API key.</param>\n+        /// <param name=\"secret\">The API secret.</param>\n+        /// <param name=\"rateLimitMilliseconds\">The rate limit in milliseconds.</param>\n+        public KrakenApi(KrakenSymbolMapper symbolMapper, string key, string secret, int rateLimitMilliseconds = 5000)\n+            : base(\"Kraken Brokerage\")\n+        {\n+            // copied from GDAX\n+            RateClient = new RestClient(\"http://api.fixer.io/latest?base=usd\");\n+\n+            _restApi = new KrakenRestApi(key, secret, rateLimitMilliseconds);\n+\n+            this.SymbolMapper = symbolMapper;\n+\n+            // Updates known symbols\n+            symbolMapper.UpdateSymbols(_restApi);\n+        }\n+\n+        #region IDataQueueHandler\n+\n+        StringBuilder tickerStringbuilder = new StringBuilder();\n+        //! IMPLEMENT IDATAQUEUEHANDLER methods\n+        public IEnumerable<BaseData> GetNextTicks()\n+        {\n+\n+            tickerStringbuilder.Clear();\n+\n+            foreach (Symbol symbol in SubscribedSymbols)\n+            {\n+\n+                string krakenSymbol = SymbolMapper.GetBrokerageSymbol(symbol);\n+\n+                tickerStringbuilder.Append(krakenSymbol);\n+                tickerStringbuilder.Append(\", \");\n+            }\n+\n+            Dictionary<string, Ticker> ticks = _restApi.GetTicker(tickerStringbuilder.ToString());\n+\n+            foreach (KeyValuePair<string, Ticker> pair in ticks)\n+                yield return KrakenTickToLeanTick(pair);\n+\n+        }\n+\n+        public Tick GetTick(Symbol symbol)\n+        {\n+            string krakenSymbol = SymbolMapper.GetBrokerageSymbol(symbol);\n+\n+            Dictionary<string, Ticker> ticks = _restApi.GetTicker(krakenSymbol);\n+\n+            Ticker krakenTick = ticks[krakenSymbol];\n+\n+            return KrakenTickToLeanTick(new KeyValuePair<string, Ticker>(krakenSymbol, krakenTick));\n+        }\n+\n+        Tick KrakenTickToLeanTick(KeyValuePair<string, Ticker> pair)\n+        {\n+\n+            Symbol symbol = SymbolMapper.GetLeanSymbol(pair.Key, SecurityType.Crypto, Market.Kraken);\n+\n+            Ticker krakenTick = pair.Value;\n+\n+            //!+ IZVEDI KAJ POMENI RAZLIKA MED WHOLE LOT IN LOT !!\n+\n+            QuantConnect.Data.Market.Tick leanTick = new Tick();\n+\n+            leanTick.Symbol = symbol;\n+            leanTick.Time = DateTime.UtcNow;\n+\n+            leanTick.BidPrice = krakenTick.Bid[0];\n+            leanTick.BidSize = krakenTick.Bid[1];\n+            leanTick.AskPrice = krakenTick.Ask[0];\n+            leanTick.AskSize = krakenTick.Ask[1];\n+\n+            leanTick.Exchange = Market.Kraken;\n+\n+            leanTick.Value = krakenTick.Closed[0];\n+            leanTick.Quantity = krakenTick.Closed[1];\n+            leanTick.DataType = MarketDataType.Tick;\n+\n+            return leanTick;\n+\n+        }\n+\n+        public void Subscribe(LiveNodePacket job, IEnumerable<Symbol> symbols)\n+        {\n+\n+\n+            foreach (Symbol symbol in symbols)\n+            {\n+                if (symbol.Value.Contains(\"UNIVERSE\") || symbol.SecurityType != SecurityType.Forex && symbol.SecurityType != SecurityType.Crypto)\n+                {\n+                    continue;\n+                }\n+\n+                SubscribedSymbols.Add(symbol);\n+            }\n+        }\n+\n+        public void Unsubscribe(LiveNodePacket job, IEnumerable<Symbol> symbols)\n+        {\n+            foreach (Symbol symbol in symbols)\n+                SubscribedSymbols.RemoveWhere(subscribedSymbol => subscribedSymbol.Value == symbol.Value);\n+        }\n+\n+        #endregion\n+\n+        #region Brokerage\n+        #region BrokerageEvents\n+        /// <summary>\n+        /// Event that fires each time an order is filled\n+        /// </summary>\n+        public event EventHandler<OrderEvent> OrderStatusChanged;\n+\n+        /// <summary>\n+        /// Event that fires each time a short option position is assigned\n+        /// </summary>\n+        public event EventHandler<OrderEvent> OptionPositionAssigned;\n+\n+        /// <summary>\n+        /// Event that fires each time a user's brokerage account is changed\n+        /// </summary>\n+        public event EventHandler<AccountEvent> AccountChanged;\n+\n+        /// <summary>\n+        /// Event that fires when an error is encountered in the brokerage\n+        /// </summary>\n+        public event EventHandler<BrokerageMessageEvent> Message;\n+        #endregion\n+        /// <summary>\n+        /// Returns true if we're currently connected to the broker\n+        /// </summary>\n+        public override bool IsConnected { get { return true; } }\n+\n+        #region TRANSLATORS\n+        private string TranslateDirectionToKraken(OrderDirection direction)\n+        {\n+            if (direction == OrderDirection.Buy)\n+                return \"buy\";\n+\n+            if (direction == OrderDirection.Sell)\n+                return \"sell\";\n+\n+            throw new KrakenException(\"Can't \\\"hold\\\" an order on Kraken!\");\n+        }\n+\n+        private string TranslateOrderTypeToKraken(OrderType orderType)\n+        {\n+            switch (orderType)\n+            {\n+                case OrderType.Limit:\n+                    return \"limit\";\n+\n+                case OrderType.Market:\n+                    return \"market\";\n+\n+                case OrderType.StopLimit:\n+                    break; // return \"stop-loss-limit\";\n+\n+                case OrderType.StopMarket:\n+                    break; // return \"stop-loss-\"\n+            }\n+\n+            throw new KrakenException(\"Unsupported order type\");\n+        }\n+\n+        private OrderType TranslateOrderTypeToLean(string type)\n+        {\n+\n+            switch (type)\n+            {\n+\n+                case \"limit\":\n+                    return OrderType.Limit;\n+\n+                case \"market\":\n+                    return OrderType.Market;\n+            }\n+\n+            throw new KrakenException(\"Unsupported order type\");\n+        }\n+\n+\n+        int ResolutionToInterval(Resolution res)\n+        {\n+\n+            switch (res)\n+            {\n+\n+                case Resolution.Daily:\n+                    return 1440;\n+\n+                case Resolution.Hour:\n+                    return 60;\n+\n+                case Resolution.Minute:\n+                    return 1;\n+\n+\n+                case Resolution.Second:\n+                case Resolution.Tick:\n+                default:\n+                    throw new KrakenException(\"This kind of res. not supported)\");\n+            }\n+        }\n+\n+        DateTime FromUnix(int unixTime)\n+        {\n+            return Time.UnixTimeStampToDateTime(checked((double)unixTime));\n+        }\n+\n+        long ToUnix(DateTime dateTime)\n+        {\n+            return checked((long)Time.DateTimeToUnixTimeStamp(dateTime));\n+        }\n+\n+        #endregion\n+        /// <summary>\n+        /// Places a new order and assigns a new broker ID to the order\n+        /// </summary>\n+        /// <param name=\"order\">The order to be placed</param>\n+        /// <returns>True if the request for a new order has been placed, false otherwise</returns>\n+        public override bool PlaceOrder(Orders.Order order)\n+        {\n+\n+            Order krakenOrder = new Order();\n+\n+            krakenOrder.Pair = SymbolMapper.GetBrokerageSymbol(order.Symbol);\n+\n+            // buy/sell\n+            krakenOrder.Type = TranslateDirectionToKraken(order.Direction);\n+            krakenOrder.OrderType = TranslateOrderTypeToKraken(order.Type);\n+            krakenOrder.Volume = order.AbsoluteQuantity;\n+\n+            if (order.Type == OrderType.Limit)\n+                krakenOrder.Price = order.Price;\n+\n+            // krakenOrder.Leverage = ?\n+\n+            var result = _restApi.AddOrder(krakenOrder);\n+\n+            if (result.Txid != null & result.Txid.Length != 0)\n+            {\n+\n+                order.BrokerId.AddRange(result.Txid);\n+\n+                return true;\n+            }\n+\n+            return false;\n+        }\n+\n+        /// <summary>\n+        /// Updates the order with the same id\n+        /// </summary>\n+        /// <param name=\"order\">The new order information</param>\n+        /// <returns>True if the request was made for the order to be updated, false otherwise</returns>\n+        public override bool UpdateOrder(Orders.Order order)\n+        {\n+\n+            //! UPDATE ORDER           \n+            //todo: maybe make it so, that this broker doesn't support updating orders (because it doesnt)\n+            bool success = false;\n+\n+            if (CancelOrder(order))\n+            {\n+\n+                order.BrokerId.Clear();\n+\n+                if (PlaceOrder(order))\n+                {\n+\n+                    return true;\n+                }\n+                else\n+                {\n+\n+                    // try again\n+                    if (PlaceOrder(order))\n+                    {\n+\n+                        return true;\n+                    }\n+                    else\n+                    {\n+                        throw new KrakenException(\"The update failed! Order was canceled but not placed again\");\n+                    }\n+                }\n+            }\n+\n+            return false;\n+\n+        }\n+\n+        /// <summary>\n+        /// Cancels the order with the specified ID\n+        /// </summary>\n+        /// <param name=\"order\">The order to cancel</param>\n+        /// <returns>True if the request was made for the order to be canceled, false otherwise</returns>\n+        public override bool CancelOrder(Orders.Order order)\n+        {\n+\n+            int sum = 0;\n+\n+            foreach (string txid in order.BrokerId)\n+            {\n+\n+                var result = _restApi.CancelOrder(txid);\n+                sum += result.Count;\n+            }\n+\n+            return sum > 0;\n+\n+        }\n+\n+        /// <summary>\n+        /// Connects the client to the broker's remote servers\n+        /// </summary>\n+        public override void Connect()\n+        {\n+            // NOP\n+            // Maybe should do implement \"ping\" functionality to check if Kraken API is online\n+        }\n+\n+        /// <summary>\n+        /// Disconnects the client from the broker's remote servers\n+        /// </summary>\n+        public override void Disconnect()\n+        {\n+            // NOP\n+        }\n+\n+        /// <summary>\n+        /// Dispose of the brokerage instance\n+        /// </summary>\n+        public override void Dispose()\n+        {\n+            // NOP\n+        }\n+\n+        /// <summary>\n+        /// Gets all open orders on the account. \n+        /// NOTE: The order objects returned do not have QC order IDs.\n+        /// </summary>\n+        /// <returns>The open orders returned from IB</returns>\n+        public override List<Orders.Order> GetOpenOrders()\n+        {\n+            List<Orders.Order> list = new List<Orders.Order>();\n+\n+            Dictionary<string, OrderInfo> orders = _restApi.GetOpenOrders();\n+\n+            foreach (KeyValuePair<string, OrderInfo> pair in orders)\n+            {\n+                OrderInfo info = pair.Value;\n+\n+                OrderDescription desc = info.Descr;\n+\n+                // This is for error-caching purposes here, will get removed in final release\n+                if (pair.Key != desc.Pair)\n+                    throw new KrakenException($\"Pair strings {pair.Key} and {desc.Pair} don't match, please inspect!\");\n+\n+                var SOR = new SubmitOrderRequest(\n+\n+                    TranslateOrderTypeToLean(info.Descr.OrderType),\n+                    SecurityType.Crypto,\n+                    this.SymbolMapper.GetLeanSymbol(desc.Pair, SecurityType.Crypto, Market.Kraken),\n+                    info.Volume - info.VolumeExecuted,\n+                    info.StopPrice.HasValue ? info.StopPrice.Value : 0m,\n+                    info.LimitPrice.HasValue ? info.LimitPrice.Value : 0m,\n+                    Time.UnixTimeStampToDateTime(info.OpenTm),\n+                    \"\"","path":"Brokerages/Kraken/KrakenApi.cs","position":469,"original_position":469,"commit_id":"b84464e48dac971767cf8ba70a88ec1d594c6f29","original_commit_id":"b84464e48dac971767cf8ba70a88ec1d594c6f29","user":{"login":"viliwonka","id":4028544,"node_id":"MDQ6VXNlcjQwMjg1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4028544?v=4","gravatar_id":"","url":"https://api.github.com/users/viliwonka","html_url":"https://github.com/viliwonka","followers_url":"https://api.github.com/users/viliwonka/followers","following_url":"https://api.github.com/users/viliwonka/following{/other_user}","gists_url":"https://api.github.com/users/viliwonka/gists{/gist_id}","starred_url":"https://api.github.com/users/viliwonka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viliwonka/subscriptions","organizations_url":"https://api.github.com/users/viliwonka/orgs","repos_url":"https://api.github.com/users/viliwonka/repos","events_url":"https://api.github.com/users/viliwonka/events{/privacy}","received_events_url":"https://api.github.com/users/viliwonka/received_events","type":"User","site_admin":false},"body":"Ok, added tags, also fixed one bug thanks to you.","created_at":"2018-05-31T12:45:51Z","updated_at":"2018-05-31T12:45:52Z","html_url":"https://github.com/QuantConnect/Lean/pull/2011#discussion_r192086275","pull_request_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/192086275"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/2011#discussion_r192086275"},"pull_request":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011"}},"in_reply_to_id":191832598},"pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011","id":187825014,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg3ODI1MDE0","html_url":"https://github.com/QuantConnect/Lean/pull/2011","diff_url":"https://github.com/QuantConnect/Lean/pull/2011.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/2011.patch","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/2011","number":2011,"state":"open","locked":false,"title":"Feature 2003 kraken exchange","user":{"login":"viliwonka","id":4028544,"node_id":"MDQ6VXNlcjQwMjg1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4028544?v=4","gravatar_id":"","url":"https://api.github.com/users/viliwonka","html_url":"https://github.com/viliwonka","followers_url":"https://api.github.com/users/viliwonka/followers","following_url":"https://api.github.com/users/viliwonka/following{/other_user}","gists_url":"https://api.github.com/users/viliwonka/gists{/gist_id}","starred_url":"https://api.github.com/users/viliwonka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viliwonka/subscriptions","organizations_url":"https://api.github.com/users/viliwonka/orgs","repos_url":"https://api.github.com/users/viliwonka/repos","events_url":"https://api.github.com/users/viliwonka/events{/privacy}","received_events_url":"https://api.github.com/users/viliwonka/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\nExtends Lean with Kraken brokerage functionality.\r\n\r\n#### Description\r\n<!--- Describe your changes in detail -->\r\nKraken is new feature, no changes.\r\n\r\n#### Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\nhttps://github.com/QuantConnect/Lean/issues/2003\r\n\r\n#### Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nMakes Lean more open to crypto sphere.\r\n\r\n#### Requires Documentation Change\r\n<!--- Please indicate if these changes will require updates to documentation, and if so, specify what changes are required -->\r\nQuantConnect.Brokerages will need new Brokerage (Kraken) in list.\r\n\r\n#### How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\r\nKraken REST client is 2 years old code, so there is some \"faith\" it works. But the integration into Lean had absolutely zero testing yet - unit tests are in progress. Absolutely not ready for production.\r\n\r\n#### Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] 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<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\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- [ ] I have added tests to cover my changes. <!--- If not applicable, please explain why -->\r\n- [ ] Write at least one trading algorithm with this Kraken brokerage\r\n- [ ] All new and existing tests passed.\r\n- [ ] Add Kraken into config.json\r\n- [x] My branch follows the naming convention `bug-<issue#>-<description` or `feature-<issue#>-<description>`\r\n\r\n<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->","created_at":"2018-05-14T13:21:18Z","updated_at":"2018-05-31T12:45:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"023bcdc0cc3834e5f140cb8aaf650ad249ab2200","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011/commits","review_comments_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011/comments","review_comment_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/2011/comments","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/b84464e48dac971767cf8ba70a88ec1d594c6f29","head":{"label":"viliwonka:feature-2003-kraken-exchange","ref":"feature-2003-kraken-exchange","sha":"b84464e48dac971767cf8ba70a88ec1d594c6f29","user":{"login":"viliwonka","id":4028544,"node_id":"MDQ6VXNlcjQwMjg1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4028544?v=4","gravatar_id":"","url":"https://api.github.com/users/viliwonka","html_url":"https://github.com/viliwonka","followers_url":"https://api.github.com/users/viliwonka/followers","following_url":"https://api.github.com/users/viliwonka/following{/other_user}","gists_url":"https://api.github.com/users/viliwonka/gists{/gist_id}","starred_url":"https://api.github.com/users/viliwonka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viliwonka/subscriptions","organizations_url":"https://api.github.com/users/viliwonka/orgs","repos_url":"https://api.github.com/users/viliwonka/repos","events_url":"https://api.github.com/users/viliwonka/events{/privacy}","received_events_url":"https://api.github.com/users/viliwonka/received_events","type":"User","site_admin":false},"repo":{"id":132914507,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI5MTQ1MDc=","name":"Lean","full_name":"viliwonka/Lean","owner":{"login":"viliwonka","id":4028544,"node_id":"MDQ6VXNlcjQwMjg1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4028544?v=4","gravatar_id":"","url":"https://api.github.com/users/viliwonka","html_url":"https://github.com/viliwonka","followers_url":"https://api.github.com/users/viliwonka/followers","following_url":"https://api.github.com/users/viliwonka/following{/other_user}","gists_url":"https://api.github.com/users/viliwonka/gists{/gist_id}","starred_url":"https://api.github.com/users/viliwonka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viliwonka/subscriptions","organizations_url":"https://api.github.com/users/viliwonka/orgs","repos_url":"https://api.github.com/users/viliwonka/repos","events_url":"https://api.github.com/users/viliwonka/events{/privacy}","received_events_url":"https://api.github.com/users/viliwonka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/viliwonka/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#)","fork":true,"url":"https://api.github.com/repos/viliwonka/Lean","forks_url":"https://api.github.com/repos/viliwonka/Lean/forks","keys_url":"https://api.github.com/repos/viliwonka/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/viliwonka/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/viliwonka/Lean/teams","hooks_url":"https://api.github.com/repos/viliwonka/Lean/hooks","issue_events_url":"https://api.github.com/repos/viliwonka/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/viliwonka/Lean/events","assignees_url":"https://api.github.com/repos/viliwonka/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/viliwonka/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/viliwonka/Lean/tags","blobs_url":"https://api.github.com/repos/viliwonka/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/viliwonka/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/viliwonka/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/viliwonka/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/viliwonka/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/viliwonka/Lean/languages","stargazers_url":"https://api.github.com/repos/viliwonka/Lean/stargazers","contributors_url":"https://api.github.com/repos/viliwonka/Lean/contributors","subscribers_url":"https://api.github.com/repos/viliwonka/Lean/subscribers","subscription_url":"https://api.github.com/repos/viliwonka/Lean/subscription","commits_url":"https://api.github.com/repos/viliwonka/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/viliwonka/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/viliwonka/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/viliwonka/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/viliwonka/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/viliwonka/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/viliwonka/Lean/merges","archive_url":"https://api.github.com/repos/viliwonka/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/viliwonka/Lean/downloads","issues_url":"https://api.github.com/repos/viliwonka/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/viliwonka/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/viliwonka/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/viliwonka/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/viliwonka/Lean/labels{/name}","releases_url":"https://api.github.com/repos/viliwonka/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/viliwonka/Lean/deployments","created_at":"2018-05-10T14:48:24Z","updated_at":"2018-05-13T14:46:52Z","pushed_at":"2018-05-31T10:21:41Z","git_url":"git://github.com/viliwonka/Lean.git","ssh_url":"git@github.com:viliwonka/Lean.git","clone_url":"https://github.com/viliwonka/Lean.git","svn_url":"https://github.com/viliwonka/Lean","homepage":"http://lean.io","size":209234,"stargazers_count":0,"watchers_count":0,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"QuantConnect:feature-2003-kraken-exchange","ref":"feature-2003-kraken-exchange","sha":"8534df4e20b8eaa8c89880629d6c9d9613044fba","user":{"login":"QuantConnect","id":3912814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTI4MTQ=","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNzI1MTQ2Mw==","name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTI4MTQ=","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-05-30T22:20:50Z","pushed_at":"2018-05-31T10:21:44Z","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":206486,"stargazers_count":1687,"watchers_count":1687,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":957,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":957,"open_issues":114,"watchers":1687,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/2011"},"issue":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/2011"},"comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/2011/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2011/commits"},"statuses":{"href":"https://api.github.com/repos/QuantConnect/Lean/statuses/b84464e48dac971767cf8ba70a88ec1d594c6f29"}},"author_association":"NONE"}}
{"actor":{"display_login":"viliwonka"}}