The following web service functions are used by the Alpha Trading API, currently.
Validate Account
Method: POST
Description: This method will validate the account and return unique GUID. The user needs to pass this GUID in future service calls along with other inputs. This GUID will expire after 30 min, automatically, for idle user.
Service:
Input
public class LoginCredential
{
public string UserId;
public string Password;
public int ConnectionId; // Primary Key of Gateway Connection table
}
Output
public class ValidationResponse
{
public int ConnectionId;
public Result result;
public string message;
public int AccountId;
public string UserId;
public string Password;
public bool IsAuthenticated;
public bool Active;
public string Guid;
}
public enum Result
{
SUCCESS = 0,
FAILED
}
Get Account Audit Report
Method: POST
Description: This method will return the audit report of an account. Only Master/Slave Accounts (not supported Index & Coverage accounts).
Input
public class AccountAuditReportInput
{
public int AccountID;
public string Guid;
public long FromDate; // Unix Timestamp
public long ToDate; // Unix Timestamp
}
Output
public class AccountAuditReportResponse
{
public Result result { get; set; } // Response Result
public string message { get; set; } // Error message
public List<AccountAuditReport> lstSlaveAccountAuditReport;
}
public class AccountAuditReport
{
public int OrderID { get; set; }
public int AccountID { get; set; }
public string Symbol { get; set; }
public string Side { get; set; }
public int Volume { get; set; }
public Decimal OpenPrice { get; set; }
public string OpenTime { get; set; }
public Decimal ClosePrice { get; set; }
public string CloseTime { get; set; }
public Decimal Profit { get; set; }
public Decimal Commission { get; set; }
public Decimal PSCommission { get; set; }
public Decimal BSCommission { get; set; }
public Decimal Swap { get; set; }
public Decimal Balance { get; set; }
public decimal ContractSize { get; set; }
}
public enum Result
{
SUCCESS = 0,
FAILED
}