public static void Main0(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        List <AdharaHFT.accountTick> accountTickList = wrapper.getAccount();

        foreach (AdharaHFT.accountTick tick in accountTickList)
        {
            Console.WriteLine("Name: " + tick.name + " Style: " + tick.style + " Leverage: " + tick.leverage);
        }

        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        foreach (AdharaHFT.tinterfaceTick tick in tinterfaceTickList)
        {
            Console.WriteLine("Name: " + tick.name + " Account: " + tick.account + " Commissions: " + tick.commissions);
        }

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
    public static void Main14(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // HISTORICAL PRICE POLLING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        Console.WriteLine("Starting Candle list 1");
        List <String> tinterfacelist = null;

        if (tinterfaceTickList != null && tinterfaceTickList.Count > 1)
        {
            tinterfacelist = new List <string>();
            tinterfacelist.Add(tinterfaceTickList[1].name);
        }
        List <AdharaHFT.candleTick> candleTickList1 = wrapper.getHistoricalPrice(new List <string> {
            "EUR/USD", "EUR/GBP", "EUR/JPY", "GBP/JPY", "GBP/USD", "USD/JPY"
        }, tinterfacelist, AdharaHFT.CANDLE_GRANULARITY_10MINUTES, AdharaHFT.SIDE_ASK, 5);

        foreach (AdharaHFT.candleTick tick in candleTickList1)
        {
            Console.WriteLine("Security: " + tick.security + " tinterface: " + tick.tinterface + " TimeStamp: " + tick.timestamp + " Side: " + tick.side + " Open: " + tick.open + " High: " + tick.high + " Low: " + tick.low + " Close: " + tick.close + " Ticks: " + tick.ticks);
        }
        Console.WriteLine("Candle list 1 Finished");

        Console.WriteLine("Starting Candle list 2");
        List <AdharaHFT.candleTick> candleTickList2 = wrapper.getHistoricalPrice(new List <string> {
            "EUR/USD"
        }, null, AdharaHFT.CANDLE_GRANULARITY_30MINUTES, AdharaHFT.SIDE_BID, 3);

        foreach (AdharaHFT.candleTick tick in candleTickList2)
        {
            Console.WriteLine("Security: " + tick.security + " tinterface: " + tick.tinterface + " TimeStamp: " + tick.timestamp + " Side: " + tick.side + " Open: " + tick.open + " High: " + tick.high + " Low: " + tick.low + " Close: " + tick.close + " Ticks: " + tick.ticks);
        }
        Console.WriteLine("Candle list 2 Finished");

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
Ejemplo n.º 3
0
    public static void Main2(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // PRICE POLLING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        Console.WriteLine("Starting Polling1");
        List <string> tinterfacelist = null;

        if (tinterfaceTickList != null && tinterfaceTickList.Count > 1)
        {
            tinterfacelist = new List <string>();
            tinterfacelist.Add(tinterfaceTickList[1].name);
        }
        List <AdharaHFT.priceTick> priceTickList1 = wrapper.getPrice(new List <string> {
            "EUR/USD", "EUR/GBP", "EUR/JPY", "GBP/JPY", "GBP/USD", "USD/JPY"
        }, tinterfacelist, AdharaHFT.GRANULARITY_TOB, 1);

        foreach (AdharaHFT.priceTick tick in priceTickList1)
        {
            Console.WriteLine("Security: " + tick.security + " Price: " + tick.price.ToString("F" + tick.pips) + " Side: " + tick.side + " TI: " + tick.tinterface + " Liquidity: " + tick.liquidity);
        }
        Console.WriteLine("Polling1 Finished");

        Console.WriteLine("Starting Polling2");
        List <AdharaHFT.priceTick> priceTickList2 = wrapper.getPrice(new List <string> {
            "EUR/USD"
        }, null, AdharaHFT.GRANULARITY_FAB, 4);

        foreach (AdharaHFT.priceTick tick in priceTickList2)
        {
            Console.WriteLine("Security: " + tick.security + " Price: " + tick.price.ToString("F" + tick.pips) + " Side: " + tick.side + " TI: " + tick.tinterface + " Liquidity: " + tick.liquidity);
        }
        Console.WriteLine("Polling2 Finished");

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
    public static void Main12(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // STRATEGY

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        tinterface1 = tinterfaceTickList[0].name;
        if (tinterfaceTickList.Count > 1)
        {
            tinterface2 = tinterfaceTickList[1].name;
        }
        else
        {
            tinterface2 = tinterfaceTickList[0].name;
        }
        List <string> tinterfacelist = null;

        if (tinterfaceTickList != null && tinterfaceTickList.Count > 1)
        {
            tinterfacelist = new List <string>();
            tinterfacelist.Add(tinterface1);
            tinterfacelist.Add(tinterface2);
        }

        // Open price streaming
        string id1 = wrapper.getPriceBegin(new List <string> {
            "EUR/USD"
        }, tinterfacelist, AdharaHFT.GRANULARITY_TOB, 1, interval, new AdharaHFTListenerImp12());

        Thread.Sleep(20000);

        // Close price streaming
        wrapper.getPriceEnd(id1);

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
Ejemplo n.º 5
0
    public static void Main6(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // ORDER POLLING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        Console.WriteLine("Starting Polling1");
        List <AdharaHFT.orderTick> orderTickList1 = wrapper.getOrder(new List <string> {
            "EUR/USD", "GBP/JPY", "GBP/USD"
        }, null, null);

        foreach (AdharaHFT.orderTick tick in orderTickList1)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status);
        }
        Console.WriteLine("Polling1 Finished");

        Console.WriteLine("Starting Polling2");
        List <string> tinterfacelist = null;

        if (tinterfaceTickList != null && tinterfaceTickList.Count > 1)
        {
            tinterfacelist = new List <String>();
            tinterfacelist.Add(tinterfaceTickList[0].name);
            tinterfacelist.Add(tinterfaceTickList[1].name);
        }
        List <AdharaHFT.orderTick> orderTickList2 = wrapper.getOrder(null, tinterfacelist, null);

        foreach (AdharaHFT.orderTick tick in orderTickList2)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status);
        }
        Console.WriteLine("Polling2 Finished");

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
    public static void Main8(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // CANCEL PENDING ORDER WITH ORDER POLLING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();
        string tinterface1 = tinterfaceTickList[0].name;

        Console.WriteLine("Starting Polling1");
        List <AdharaHFT.orderTick> orderTickList1 = wrapper.getOrder(null, null, new List <string> {
            AdharaHFT.ORDERTYPE_PENDING, AdharaHFT.ORDERTYPE_CANCELED
        });

        foreach (AdharaHFT.orderTick tick in orderTickList1)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status + " Price: " + tick.limitprice);
        }
        Console.WriteLine("Polling1 Finished");
        Thread.Sleep(2000);

        // get current price
        double price = 0.0;
        List <AdharaHFT.priceTick> priceTickList1 = wrapper.getPrice(new List <string> {
            "EUR/USD"
        }, new List <string> {
            tinterface1
        }, AdharaHFT.GRANULARITY_TOB, 1);

        foreach (AdharaHFT.priceTick tick in priceTickList1)
        {
            price = tick.price;
        }

        // Create pending order. If buy, order price must be lower than current price
        AdharaHFT.orderRequest order1 = new AdharaHFT.orderRequest();
        order1.security    = "EUR/USD";
        order1.tinterface  = tinterface1;
        order1.quantity    = 500000;
        order1.side        = AdharaHFT.SIDE_BUY;
        order1.type        = AdharaHFT.TYPE_LIMIT;
        order1.timeinforce = AdharaHFT.VALIDITY_DAY;
        order1.price       = price - 0.01;

        Console.WriteLine("Sending order");
        int    tempid = -1;
        string fixid  = "";
        List <AdharaHFT.orderRequest> orderList = wrapper.setOrder(new List <AdharaHFT.orderRequest> {
            order1
        });

        foreach (AdharaHFT.orderRequest orderresponse in orderList)
        {
            Console.WriteLine("Id: " + orderresponse.tempid + " Security: " + orderresponse.security + " Side: " + orderresponse.side + " Quantity: " + orderresponse.quantity + " Price: " + orderresponse.price + " Type: " + orderresponse.type);
            tempid = orderresponse.tempid;
        }
        Console.WriteLine("Order sended order");
        Thread.Sleep(2000);

        Console.WriteLine("Starting Polling2");
        List <AdharaHFT.orderTick> orderTickList2 = wrapper.getOrder(null, null, new List <string> {
            AdharaHFT.ORDERTYPE_PENDING, AdharaHFT.ORDERTYPE_CANCELED
        });

        foreach (AdharaHFT.orderTick tick in orderTickList2)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status + " Price: " + tick.limitprice);
            if (tempid == tick.tempid)
            {
                fixid = tick.fixid;
            }
        }
        Console.WriteLine("Polling2 Finished");
        Thread.Sleep(2000);

        Console.WriteLine("Cancel order");
        List <AdharaHFT.cancelTick> cancelList = wrapper.cancelOrder(new List <string> {
            fixid
        });

        foreach (AdharaHFT.cancelTick cancelresponse in cancelList)
        {
            Console.WriteLine("FixId: " + cancelresponse.fixid + " Result: " + cancelresponse.result);
        }
        Console.WriteLine("Order canceled");
        Thread.Sleep(2000);

        Console.WriteLine("Starting Polling3");
        List <AdharaHFT.orderTick> orderTickList3 = wrapper.getOrder(null, null, new List <string> {
            AdharaHFT.ORDERTYPE_PENDING, AdharaHFT.ORDERTYPE_CANCELED
        });

        foreach (AdharaHFT.orderTick tick in orderTickList3)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status + " Price: " + tick.limitprice);
        }
        Console.WriteLine("Polling3 Finished");

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
    public static void Main11(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // MODIFY PENDING ORDER WITH ORDER STREAMING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();
        string tinterface1 = tinterfaceTickList[0].name;

        // Open order streaming
        AdharaHFTListenerImp10 listener = new AdharaHFTListenerImp10();
        string id1 = wrapper.getOrderBegin(null, null, null, interval, listener);

        Thread.Sleep(5000);

        // get current price
        double price = 0.0;
        List <AdharaHFT.priceTick> priceTickList1 = wrapper.getPrice(new List <string> {
            "EUR/USD"
        }, new List <string> {
            tinterface1
        }, AdharaHFT.GRANULARITY_TOB, 1);

        foreach (AdharaHFT.priceTick tick in priceTickList1)
        {
            price = tick.price;
        }

        // Create pending order. If buy, order price must be lower than current price
        AdharaHFT.orderRequest order1 = new AdharaHFT.orderRequest();
        order1.security    = "EUR/USD";
        order1.tinterface  = tinterface1;
        order1.quantity    = 500000;
        order1.side        = AdharaHFT.SIDE_BUY;
        order1.type        = AdharaHFT.TYPE_LIMIT;
        order1.timeinforce = AdharaHFT.VALIDITY_DAY;
        order1.price       = price - 0.01;
        List <AdharaHFT.orderRequest> orderList = wrapper.setOrder(new List <AdharaHFT.orderRequest> {
            order1
        });
        int tempid = -1;

        foreach (AdharaHFT.orderRequest orderresponse in orderList)
        {
            Console.WriteLine("Id: " + orderresponse.tempid + " Security: " + orderresponse.security + " Side: " + orderresponse.side + " Quantity: " + orderresponse.quantity + " Price: " + orderresponse.price + " Type: " + orderresponse.type);
            tempid = orderresponse.tempid;
        }
        Thread.Sleep(5000);

        // Modify pending order
        Console.WriteLine("Modify order");
        AdharaHFT.modOrder ordermod = new AdharaHFT.modOrder();
        ordermod.fixid    = listener.fixidDictionary[tempid];
        ordermod.price    = price - 0.015;
        ordermod.quantity = 200000;
        List <AdharaHFT.modifyTick> modifyList = wrapper.modifyOrder(new List <AdharaHFT.modOrder> {
            ordermod
        });

        foreach (AdharaHFT.modifyTick modifyresponse in modifyList)
        {
            Console.WriteLine("FixId: " + modifyresponse.fixid + " Result: " + modifyresponse.result);
        }
        Console.WriteLine("Order modified");
        Thread.Sleep(2000);

        // Close order streaming
        wrapper.getOrderEnd(id1);

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
    public static void Main7(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // ORDER CREATION

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        string tinterface;

        if (tinterfaceTickList.Count > 1)
        {
            tinterface = tinterfaceTickList[1].name;
        }
        else
        {
            tinterface = tinterfaceTickList[0].name;
        }

        AdharaHFT.orderRequest order1 = new AdharaHFT.orderRequest();
        order1.security   = "EUR/USD";
        order1.tinterface = tinterface;
        order1.quantity   = 500000;
        order1.side       = AdharaHFT.SIDE_BUY;
        order1.type       = AdharaHFT.TYPE_MARKET;

        Console.WriteLine("Starting Polling1");
        List <AdharaHFT.orderTick> orderTickList1 = wrapper.getOrder(new List <string> {
            "EUR/USD"
        }, new List <string> {
            tinterface
        }, null);

        foreach (AdharaHFT.orderTick tick in orderTickList1)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status);
        }
        Console.WriteLine("Polling1 Finished");
        Thread.Sleep(2000);

        Console.WriteLine("Sending order");
        List <AdharaHFT.orderRequest> orderList = wrapper.setOrder(new List <AdharaHFT.orderRequest> {
            order1
        });

        foreach (AdharaHFT.orderRequest orderresponse in orderList)
        {
            Console.WriteLine("Id: " + orderresponse.tempid + " Security: " + orderresponse.security + " Side: " + orderresponse.side + " Quantity: " + orderresponse.quantity + " Price: " + orderresponse.price + " Type: " + orderresponse.type);
        }
        Console.WriteLine("Order sended");
        Thread.Sleep(2000);

        Console.WriteLine("Starting Polling2");
        List <AdharaHFT.orderTick> orderTickList2 = wrapper.getOrder(new List <string> {
            "EUR/USD"
        }, new List <string> {
            tinterface
        }, null);

        foreach (AdharaHFT.orderTick tick in orderTickList2)
        {
            Console.WriteLine("TempId: " + tick.tempid + " OrderId: " + tick.orderid + " Security: " + tick.security + " Account: " + tick.account + " Quantity: " + tick.quantity + " Type: " + tick.type + " Side: " + tick.side + " Status: " + tick.status);
        }
        Console.WriteLine("Polling2 Finished");

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
Ejemplo n.º 9
0
    public static void Main5(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // ORDER STREAMING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        string tinterface1;

        if (tinterfaceTickList.Count > 1)
        {
            tinterface1 = tinterfaceTickList[1].name;
        }
        else
        {
            tinterface1 = tinterfaceTickList[0].name;
        }
        AdharaHFT.orderRequest order1 = new AdharaHFT.orderRequest();
        order1.security    = "EUR/USD";
        order1.tinterface  = tinterface1;
        order1.quantity    = 500000;
        order1.side        = AdharaHFT.SIDE_BUY;
        order1.type        = AdharaHFT.TYPE_LIMIT;
        order1.timeinforce = AdharaHFT.VALIDITY_DAY;
        order1.price       = 1.10548;

        string tinterface2 = tinterfaceTickList[0].name;

        AdharaHFT.orderRequest order2 = new AdharaHFT.orderRequest();
        order2.security    = "GBP/USD";
        order2.tinterface  = tinterface2;
        order2.quantity    = 600000;
        order2.side        = AdharaHFT.SIDE_BUY;
        order2.type        = AdharaHFT.TYPE_LIMIT;
        order2.timeinforce = AdharaHFT.VALIDITY_DAY;
        order2.price       = 1.47389;

        // Open order streaming
        string id1 = wrapper.getOrderBegin(null, null, null, interval, new AdharaHFTListenerImp5());

        Thread.Sleep(2000);

        // Create two orders
        List <AdharaHFT.orderRequest> orderList = wrapper.setOrder(new List <AdharaHFT.orderRequest> {
            order1, order2
        });

        foreach (AdharaHFT.orderRequest orderresponse in orderList)
        {
            Console.WriteLine("Id: " + orderresponse.tempid + " Security: " + orderresponse.security + " Side: " + orderresponse.side + " Quantity: " + orderresponse.quantity + " Price: " + orderresponse.price + " Type: " + orderresponse.type);
        }
        Thread.Sleep(5000);

        // Close order streaming
        wrapper.getOrderEnd(id1);

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }
Ejemplo n.º 10
0
    public static void Main1(string[] args)
    {
        // get properties from file
        getProperties();

        wrapper = new AdharaHFT(domain, url_stream, url_polling, url_challenge, url_token, user, password, authentication_port, request_port, ssl, ssl_cert);

        bool auth = wrapper.doAuthentication();

        if (!auth)
        {
            Console.WriteLine("Authentication failed");
            Console.Read();
            return;
        }

        // PRICE STREAMING

        // get tinterfaces
        List <AdharaHFT.tinterfaceTick> tinterfaceTickList = wrapper.getInterface();

        // Open first price streaming for one security in all tinterfaces
        string id1 = wrapper.getPriceBegin(new List <string> {
            "GBP/USD"
        }, null, AdharaHFT.GRANULARITY_TOB, 1, interval, new AdharaHFTListenerImp1());

        Thread.Sleep(5000);

        // Open second price streaming for two securities in the two first tinterfaces
        List <String> tinterfacelist = null;

        if (tinterfaceTickList != null && tinterfaceTickList.Count > 1)
        {
            tinterfacelist = new List <string>();
            tinterfacelist.Add(tinterfaceTickList.ElementAt(0).name);
            tinterfacelist.Add(tinterfaceTickList.ElementAt(1).name);
        }
        string id2 = wrapper.getPriceBegin(new List <string> {
            "EUR/USD", "GBP/JPY"
        }, tinterfacelist, AdharaHFT.GRANULARITY_FAB, 2, interval, new AdharaHFTListenerImp1());

        Thread.Sleep(5000);

        // Close second price streaming
        wrapper.getPriceEnd(id2);
        Thread.Sleep(5000);

        // Close first price streaming
        wrapper.getPriceEnd(id1);
        Thread.Sleep(5000);

        // Open third price streaming for six securities in the first tinterface
        if (tinterfaceTickList != null && tinterfaceTickList.Count > 0)
        {
            tinterfacelist = new List <string>();
            tinterfacelist.Add(tinterfaceTickList.ElementAt(0).name);
        }
        string id3 = wrapper.getPriceBegin(new List <string> {
            "EUR/USD", "EUR/GBP", "EUR/JPY", "GBP/JPY", "GBP/USD", "USD/JPY"
        }, tinterfacelist, AdharaHFT.GRANULARITY_TOB, 1, interval, new AdharaHFTListenerImp1());

        Thread.Sleep(5000);

        // Close third price streaming
        wrapper.getPriceEnd(id3);

        Console.WriteLine("Press Enter to exit");
        Console.Read();
    }