Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Physicsman last won the day on September 15

Physicsman had the most liked content!


About Physicsman

  • Rank

Profile Information

  • Gender
  • Location
    London, Great Britain

Recent Profile Visitors

1,204 profile views
  1. Lightstreamer Access?

    Hi Tom, Since Lightstreamer do not have a specific Ruby on Rails client development kit, presumably you are using the one named "Genric Client SDK"? Did you download the version of the SDK for the version of LS we are running on the server, which is 7.0.3? Possibly some sort of incompatibility happening if you are using the latest client SDK. The client SDKs for the LS server version we run can be downloaded at: https://lightstreamer.com/download/#ls70 Kind Regards, PM
  2. This forum will be unmonitored over the period from Monday 14th September through to Monday 28th September 2020. Should you have an urgent API query please contact your account manager or client services.
  3. Lightstreamer Access?

    Hi TomG, A quick check, for LS authentication are you sending the password as the SessionID you receive back from the REST API? For authenticating wiht LS, the username is your username as used in REST API, but the password is not your account password, it is the REST API Session ID. That could explain the issue you are seeing? Kind Regards, PM
  4. Hi Rony, For US clients that use what are called "associated" stops/limits, the values of stops/limits cannot be different for each of your trades in the same market. When you place the 2nd or subsequent trade with stop/limits, these will replace/overwrite the previous stops/limits you have set. Again, this is unfortunately due to specific US NFA regulations. Kind Regards, PM
  5. Reset DEMO account via API

    Hi Motown, No, that functoinality is not available at this time. Please contact client services and request they reset the account balance of the demo account. Kind Regards, PM
  6. Hi, It is described in the list of fields at the link I posted previously. The "Reference" field is a code to identify the source origin of the trade order request. I would suggest using your API Key as the reference string, or you could tag your request as "GCAPI" to show it is an API request. Origin601 is an internal reference. Kind Regards, PM
  7. 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" }
  8. Hi Rony, I have a couple of questions to help clarify the situation. 1) Do you have a US based account? This is because US accounts cannot have simultaneous long and short open positions in the same market. This is a rule from the US regulator so is not something we can change. 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? You wrote you are sending to the /newtradeorder endpoint, which is for placing a market order trade to buy/sell immediately at market price. However, your request is structured as an entry order to buy when the market reaches a certain trigger price. Entry orders should be sent to the /newstoplimitorder endpoint instead. 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. Kind Regards, PM
  9. New order on options

    Hi Magda, Yes, the streaming API only streams the latest current live market price - it does not provide historical price ticks. We don't store much/any Option price data so it's a bit more problematic since you are looking into these markets than our standard non-option markets. It's still worth looking to see if you can pull any historical price data for option markets using the Price History service endpoints. You can find those calls in the documentation at: http://docs.labs.gaincapital.com/
  10. .Net C# Lightstreamer Demo

    Hi Rony, Many thanks for the reference notes. I'm sure they will be appreciated by other users in future. Kind Regards, PM
  11. New order on options

    Hi Magda, To receive the current live market prices, subscribe via the Lightstreamer API to the PRICES stream. The application can then read in the latest Bid / Offer prices and supply them in the trade request. The Help page file at: http://docs.labs.gaincapital.com/#Getting Started/CIAPI Arky.htm%3FTocPath%3DGetting%20Started|_____1 explains that there are actually 2 APIs. The REST API for stattic data, which you are already using, and the Streaming API (via the third party Lightstreamer) for streamed data such as live market prices. Kind Regard, PM
  12. Orders Not Processing

    Hi, No, as mentioned in my previous post the SimulateTrade call is used to calculate the potential margin requirement for the proposed trade details submitted. It is used in the deal ticket of our trading platforms. The API reponse to the SimulatedTrade call provides the following information. { "Status": 1, "StatusReason": 1, "SimulatedCash": 19002.12, "ActualCash": 19002.12, "SimulatedTotalMarginRequirement": 444.65, "ActualTotalMarginRequirement": 0, "CurrencyId": 6, "Orders": [ { "StatusReason": 1, "Status": 3 } ] } Kind Regards, PM
  13. New order on options

    Hello Magda, Entry orders cannot be placed on option markets. Kind Regards, PM
  14. Hi Suchin, The response for an entry order call is coming back as JSON from the server. I'm not sure what your initial call looks like that would return test/html, however the server is returning responses correctly. Kind Regards, PM
  15. Hi @chriss, A quick question from the team. In your ListTradeHistory call, did you supply your TradingAccountId in the call parameters? If no account ID is supplied in the parameters the call defaults to using ClientAccountId. The From date is supported with the TradingAaccountID but not the ClientAaccountID version of the call. That might be why it is nor working for you, although we'll still invetigate whether there is a bug as well. Kind Regards, PM