Trading APIs

User Login

Purpose

This method allows the developer to login the client into the application.

Request URL https://Openapi.5paisa.com/VendorsAPI/Service1.svc/V2/LoginRequestMobileNewbyEmail

Request Method POST
Request format: JSON

Request Header Content-Type:application/json

Request Body

Header

Field Name Description Data Type (max length) Validation Sample Value
appName App Name provided at the time of registration String Cannot be empty. APPTRIAL
appVer Developer App Version String Cannot be empty. 1.0
key UserKey generated at the time of registration String Cannot be empty. ue73jHVeEzBswG5ss9ugyrAasdasdyKYxg
osName Channel of order String Cannot be Empty WEB, Android, iOS
requestCode Request Code of the API called String Cannot be Empty 5PLoginV2
userId User ID generated at the time of registration String Cannot be empty. asdue73jHVeE
password Password generated at the time of registration String Cannot be empty. 9ugyrAasdasdy

Body

Field Name Description Data Type (max length) Validation Sample Value
Email_id Client’s Email id String Cannot be empty. Should be encrypted /EYUDYVGLvfkvufmwN9+Mg==
Password Password Respective ClientCode String Cannot be empty. Should be encrypted +PMtfej7whK6g0HsvdF53Q==
LocalIP Local IP of the login requestor system String Cannot be empty. 192.168.88.41
PublicIP Public IP of the login requestor system String Cannot Be Empty 192.168.88.41
HDSerialNumber Hard Disk Serial number of the Login requestor system. String Cannot be empty.
MACAddress MACAddress of the Login requestor system. String Cannot Be Empty
MachineID Machine ID of the Login requestor system String Cannot be empty. BM4653-D-039377.local.indiainfoline.com
VersionNo The version no of the app String Cannot Be Empty Will be 1.7
RequestNo 1 String Cannot be empty. First request for the day would be 1. Incremental request can be increased.
My2PIN Provide Date of Birth in YYYYMMDD format. E.g 19881226 String Cannot Be Empty. Should be encrypted YAftqUV3rrXnbuCkD9Z+LA=
ConnectionType 1 String Cannot Be Empty Will be 1

Response Body

Field Name Description Data Type Sample Value
Success 0= Password change success full. Other 0 will point rejection Int32 A. -1 = Exception
B. 0 = success
C. 1=No Record Found
D. 2- Invalid Input/ head parameters
ServerDt Server Date Date
LastLogin Last Login Detail String
TCPBcastLocalIP TCP Broad Cast Local IP Details String 192.168.122.110
TCPBcastPublicIP TCP Broad Cast Public IP Details String
TCPBCastPort TCP BroadCast Port UInt16 25002
UDPBcastIP UDP Broadcast IP details. String 224.5.6.21
UDPBCastPort UDP Broadcast Port. UInt16 25002
InteractiveLocalIP Interactive LocalIP details. String
InteractivePublicIP Interactive public P details. String
InteractivePort InteractivePort details. UInt16 10116
ClientType Client Type Details UInt16 1
Message Message Type String "Invalid head parameters."
"Invalid Body Parameters."
“Success”
“Error while processing your request.”
LastPasswordModify Last Password Modified Details. DateTime /Date(1551422548000+0530)/
LastAccessedTime Last Accessed Details. DateTime /Date(1519693794000+0530)/
CleareDt - Date /Date(1554348600000+0530)/
VersionChanged Application Version Change Details Byte 0
1
IsPLMDefined PLM Defined details Byte 0
1
IsPLM PLM Bind status. Byte 0
1
IsIDBound - Byte 0
1
IsIDBound2 - Byte 0
1
PLMsAllowed PLMs Allowed count Byte 0
1
BulkOrderAllowed Bulk Order facility allowed or not for the customer. Byte 0
1
RunningAuthorization - Byte 0
1
OTPCredentialID - String
ClientName Client Name String AKASH
EmailId Email ID String AMITABH.BACHCHAN@GMAIL.COM
PasswordChangeFlag Password Change Flag Integer 0
1
PasswordChangeMessage Password Change Massage String
ClientCode Client ClientCode String 123456789
AllowNseCash Whether Nse Cash segment is allowed String Y
N
AllowNseDeriv Whether Nse Derivative segment is allowed String Y
N
AllowBseCash Whether Bse Cash segment is allowed String Y
N
AllowMCXComm Whether MCX Comm segment is allowed String Y
N
AllowNSEL Whether NSEL segment is allowed String Y
N
AllowNSECurrency Whether NSE Currency segment is allowed String Y
N
AllowNseMF Whether Nse MF segment is allowed String Y
N
AllowBseMF Whether Bse MF segment is allowed String Y
N
AllowMcxSx Whether McxSx segment is allowed String Y
N
AllowNseComm Whether Nse Comm segment is allowed String Y
N
AllowBseDeriv Whether Bse Derivative segment is allowed String Y
N
IsOnlyMF It specifies wether user is only MF user String Y
N
DemoTrial Is specifies wether user is a trial user String Y
N
POAStatus It will give whether POA is available for that Client Char Y
N

