Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

IClient.reconnect() Questions in standalone API client ?
 Post subject: IClient.reconnect() Questions in standalone API client ? Post rating: 0   New post Posted: Wed 16 Jan, 2013, 23:24 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
I'm using API v2.7.7 on a Live connection, which is latest at the time of this post.

TWO QUESTIONS:

I've successfully recovered from ISystemListener.disconnect(), but somewhat clumsy.

LIGHTWEIGHT RECONNECT LIVE
I'm not clear what are the minimum requirements for a "lightweight reconnect", using IClient.reconnect() ?

I found that the existing chart failed to recover, so I resubscribed to my single instrument, completely deleted both the chart and dispose()'d of its JFrame, and then completely recreated the new chart in a new JFrame.

It worked, but I am sure it is more work than needed. What is the minimum I need to do for a lightweight IClient.reconnect(), to keep my charts working?

I believe I have to resubscribe to the instruments, at least.

When I resubscribed, and completely recreated my IChart and JFrame, and passed my New Chart's IClient handle and the IClientChartPresentationManager presentation manager into my already running existing Strategy, it appeared that the Strategy was unaffected by the ISystemListener.disconnect / IClient.reconnect() and continued to behave normally (but now using the New Chart). (The strategy module puts horizontal and vertical lines on the chart.)

Do I have to worry about my Strategies being affected? It appears my strategy continued to run normally in the recovery sequence.

HEAVYWEIGHT RECONNECT
According to the Wiki, I would then use the form of IClient.reconnect(parameters).

In this case if IClient.reconnect() continues to fail, for a LIVE login, will automatic reconnection be impossible? Will I have to handle the Captcha logic again, and have a human operator login?

Great software !!

Thanks for your help !!
HyperScalper


 
 Post subject: Re: IClient.reconnect() Questions in standalone API client ? Post rating: 0   New post Posted: Tue 22 Jan, 2013, 09:07 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
hyperscalper wrote:
I'm not clear what are the minimum requirements for a "lightweight reconnect", using IClient.reconnect() ?
There are no such determined.
hyperscalper wrote:
In this case if IClient.reconnect() continues to fail, for a LIVE login, will automatic reconnection be impossible? Will I have to handle the Captcha logic again, and have a human operator login?
Yes, after ~15 minutes session will be deleted and you will have to input Captcha again.


 
 Post subject: Re: IClient.reconnect() Questions in standalone API client ? Post rating: 0   New post Posted: Mon 25 Feb, 2013, 23:11 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Thanks, the 15 minutes session is very useful information.

Is it possible for the Live client to programmatically force a disconnection and then reconnect without needing to authenticate through the Captcha.

What I mean is: Currently, my ISystemListener passively detects a disconnect event. Then I react by reconnecting.

But can the API client actively force the disconnection, and then reconnect in the same way, without having to authenticate again through the Captcha?

Thanks for the help !
HyperScalper


 
 Post subject: Re: IClient.reconnect() Questions in standalone API client ? Post rating: 0   New post Posted: Mon 11 Mar, 2013, 11:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
hyperscalper wrote:
But can the API client actively force the disconnection, and then reconnect in the same way, without having to authenticate again through the Captcha?
On disconnect call, the captcha ID gets cleared, hence you need to reenter the captcha on the subsequent authentication.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com