Main Content

tradelogout

Log out from WDS order management system

Description

example

d = tradelogout(c,logonid) returns logout information after logging out from the Wind Data Feed Services (WDS) order management system using the WDS connection and the login identifier.

[d,e] = tradelogout(c,logonid) also returns the WDS error identifier. For troubleshooting, contact Wind Information Co., Ltd.

Examples

collapse all

Using a WDS connection, log in to the WDS order management system and query for account information by using the login identifier.

Create a WDS connection.

c = wind;

Log in to the WDS order management system using the WDS connection. Specify the broker, branch, user name, password, and account type.

broker = "0000";
branch = "0";
capitalaccount = "1234567891011";
password = "abcdefghi";
accttype = "SHSZ";
d = tradelogin(c,broker,branch, ...
    capitalaccount,password,accttype)
d =

  1×5 table

    LogonID     LogonAccount      AccountType    ErrorCode    ErrorMsg
    _______    _______________    ___________    _________    ________

       1       '1234567891011'      'SZSHA'          0           ''   

d is a table with these variables:

  • Login identifier

  • Account number

  • Account type

  • Error code

  • Error message

If the error code is 0 and the message is an empty character vector, then the login is successful.

Query for account information using the WDS connection, Account query term, and login identifier. Use the login identifier returned by the tradelogin function with the 'LogonID' name-value pair argument.

q = 'Account';
logonid = d.LogonID;
d = query(c,q,'LogonID',logonid)
d =

  4×10 table

    ShareholderStatus    MainShareholderFlag    AccountType    MarketType    Shareholder      AssetAccount        Customer         Seat       ErrorCode    ErrorMsg
    _________________    ___________________    ___________    __________    ____________    _______________    _____________    _________    _________    ________

           48                     0               'SZSHA'         'SH'       '0123456789'    '1234567891011'    '12345678910'    '0001000'        0           ''   
           48                     0               'SHB'           'SH'       '0123456789'    '1234567891011'    '12345678910'    '0001000'        0           ''   
           48                     0               'SZSHA'         'SZ'       '0123456789'    '1234567891011'    '12345678910'    '0001000'        0           ''   
           48                     0               'SZB'           'SZ'       '0123456789'    '1234567891011'    '12345678910'    '0001000'        0           ''   

d is a table with these variables:

  • Shareholder status

  • Shareholder flag

  • Account type

  • Market type

  • Shareholder

  • Account number

  • Customer number

  • Seat

  • Error code

  • Error message

Log out from the WDS order management system using the login identifier.

d = tradelogout(c,logonid)
d =

  1×3 table

    LogonID    ErrorCode    ErrorMsg
    _______    _________    ________

      '1'          0        'logout'

d is a table with these variables:

  • Login identifier

  • Error code

  • Error message

Close the WDS connection.

close(c)

Input Arguments

collapse all

WDS connection, specified as a connection object created with the wind function.

Login identifier, specified as a character vector or string scalar. Specify the value of the login identifier by using the LogonID variable in the d output argument of the tradelogin function. For example, enter logonid = d.LogonID; at the command line.

Example: '1'

Data Types: char | string

Output Arguments

collapse all

Logout information, returned as a table with these variables:

  • Login identifier

  • Error code

  • Error message

WDS error identifier, returned as a numeric scalar. The value 0 indicates a successful execution of the tradelogout function. Otherwise, for details about the error, contact Wind Information Co., Ltd.

Version History

Introduced in R2018a