Jump to content


Popular Content

Showing most liked content since 08/29/2020 in all areas

  1. 2 points

    .Net C# Lightstreamer Demo

    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
  2. 1 point

    Set Stop/Limit to a new trade

    Hi Rony, Yes, mainly removing the TriggerPrice field. The list of permissable fields for a market order (trade) request is detailed at http://docs.labs.gaincapital.com/#Data Types/NewTradeOrderRequestDTO.htm. I've pasted an example below. Yes, US clients can send a market order (trade) request with attached stops and limits as I have done in the example below. Kind Regards, PM { "MarketId": 400723798, "Direction": "buy", "Quantity": 1000, "BidPrice": 106.174, "OfferPrice": 106.204, "AuditId": "ELU17236432", "TradingAccountId": 401843563, "PositionMethodId": 1, "IfDone": [ { "Stop": { "OrderId": null, "Direction": "sell", "Applicability": "gtc", "ExpiryDateTimeUTC": null, "Guaranteed": false, "TrailingDistance": 10, "Quantity": 1000, "TriggerPrice": null, "IfDone": [], "OcoOrder": null }, "Limit": { "OrderId": null, "Direction": "sell", "Applicability": "gtc", "ExpiryDateTimeUTC": null, "Quantity": 1000, "TriggerPrice": 106.704, "IfDone": [], "OcoOrder": null } } ], "Reference": "Origin601" }
  3. 1 point
    Hi PM I did supply the TradingAccountID parameter. The C# code is: string requestString = serverBaseURL + string.Format("/order/tradehistory?TradingAccountId={0}&maxResults=500&from={1}", tradingAccountId, unixTimestamp); Kind Regards Chris.
  4. 1 point
    Update: the team have created an internal ticket to track this investigation. Since I have the ticket number I can keep an eye on its progress and update here when I see a status change.
  5. 1 point

    List of Currency IDs

    Hello u1035, The table of currency codes is pasted below. Kind Regards, PM CurrencyId ISOCurrency Description 1 AUD Australian Dollar 2 CAD Canadian Dollar 3 CHF Swiss Franc 4 EUR Currency of EMU member states 6 GBP British Pound 7 HKD Hong Kong Dollar 8 JPY Japanese Yen 9 SEK Swedish Krona 10 SGD Singapore Dollar 11 USD American Dollar 12 ZAR South African Rand 14 DKK Danish Krone 15 IDR Indonesian Rupiah 16 KRW Korean Won 17 MXN Mexican Peso 18 MYR Malaysian Ringgit 19 NOK Norwegian Kroner 20 NZD New Zealand Dollar 21 THB Thai Bhat 22 TWD Taiwanese Dollar 23 INR Indian Rupee 24 PLN Polish Zloty 31 TRY Turkish Lira 32 CZK Czech Kroner 33 HUF Hungarian Forint 34 SKK Slovakian Kroner 36 CNH Chinese Yuan 37 AED Emirati Dirham 38 BRL Brazilian Real 39 ILS Israeli Shekel 40 RON Romanian Leu 41 RUB Russian Ruble 42 SAR Saudi Riyal 43 XAU Gold 44 XAG Silver 45 CNY Chinese Yuan Renminbi 46 BTC Bitcoin 47 ETH Ethereum 48 BCH Bitcoin Cash 49 LTC Litecoin 50 XRP Ripple
  6. 1 point
    I am seeing the same behaviour from tradehistory. When I make a call like this in C#: string requestString = serverBaseURL + string.Format("/order/tradehistory?TradingAccountId={0}&maxResults=500&from={1}", tradingAccountId, unixTimestamp); Where unixTimestamp = 1584955458 (equivalent to approx 23/3/2020) I always get the last 200 trades. It appears that the "from" parameter is ignored. The trading account ID I'm using is correct as I got that from a call to /useraccount/ClientAndTradingAccount. And this code used to work as I previously used it to back-populate some trade history into an Excel sheet. Kind Regards Chris.