PMobile 2 - CFD API
Welcome to the POEMS Mobile 2.0 - CFD API!.
We have language bindings in curl! You can view code examples in the dark area to the right.
Counter
Get CFD Counter Information
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/counter/info?osVersion=2&counterID=CFD%2FSG%2FSGX%2FDBS.SG&language=1&priceMode=1' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: B2953A9F-1B79-439B-B6ED-F53FF37C94EB' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterIDs=FX%2FFX%2FFX%2FAUDCAD'
Sample Response
{
"msg": "success",
"code": 1,
"product": "CFD",
"productIcon": "CFD",
"counterName": "DBS",
"market": "SG",
"delayIndicator": "",
"lastDone": "28.38",
"change": "-0.42",
"changePercent": "-1.45%",
"bid": "28.37",
"ask": "28.38",
"bVolK": "4.6",
"sVolK": "1.2",
"low": "28.18",
"high": "28.59",
"pmpTopic": "\\SGXSE\\D05_RY"
}
This function is to retrieve the counter info for CFD. This function allows to filter the counter info (Short or Details) by passing the price mode.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/counter/info
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID | ||
priceMode | 1 | 1: Short Info, 2: Detail Info |
Trade
This is the CFD trade, which you can get CFD trade information, validate and submit orders.
Get Trade Info
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/info?osVersion=2&language=1&counterID=CFD%2FSG%2FSGX%2FDBS.SG' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 45663A48-D7CD-471A-B785-521AA9E6E48A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"availCash": "0 SGD",
"creditLimit": "200,000 SGD",
"counterID": "CFD/SG/SGX/DBS.SG",
"exchange": "SGX",
"market": "SG",
"lastDone": "27.96",
"companyName": "DBS",
"companyCode": "DBS.SG",
"currency": "SGD",
"bid": "-0.44",
"ask": "-1.548",
"lotSize": "100",
"requireMargin": "0",
"multiplier": "1",
"decimalPosition": "3",
"bidSize": [
{
"fromPrice": "0",
"toPrice": "0.2",
"size": "0.001"
},
{
"fromPrice": "0.2",
"toPrice": "1",
"size": "0.005"
},
{
"fromPrice": "1",
"toPrice": "9999999999.999999",
"size": "0.01"
}
],
"orderTypes": [
{
"orderType": "2",
"orderTypeDisplay": "Limit Order",
"duration": [
{
"timeInForce": "0",
"timeInForceDisplay": "DAY",
"validityDay": "1"
},
{
"timeInForce": "6",
"timeInForceDisplay": "GTD",
"validityDay": "90"
}
],
"triggerTypes": null,
"operator": null,
"trailingStep": null,
"limitSpread": null
},
{
"orderType": "3",
"orderTypeDisplay": "Stop Limit Order",
"duration": [
{
"timeInForce": "0",
"timeInForceDisplay": "DAY",
"validityDay": "1"
},
{
"timeInForce": "6",
"timeInForceDisplay": "GTD",
"validityDay": "90"
}
],
"triggerTypes": [
{
"value": "2",
"text": "Ask Price"
},
{
"value": "1",
"text": "Bid Price"
}
],
"operator": null,
"trailingStep": null,
"limitSpread": null
},
...
],
"actions": [
{
"value": "1",
"text": "Buy"
},
{
"value": "2",
"text": "Sell"
}
]
}
This function is to retrieve CFD trade information.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/info
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID |
Get Limit Balance
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/limitbalance?osVersion=2&language=1' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 45663A48-D7CD-471A-B785-521AA9E6E48A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"availCash": "0 SGD",
"creditLimit": "200,000 SGD"
}
This function is to retrieve CFD trade limit balance.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/limitbalance
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Get Limit Order Number(s)
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/limitorder?osVersion=2&language=1&counterID=CFD%2FSG%2FSGX%2FDBS.SG' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 45663A48-D7CD-471A-B785-521AA9E6E48A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"orders": [
{
"orderNo": "5043990",
"action": "Buy",
"companyName": "DBS",
"qty": "100",
"price": "26.51"
},
{
"orderNo": "5045912",
"action": "Buy",
"companyName": "DBS",
"qty": "100",
"price": "28.41"
}
]
}
This function is to retrieve CFD trade limit order data.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/limitorder
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID |
Validate Order
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/validate \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'encryptedpin: B832FF0D5E1A671931AB9A7A8BE1FBFE9A42A729BC7F097B43ABD406BE26D6C73341B2650ED35E434B233B38CBB46E79F9DE9ABBA1FDE2E6F31903D8BAACB801E8CC165AAFAC9B82A21DCDCAEA8C2F4E45A9D679D5E0C1E2EFAF49D1D1BA2EFA63069D1EB785D5C52B5B0E576DC20895E570525B5BFBDFAAA210D29B002FA771' \
-H 'sessionid: 2D9F55A5-C86A-4631-9C47-BF9845480BA3' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=CFD%2FSG%2FSGX%2FDBS.SG&action=1&orderType=2&quantity=200&timeInForce=0&expireTime=&ifDoneLimitOrderNo=&ocoStopLimitPrice=&ocoStopLimitQty=0&stopPrice=&trailingSteps=&limitSpread=&triggerType=0&conditionOperator=0&conditionCompanyCode=&conditionPrice=&limitPrice=28'
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"authToken": "798A6298-9F92-4B39-9713-E487919ADFA5"
}
This function is to validate CFD orders and get the authToken for submitting orders.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/validate
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
encryptedPIN | Encrypted PIN generated from client's password by using e2ee client lib |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID | ||
action | 1: Buy, 2: Sell, 5: Short Sell | |
orderType | 2: Limit Order, 3: Stop Limit Order, 4: Trailing Stop Order, 5: IF Done Order, 6: OCO Order, 7: Contingency Order | |
limitPrice | ||
quantity | ||
timeInForce | ||
expireTime | ||
ifDoneLimitOrderNo | ||
ocoStopLimitPrice | ||
ocoStopLimitQty | ||
stopPrice | ||
trailingSteps | ||
limitSpread | ||
triggerType | 1:Bid Price 2: Ask Price | |
conditionOperator | ||
conditionCompanyCode | ||
conditionPrice |
Submit Order
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/submit \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'authtoken: 6D4B83E9-8531-45BF-91B2-4C1F86B287A8' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 174EE95F-2C2B-443A-AF62-C9775901784D' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=CFD%2FSG%2FSGX%2FDBS.SG&action=1&orderType=2&quantity=200&timeInForce=0&expireTime=&ifDoneLimitOrderNo=&ocoStopLimitPrice=&ocoStopLimitQty=0&stopPrice=&trailingSteps=&limitSpread=&triggerType=0&conditionOperator=0&conditionCompanyCode=&conditionPrice=&limitPrice=28'
Sample Response
{
"msg": "Order submitted successfully.",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"orderDetailURI": "/cfd/order/5045965"
}
This function is to submit CFD orders.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/trade/submit
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
authToken | Authentication Token |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID | ||
action | 1: Buy, 2: Sell, 5: Short Sell | |
orderType | 2: Limit Order, 3: Stop Limit Order, 4: Trailing Stop Order, 5: IF Done Order, 6: OCO Order, 7: Contingency Order | |
limitPrice | ||
quantity | ||
timeInForce | ||
expireTime | ||
ifDoneLimitOrderNo | ||
ocoStopLimitPrice | ||
ocoStopLimitQty | ||
stopPrice | ||
trailingSteps | ||
limitSpread | ||
triggerType | 1:Bid Price 2: Ask Price | |
conditionOperator | ||
conditionCompanyCode | ||
conditionPrice |
Order Status
This is CFD order status, which you can get order details and withdraw order for CFD.
Get Order Details
The functions are to retrieve order details for CFD.
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/order/5043990?osVersion=6.0.1&language=1&counterID=CFD%2FSG%2FSGX%2FDBS.SG&isToday=true' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 8E24D187-175A-4D2D-8B4E-F243DD51F96A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"counterID": "CFD/SG/SGX/DBS.SG",
"name": "DBS",
"product": "CFD",
"productIcon": "CFD",
"action": "BUY",
"status": "OR",
"statusDesc": "Order Received",
"statusColor": "BLACK",
"orderType": "Limit",
"orderNo": "5043990",
"currency": "SGD",
"qty": "100",
"remainingQty": "100",
"stopPrice": "",
"stopPriceTrigger": "",
"trailingStep": "",
"limitSpread": "",
"contingencyCondition": "",
"tradeType": "Cash",
"settlementCurrency": "SGD",
"validity": "GTD",
"gtd": "21-Dec-2560",
"message": "",
"withdrawURI": "/cfd/order/5043990/withdraw",
"correspondLimitOrderNo": "",
"correspondOrderNo": "",
"ocoNo": "",
"orderHistory": [
{
"status": "OR",
"statusDesc": "Order Received",
"qty": "100",
"price": "26.51",
"time": "07 Dec 2017 03:46 PM",
"timeCompare": null,
"message": ""
}
],
"exchange": "SGX",
"symbol": "D05",
"submittedPrice": "26.51",
"isSynthetic": false
}
This function is to retrieve the details of order by order ID for CFD.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/order/{orderNo}
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID | ||
isToday | true |
Path Parameters
Parameter | Description |
---|---|
orderNo | Order No. |
Withdraw Order
The functions are to withdraw orders for CFD.
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/order/5043990/withdraw \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'encryptedpin: AECC9F115C23036F39A4A2AFB019545DFEA83B9AFB817E206C712E213A8377368E420FBB60CB83FEB3FBB68836170ECBC85CD1D0C9ECFF50AB7B6E98898FAA7BD0846E3D7DC258B7247217F82A2EABB316AB4989815A5D9E378C52ECD62BD18441A0EC24AFD89590DD05BB5D5040D1C815CBEEC809D924AAE744A98194623A53' \
-H 'sessionid: 8E24D187-175A-4D2D-8B4E-F243DD51F96A' \
-H 'versionno: 2.0.0' \
-d 'osVersion=6.0.1&language=1&counterID=CFD%2FSG%2FSGX%2FDBS.SG'
Sample Response
{
"msg": "Withdrawal request has been sent",
"code": 1,
"passwordRequire": true,
"twoFARequire": false
}
this function is to withdraw the CFD order. This function will allow to withdraw the withdrawable order after validating the input data.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/order/{orderNo}/withdraw
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
encryptedPIN | Encrypted PIN generated from client's password by using e2ee client lib |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID |
Path Parameters
Parameter | Description |
---|---|
orderNo | Order No. |
Portfolio
This is the CFD portfolio, which you can get CFD account details and position details.
Get CFD Account Details
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/accountdetails?osVersion=6.0.1&language=1' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 8E24D187-175A-4D2D-8B4E-F243DD51F96A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "Success",
"code": 1,
"lastUpdated": "07-Mar-2018 10:31AM",
"currency": "SGD_Base",
"ledgerBalance": "0",
"unrealizedPL": "0",
"equityBalance": "0",
"availableCash": "0",
"maintenanceMargin": "0",
"marginUtilization": "0%",
"creditLeft": "200,000",
"creditLimit": "200,000",
"needDisclaimer": false,
"disclaimers": []
}
This function is to retrieve CFD account details.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/accountdetails
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Get CFD Positions
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/positions?osVersion=6.0.1&language=1' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 8E24D187-175A-4D2D-8B4E-F243DD51F96A' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "Success",
"code": 1,
"total": "0",
"currency": "SGD",
"lastUpdated": "07-Mar-2018 11:00AM",
"holdings": [
{
"product": "CFD",
"productIcon": "CFD",
"list": null
},
{
"product": "CFDDMA",
"productIcon": "CFD\r\nDMA",
"list": null
}
],
"needDisclaimer": true,
"disclaimers": [
"1.Investors should note that the profits and losses calculated here are based on the last done price excluding commission, GST and finance charges.",
"2.Please manually convert your foreign currency ledger deficit to avoid any penalty interest. You can do so via CFD > Forms > Currency Conversion. Alternatively, you may also contact your trading representative."
]
}
This function is to return the script positions for CFD.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/positions
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Get CFD Position Details
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/positions/20180307/20180222C000010/001?osVersion=6.0.1&language=1&counterID=CFD%2FHK%2FHKSE%2F0002.HK' \
-H 'accountno: 0379139' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 81C004C9-CEDC-4D1F-A5D3-16EF157ACD01' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "Success",
"code": 1,
"lastUpdated": "07-Mar-2018 11:36AM",
"counterID": "CFD/HK/HKSE/0002.HK",
"contractNo": "5045638",
"description": "CLP HOLDINGS LTD",
"action": "Long",
"entryPrice": "76.5",
"qty": "500",
"currency": "HKD",
"rolloverPrice": "76.5",
"markToMarket": "78.45*",
"maintenanceMargin": "7,845",
"unrealizedPL": "975",
"unrealizedFC": "-42.72",
"tradedDate": "22-Feb-2018",
"expiryDate": "26-Mar-2018",
"needDisclaimer": true,
"disclaimers": [
"1.Investors should note that the profits and losses calculated here are based on the last done price excluding commission, GST and finance charges.",
"2.Please manually convert your foreign currency ledger deficit to avoid any penalty interest. You can do so via CFD > Forms > Currency Conversion. Alternatively, you may also contact your trading representative."
],
"isTradable": true
}
This function is to retrieve position detail for CFD.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/portfolio/positions/{tradeDate}/{orderNo}/{subOrderNo}
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
counterID |
Path Parameters
Parameter | Description |
---|---|
tradeDate | Trade Date |
orderNo | Order No. |
subOrderNo | Subordinate Order No. |
Online Forms
This is CFD online forms, which you can get withdrawal form and currency conversion form information, validate the withdrawal form and currency conversion form, submit the withdrawal form and currency conversion form, get online form history and cancel onlines form.
Get CFD Withdrawal Form Info
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal?osVersion=6.0.1&language=1' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 99D856E2-A24B-465E-9C99-C86DAD95CAC7' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"currencies": [
"SGD",
"HKD",
"USD",
"MYR",
"JPY",
"AUD",
"CNY",
"GBP",
"THB"
],
"otherAccounts": [
{
"text": "0000000 ((V))",
"acctNo": "0000000",
"spelCd": "(V)"
},
{
"text": "1000107 ((V))",
"acctNo": "1000107",
"spelCd": "(V)"
},
...
],
"withdrawalType": [
{
"text": "Deposit into POSB/DBS Bank A/C No: 117-17771-7",
"value": "DP"
},
{
"text": "Quick Cheque Deposit",
"value": "DC"
},
{
"text": "Client to collect Cheque",
"value": "CP"
},
{
"text": "Transfer into Account",
"value": "TA"
}
]
}
This function is to retrieve the information of the CFD online withdrawal form information for the current login account.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Validate CFD Withdrawal Form
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/validate \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'encryptedpin: 924960719831536B2DE9EAAF5804FA0B1AD3665DDCA3C3A7E5EDE8AB84787F62BF22DA5F13EC4888A36F26E7EB16B258B48B77660017B148E9A6CCCA2A69B2A30CA41DEB18807D389B57DA66B5CC7CA51B9D4C0D941A5B7E648944583D06AB62B09DAA939F3605D46527BCA36798B316B50ED119D9C4A27067B063D49ADEF449' \
-H 'sessionid: 99D856E2-A24B-465E-9C99-C86DAD95CAC7' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&withdrawalType=DP&amount=1000¤cy=SGD&processDate=20180309&remarks=sample&taAcctNo=&taSpelCd=&taDetails=&taRemisierCd=&dcBank=&dcAccountNo='
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"authToken": "18460151-5623-43CE-9094-AAF873F116E0",
"confirmMessage": "Deposit into POSB/DBS Bank A/C No: 117-17771-7 SGD 1,000.00 on 09-Mar-2018",
"note": "Withdrawal Request submitted before 10:00am will be processed on the same working day.\nRequests submitted after 10:00am will be processed on the next working day.\nDirect crediting only applicable If funds are to be credited into Bank Account that is maintained in our record (EPS, Bank ref - client may update our record).\nPayment to 3rd party is not allowed."
}
this function is to validate the online withdrawal form before submitting the form. This function will validate the withdrawal form by checking the input parameters depending on the type of withdrawal and return back the authentication token required for form submission process.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/validate
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
encryptedPIN | Encrypted PIN generated from client's password by using e2ee client lib |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
withdrawalType | Withdrawal Type (eg.DP) | |
amount | Withdrawal Amount | |
currency | Currency (eg.SGD) | |
processDate | Process Date (yyyyMMdd) | |
remarks | ||
taAcctNo | TA Account No | |
taSpelCd | TA Special Code | |
taDetails | TA Details | |
taRemisierCd | TA Remisier Code | |
dcBank | DC Bank Name | |
dcAccountNo | DC Bank Account No. |
Submit CFD Withdrawal Form
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/submit \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'authtoken: 18460151-5623-43CE-9094-AAF873F116E0' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 8BBBAA09-0D76-44F7-87C5-3450208E64EC' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&withdrawalType=DP&amount=1000¤cy=SGD&processDate=20180309&remarks=sample&taAcctNo=&taSpelCd=&taDetails=&taRemisierCd=&dcBank=&dcAccountNo='
Sample Response
{
"msg": "Withdrawal Request submitted.",
"code": 1,
"passwordRequire": true,
"twoFARequire": false
}
this function is to submit the online withdrawal form.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/submit
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
authToken | Authentication Token |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
withdrawalType | Withdrawal Type (eg.DP) | |
amount | Withdrawal Amount | |
currency | Currency (eg.SGD) | |
processDate | Process Date (yyyyMMdd) | |
remarks | ||
taAcctNo | TA Account No | |
taSpelCd | TA Special Code | |
taDetails | TA Details | |
taRemisierCd | TA Remisier Code | |
dcBank | DC Bank Name | |
dcAccountNo | DC Bank Account No. |
Get CFD Currency Conversion Form
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion?language=1&osVersion=5' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 8BBBAA09-0D76-44F7-87C5-3450208E64EC' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&withdrawalType=DEPOSIT_LOCAL_BANK&amount=1000¤cy=SGD&processDate=20180308&remarks=sample&ttAcctNo=&ttAcctName=&ttBank=&ttDetail=&ttBranch=&ttSwiftCd=&ttInterBank=&ttInterSwiftCd=&taAcctNo=&taSpelCd=&taDetails=&taRemisierCd=&dcBank=&dcAccountNo=&rpCode=&rpOthers='
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"currencies": [
"SGD",
"HKD",
"USD",
"MYR",
"JPY",
"AUD",
"CNY",
"GBP",
"THB"
],
"conversionType": [
{
"text": "Convert Amount",
"value": "1"
},
{
"text": "Convert to Offset Debit Balance",
"value": "2"
}
]
}
This function is to get CFD/DMA currency conversion form information.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Validate CFD Currency Conversion
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion/validate \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'encryptedpin: 969BDB484A0E09BF0F8D03B82ABD65A3C0C55275BF12F9E7AD468A664846E82B08561972D613F662E5AF2D293306A39C409C69CD7229CF181C54C33C62A15688FC7A7EA4ABD6E3DD230F7A5D995CA510A2191EA91178BE62A697DFBB6F79BDC76CD3228C8F5DFA9F1D1A9CCBC0E6850AA511CC7E2A47794CEDED439E86DD1376' \
-H 'sessionid: 8BBBAA09-0D76-44F7-87C5-3450208E64EC' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&conversionType=1&sourceCurrency=SGD&sourceAmount=1000&targetCurrency=USD&targetAmount=&remarks=sample'
Sample Response
{
"msg": "Success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"authToken": "7ECDE7AA-7DBB-4DBC-8A2A-4F0DBCBDA758",
"confirmMessage": "Convert SGD 1,000.00 to USD"
}
This function is to validate CFD currency conversion information.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion/validate
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
encryptedPIN | Encrypted PIN generated from client's password by using e2ee client lib |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
conversionType | 1: Convert Amount, 2: Convert to Offset Debit Balance | |
sourceCurrency | ||
sourceAmount | ||
targetCurrency | ||
targetAmount | ||
remarks |
Submit CFD Currency Conversion
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion/submit \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'authtoken: 7ECDE7AA-7DBB-4DBC-8A2A-4F0DBCBDA758' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: C77AE9BC-B230-465C-9398-D4AB6861DEC9' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&conversionType=1&sourceCurrency=SGD&sourceAmount=1000&targetCurrency=USD&targetAmount=&remarks=sample'
Sample Response
{
"msg": "Success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false
}
This function is to submit successful validation CFD currency conversion information.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/currencyconversion/submit
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
authToken | Authentication Token |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
conversionType | Conversion Type (EMPTY, CONVERT_AMOUNT, OPT_IN_MULTI_CURRENCY, CONVERT_OFFSET) | |
sourceCurrency | ||
sourceAmount | ||
targetCurrency | ||
targetAmount | ||
remarks |
Get CFD Online Form History
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/history?language=1&osVersion=5&period=201803' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: C77AE9BC-B230-465C-9398-D4AB6861DEC9' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&conversionType=CONVERT_AMOUNT&sourceCurrency=SGD&processDate=20180308&sourceAmount=1000&targetCurrency=USD&targetAmount=&offsetSourceCurrecny=&offsetTargetCurrecny=&remarks=sample'
Sample Response
{
"msg": "success",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"history": [
{
"description": "Convert SGD 1,000.00 to USD",
"status": "Submitted",
"formType": "2",
"processNo": "7434",
"time": "08-Mar-2018 10:44AM",
"cancellable": true,
"remarks": ""
},
{
"description": "Deposit into POSB/DBS Bank A/C No: 117-17771-7 SGD 1,000.00 on 09-Mar-2018",
"status": "Submitted",
"formType": "1",
"processNo": "51184",
"time": "08-Mar-2018 10:18AM",
"cancellable": true,
"remarks": ""
},
...
]
}
This function is to retrieve the history of CFD online withdrawal form for a month. This function allows to filter the withdrawal form history by passing the year and month. The default period is current month.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/history
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Cancel CFD Online Form
Sample Request
curl -X POST \
https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/cancel \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'deviceid: deviceid-sample' \
-H 'encryptedpin: 37336E37763A02A7000636CA722F2B188A979C6F4111F32EC674D3CE5D6EF48FCA95140B91D810DD4F9BDAF04704757BC24BCF193F846B0CDBA3934DD894795ECFFA2ADBD1823B9DBA65FDFC8BAC0A682DE85E636A28258E878BF00D130547FC47D0871DC87A8D02A7660C10B2CE9E2C549255C29F87BF734C92EDFE105F9313' \
-H 'sessionid: C77AE9BC-B230-465C-9398-D4AB6861DEC9' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&wdProcessNos=&ccProcessNos=7434'
Sample Response
{
"msg": "Cancellation Request submitted.",
"code": 1,
"passwordRequire": true,
"twoFARequire": false,
"cancelList": [
{
"processNo": "7434",
"onlineFormType": "CurrencyConversionOnlineForm"
}
]
}
This function is to cancel CFD online forms.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/cancel
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
encryptedPIN | Encrypted PIN generated from client's password by using e2ee client lib |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
wdProcessNos | withdraw form process No. is separated by comma | |
ccProcessNos | currency conversion form process No. is separated by comma |
Get CFD Withdrawal Form Note
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/note?language=1&osVersion=5¤cy=SGD&withdrawalType=DP' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: C77AE9BC-B230-465C-9398-D4AB6861DEC9' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&wdProcessNos=&ccProcessNos=186272'
Sample Response
{
"msg": "success",
"code": 1,
"note": "Withdrawal Request submitted before 10:00am will be processed on the same working day.\nRequests submitted after 10:00am will be processed on the next working day.\nDirect crediting only applicable If funds are to be credited into Bank Account that is maintained in our record (EPS, Bank ref - client may update our record).\nPayment to 3rd party is not allowed."
}
This function is to retrieve note for CFD withdrawal online form.
HTTP Request
POST https://sandboxapi.poems.com.sg/pmobile2/cfd/onlineforms/withdrawal/note
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Form Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
currency | ||
withdrawalType | Withdrawal Type (eg.DP) |
Transaction History
The functions are to get the transaction history by passing the currency code and year month.
Get CFD Transaction History
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/transactionhistory?language=1&osVersion=5¤cy=SGD&month=201803&pageSize=100&pageIndex=0&accountType=V' \
-H 'accountno: 0008911' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: 700EB0B5-F543-43FC-BD84-810D3D164B7D' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&wdProcessNos=&ccProcessNos=186272'
Sample Response
{
"msg": "Success",
"code": 1,
"currencies": [
"SGD"
],
"lastUpdated": "09-Mar-2018 07:23AM",
"transHistory": [
{
"date": "01-Mar-2018",
"currencies": [
{
"currency": "SGD",
"subtotal": "227.92",
"list": [
{
"description": "INTEREST CREDITED FOR 02/2018",
"amount": "227.92"
}
]
}
]
},
{
"date": "07-Mar-2018",
"currencies": [
{
"currency": "SGD",
"subtotal": "-60.73",
"list": [
{
"description": "Commission for SIAA.SG",
"amount": "-25"
},
{
"description": "GST",
"amount": "-1.75"
},
{
"description": "INTEREST CHARGES",
"amount": "-2.98"
},
{
"description": "Realised P&L for SIAA.SG",
"amount": "-31"
}
]
}
]
}
]
}
This function is to get CFD transaction history by passing the currency code and year.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/transactionhistory
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version | |
currency | ||
month |
Alerts
This is the CFD alerts, which you can get the account alert details for CFD.
Get CFD Account Alerts
Sample Request
curl -X GET \
'https://sandboxapi.poems.com.sg/pmobile2/cfd/alert/account?osVersion=2&language=1&accountType=V' \
-H 'accountno: 0000000' \
-H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
-H 'deviceid: deviceid-sample' \
-H 'sessionid: F40E6287-9F7E-4140-AD52-313CD8E4B8A3' \
-H 'versionno: 2.0.0' \
-d 'language=1&osVersion=5&counterID=ST%2FSG%2FSGX%2FCRP.SG'
Sample Response
{
"msg": "success",
"code": 1,
"timeStamp": "20180312145722",
"marginCallAmount": null,
"marginCallAmountDisplay": null,
"marginCallAmountColor": null,
"marginCallDate": null,
"marginCallDays": null,
"ledgerDeficitDate": null,
"ledgerDeficits": []
}
This function is to return the account alert details for CFD.
HTTP Request
GET https://sandboxapi.poems.com.sg/pmobile2/cfd/alert/account
Header Parameters
Parameter | Description |
---|---|
apikey | API key to access the api |
versionNo | Application version number |
deviceId | Client's device id |
accountNo | Login Account Number |
sessionId | Session ID |
Query Parameters
Parameter | Default | Description |
---|---|---|
language | 1 | 1: English, 2: Chinese |
osVersion | Client's device OS version |
Errors
The Kittn API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The kitten requested is hidden for administrators only. |
404 | Not Found -- The specified kitten could not be found. |
405 | Method Not Allowed -- You tried to access a kitten with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
410 | Gone -- The kitten requested has been removed from our servers. |
418 | I'm a teapot. |
429 | Too Many Requests -- You're requesting too many kittens! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |