Accounts

This function will help you to fetch the list of available accounts. Each account is identified by a unique combination of provider with id. It takes two parameters: the provider and the callback function that will be called when the result is available.

function accounts(provider,callback)

Possible Responses:

  • Success

{
    "RQT":"accounts",               // Request Type
    "RQI":"10",                     // Request Id
    "RES":"OK",                     // Result
    "ACCOUNTS":[
    {
        "AC": "acc12123141",        // Account Id
        "PV": "QOR",                // Provider Id
        "NM": "John Snow",          // Account Name
        "RP": "Account 12132"       // Account Repr
    },
    ...
    ]
}
  • Error

{
    "RQT":"accounts",                   // Request Type
    "RQI":"10",                         // Request Id
    "RES":"ERR",                        // Result
    "MSG":"Cannot satisfy request"      // Error Message
}