SHARE
TWEET

Untitled

a guest Feb 27th, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  public static SymbolTickInfo Run(OrderSymbol orderSymbol)
  2.         {
  3.             var timestamp = (long)((DateTime.UtcNow) - new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc)).TotalMilliseconds;
  4.             Configuration.Default.ApiKey["timestamp"] = timestamp.ToString();
  5.  
  6.             var sign = SignRequest(orderSymbol);
  7.             Configuration.Default.ApiKey["sign"] = sign;
  8.  
  9.             try
  10.             {
  11.                 var marketApiInstance = new MarketApi();
  12.  
  13.                 dynamic response = marketApiInstance.MarketSymbolInfo(orderSymbol.ToString());                
  14.  
  15.                 var symbolInfo = JsonConvert.DeserializeObject<SymbolTickInfo>(JsonConvert.SerializeObject(response.result));
  16.                
  17.                 return symbolInfo;
  18.             }
  19.             catch (Exception e)
  20.             {
  21.                 Debug.Print("Exception when calling MarketApi.MarketOrderBook: " + e.Message);
  22.  
  23.                 return new SymbolTickInfo();
  24.             }
  25.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top