How to submit stop (market) order using Redilib (C#) to the GS SOR?

We are trying to send a stop (market) order using the C# Redilib API and are trying to send via GS Smart Order Algo. However, we are not having much success. We are aware that we should be able to test order submission with VBA Excel using one of the using one of REDI VBA Excel Examples on GitHub (Order Entry Single - US Options), but we do not have this setup. Why can't the required fields be posted in a document somewhere?

Send a Redi Excel VBA "Stop Limit" order with Goldman Sachs. - Forum | Refinitiv Developer Community


new_order.Symbol = Symbol;

new_order.Side = Side; // (Side == "BUY" ? "SELL" : "BUY");

new_order.PriceType = "SOR GSDE";

new_order.Exchange = "GSCO ALGO";

new_order.Quantity = Quantity;

new_order.TIF = "Day";

new_order.Account = Account;

new_order.StopPrice = StopPrice;

new_order.SetNewVariable("(MB) Order Type", "Stop");

new_order.SetNewVariable("(MB) Stop", StopPrice);

Tagged:

Best Answer

  • Jirapongse
    Answer ✓

    @elf

    Thank you for reaching out to us.

    Typically, after setting a Symbol, you can call the GetExchangeX method to get a list of avaiable exchanges. Then, call the GetPriceTypeX method to get a list of price types.

                ORDER hOrder = new ORDER();
                hOrder.Symbol = "AAPL";
                object objCount = null;
                hOrder.GetExchangeCount(ref objCount);


                for (int i = 0; i < (int)objCount; i++)
                {
                    object objRef = null;
                    var objDynamic = hOrder.GetExchangeX(i, ref objRef);
                    Console.WriteLine(objRef.ToString());
    }

                Console.Write("Exchange: ");
                hOrder.Exchange = Console.ReadLine();
                objCount = null;
                hOrder.GetPriceTypeCount(ref objCount);
                for (int i = 0; i < (int)objCount; i++)
                {
                    object objRef = null;
                    var objDynamic = hOrder.GetPriceTypeX(i, ref objRef);
                    Console.WriteLine(objRef.ToString());
    }

                Console.Write("Price Type: ");
                hOrder.PriceType = Console.ReadLine();

    The output look like this:

    1719303246170.png


Answers

  • Yes, this was helpful. However, we still can not send stop orders via SOR (using Redilib API). Are there additional fields we need to include?

    2024-07-03 08:51:35,823 [1] INFO OrdMgr - Exchange: GSGU Algo
    2024-07-03 08:51:35,831 [1] INFO OrdMgr - PriceType: [AXIS GSGU]
    2024-07-03 08:51:35,832 [1] INFO OrdMgr - PriceType: [AUCTION GSGU]
    2024-07-03 08:51:35,833 [1] INFO OrdMgr - PriceType: [VWAP GSGU]
    2024-07-03 08:51:35,834 [1] INFO OrdMgr - PriceType: [TWAP GSGU]
    2024-07-03 08:51:35,836 [1] INFO OrdMgr - PriceType: [STEALTH GSGU]
    2024-07-03 08:51:35,838 [1] INFO OrdMgr - PriceType: [SOR GSGU]
    2024-07-03 08:51:35,839 [1] INFO OrdMgr - PriceType: [SONAR DARK GSGU]
    2024-07-03 08:51:35,840 [1] INFO OrdMgr - PriceType: [SONAR GSGU]
    2024-07-03 08:51:35,841 [1] INFO OrdMgr - PriceType: [SMALLCAP GSGU]
    2024-07-03 08:51:35,841 [1] INFO OrdMgr - PriceType: [SIGMA X2 GSGU]
    2024-07-03 08:51:35,842 [1] INFO OrdMgr - PriceType: [SCALING GSGU]
    2024-07-03 08:51:35,843 [1] INFO OrdMgr - PriceType: [PARTCIPATE GSGU]
    2024-07-03 08:51:35,844 [1] INFO OrdMgr - PriceType: [NAVIGATOR GSGU]
    2024-07-03 08:51:35,844 [1] INFO OrdMgr - PriceType: [IS GSGU]
    2024-07-03 08:51:35,845 [1] INFO OrdMgr - PriceType: [GSPRINCPAL GSGU]
    2024-07-03 08:51:35,846 [1] INFO OrdMgr - PriceType: [CUSTOM GSGU]
    2024-07-03 08:51:35,846 [1] INFO OrdMgr - PriceType: [1CLICK GSGU]

  • @elf

    Did you try the code mentioned on this discussion?

    You can contact the REDI support team directly via MyAccount to verify the code.