Reconnect: Reconnect a session that is no longer active

Description Usage Arguments Details Value Examples

View source: R/TFX.R

Description

Reconnect will create a new session and update the 'id' to the new authenticated id returned by the TrueFX(tm) server.

Usage

1
2
3
4
  Reconnect(x, ...)

  ## S3 method for class 'TFXsession'
 Reconnect(x, ...)

Arguments

x

an object to be re-connected

...

other args for methods

Details

After roughly 70 seconds, an authenticated TrueFX(tm) session will time-out. Also, a connection made with snapshot=FALSE will be disconnected after it is used once.

A non-active TrueFX(tm) session id is treated like an unauthenticated session.

Value

a TFXsession object of an active/authenticated session.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Cannot run because there may not be an internet connection
## Not run: 
## You must use your username and password instead of JSTrader and Ou812
sess <- ConnectTrueFX("USD/JPY", username='JSTrader', password='Ou812')
Disconnect(sess)
isActive(sess) #FALSE
Reconnect(sess)
isActive(sess) #TRUE

## End(Not run)

TFX documentation built on May 2, 2019, 4:21 a.m.

Related to Reconnect in TFX...