Jump to content

Ynor

Members
  • Content count

    12
  • Joined

  • Last visited

  • Days Won

    1
  1. Yeah this is truly unfortunate. Thank you PM!
  2. I read the description from the link but still wasn't entirely sure. Thanks for the quick response! Is it possible to have multiple market order (trade) requests with attached stops/limits (each with unique trigger values) on the same market? Thanks in advance, Rony
  3. Hi Chuck, I ran into a similar problem and posted the step by step solution here:
  4. Thank you! Where can I find more information about the Reference property? What is "Origin601"?
  5. Hello PM, 1) Do you have a US based account? Yes, I do -- I guess that's that. 2) Are you trying to place an entry order to enter the market should it reach a certain trigger price, or are you trying to place a market order to trade immediately on whatever the current buy/sell price is? I am trying to place a market order to trade immediately. What changes should I make to my request? Should I remove the trigger price? NOTE: US accounts also cannot attach If/Done Stop or Limit orders to an entry order. Again this is a rule from the US regulator. I am still allowed to attach If/Done order to a market order, correct? Thank you, Rony
  6. Hello, I have a service that opens new trades using the /newtradeorder endpoint. This is my request Json: { "Id":0, "IfDone":[ { "Id":0, "Stop":{ "Id":0, "Guaranteed":false, "TriggerPrice":null, "ExpiryDateTimeUTC":null, "Applicability":"gtc", "ParentOrderId":0, "TrailingDistance":10.0, "Associated":false, "Direction":"sell", "Quantity":1000 }, "Limit":{ "Id":0, "Guaranteed":false, "TriggerPrice":106.31527, "ExpiryDateTimeUTC":null, "Applicability":"gtc", "ParentOrderId":0, "TrailingDistance":null, "Associated":false, "Direction":"sell", "Quantity":1000 } } ], "Direction":"buy", "ExpiryDateTimeUTCDate":null, "LastChangedDateTimeUTCDate":null, "OcoOrder":null, "Type":null, "ExpiryDateTimeUTC":null, "Applicability":"gtc", "TriggerPrice":106.31527, "BidPrice":106.251, "AuditId":"LJ40690714", "AutoRollover":false, "MarketId":401484414, "OfferPrice":106.262, "OrderId":0, "Currency":null, "Quantity":1000, "QuoteId":null, "LastChangedDateTimeUTC":null, "PositionMethodId":1, "TradingAccountId":"<removed id>", "MarketName":null, "Status":null, "isTrade":false, "Json":null } Here's my response: { "Status":1, "StatusReason":1, "OrderId":754499310, "Orders":[ { "OrderId":754499310, "StatusReason":1, "Status":3, "OrderTypeId":1, "Price":106.262, "Quantity":1000.0, "TriggerPrice":0.0, "CommissionCharge":0.0, "IfDone":[ ], "GuaranteedPremium":0.0, "OCO":null, "AssociatedOrders":{ "Stop":{ "OrderId":754497194, "StatusReason":1, "Status":2, "OrderTypeId":2, "Price":0.0, "Quantity":9000.0, "TriggerPrice":106.151000, "CommissionCharge":0.0, "IfDone":[ ], "GuaranteedPremium":0.0, "OCO":{ "OrderId":754497195, "StatusReason":1, "Status":2, "OrderTypeId":3, "Price":0.0, "Quantity":9000.0, "TriggerPrice":106.31527, "CommissionCharge":0.0, "IfDone":[ ], "GuaranteedPremium":0.0, "OCO":null, "AssociatedOrders":{ "Stop":null, "Limit":null }, "Associated":true }, "AssociatedOrders":{ "Stop":null, "Limit":null }, "Associated":true }, "Limit":{ "OrderId":754497195, "StatusReason":1, "Status":2, "OrderTypeId":3, "Price":0.0, "Quantity":9000.0, "TriggerPrice":106.31527, "CommissionCharge":0.0, "IfDone":[ ], "GuaranteedPremium":0.0, "OCO":null, "AssociatedOrders":{ "Stop":null, "Limit":null }, "Associated":true } }, "Associated":false } ], "Quote":null, "Actions":[ { "ActionedOrderId":0, "ActioningOrderId":0, "Quantity":1000.0, "ProfitAndLoss":0.0, "ProfitAndLossCurrency":null, "OrderActionTypeId":1 } ], "ErrorMessage":null } The issue: I am trying to open multiple positions (long and short) on the same market. Each of these new positions should have its own unique Stop/Limit with different trigger prices. What is happening now is that any position I open on the same market seems to get overridden by each other. For example: if I open multiple short and long positions in the same Market-- they all seem to default to one position with the same limit and stop: I am wondering what I am doing wrong with my request? Regards, Rony
  7. For future reference: 1. First, download the proper Lightstreamer client demo: https://github.com/Lightstreamer/Lightstreamer-example-Quickstart-client-dotnet/tree/for_version_4 2. Download the following nuget packages : Some things to note: Make sure the version for Lightstreamer client is 4.0.0 (this is the only version that the Forex Servers are currently working with). In this demo I am using the latest logging service (NLog 4.7.4) -- this is the one that Lightstreamer is currently using in their version 5+ demos. You will need to make sure your Wrapper class is also the latest version. This works with .NET Core 3.0 and previous .net framework versions. 3. Setup your client and subscription. This is the C# code to setup and connect to the Prices streaming server: Regards, Rony
  8. I am using Lightstreamer.DotNetStandard.Client (5.0.5). That is the latest version they have available.
  9. Hello, I have created a thread in the Lightstreamer forum for this. I have also been able to get more logging output from the connection: Is there anything here that you can identify? Thanks in advance, Rony
  10. Hello, I was able to get a demo working using the Lightstreamer quickstart C# example. I am working with Lightstreamer.DotNetStandard.Client (5.0.5) and I instantiated and populated a LightstreamerClient object so it looks like this: The value I used for the password was the session token I got from https://ciapi.cityindex.com/TradingAPI/session (as the documentation states) and the User is the username that was given to me for the demo account. When I try run the Connect() method on my LightstreamerClient object, this is what I get: I can't find documentation for this error anywhere. Do you know what I am doing wrong? Thanks in advance, Rony
  11. I already have those projects downloaded, I can see how it works but I don't understand from the gain capital side. Do you know if this a service that can be purchased?
  12. Hello, I am trying to implement a streaming service to receive live price data using Lightstreamer, but I am having trouble wrapping my head around the code implementation. First thing I want to say is that I have gone through the GainCapital documentation and the Lighstreamer documentation and beginner examples. I also downloaded a sample C# demo of the lightstreamer implementation and went through the code. I am a junior developer and I have no problem creating the other post requests to https://ciapi.cityindex.com/tradingapi/ endpoint for authentication. But I am not sure how to implement this specific streaming service in C#. I am sure there must be many implementations of this service already created, even internally-- so I wanted to know how we could get access to a demo implementation of the gain capital streaming service? Thank you in advance.
×