Jump to content
  • 0

No connexion on swift lightstream SDK


julienchino

Question

I'm certainly missing something obvious but I can't figure it out.
I'm trying to get the lightstream sdk to work on a macOS project in swift

Everything compiles perfectly and runs without errors but the log systematically indicates Status: CONNECTING

The same code in Javascript works just fine.
LighstreamerClient is version 5.0.3 as recommended.

Here is my code

let loggerProvider = ConsoleLoggerProvider(level: .debug)
LightstreamerClient.setLoggerProvider(loggerProvider)

let client = LightstreamerClient(serverAddress: lightstreamerEndpoint)
client.connectionDetails.user = currentAccountId
client.connectionDetails.setPassword("CST-\(cst)|XST-\(securityToken)")
client.addDelegate(ClientDelegateImpl())
client.connect()

And the log :
serverAddress changed: https://apd.marketdatasystems.com
user changed: XXXXX
password changed
Connection requested: details: [serverAddress: https://apd.marketdatasystems.com, user: XXXXX, libVersion: swift_client 5.0.3] options: [requestedMaxBandwidth: unlimited, retryDelay: 4000, firstRetryMaxDelay: 100, sessionRecoveryTimeout: 15000, stalledTimeout: 2000, reconnectTimeout: 3000, idleTimeout: 19000, contentLength: 50000000]
Status: CONNECTING
WS connecting: https://apd.marketdatasystems.com/lightstreamer Sec-WebSocket-Protocol: TLCP-2.4.0.lightstreamer.com

Does anyone have an idea or managed to get the SDK to work with IG on swift?

Link to comment

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • DeFi functionalities like savings are exactly what CEXs need to grab the attention of the non crypto users... Plus using blockchain will further enhance the trust of customers.  Bitget's are going about it the right way and savings are actually a good idea 
    • I couldn't help but think of traditional bank savings accounts at a time of market volatility and a notable decline in the entire cryptocurrency market, where money could be deposited and still earn interest. Imagine being able to save Bitcoin during a downturn, receive interest on it, and then profit twice over when it rises. It's far too dangerous to wait for ideal circumstances and then not have a way to protect your money and investments during market downturns. Putting in place programs similar to Bitget's May Savings Carnival on all cryptocurrency platforms might be a big help to traders shielding their assets from the erratic nature of the cryptocurrency market. Having such options available could have saved me from losing my investments three years ago, just after I made profits during the enormous bull market surge, as I can personally attest to.
    • This post is about COT of Sugar. COT (Commitment of Traders) is a weekly report prepared by US regulatory body that reveals market sentiment by disclosing long and short positions of users of commodity and speculators. Index of producers is 87%. Previous reading was 85%. The index is proprietary metric, 0% is extremely bearish and 100% is extremely bullish sentiment. During the week producers were buying at low speed. They bought 7385 contracts. Last 3 weeks show active buying pattern. Producers index sits in the upper quartile. During last weeks index moved towards extreme values. Current market balance indicates limited bearish potential (and good potential for bulls), however this indicator alone is not enough to make good decisions. Index of speculators is 11%. Previous reading was 19%. During the week speculators were selling at low speed. They sold 20234 contracts. Last 3 weeks show active selling pattern. Speculators index sits in the lower quartile. During last weeks index moved towards extreme values. Current market balance indicates limited bearish potential (and good potential for bulls), however this indicator alone is not enough to make good decisions. Market is in Bearish zone. This is depression zone and it lasts for 5 weeks. We are confident in this trend. Full version of this COT report https://dd51c300-779d-4e88-81aa-f968b3f24421.filesusr.com/ugd/719da3_4f10f300112f4524a0a2746f06057704.pdf
×
×
  • Create New...
us