using System.Collections.Generic;
public static void Main()
Console.WriteLine(Handshake().ToString());
static private bool Handshake()
string command = "handshake";
var request = new RestRequest(Method.POST);
request.RequestFormat = RestSharp.DataFormat.Json;
request.ReadWriteTimeout = request.Timeout;
request.AddHeader("origin", "9000");
productId = "REFINITIVHOLDINGSLIMITED.ALPHADESKTRADING",
RestClient client = new RestClient("http://127.0.0.1:9001/sxs/v1");
client.Timeout = request.Timeout;
IRestResponse response = client.Execute(request);
Dictionary<string, object> values = parseJSON(response.Content);
bool connected = values != null && (bool)values["isSuccess"];
private static Dictionary<string, object> parseJSON(string json)
Dictionary<string, object> values = JsonConvert.DeserializeObject<Dictionary<string, object>>(json);
return new Dictionary<string, object> {
{ "error" , e.ToString() }