Jump to content

oli

Members
  • Content count

    12
  • Joined

  • Last visited

Posts posted by oli


  1. Hi PM - thank you so much for coming back to me and, yeah, it seemed strange to me too.

    However, I think I identified the problem as I haven't had the error since the original post. It appears to have been linked to an underpowered server making the calls to the CI api. I make multiple calls at market opening times and it seems that this activity was pushing the server to its limits, potentially causing repeated or malformed api queries. Certainly no part of the code could have generated 500 requests over 5 seconds... 

    Since doubling the processors and memory it appears to have solved the problem. No errors since then. Bit strange, but hopefully resolved.

    All the best

    Oliver


  2. Hi @Physicsman - I've got another question for you... it's been a while :)

    I've recently started getting "Error 429 - Too Many Requests" when submitting multiple newstoplimitorder requests at market opening times. Would you be able to shed any light on

    - what limits are typically in place on an account (do they differ between consumer / professional accounts?)
    - what counts towards a 'request' (e.g. is a historical bars request treated equally to a newstoplimitorder request?)
    - how to find out the current level remaining calls available at any point in time. I couldn't find any mention in the documentation..
    - whether it's possible to increase that limit?

    thank you so much, as always

    Oliver


  3. Hi @physicsman - me again... lightstreamer has died again for me.. although I'm not getting the same error i was before. Right now I'm getting a generic "An error occurred" message and will have to go into the code and recompile to get it to spit out more detail.

    Pinging push.cityindex.com sends me to 213.152.236.40, which is different from last time so it looks like there might be some more DNS changes going on. I tried re-flushing and it that didn't work either.. maybe you could point me to a functioning lightstreamer server? Without it I can't place any trades :(

    thanks!

    oliver


  4. Hi @Physicsman - by way of a quick update, I'm still using push2 as the DNS problems weren't resolved by the flushing process.

    Pinging push.cityindex.com resolves to [213.152.236.50], but when the server actually tries to stream i get the same 

    Lightstreamer.DotNet.Client.PushConnException: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 212.161.8.52:80

    message as I was getting before. So it seems that the first bit is working ok, but then something is pointing me to .52 and that's presumably not right.

    I checked the hosts file too, which is empty (I assume we're talking about "C:\Windows\System32\drivers\etc\hosts", right?)

    So I guess I'll continue using push2 for now, but if you have any other thoughts on what it might be then please do let me know!

    Thanks again,

    Oli

     


  5. HI again @Physicsman - my lightstreamer feed seems to be having some issues and I wanted to check whether that's due to me or the server. It was working fine last Friday, and has been working fine for some months now. However today I'm authenticating the session ok, connecting to the lightstreamer server, even starting the streaming session... and then the connection is refused:

    Lightstreamer.DotNet.Client.PushConnException: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 212.161.8.52:80

    Before I embark upon an epic journey to try to figure out what's broken, would you be able to tell me whether the lightstreamer is up and running or whether there is another reason why it might have stopped working for me? Maybe something changed or it's been upgraded or something?

    Thank you so much,

    oli


  6. Hi Physicsman - thank you so much for looking into this. The (good?) news is that it still doesn't work, even with your functioning json. Below is the json used in which I replaced only the BidPrice, OfferPrice and AuditId (out of lightstreamer) and of course the TradingAccountId. Which suggests it might be something to do with the account after all..

    {"Applicability":"GTC",  
    "ExpiryDateTimeUTC":null,  
    "AutoRollover":false,  
    "ExpiryDateTimeUTCDate":null,  
    "MarketName":"UK 100 DFT",  
    "IfDone":[],  
    "Close":[],  
    "LastChangedDateTimeUTCDate":null,  
    "TriggerPrice":7500.0,  
    "BidPrice":7307,  
    "OfferPrice":7313,  
    "Quantity":1,  
    "Direction":"buy",  
    "Currency":null,  
    "LastChangedDateTimeUTC":null,  
    "PositionMethodId":1,  
    "isTrade":false,  
    "Reference":"GCAPI",  
    "OcoOrder":null,  
    "Type":null,  
    "Status":null,  
    "MarketId":400616113,  
    "OrderId":0,  
    "QuoteId":null,  
    "AuditId":"45031996-4-0-0-R",  
    "TradingAccountId":xxxxxxxxx}

    output:
    ERROR 400 - Bad Request

     


  7. Please @Physicsman you've gotta help me before I pull the rest of my hair out... I'm simply trying to place a stop/limit order for the UK 100 DFT, and am failing. Here's my json:

    {"AutoRollover":false, "AuditId":"5288272-1-0-0-B", "Currency":null, "Direction":"buy", "LastChangedDateTimeUTC":null, "BidPrice":7306.3,"PositionMethodId":1, "ExpiryDateTimeUTCDate":null, "MarketId":400616113, "LastChangedDateTimeUTCDate":null, "OfferPrice":7307.3, "TriggerPrice":7500.0, "Quantity":1, "IfDone":[], "TradingAccountId":40xxxxx48, "Type":null, "Applicability":"GTC", "ExpiryDateTimeUTC":null}

    I'm posting it to https://ciapi.cityindex.com/tradingapi/order/newstoplimitorder?username=CXxxxxxx&session=0c39bab9-1158-47d2-8eda-c4c8828dbce8

    and it's returning "ERROR 400 - Bad Request". 

    I'm authorising fine and the AuditId is coming straight out of the lightstreamer feed, so I think that should be ok.. but what else could it be? Is it something obvious? The only other issue that I figured it might be is the TradingAccountId value. A couple of years back (i.e. before AuditId was necessary) this call used to work fine with my TradingAccountCode (i.e. CXxxxxxx) however, even though it does work for authorising the session, it doesn't seem to work with this call. Another guy I know who was set up post Gain take-over has been set up to have a different username altogether (i.e. neither TradingAccountId nor TradingAccountCode) so I'm wondering whether there have been some authentication changes that might be impacting old accounts?

    I can DM you TradingAccountId details in case it helps...

    Thank you so much

    oli

×