main content

factset workstation connection -凯发k8网页登录

factset workstation connection

description

the fds function creates an fds object. the fds object represents a factset® workstation connection.

after you create an fds object, you can use the object functions to retrieve real-time data for securities. for credentials, contact .

creation

description

example

c = fds(username,password) creates a factset workstation connection using a user name and password. by default, this syntax uses the field information file rt_fields.xml, which is found on the matlab® path.

example

c = fds(username,password,finfo) creates a connection using the specified field information file.

input arguments

factset user name, specified as a character vector or string scalar. to find your user name, contact .

example: 'abcd_efgh_ijkl'

data types: char | string

factset password, specified as a character vector or string scalar. to find your password, contact .

example: 'xxxxxxxx'

data types: char | string

field information file, specified as a character vector or string scalar. to obtain the field information file, contact . specify the full file path to the field information file.

example: 'c:\program files (x86)\factset\factsetdatafeed\fdsrt-2\etc\rt_fields.xml'

data types: char | string

properties

factset handle, specified as a handle object.

example: [1×1 com.fdsrtcom_fdf]

object functions

obtain real-time data from factset workstation
cancel real-time request
disconnect from factset workstation

examples

create a factset workstation connection. then, retrieve real-time data for a security.

connect to the factset workstation using a user name and password. by default, the fds function uses the field information file rt_fields.xml, which is found on the matlab path. c is an fds object.

username = 'abcd_efgh_ijkl';
password = 'xxxxxxxx';
c = fds(username,password)
c = 
 
  fds with properties:
    handle: [1×1 com.fdsrtcom_fdf]

retrieve real-time data for the fds1 service and abcd-usa security by using the factset workstation connection. use the default event handler function mymessageeventhandler to process real-time data events from the factset workstation. to access the code for the default event handler function, enter edit mymessageeventhandler at the command line. you can write a custom function to process real-time data events differently. for details, see .

srv = 'fds1';
sec = 'abcd-usa';
cb = @(varargin)mymessageeventhandler(varargin);
t = realtime(c,srv,sec,cb)
t =
     1
abcd-usa:d 11-sep-2017 14:04:53 6.27
abcd-usa:d 11-sep-2017 14:07:00 6.29
...

the realtime function returns a data tag t for the real-time request. then, the event handler function returns the following data to the command window:

  • security name

  • date

  • time

  • last price

stop real-time data retrieval.

stop(c,t)

close the factset workstation connection.

close(c)

create a factset workstation connection and specify the field information file. then, retrieve real-time data for a security.

connect to the factset workstation using a user name, password, and field information file. c is an fds object.

username = 'abcd_efgh_ijkl';
password = 'xxxxxxxx';
finfo = 'c:\program files (x86)\factset\factsetdatafeed\fdsrt-2\etc\rt_fields.xml';
c = fds(username,password,finfo)
c = 
 
  fds with properties:
    handle: [1×1 com.fdsrtcom_fdf]

retrieve real-time data for the fds1 service and abcd-usa security by using the factset workstation connection. use the default event handler function mymessageeventhandler to process real-time data events from the factset workstation. to access the code for the default event handler function, enter edit mymessageeventhandler at the command line. you can write a custom function to process real-time data events differently. for details, see .

srv = 'fds1';
sec = 'abcd-usa';
cb = @(varargin)mymessageeventhandler(varargin);
t = realtime(c,srv,sec,cb)
t =
     1
abcd-usa:d 11-sep-2017 14:04:53 6.27
abcd-usa:d 11-sep-2017 14:07:00 6.29
...

the realtime function returns a data tag t for the real-time request. then, the event handler function returns the following data to the command window:

  • security name

  • date

  • time

  • last price

stop real-time data retrieval.

stop(c,t)

close the factset workstation connection.

close(c)

version history

introduced in r2013a

see also

topics

    external websites

      网站地图