Main Content

tradelogin

Log in to WDS order management system

Description

example

d = tradelogin(c,broker,branch,capitalaccount,password,accttype) returns login information after logging in to the Wind Data Feed Services (WDS) order management system using:

  • WDS connection

  • Broker

  • Branch

  • Capital account

  • Password

  • Account type

[d,e] = tradelogin(c,broker,branch,capitalaccount,password,accttype) 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.

Broker specification, specified as a character vector or string scalar.

Example: "0000"

Data Types: char | string

Branch name, specified as a character vector or string scalar.

Example: "0"

Data Types: char | string

User name of the WDS account, specified as a character vector or string scalar. For credentials, contact Wind Information Co., Ltd.

Example: "1234567891011"

Data Types: char | string

Password of the WDS account, specified as a character vector or string scalar. For credentials, contact Wind Information Co., Ltd.

Example: "abcdefghi"

Data Types: char | string

Account type, specified as a character vector or string scalar.

Example: "SHSZ"

Data Types: char | string

Output Arguments

collapse all

Login information, returned as a table with these variables:

  • Login identifier

  • Account number

  • Account type

  • Error code

  • Error message

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

Version History

Introduced in R2018a