Sample Request

{
    "head": {
        "appName": "ABC",
        "appVer": "1.0",
        "key": "ue73jH6345ASDAHJSDXeEzBswG5ss9ugyrAyKYxg",
        "osName": "WEB",
        "requestCode": "5PLoginV2",
        "userId": "abc1234abc123",
        "password": "abc1234abc1234"
    },
    "body": {
        "Email_id": "HPD3LzHjyasx6GQBEstwZoGw=",
        "Password": "DDQSi9asdQ0gQIyjoDLtHCsmw=",
        "LocalIP": "192.168.10.10",
        "PublicIP": "192.168.10.10",
        "HDSerailNumber": "",
        "MACAddress": "",
        "MachineID": "039377 ",
        "VersionNo": "1.7",
        "RequestNo": "1",
        "My2PIN": "CyHWXC5WXZsgyislasd5dp/Uwasd==",
        "ConnectionType": "1"
    }
}

Sample Response

{
    "body": {
        "AllowBseCash": "Y",
        "AllowBseDeriv": "Y",
        "AllowBseMF": "Y",
        "AllowMCXComm": "Y",
        "AllowMcxSx": "N",
        "AllowNSECurrency": "Y",
        "AllowNSEL": "Y",
        "AllowNseCash": "Y",
        "AllowNseComm": "N",
        "AllowNseDeriv": "Y",
        "AllowNseMF": "Y",
        "BulkOrderAllowed": 0,
        "CleareDt": "/Date(1556163000000+0530)/",
        "ClientCode": "1231234123",
        "ClientName": "AMITABH",
        "ClientType": 1,
        "DemoTrial": "N",
        "EmailId": "AMITABH.BACHCHAN@GMAIL.COM",
        "InteractiveLocalIP": "",
        "InteractivePort": 10116,
        "InteractivePublicIP": "",
        "IsIDBound": 0,
        "IsIDBound2": 0,
        "IsOnlyMF": "N",
        "IsPLM": 0,
        "IsPLMDefined": 0,
        "LastAccessedTime": "/Date(1556174203000+0530)/",
        "LastLogin": "",
        "LastPasswordModify": "/Date(1554721041000+0530)/",
        "Message": "",
        "OTPCredentialID": "",
        "PLMsAllowed": 0,
        "POAStatus": "Y",
        "PasswordChangeFlag": 0,
        "PasswordChangeMessage": "",
        "RunningAuthorization": 0,
        "ServerDt": "/Date(1556175256125+0530)/",
        "Status": 0,
        "TCPBCastPort": 25002,
        "TCPBcastLocalIP": "172.24.32.76",
        "TCPBcastPublicIP": "124.153.80.164",
        "UDPBCastPort": 25002,
        "UDPBcastIP": "224.5.6.21",
        "VersionChanged": 0
    },
    "head": {
        "responseCode": "5PLoginV2",
        "status": "0",
        "statusDescription": "Success"
    }
}