Exemple #1
0
 /// <summary>
 /// Get All Assets
 /// </summary>
 /// <returns>Dynamic ojbect with assets</returns>
 Hashtable GetAssets()
 {
     using (KrakenClient client = new KrakenClient())
     {
         Task <string> assets = Task.Run <string>(async() => await client.GetAllAssetsAsync());
         dynamic       data   = JsonConvert.DeserializeObject <dynamic>(assets.Result);
         return(ProcessAssets(data));
     }
 }
Exemple #2
0
        /// <summary>
        /// Get Latest Quotes
        /// </summary>
        /// <param name="pairs">List with pairs</param>
        /// <returns>The Array with FXQuote objects</returns>
        public FXQuote[] GetLatestQuotes(List <string> pairs)
        {
            using (KrakenClient client = new KrakenClient())
            {
                Task <string> tick      = Task.Run <string>(async() => await client.GetTickAsync(pairs));
                dynamic       ticksData = JsonConvert.DeserializeObject <dynamic>(tick.Result);

                return((ProcessTicker(ticksData)).ToArray());
            }
        }