Jump to content

Leaderboard


Popular Content

Showing most liked content since 08/05/2013 in all areas

  1. 1 point
    Matrix

    List Market Information

    Yes thats correct, but different IDs can be used for streaming price data. A bit confusing.
  2. 1 point
    I'm the worst hacker of all time. That was it PM, it works. Thanks for your time and for your heroic support in this forum. Steven Almeroth Cleveland
  3. 1 point
    Hello Stav, We're looking into this for you and will reply once I have results of the investigation. Kind Regards, PM
  4. 1 point
    Hi Superee, Theoretically it could be possible at some point in the future, but not likely or probable at the moment. Kind Regards, PM
  5. 1 point
    Hi Physicsman, Thank you for your reply. You pointed me to the right direction. So I was using ''TradingAccountCode' instead of 'TradingAccountId'. I got the latter via GetClientAndTradingAccount. My problem solved. Thanks!! Takashi
  6. 1 point
    cleggink

    Lightstreamer Subscription Problems

    Well whether or not you intended it you found it anyway. So for future reference everyone lightstreamer client version 4.2.8 is the one that works here. Thanks for everything physicsman you where great. If you're ever in Ohio I'll buy you a beer!
  7. 1 point
    Physicsman

    Lightstreamer Subscription Problems

    Hello, We haven't encountered this error before ourselves. A Web Search found a thread on the LightStreamer forums where a user had this problem on Android. In the end it turned out to be a mismatched client to server version. Posting to the LS forum is probably the best chance for a solution to the problem. Kind Regards, PM
  8. 1 point
    @Physicsman and Forum Good day everybody, Together with Physicsman we were able to resolve the above issue. Thanks again, Physicsman, for your assistance and determination in finding a solution. For those of you who are attempting to log onto the API using python, please review the following code snippet and result. NOTE language: python, platform: Google Colab RECOMMENDATIONS: 1.) Call customer service to confirm two things: 1.) there are NO security locks for multiple failed attempts on the account you are trying to log onto 2.) confirm you account details (username, password, and AppKey). I discovered that the accounts team accidentally sent me the account number as the username. But they were able to quickly correct this and provide me the correct username. So, make sure to confirm these details with customer service. Once you have done these things, try using the code below: Remember to substitute your credials for your specific account. Code import requests import json url = 'https://ciapi.cityindex.com/TradingAPI/session/' data = {'Password':'XXXXXXX', 'UserName':'DM123456', 'AppKey':'ABC' } response = requests.post(url, json=data) print(response.url) print(response.status_code) print(response.text) Result: Response 200 means successful connection. From the response you can get your session id for other API functions https://ciapi.cityindex.com/TradingAPI/session/ 200 {"Session":"081ei2-awe234322-we23dr-223serrwd","PasswordChangeRequired":false,"AllowedAccountOperator":false,"StatusCode":1,"AdditionalInfo":null,"Is2FAEnabled":false,"TwoFAToken":null,"Additional2FAMethods":null,"UserType":1}
  9. 1 point
    Good afternoon, PM. Ok, that sounds like a plan. I have sent my demo account credentials to you via private message. Please keep an eye out for that. I look forward to seeing what you discover. Thanks again, Brent
  10. 1 point
    kensplanet

    Is there a Stop-Limit order?

    Thank you for your reply.
  11. 1 point
    szcxdave1988

    Reson Code 75

    I got the problem, i pass the limit price to the stop price.... Thanks for your help, my mistake
  12. 1 point
    szcxdave1988

    Reson Code 75

    I am using demo account and sent the login info to you. thanks
  13. 1 point
    That worked, I did query for a list of market ids. Looks like I accidentally copied the wrong one over... I apologize for this being such a simple mistake. Thank you for your help.
  14. 1 point
    Kevin.Forex

    Builder documentation

    Thanks much, this is exactly what I needed. I must say that even though I have been a customer for only a short time the service and support that I have received has been outstanding.
  15. 1 point
    Hi Frank, Yes, you guessed correctly. Depending upon the market, we only keep tick history for a few days to about a week or so. Hence the API request you sent is giving you all the tick prices it has from the database, which in your example starts from Wed 14 April. Kind Regards, PM
  16. 1 point
    Hi JFlaggs, The example table you deduced is almost fully correct. Updated version below. Minute: 1, 2, 3, 5, 10, 15, 30 Hour: 1, 2, 4, 8 Day: 1 Week: 1 Kind Regards, PM
  17. 1 point
    Thank you so much Physicsman!!! That solved it, i successfully placed a live trade with the Commission account Our problem was that we were hard-coding the market id (using the same as the Standard account), while the market id should be different between Standard and Commission accounts, as you suggested). Extremely grateful for your help, words cannot thank you enough for this reply - this ticket can be closed
  18. 1 point
    Aniket

    Streaming Client Server Version

    I tried the url provided by you, but was not able to get the Streaming to work. Also tried to check out the version 7.03, there is no such version. It is 7.0.3 but even that didnt work. Finally got the lightstreamer-client version 7.2.4 from NPM registry and i was able to get the ls Client up but there was an issue with the Subscription. So downgraded and tried other versions. Finally 7.2.2 version of lightstreamer-client from the NPM registry worked and now have the streaming up and running. Hope this helps anyone who is trying to get the streaming working for Forex.com . Kind Regards, Aniket.
  19. 1 point
    Hi Superee, It is the MarketPricingTimes fields. Since these are Forex 24H trading markets, we've been using a shortcut internally and that is probably what is causing you confusion. DayofWeek 0 is Sunday and DayofWeek 5 is Friday. Since we know that FX markets open on Sunday and close on Friday, we just take the current week's Sunday and Friday dates. The actual Date returned in the field is just today's date and close time of 22:00 hours. We're ignoring the date and appending the 22:00 hours close/open times to the Sunday Start and Friday End dates to get each weeks open/close. Kind Regards, PM
  20. 1 point
    Hi Superee, Check the OrderStatusReason code that is also included in the response. It provides more information on the error and its cause. Kind Regards, PM
  21. 1 point
    Thanks for the detailed information. I will send CLOSE request with PriceTolerance value "2" so that most of the time close order would go through.
  22. 1 point
    Yes, it was DEMO Account. The outage was intermittent on Friday. Working fine this week. Thanks for checking.
  23. 1 point
    Ok, I should've guessed the "Inheritance" - may be I missed that to remember when studied the documentation. Thanks for pointing that out. I assume anytime I see something like :- ApiPrimaryMarketTagDTO > ApiMarketTagDTO I know "ApiPrimaryMarketTagDTO" class inherits from "ApiMarketTagDTO" class (in c# terms) Thanks for the info!
  24. 1 point
    Hi Superee, ApiStopLimitOrderDTO also inherits from ApiOrderDTO and all of its properties, hence the link to that DTO in the documentation. Additionally, many of the Properties are nullable and can be dropped from the reqeusts. A valid trade request with attached stops/limits can be formed as in the following example: "IfDone": [ { "Stop": { "OrderId": 778252070, "StatusReason": 1, "Status": 2, "OrderTypeId": 2, "Price": 0, "Quantity": 1000, "TriggerPrice": 1.36261, "CommissionCharge": 0, "IfDone": [], "GuaranteedPremium": 0, "OCO": null, "AssociatedOrders": { "Stop": null, "Limit": null }, "Associated": false }, "Limit": { "OrderId": 778252069, "StatusReason": 1, "Status": 2, "OrderTypeId": 3, "Price": 0, "Quantity": 1000, "TriggerPrice": 1.36661, "CommissionCharge": 0, "IfDone": [], "GuaranteedPremium": 0, "OCO": null, "AssociatedOrders": { "Stop": null, "Limit": null }, "Associated": false } } ], Kind Regards, PM
  25. 1 point
    Hello, You may temporarily use the address: https://platformapidocs.svc.cityindex.com/ to access the online documentation. This will be mapped to http://docs.labs.gaincapital.com/ soon, which remains it's permanent address. Kind Regards, PM
  26. 1 point
    In the demo: https://github.com/Lightstreamer/Lightstreamer-example-StockList-client-python/blob/master/src/stock_list_demo.py I would also suggest changing: def wait_for_input(): input("{0:-^80}\n".format("HIT CR TO UNSUBSCRIBE AND DISCONNECT FROM \ LIGHTSTREAMER")) To something like this: def wait_for_input(): while True: try: q = input("{0:-^80}\n".format("Press q than Enter to Unsubscribe and Disconnect from Lightstreamer")) if q == 'q': break except: break With the way it was written originally anytime you hit Enter it would exit. This way you can press 'q' than Enter to exit. Better control.
  27. 1 point
    Thanks Superee. Even though, I wrote my code in Python, your code was a good reference on what to do in the subscription. I successfully wrote everything in Python, but looking at the demo code given by Lightstreamer, I noticed that the error handling was pretty lacking. Those that are doing their code in Python, I suggest you do something like below: subscription.addlistener(on_item_update) # Adding the "on_item_update" function to Subscription sub_key = lightstreamer_client.subscribe(subscription) # Registering the Subscription try: wait_for_input() lightstreamer_client.unsubscribe(sub_key) # Unsubscribing from Lightstreamer by using the subscription key lightstreamer_client.disconnect() # Disconnecting Lightstreamer kafka_producer_obj.close() # Close Apache Kafka except KeyboardInterrupt: lightstreamer_client.unsubscribe(sub_key) lightstreamer_client.disconnect() kafka_producer_obj.close() print('Manual break by user') except Exception as e: lightstreamer_client.unsubscribe(sub_key) lightstreamer_client.disconnect() kafka_producer_obj.close() print(e) You can ignore the "kafka_producer_obj.close()". I have that because, I also use Kafka and need to close the connection on that too.
  28. 1 point
    I hope this link works. Visual Studio 2017/19 Solution Folder Ziipped . https://drive.google.com/file/d/1SavnJe6f_NRFE5-LYV9arewd893d7AdP/view?usp=sharing I created a Class to hold the rate info, and a List of that Rate Info Class - which keeps latest rate info , along with showing rates on the screen.
  29. 1 point
    Aaah Dang It! It was my Coding Error, in the "public class ApiOpenPositionDTO" I had public List<ApiAssociatedDTO> AssociatedOrders { get; set; } but CORRECT Format IS = public ApiAssociatedDTO AssociatedOrders { get; set; } Now it is DeSerializing just fine. ********* THIS THREAD /POST Can Be deleted as I found My Answer Myself But can be kept for Future Users ******
  30. 1 point
    Thank you Physicsman. In python, I was doing below for conversion: from datetime import datetime dateconv = datetime.fromtimestamp(1611273600000 / 1e3) print(dateconv) I should have been doing: from datetime import datetime dateconv = datetime.utcfromtimestamp(1611273600000 / 1e3) print(dateconv)
  31. 1 point
    wertmandu

    Order Status Reason 81

    I will check to see the code is in fact grabbing the quantity correctly, however I believe that I have not made any changes in that respect for creating the json to send. On the other hand I have only just recently began testing with quantities larger than 1000. I will report back if it is an error with my code attempting to send incorrect information.
  32. 1 point
    motown69

    Error Code in Live Account

    Perfect.... Yes that's what it was.... I didn't realise the Market IDs in the Live account were different to the Demo account. This now Works. Thanks for your help...:)
  33. 1 point
    SupereeDuperee

    Demo Account Access Denied

    Just sent you a private message.
×