NAV Navbar
cURL java c csharp php ruby
  • Introduction
  • Pre-Login
  • Account
  • Alerts
  • Contract
  • Chart
  • FXInvest
  • Order
  • News
  • Net Position
  • Online Forms
  • Settings
  • Error Code
  • Introduction

    This API is to support the functionlity of the following PFPL products and modules in POEMS Mobile 2.0 and other platforms.

    Products:

    Modules:

    Environment

    Environemtn URL
    Test http://118.189.144.221
    Production https://api.poems.com.sg

    URI

    Product URI Product Prefix Sample Request URI
    Futures /FT {url}/FT/contract
    Forex Regular /FX {url}/FX/contract
    Forex Mini /FXMN {url}/FXMN/contract
    FXInvest /NFX {url}/NFX/contract
    All / {url}/contract

    Supported Product

    As this API supports the multi-product on POEMS Mobile 2.0 application, the following codes and flags are setup along with the other products.

    Product Key Name Product Icon
    FT Futures FT
    FX Regular Forex FX
    FXMN Mini Forex FXMN
    NFX FXInvest NFX

    Supported Language

    Language ID Language Name
    1 EN (English)
    2 CN (Simplified Chinese)

    Pre-Login

    Provide API functions to supports pre-login functions to retrieve information for Futures and Forex pre-login watchlist

    Get Pre-Login Watchlist

    Sample Request

    curl -X GET \
      'http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin?osVersion=7.1.1&language=1' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 0c83d21d-7593-83d2-f870-491fbf7c8dd8' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin?osVersion=7.1.1&language=1")
      .get()
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "398e06f9-5af9-abd3-362f-b593a1ca15cb")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"af23e54f-f007-d9e7-7e6c-132758dd8b86" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "9f59d4e1-895d-fc00-6257-f59fcf75240b");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'c4cbf521-fb0b-dc89-2213-5073ba576dd3',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://10.30.2.21:7047/PMobile2API/FX/contract/watchlist/prelogin?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'a73a618b-78fc-a165-f36e-55e05a5519ec'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "pmpURL": "https://118.189.144.221/TestPMPFXPrice",
        "columns": [
            {
                "title": "Symbol",
                "property": "symbol"
            },
            {
                "title": "Bid",
                "property": "bid"
            },
            {
                "title": "Spread",
                "property": "spread"
            },
            {
                "title": "Ask",
                "property": "ask"
            },
            {
                "title": "High",
                "property": "high"
            },
            {
                "title": "Low",
                "property": "low"
            }
        ],
        "counterData": [
            {
                "counterID": "FXMN/FX/FXMN/SDIUSD",
                "name": "Silver Direct",
                "productIcon": "Mini\r\nFX",
                "market": "FX",
                "product": "FXMN",
                "pmpTopic": "\\FX100KFeeder\\SDIUSD[2]",
                "symbol": "SDIUSD",
                "bid": "16.5325",
                "spread": "650",
                "ask": "16.5975",
                "high": "17.6925",
                "low": "15.7075"
            },
            {
                "counterID": "FX/FX/FX/GLDUSD",
                "name": "Loco London Gold",
                "productIcon": "REG\r\nFX",
                "market": "FX",
                "product": "FX",
                "pmpTopic": "\\FX100KFeeder\\GLDUSD[1]",
                "symbol": "GLDUSD",
                "bid": "1346.77",
                "spread": "80",
                "ask": "1347.57",
                "high": "1366.10",
                "low": "1212.60"
            }
        ]
    }
    

    Get Futures and Forex pre-login watchlist

    HTTP Request

    GET {url}/pmobile2/{product}/contract/watchlist/prelogin

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    pmpURL PMP URL String
    columns List of columns to be displayed
    PropertyDescriptionType
    titleColumn name to be displayed. This will change based on selected languageString
    propertyColumn property valueString
    List
    counterData List of contract or counter details
    PropertyDescriptionType
    counterIDUnique identifier for contract across multiple products
    {product}/{market}/{exchange}/{counterID}
    String
    nameContract display nameString
    productIconProduct iconString
    marketMarket where the contract belongString
    productProduct where the contract belongString
    pmpTopicContract topic name for subscribing to PMPString
    symbolContract symbolString
    spreadContract calculated spreadString
    bidBid priceString
    askAsk priceString
    highHigh priceString
    lowLow priceString
    List

    Account

    Provide API functions to supports all account related information retrieval such as Account Details, Account Remisier or Account Executive and Equity Balance

    Account Detail

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/account?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: de3d1374-9b3a-5cb3-c44e-bcb04d475045' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/account?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "bbea6260-def9-c058-0bd2-598af6447a7c")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"e5cc4a08-918e-e39d-651e-63ee75552eb5" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/account?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/account?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "4abc8baf-aa4c-0785-6863-e0e48235bec5");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/account');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '8daaa729-e047-c6bd-9fc8-56154e5f392f',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/account?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '944dd3d5-8258-8cd9-a1a9-3a4274001471'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "accountNo": "ABC1234",
            "accountName": "TEST PURPOSE CLIENT",
            "baseCurrency": "SGD",
            "ledgerBalance": "-2,950.00",
            "accountBalance": "17,700.50",
            "unrealizedPL": "10,650.50",
            "marginExcessDeficit": "17,040.50",
            "initialMargin": "660.00",
            "maintenanceMargin": "600.00",
            "utilization": "3.73%",
            "totalAdjustment": "0.00",
            "lastUpdatedTime": "25-Mar-2018 06:33PM",
            "needDisclaimer": true,
            "disclaimers": [
                "Use of “Portfolio” module under “Account Management” in POEMS is provided for your convenience and should only serve as a guide. Phillip Futures Pte Ltd provides no guarantee with regard to its content and completeness and does not accept any liability for losses which might arise from making use of this information. Futures Call-in trades through dealers or trades done through platforms other than POEMS will not be reflected in the net position calculation. "
            ]
        }
    }
    

    Get the account portfolio of the client

    HTTP Request

    GET {url}/pmobile2/{product}/account

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for account details Object

    Account Details

    Property Description Type
    accountNo Account number String
    accountName Account name String
    baseCurrency Account base currency String
    legderBalance Account ledger balance String
    accountBalance Account balance String
    unrealizedPL Unrealized P/L String
    marginExcessDeficit Margin deficit/excess String
    initialMargin Portfolio initial margin String
    maintenanceMargin Portfolio maintenance margin String
    utilization Margin utilization String
    lastUpdatedTime Last account detail update timestamp String
    needDisclaimer Flag whether disclaimer is needed Boolean
    disclaimers List of disclaimer information List of String

    Account Remisier

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: b92f754b-4100-e664-7f2b-8af79d8fecc6' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "c2dbd878-4730-ac34-cca4-e402d9086a6c")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"6126195a-54ac-2ea7-49fb-960fc5f90b8f" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "1c044d23-7494-fac9-038f-fb314e242d4b");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '1a024cc5-d178-51b8-763b-b33fdbe9720b',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/account/remisier?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '46484c37-f5f6-40d6-163b-fff480e0ea5d'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "code": "ZZ",
            "name": "",
            "email": "",
            "officeNumber": "",
            "mobileNumber": ""
        }
    }
    

    Get the Remisier or Account Executive details for Futures account

    HTTP Request

    GET {url}/pmobile2/{product}/account/remisier

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for remisier Object

    Remisier

    Property Description Type
    code Remisier code String
    name Remisier name String
    email Email address String
    officeNumber Office contact number String
    mobileNumber Mobile contact number String

    Equity Balance

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: dcd798d4-2f52-9b39-cb34-0abb094fb655' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "c5ba8453-1654-ba3f-7f63-2a3635af8452")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"35b2af34-b7b1-8767-a9f8-5876ad0b74ee" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "a42647d1-5133-d0a3-edd4-ea41a8724cab");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '221b7cb0-133b-f113-0531-9e5a13820878',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/account/equitybalance?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '420bc539-681f-7900-01cc-6fa762dd80fa'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "accountNo": "ABC1234",
            "name": "TEST PURPOSE CLIENT",
            "currency": "SGD",
            "balance": "17700.50",
            "ledgerBalance": "-2950.00",
            "updatedTime": "21-Mar 2018 04:08PM",
            "ledgers": [
                {
                    "currency": "EUR",
                    "balance": "50000.00",
                    "withdrawable": true,
                    "message": ""
                },
                {
                    "currency": "SGD",
                    "balance": "58031.28",
                    "withdrawable": true,
                    "message": ""
                },
                {
                    "currency": "THB",
                    "balance": "50000.00",
                    "withdrawable": false,
                    "message": "You are not allowed to withdraw <THB> via online withdrawal form"
                },
                {
                    "currency": "USD",
                    "balance": "455.00",
                    "withdrawable": true,
                    "message": ""
                }
            ],
            "termsAndCondition": "<ul><li>All Instructions for withdrawal are subject to the following terms & conditions:</li><li>The customer acknowledges and agrees that the withdrawal instructions shall not be taken to have been received or executed by Phillip Futures Pte Ltd (\"\"PFPL\"\") until he has received PFPL's confirmation of receipt of the withdrawal form.</li><li>PFPL shall not be obliged to effect the customer’s withdrawal instruction if, on the stipulated date, his trading account does not have sufficient funds to meet such withdrawal or the bank account specified by him is closed, frozen or inaccessible for any reason whatsoever.</li><li>The customer shall be solely responsible for ensuring the accuracy, adequacy and completeness of his withdrawal instructions and PFPL will not be obliged to verify the accuracy, adequacy and completeness of his instructions. PFPL shall not be responsible for any loss or damage suffered by him as a result of his instructions being inaccurate, inadequate or incomplete in any way.</li><li>Withdrawals, whether by way of telegraphic transfer or cheque, will only be paid out in the name of the account holder.</li><li>Countermand of any instructions for withdrawal will only be effected and will only be effective if it is received by PFPL in sufficient time for PFPL to accommodate such countermand and before PFPL has actually carried out the instructions which the customer intended to countermand. Any countermand of such instructions may be effected orally, in writing, by facsimile, by electronic mail or in person.</li><li>PFPL reserves the right <b><u>not to</u></b> execute the customer’s instructions at any time without prior notice to him and without assigning any reason whatsoever; PFPL shall not be responsible for any loss or damage suffered by the customer as a result.</li><li>Not withstanding the termination of the customer’s POEMS access, PFPL shall carry out any withstanding conversion instructions.</li><li>The customer agrees to indemnify PFPL in full against any claim, demand, action or proceeding which may be made against PFPL and/or any damage, liability, loss and expense including legal costs on a full indemnity basis which PFPL may incur or suffer directly or indirectly in acting upon any instructions which he may give in relation to any withdrawal or transfer due to the customer’s negligence, misconduct or breach of any term herein.</li><li>These terms and conditions are in addition to the Conditions Governing Phillip Futures Trading Accounts. PFPL reserves the right to add or vary any of these terms and conditions at any time at its discretion and such additions and/or variations shall be deemed to have effect on the date specified by PFPL.</li></ul>"
        }
    }
    

    Get client’s portfolio

    HTTP Request

    GET {url}/pmobile2/{product}/account/equitybalance

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for equity balance Object

    Equity Balance

    Property Description Type
    accountNo Account reference number String
    name Account name String
    currency Account base currency String
    balance Account balance String
    ledgerBalance Account ledger balance String
    updatedTime Equity balance last updated time String
    ledgers Account ledger balance breakdown
    PropertyDescriptionType
    currencyLedger currencyString
    balanceLedger balanceString
    withdrawableFlag whether the currency is allowed for Online Withdrawal via POEMS platformBoolean
    messageIf withdrawable is true, this message should be displayedString
    List
    termsAndCondition Terms and Condition details String

    Alerts

    Provide API functions to support the retrieval of Announcement, Account alerts and acknowledging alerts

    Announcement Alert

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 85abeaa6-dce2-8864-729f-8e66ce737278' \
      -H 'sessionid: 141C000A-7DCF-40ED-895E-2BF812CAC1A7' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "141C000A-7DCF-40ED-895E-2BF812CAC1A7")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "8245f9e1-acd8-c468-e036-ea4ebeddfbf1")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"141C000A-7DCF-40ED-895E-2BF812CAC1A7",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"02441600-ad20-d7fb-c8ea-94b744213aae" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "ff456d05-b867-9c02-6b04-64e77939694e");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "141C000A-7DCF-40ED-895E-2BF812CAC1A7");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '33ec6942-c965-dea0-ba29-24d515ff4fda',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '141C000A-7DCF-40ED-895E-2BF812CAC1A7',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/announcement?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '141C000A-7DCF-40ED-895E-2BF812CAC1A7'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '701990b7-17f9-93d9-8c5d-d245f25a6af7'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "timestamp": "20180326105214",
        "data": [
            {
                "id": "149",
                "time": "05 Dec 2017 12:00 AM SGT",
                "highlight": true,
                "detailURI": "/FX/alert/announcement/149",
                "product": "FX",
                "type": "announcement",
                "title": "Testing"
            },
            {
                "id": "147",
                "time": "01 Nov 2017 12:00 AM SGT",
                "highlight": true,
                "detailURI": "/FX/alert/announcement/147",
                "product": "FX",
                "type": "announcement",
                "title": "Testing _01112017"
            },
            {
                "id": "6",
                "time": "27 Oct 2017 12:00 AM SGT",
                "highlight": true,
                "detailURI": "/FX/alert/announcement/6",
                "product": "FX",
                "type": "announcement",
                "title": "E-statement delivery timing changes - DST In US"
            }
        ]
    }
    

    Get announcement alerts

    HTTP Request

    GET {ur}/pmobile2/{product}/alert/announcement

    Container Description Constraints Type
    {product} Product code FT
    FX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    timestamp Timestamp
    Optional : Yes
    Format : yyyyMMddHHmmss
    String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of announcement alert List

    Announcement Alert

    Property Description Type
    code Response code Integer
    id The announcement Id String
    title Announcement title. String
    time Announcement time. String
    hightlight Determines announcement read flag
    true - Announcement is read
    false - Announcement is not yet read
    Boolean
    product Product identifier String
    type Announcement String
    detailURI Announcement details URI String

    Announcement Detail

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 8c7125a5-2ee8-e65d-77d0-cb9fa62675cd' \
      -H 'sessionid: 141C000A-7DCF-40ED-895E-2BF812CAC1A7' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "141C000A-7DCF-40ED-895E-2BF812CAC1A7")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "854fdbb5-e5e6-1bd0-c17b-5ed60ed422a6")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"141C000A-7DCF-40ED-895E-2BF812CAC1A7",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"7a01070a-a6b5-f138-ad1e-b9e9202c9ea1" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "e4aae1bf-c592-6756-e0be-cffee1efa58d");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "141C000A-7DCF-40ED-895E-2BF812CAC1A7");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'bfddea42-02db-9550-3188-84b34f232d92',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '141C000A-7DCF-40ED-895E-2BF812CAC1A7',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/announcement/149?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '141C000A-7DCF-40ED-895E-2BF812CAC1A7'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '75e66119-c508-d73b-83ab-16618aaf4c50'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "data": {
            "id": "149",
            "content": "This is the testing for the FTFX Admin Enhancement.",
            "time": "05 Dec 2017 12:00 AM SGT",
            "product": "FT",
            "type": "announcement",
            "title": "Testing"
        }
    }
    

    Get announcement details

    HTTP Request

    GET {url}/{product}/alert/announcement/{alertID}

    Container Description Constraints Type
    {product} Product code FT
    FX
    String
    {alertID} Alert ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for announcement detail Object

    Announcement Detail

    Property Description Type
    code Response code Integer
    timestamp Timestamp String
    id The announcement Id String
    title Announcement title String
    content Announcement content String
    time Announcement time String
    product Product identifier String
    type Type announcement String

    Account Alert

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account?osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: ee582c47-2579-18bc-224d-292e7c597c89' \
      -H 'sessionid: DD630C2A-96E9-42D0-83A6-65F30DBFE950' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "DD630C2A-96E9-42D0-83A6-65F30DBFE950")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "6df9b109-cde9-a9f3-1310-0e7724cefc9c")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"DD630C2A-96E9-42D0-83A6-65F30DBFE950",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"09b1940d-6587-526c-f3f1-4cebe85410df" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "79f05224-112b-bffc-c237-a3eb89a506c3");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "DD630C2A-96E9-42D0-83A6-65F30DBFE950");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '88ffafb0-3248-6dbc-3925-3e584d3e9c08',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'DD630C2A-96E9-42D0-83A6-65F30DBFE950',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/alert/account?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = 'DD630C2A-96E9-42D0-83A6-65F30DBFE950'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'd1beb134-d139-9edc-13a4-db1ecbad6dbf'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "timestamp": "20180326112155",
        "data": {
            "marginCall": {
                "name": "TEST PURPOSE",
                "amount": "-124.53",
                "lastUpdated": "25 Aug 2017 12:00 AM SGT",
                "highLight": true
            },
            "fundDeficit": {
                "deficitAmount": [
                    {
                        "currency": "CHF",
                        "amount": "-650.00"
                    },
                    {
                        "currency": "NZD",
                        "amount": "-55.00"
                    }
                ],
                "lastUpdated": "25 Aug 2017 12:00 AM SGT",
                "highLight": true,
                "note": "You may wish to cover your deficit amount using FX Invest. Go to Menu > FXInvest. \n\n The amount does not take into account of your deficit which may arise form your existing open position or current day activities. Interest will be charged for deficit in any currencies on the Margin Excess / Deficiency Balance. Any excess amount in your account that has not been utilised for trading will earn interest. \n\n <a href=\"#\">Click here for more information on Credit Interest Rate</a> "
            },
            "forMoreInfo": "For more information on this account, please contact your Trading Representative. Alternatively, please call our Risk Control Desk at (65) 6531 1528 or our 24-HR Dealing Desk at (65) 6535 1155"
        }
    }
    

    Get account Fund Deficit and/or Margin Call alert

    HTTP Request

    GET {url}/pmobile2/{product}/alert/account

    Container Description Constraints Type
    {product} Product code FT
    FX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No
    timestamp Timestamp
    Constraints : yyyyMMddHHmmss(24 hours format)
    No String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    timestamp Alert Timestamp String
    data Response data container for account alert object

    Account Alert

    Property Description Type
    marginCall Container of margin call alert
    PropertyDescriptionType
    nameClient nameString
    amountMargin call amountString
    lastUpdatedLast date and time when margin call updatedString
    highLightFlag whether the alert is read or notBoolean
    Object
    fundDeficit Container of fund deficit
    PropertyDescriptionType
    deficitAmountList of fund deficits
    PropertyDescriptionType
    currencyFund deficit currencyString
    amountFund deficit amountString
    Object
    lastUpdatedLast date and time when margin call updatedString
    highLightFlag whether the alert is read or notBoolean
    noteFund deficit noteString
    Object
    forMoreInfo For more information note String

    Acknowledge Account Alert

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 60c033eb-93b9-4598-8011-ddd9f6b65e5f' \
      -H 'sessionid: DD630C2A-96E9-42D0-83A6-65F30DBFE950' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "DD630C2A-96E9-42D0-83A6-65F30DBFE950")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "a0c6dde3-f35c-894e-c4cd-d26e7fb49682")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "DD630C2A-96E9-42D0-83A6-65F30DBFE950")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "a0c6dde3-f35c-894e-c4cd-d26e7fb49682")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "86900eab-85e8-ee6c-343d-096ab68e0335");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "DD630C2A-96E9-42D0-83A6-65F30DBFE950");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '4c8d07e5-8716-394c-df52-4ffbabc0f1c6',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'DD630C2A-96E9-42D0-83A6-65F30DBFE950',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/alert/account/acknowledge")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = 'DD630C2A-96E9-42D0-83A6-65F30DBFE950'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '0cb76859-3054-2523-e034-dc27ec19f5de'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Account alert has been successfully acknowledged!"
    }
    

    Perform alert acknowledgement to account alert

    HTTP Request

    POST {url}/pmobile2/{product}/alert/account/acknowledge

    Container Description Constraints Type
    {product} Product code FT
    FX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    timestamp Current date and time of acknowledgement from frontend
    Constraints : yyyyMMddHHmmss (24 hours format)
    Yes String
    remarks Acknowledgement remarks
    Constraints : Max 50 characters
    No String

    Response

    Property Description Type
    code Response code Integer
    msg Acknowledgement response message String

    Contract

    Contract Details

    Sample Request for Futures

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/contract?counterIDs=FT%2FBURSA%2FBURSA%2FFGLDF18&price=1&language=1&language=1&osVersion=7.1.1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 711fed37-b481-7dc1-2d00-9044d86d8557' \
      -H 'sessionid: 1675FF99-77A0-4AA5-886C-FA9A52987F0F' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/contract?counterIDs=FT%2FBURSA%2FBURSA%2FFGLDF18&price=1&language=1&language=1&osVersion=7.1.1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "1675FF99-77A0-4AA5-886C-FA9A52987F0F")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "44ff2eb9-688e-f3db-188f-4b88d2318904")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"1675FF99-77A0-4AA5-886C-FA9A52987F0F",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"22f05a0c-376a-69c3-e40d-a9438d59f80e" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/contract?counterIDs=FT%2FBURSA%2FBURSA%2FFGLDF18&price=1&language=1&language=1&osVersion=7.1.1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/contract?counterIDs=FT%2FBURSA%2FBURSA%2FFGLDF18&price=1&language=1&language=1&osVersion=7.1.1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "9377a7cf-1a96-a432-59cb-0f2d02144014");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "1675FF99-77A0-4AA5-886C-FA9A52987F0F");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/contract');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterIDs' => 'FT/BURSA/BURSA/FGLDF18',
      'price' => '1',
      'language' => array(
        '1',
        '1'
      ),
      'osVersion' => '7.1.1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'c8372360-a8f3-9c77-baa1-c90110e8b0dc',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '1675FF99-77A0-4AA5-886C-FA9A52987F0F',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/contract?counterIDs=FT%2FBURSA%2FBURSA%2FFGLDF18&price=1&language=1&language=1&osVersion=7.1.1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '1675FF99-77A0-4AA5-886C-FA9A52987F0F'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '670b2e0f-9f51-962c-0b4e-f66540e73b0c'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for Futures

    {
        "code": 1,
        "data": [
            {
                "productIcon": "FUT",
                "product": "FT",
                "market": "BURSA",
                "exchange": "BURSA",
                "exchageDisplay": "BURSA",
                "symbol": "FGLDF18",
                "code": "FGLDF18",
                "counterId": "FT/BURSA/BURSA/FGLDF18",
                "name": "BURSA GOLD FUTURES (E) - JAN 2018",
                "pmpTopic": "\\PATSFeeder\\[BURSA]FGLDF18R",
                "disabled": false,
                "delayIndicator": null,
                "commodityCode": "FGLD",
                "month": 1,
                "year": 2018,
                "monthYear": "JAN 2018",
                "tickSize": 0.05,
                "preSettlementPrice": 166.7,
                "initialMargin": 900,
                "maintenanceMargin": 800,
                "marginCurrency": "MYR",
                "tickNumerator": 5,
                "tickDenominator": 100,
                "isEnabled": true,
                "orderTypes": [
                    2,
                    4
                ],
                "price": {
                    "bid": "0",
                    "ask": "0",
                    "open": "168.1",
                    "high": "168.1",
                    "low": "168.1",
                    "close": "-",
                    "lastDone": "168.1",
                    "change": "-0.55",
                    "percentChange": "-",
                    "bVolK": "0",
                    "sVolK": "0",
                    "volK": "1",
                    "time": "04/02"
                }
            }
        ]
    }
    

    Sample Request for Forex

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/contract?counterIDs=FX%2FFX%2FFX%2FGLDUSD&price=1&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 0fe90288-8b85-ea76-871d-09eff9f37a5c' \
      -H 'sessionid: 55E54434-2138-4605-8E11-4FF816883D5C' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/contract?counterIDs=FX%2FFX%2FFX%2FGLDUSD&price=1&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "55E54434-2138-4605-8E11-4FF816883D5C")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "f46b54f0-2388-b399-93a7-a8d09ff2709e")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"55E54434-2138-4605-8E11-4FF816883D5C",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"bbe7cf8a-d26a-26ef-50aa-a9208fd9043f" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/contract?counterIDs=FX%2FFX%2FFX%2FGLDUSD&price=1&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/contract?counterIDs=FX%2FFX%2FFX%2FGLDUSD&price=1&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "031def84-b5ba-884c-9bcb-73d6c50089bf");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "55E54434-2138-4605-8E11-4FF816883D5C");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/contract');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterIDs' => 'FX/FX/FX/GLDUSD',
      'price' => '1',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '835bd015-03da-ecd1-25e7-15f2e51ec637',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '55E54434-2138-4605-8E11-4FF816883D5C',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/contract?counterIDs=FX%2FFX%2FFX%2FGLDUSD&price=1&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '55E54434-2138-4605-8E11-4FF816883D5C'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '9a95340a-1eb0-b445-6a6e-3e6b49af8769'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for Forex

    {
        "code": 1,
        "data": [
            {
                "productIcon": "REG\r\nFX",
                "product": "FX",
                "market": "FX",
                "exchange": "FX",
                "exchageDisplay": "FX",
                "symbol": "GLDUSD",
                "code": "GLDUSD",
                "counterId": "FX/FX/FX/GLDUSD",
                "name": "Loco London Gold",
                "pmpTopic": "\\FX100KFeeder\\GLDUSD[1]",
                "disabled": false,
                "delayIndicator": null,
                "feedCode": "USDGL",
                "productType": 0,
                "spread": 7,
                "lotSize": "100",
                "displayLotSize": "100",
                "displayUnit": "OZ",
                "displayLotSizeAndUnit": " X 100OZ",
                "tickSize": 0.05,
                "spTickSize": 0.01,
                "highlightStartPosition": 1,
                "highlightLengthOfCharacters": 2,
                "noOfDecimalsDisplay": 2,
                "priceRequestId": "GLDUSD[1]",
                "price": {
                    "bid": "1329.12",
                    "ask": "1329.47",
                    "open": "1325.8",
                    "high": "1366.1",
                    "low": "1212.6",
                    "close": "0",
                    "time": "10:44"
                }
            }
        ]
    }
    

    Get Futures, Forex (Regular/Mini) and FXInvest contract details

    HTTP Request

    GET {url}/pmobile2/{product}/contract?counterIDs=&price=

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited counters ID’s
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    Futures - FT/BURSA/BURSA/FGLDG17
    Forex (Reg) – FX/FX/FX/EURUSD
    Forex (Mini) – FXMN/FX/FXMN/AUDCAD
    FXInvest - NFX/NFX/NFX/AUDJPY
    Yes String
    price Flag to determine whether to include contract price
    1 - (true) Will include contract price
    0 - (false) Will NOT include contract price
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for Futures or Forex counter details Object

    Futures Counter Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchageDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products
    Format : {product}/{market}/{exchange}/{counterID}
    String
    name Contract display name String
    pmpTopic Contract topic name for subscribing to PMP String
    disabled Flag that determines whether the client request the request has access or the contract has been disabled

    true - Client has no access to the contract or the contract has already disabled/expired

    false - Client has access to the contract or the contract is NOT disabled / expired
    Boolean
    delayIndicator Delay indicator. Not applicable for FT/FX/FXMN/NFX contracts String
    commodityCode Contract commodity code String
    month Contract month Integer
    year Contract year Integer
    monthYear Combination of month and year properties String
    commodity Contract commodity code String
    ticksize Contract tick size Decimal
    preSettlementPrice Contract pre-settlement price Decimal
    initialMargin Contract initial margin Decimal
    maintenanceMargin Contract maintenance margin Decimal
    marginCurrency Contract margin currency String
    tickNumerator Contract tick numerator Decimal
    tickDenominator Contract tick denominator Decimal
    isEnabled Flag whether the contract is enabled or disabled Boolean
    orderTypes List of order types applicable for the future contract List of Integer
    price Futures contract price snapshot details
    PropertyDescriptionType
    bidBid priceString
    askAsk priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    lastDoneLast done priceString
    changeChangeString
    percentageChangePercentage changeString
    bVolKBuy volumeString
    sVolKSell volumeString
    volKTotal volumeString
    timePrice time updatedString
    Object

    Forex Counter Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchageDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products
    Format : {product}/{market}/{exchange}/{counterID}
    String
    name Contract display name String
    pmpTopic Contract topic name for subscribing to PMP String
    disabled Flag that determines whether the client request the request has access or the contract has been disabled

    true - Client has no access to the contract or the contract has already disabled/expired
    false - Client has access to the contract or the contract is NOT disabled / expired
    Boolean
    delayIndicator Delay indicator. Not applicable for FT/FX/FXMN/NFX contracts String
    feedCode Contract feed code String
    productType Forex contract product type Integer
    spread Contract calculated spread Decimal
    lotSize Contract lot size String
    displayLotSize Contract display lot size String
    displayUnit Contract display unit String
    displayLotSizeAndUnit Combination of displayLotSize and displayUnit properties Eg. “ x 10K” String
    tickSize Contract tick size Decimal
    spTickSize Contract SP tick size Decimal
    highlightStartPosition Highlight start position indicator. This indicator tells from which would the price decimal should be highlighted Integer
    highlightLengthOfCharacters Highlight length of characters. Indicator of how many characters should be highlighted from the price decimals Integer
    noOfDecimalsDisplay Contract number of decimal display indicator Integer
    priceRequestId Contract price request ID String
    price Futures contract price snapshot details
    PropertyDescriptionType
    bidBid priceString
    askAsk priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timePrice time updatedString
    Object

    Chart

    Provide API function to support the retrieval of chart data for Futures/Forex

    Get chart data

    Sample Request for FX or FXMN

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/chart?counterID=FX%2FFX%2FFX%2FAUDJPY&interval=3&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 262d56f2-f9da-7a0a-a51a-e8c11ae8bc21' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/chart?counterID=FX%2FFX%2FFX%2FAUDJPY&interval=3&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "308060d2-6cbd-a7dd-7fba-605cc8645552")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"26f97550-c333-55ed-6dbc-8809c5b488e6" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/chart?counterID=FX%2FFX%2FFX%2FAUDJPY&interval=3&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/chart?counterID=FX%2FFX%2FFX%2FAUDJPY&interval=3&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "4293fa52-f4a7-cc4b-6565-0a31a84cb00c");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/chart');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterID' => 'FX/FX/FX/AUDJPY',
      'interval' => '3',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'f620d889-19e2-f44f-3014-b1d5402fd154',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/chart');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterID' => 'FX/FX/FX/AUDJPY',
      'interval' => '3',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '7ebe52be-35f0-63da-c1fc-5510743fc41b',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    

    Sample Response for FX and FXMN

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "dttm": "2018-01-31 01:00:00",
                "time": 1517331600000,
                "open": "87.92",
                "high": "87.95",
                "low": "87.88",
                "close": "87.94"
            },
            {
                "dttm": "2018-01-31 00:45:00",
                "time": 1517330700000,
                "open": "87.93",
                "high": "87.96",
                "low": "87.9",
                "close": "87.92"
            }
        ]
    }
    

    Sample Request for FT

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/chart?counterID=FT%2FBURSA%2FBURSA%2FFGLDF18&interval=1&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: f21f3d70-ba13-0679-cde6-b271c4a5350e' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/chart?counterID=FT%2FBURSA%2FBURSA%2FFGLDF18&interval=1&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "4e7c14d4-72a7-f07d-73af-64dff3540c56")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"0474abf1-a7d9-9c9e-22b3-f10065dd7d50" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/chart?counterID=FT%2FBURSA%2FBURSA%2FFGLDF18&interval=1&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/chart?counterID=FT%2FBURSA%2FBURSA%2FFGLDF18&interval=1&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "c1dde6f9-f0d2-4b6f-1330-20d736786247");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/chart');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterID' => 'FT/BURSA/BURSA/FGLDF18',
      'interval' => '1',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '81109149-17b1-2ec6-5c8e-9bd757fd30aa',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/chart?counterID=FT%2FBURSA%2FBURSA%2FFGLDF18&interval=1&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '7c3e9806-bafd-5d7a-9c2a-8c61b672dcd4'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for FT

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "dttm": "2018-01-30 18:58:00",
                "time": 1517309880000,
                "open": "168.1",
                "high": "168.1",
                "low": "168.1",
                "close": "168.1",
                "volume": "0"
            },
            {
                "dttm": "2018-01-30 18:57:00",
                "time": 1517309820000,
                "open": "168.1",
                "high": "168.1",
                "low": "168.1",
                "close": "168.1",
                "volume": "0"
            }
        ]
    }
    

    Get FT and FX contract chart data

    HTTP Request

    GET {url}/pmobile2/{product}/chart

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterID Contract counters Id
    Format : product/market/exchange/counterID
    Eg : FX/FX/FX/EURUSD
    Yes String
    interval Indicator for the chart interval
    1 - Minutely
    2 - Five minutes
    3 - Fifteen minutes
    4 - Thirty minutes
    5 - Hourly
    6 - Daily
    7 - Weekly
    8 - Monthly
    1 No Integer
    Interval Id Interval Description No. of chart data
    1 Minutely 2880
    2 Five minutes 1152
    3 Fifteen minutes 960
    4 Thirty minutes 960
    5 Hourly 960
    6 Daily 365
    7 Weekly 52
    8 Monthly 12

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for list of Futures and/or Forex chart data object

    Futures Chart Data

    Property Description Type
    dttm Chart Date time in string String
    time UTC time in milliseconds String
    open Open price String
    close Close price String
    high Highest price String
    low Lowest price String
    volume Volume String

    Forex Chart Data

    Property Description Type
    dttm Chart Date time in string String
    time UTC time in milliseconds String
    open Open price String
    close Close price String
    high Highest price String
    low Lowest price String

    FXInvest

    Provide API functions to support the FXInvest such as watchlist, validate/submit order, amend, withdrawal, order history/order details retrieval

    Search Contract

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd?count=2&osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 0f3ee572-cb9e-d30a-c2a5-3c407956214c' \
      -H 'sessionid: 73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd?count=2&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "c002c6d4-aae9-5508-0e6c-5a43d1dec86a")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"abf8d1a2-7769-aae2-9930-6d1779a17ba1" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd?count=2&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd?count=2&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "28e5e0a9-f9d4-61ed-72a5-c9828a2ac1cb");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'count' => '2',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '15122e76-1a8b-36af-11b1-14872a1eff31',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/contract/search/usd?count=2&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '73C80C5C-8195-4E83-BBA5-80DD5B3AFC5B'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'a65d65a1-3dd3-d0ca-7edf-22d2dd4db162'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "counterList": [
            {
                "productIcon": "NFX",
                "product": "NFX",
                "market": "NFX",
                "exchange": "NFX",
                "exchangeDisplay": "NFX",
                "symbol": "USDCAD",
                "code": "USDCAD",
                "counterID": "NFX/NFX/NFX/USDCAD",
                "name": "USD/CAD",
                "pmpTopic": "\\FXInvestFeeder\\[NFX]CADUS",
                "disabled": false,
                "delayIndicator": null,
                "rank": 1
            },
            {
                "productIcon": "NFX",
                "product": "NFX",
                "market": "NFX",
                "exchange": "NFX",
                "exchangeDisplay": "NFX",
                "symbol": "USDCHF",
                "code": "USDCHF",
                "counterID": "NFX/NFX/NFX/USDCHF",
                "name": "USD/CHF",
                "pmpTopic": "\\FXInvestFeeder\\[NFX]CHFUS",
                "disabled": false,
                "delayIndicator": null,
                "rank": 1
            }
        ]
    }
    

    Search FXInvest contract

    HTTP Request

    GET {url}/pmobile2/NFX/contract/search/{keyword}

    Container Description Constraints Type
    {keyword} Search keyword String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    count Result count number 10 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    counterList List of counters List

    Counter

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchangeDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products
    Format : {product}/{market}/{exchange}/{counterID}
    String
    name Contract display name String
    pmpTopic Contract topic name for subscribing to PMP String
    disabled Flag that determines whether the client request the request has access or the contract has been disabled

    true - Client has no access to the contract or the contract has already disabled/expired

    false - Client has access to the contract or the contract is NOT disabled / expired
    Boolean
    delayIndicator Delay indicator
    Not applicable for NFX contracts
    String
    rank Result rank Integer

    Get Watchlist

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist?osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: bcab6899-56f0-5382-aee9-de22a0a00177' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "e4dda75a-cea7-a418-ab8c-58261441d767")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"f316f5ed-8be3-5a68-0cc2-5e70ac8de085" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "eb6852e9-f026-eff2-830a-189e4c4cb00e");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '02c84983-dad6-af89-45eb-ebbc1d646469',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'e6d80f5a-57d8-4a0e-1edb-ddf619307030'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "watchlistID": 1,
                "watchlistName": "Watchlist 1",
                "counterListURI": "/NFX/watchlist/1",
                "index": 1
            },
            {
                "watchlistID": 2,
                "watchlistName": "Watchlist 2",
                "counterListURI": "/NFX/watchlist/2",
                "index": 2
            },
            {
                "watchlistID": 3,
                "watchlistName": "Watchlist 3",
                "counterListURI": "/NFX/watchlist/3",
                "index": 3
            },
            {
                "watchlistID": 4,
                "watchlistName": "Watchlist 4",
                "counterListURI": "/NFX/watchlist/4",
                "index": 4
            },
            {
                "watchlistID": 5,
                "watchlistName": "Watchlist 5",
                "counterListURI": "/NFX/watchlist/5",
                "index": 5
            }
        ],
        "needDisclaimer": true,
        "disclaimers": [
            "All prices shown on “FX Invest” module are indicative, and subjected to market fluctuations. FX Invest Prices may not be present at certain time period based on the liquidity of the contract and market conditions. PFPL shall not be under any obligation to account to the Customer for any unsent orders or orders not done."
        ]
    }
    

    Get FXInvest watchlist

    HTTP Request

    GET {url}/pmobile2/NFX/watchlist

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container for the list of FXInvest watchlist List

    FXInvest Watchlist

    Property Description Type
    watchlistID Watch list id Integer
    watchlistName Watch list name String
    counterListURI Watch list Detail URI String
    index Watch list order number Integer

    Rename Watchlist

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1 \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 7eb4c435-ebd3-99d2-c993-824228a5b6ce' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ad2433d9-ef94-9ad7-82e7-6d38b8073b0f")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ad2433d9-ef94-9ad7-82e7-6d38b8073b0f")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "39ae3405-0dc1-d053-76ce-7244f09dd076");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '1e769e9f-ac68-318d-af7c-a27821d7185b',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/rename/1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '1e9d1b01-4488-6afe-54f8-bf25fa51aed2'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "watchlistId": 1,
            "watchlistName": "Watchlist 1",
            "counters": [
                {
                    "name": "AUD/NZD",
                    "baseCurrency": "AUD",
                    "quoteCurrency": "NZD",
                    "code": "AUDNZD",
                    "index": 1,
                    "symbol": "AUDNZD",
                    "feedCode": "NZDAS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/AUDNZD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]NZDAS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.0654",
                    "bid": "1.0619",
                    "open": "1.0646",
                    "high": "1.1111",
                    "low": "1.061",
                    "close": "1.062",
                    "time": "05:01:02"
                },
                {
                    "name": "USD/CNH (View Only)",
                    "baseCurrency": "USD",
                    "quoteCurrency": "CNH",
                    "code": "USDCNH",
                    "index": 2,
                    "symbol": "USDCNH",
                    "feedCode": "CNHUS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/USDCNH",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]CNHUS",
                    "isTradable": false,
                    "isTradableMessage": "You are not allowed to trade for this contract",
                    "ask": "6.3113",
                    "bid": "6.3073",
                    "open": "6.3377",
                    "high": "6.5804",
                    "low": "6.2539",
                    "close": "6.3116",
                    "time": "04:58:00"
                },
                {
                    "name": "EUR/USD",
                    "baseCurrency": "EUR",
                    "quoteCurrency": "USD",
                    "code": "EURUSD",
                    "index": 3,
                    "symbol": "EURUSD",
                    "feedCode": "USDVS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/EURUSD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]USDVS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.2404",
                    "bid": "1.2304",
                    "open": "1.2271",
                    "high": "1.2394",
                    "low": "1.219",
                    "close": "1.2316",
                    "time": "05:00:08"
                }
            ]
        }
    }
    

    Rename FXInvest watchlist name

    HTTP Request

    POST {url}/pmobile2/NFX/watchlist/rename/{watchListID}

    Container Description Constraints Type
    {watchListID} FXInvest watch list ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    watchlistName New watchlist name Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Sort Watchlist

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2 \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: e0842aeb-2381-ac13-352f-e6c7ce5f254d' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "aacbb23f-58fc-5fb4-0ad5-80ba61cb405a")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "aacbb23f-58fc-5fb4-0ad5-80ba61cb405a")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "1c4b0947-f32c-ede0-04ea-9e4c15e2b8a1");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => 'd3d632ab-07a1-adab-3300-af454c30b1b9',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/sort/2")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '7021e421-36d1-5d69-69cf-8d42afb0950b'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful",
        "data": {
            "watchlistId": 2,
            "watchlistName": "Watchlist 2",
            "counters": [
                {
                    "name": "AUD/NZD",
                    "baseCurrency": "AUD",
                    "quoteCurrency": "NZD",
                    "code": "AUDNZD",
                    "index": 1,
                    "symbol": "AUDNZD",
                    "feedCode": "NZDAS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/AUDNZD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]NZDAS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.0654",
                    "bid": "1.0619",
                    "open": "1.0646",
                    "high": "1.1111",
                    "low": "1.061",
                    "close": "1.062",
                    "time": "05:01:02"
                },
                {
                    "name": "EUR/GBP",
                    "baseCurrency": "EUR",
                    "quoteCurrency": "GBP",
                    "code": "EURGBP",
                    "index": 2,
                    "symbol": "EURGBP",
                    "feedCode": "GBPVS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/EURGBP",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]GBPVS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "0.8816",
                    "bid": "0.8666",
                    "open": "0.8654",
                    "high": "0.8894",
                    "low": "0.8602",
                    "close": "0.8671",
                    "time": "05:00:13"
                }
            ]
        }
    }
    

    Sort FXInvest watchlist items and return the updated watchlist

    HTTP Request

    POST {url}/NFX/watchlist/sort/{watchListID}

    Container Description Constraints Type
    {watchListID} FXInvest watch list ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    NFX/NFX/NFX/AUDJPY
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Get Watchlist Details by ID

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2?osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 8ae4e607-fccc-6c80-da51-aadf5973bfd0' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ee8212a4-9375-6b3c-c105-4fa27f9bcabf")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"44a8c151-ea3f-e98e-3aa4-d750daf1058d" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "0a49f76f-4206-18f5-b1d1-3b951eac77f0");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'bd9c859e-c2d1-ceda-43e3-c9cddc777a7f',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/2?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '1d80ec68-0c8e-d8d7-d00b-a94d65c34f46'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "watchlistId": 1,
            "watchlistName": "Watchlist 1",
            "counters": [
                {
                    "name": "AUD/NZD",
                    "baseCurrency": "AUD",
                    "quoteCurrency": "NZD",
                    "code": "AUDNZD",
                    "index": 1,
                    "symbol": "AUDNZD",
                    "feedCode": "NZDAS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/AUDNZD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]NZDAS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.0654",
                    "bid": "1.0619",
                    "open": "1.0646",
                    "high": "1.1111",
                    "low": "1.061",
                    "close": "1.062",
                    "time": "05:01:02"
                },
                {
                    "name": "USD/CNH (View Only)",
                    "baseCurrency": "USD",
                    "quoteCurrency": "CNH",
                    "code": "USDCNH",
                    "index": 2,
                    "symbol": "USDCNH",
                    "feedCode": "CNHUS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/USDCNH",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]CNHUS",
                    "isTradable": false,
                    "isTradableMessage": "You are not allowed to trade for this contract",
                    "ask": "6.3113",
                    "bid": "6.3073",
                    "open": "6.3377",
                    "high": "6.5804",
                    "low": "6.2539",
                    "close": "6.3116",
                    "time": "04:58:00"
                }
            ]
        }
    }
    

    Get FXInvest watch list details by ID

    HTTP Request

    GET {url}/pmobile2/NFX/watchlist/{watchListID}

    Container Description Constraints Type
    {watchListID} FXInvest watch list ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Add Counter to Watchlist

    Sample Request

    curl -X POST \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1?counterIDs=NFX%2FNFX%2FNFX%2FEURUSD' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'language: 1' \
      -H 'osversion: 7.1.1' \
      -H 'postman-token: 813ac562-3361-012f-d83a-061942c79687' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1?counterIDs=NFX%2FNFX%2FNFX%2FEURUSD")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("osversion", "7.1.1")
      .addHeader("language", "1")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "5178055d-e30d-7f37-4c41-56f3600ccb0d")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"content-type": @"application/x-www-form-urlencoded",
                               @"osversion": @"7.1.1",
                               @"language": @"1",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"18567c3a-bdd6-c72f-1bd3-9113ca1dd341" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1?counterIDs=NFX%2FNFX%2FNFX%2FEURUSD"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"POST"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1?counterIDs=NFX%2FNFX%2FNFX%2FEURUSD");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "04ad0a14-2799-8f9f-71c0-5db27e423a51");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("language", "1");
    request.AddHeader("osversion", "7.1.1");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setQueryData(array(
      'counterIDs' => 'NFX/NFX/NFX/EURUSD'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '8732a921-03f5-ef4b-e973-978016212e4d',
      'cache-control' => 'no-cache',
      'language' => '1',
      'osversion' => '7.1.1',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/add/1?counterIDs=NFX%2FNFX%2FNFX%2FEURUSD")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["osversion"] = '7.1.1'
    request["language"] = '1'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '6b32cf93-db9e-70f1-db05-0c2742b8c262'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "EUR/USD added to Watchlist 1",
        "data": {
            "watchlistId": 1,
            "watchlistName": "Watchlist 1",
            "counters": [
                {
                    "name": "AUD/NZD",
                    "baseCurrency": "AUD",
                    "quoteCurrency": "NZD",
                    "code": "AUDNZD",
                    "index": 1,
                    "symbol": "AUDNZD",
                    "feedCode": "NZDAS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/AUDNZD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]NZDAS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.0654",
                    "bid": "1.0619",
                    "open": "1.0646",
                    "high": "1.1111",
                    "low": "1.061",
                    "close": "1.062",
                    "time": "05:01:02"
                },
                {
                    "name": "USD/CNH (View Only)",
                    "baseCurrency": "USD",
                    "quoteCurrency": "CNH",
                    "code": "USDCNH",
                    "index": 2,
                    "symbol": "USDCNH",
                    "feedCode": "CNHUS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/USDCNH",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]CNHUS",
                    "isTradable": false,
                    "isTradableMessage": "You are not allowed to trade for this contract",
                    "ask": "6.3113",
                    "bid": "6.3073",
                    "open": "6.3377",
                    "high": "6.5804",
                    "low": "6.2539",
                    "close": "6.3116",
                    "time": "04:58:00"
                },
                {
                    "name": "EUR/USD",
                    "baseCurrency": "EUR",
                    "quoteCurrency": "USD",
                    "code": "EURUSD",
                    "index": 3,
                    "symbol": "EURUSD",
                    "feedCode": "USDVS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/EURUSD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]USDVS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.2404",
                    "bid": "1.2304",
                    "open": "1.2271",
                    "high": "1.2394",
                    "low": "1.219",
                    "close": "1.2316",
                    "time": "05:00:08"
                }
            ]
        }
    }
    

    Add counter to FXInvest watch list and return updated watchlist

    HTTP Request

    POST {url}/pmobile2/NFX/watchlist/add/{watchListID}

    Container Description Constraints Type
    {watchListID} FXInvest watch list ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    NFX/NFX/NFX/AUDJPY
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Remove Counter from Watchlist

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1 \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 5803ea5f-4de8-0d81-653b-f7a662069594' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ad94d0bd-cdc0-baf9-ad54-46c826e62d17")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ad94d0bd-cdc0-baf9-ad54-46c826e62d17")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "15332f78-9e97-b422-cf65-a3166f1b2390");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '53c4a3fc-4a5b-db5a-64f2-45d360804130',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/remove/1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '92558e4e-cf5f-0cba-4e65-0e50ca5a69b6'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Instrument deleted from watchlist",
        "data": {
            "watchlistId": 1,
            "watchlistName": "My Watchlist",
            "counters": [
                {
                    "name": "AUD/NZD",
                    "baseCurrency": "AUD",
                    "quoteCurrency": "NZD",
                    "code": "AUDNZD",
                    "index": 1,
                    "symbol": "AUDNZD",
                    "feedCode": "NZDAS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/AUDNZD",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]NZDAS",
                    "isTradable": true,
                    "isTradableMessage": "",
                    "ask": "1.0654",
                    "bid": "1.0619",
                    "open": "1.0646",
                    "high": "1.1111",
                    "low": "1.061",
                    "close": "1.062",
                    "time": "05:01:02"
                },
                {
                    "name": "USD/CNH (View Only)",
                    "baseCurrency": "USD",
                    "quoteCurrency": "CNH",
                    "code": "USDCNH",
                    "index": 2,
                    "symbol": "USDCNH",
                    "feedCode": "CNHUS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/USDCNH",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]CNHUS",
                    "isTradable": false,
                    "isTradableMessage": "You are not allowed to trade for this contract",
                    "ask": "6.3113",
                    "bid": "6.3073",
                    "open": "6.3377",
                    "high": "6.5804",
                    "low": "6.2539",
                    "close": "6.3116",
                    "time": "04:58:00"
                }
            ]
        }
    }
    

    Remove/Delete counter from FXInvest watch list and return updated watch list

    HTTP Request

    POST {url}/pmobile2/NFX/watchlist/remove/{watchListID}

    Container Description Constraints Type
    {watchListID} FXInvest watch list ID 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    NFX/NFX/NFX/AUDJPY
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Move Counters to another Watchlist

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 6b63aa79-720f-e885-a208-218cdc87d9d7' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "7bf38dc5-1770-382d-e16f-16a796bb17aa")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "7bf38dc5-1770-382d-e16f-16a796bb17aa")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "b4fdea81-0c34-28e2-f0a5-133771c59a6d");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '1ea310d0-9d2b-609d-5a38-ac41721826d6',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/watchlist/move")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '64b3397c-337b-a8b7-d696-0f68065baa40'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Instruments moved to Watchlist 2",
        "data": {
            "watchlistId": 1,
            "watchlistName": "My Watchlist",
            "counters": [
                {
                    "name": "USD/CNH (View Only)",
                    "baseCurrency": "USD",
                    "quoteCurrency": "CNH",
                    "code": "USDCNH",
                    "index": 1,
                    "symbol": "USDCNH",
                    "feedCode": "CNHUS",
                    "product": "NFX",
                    "exchange": "NFX",
                    "exchangeDisplay": "NFX",
                    "market": "NFX",
                    "counterID": "NFX/NFX/NFX/USDCNH",
                    "pmpTopic": "\\FXInvestFeeder\\[NFX]CNHUS",
                    "isTradable": false,
                    "isTradableMessage": "You are not allowed to trade for this contract",
                    "ask": "6.3113",
                    "bid": "6.3073",
                    "open": "6.3377",
                    "high": "6.5804",
                    "low": "6.2539",
                    "close": "6.3116",
                    "time": "04:58:00"
                }
            ]
        }
    }
    

    Move counters from one watch list to another FXInvest watch list and return updated watch list

    HTTP Request

    POST {url}/pmobile2/NFX/watchlist/move

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    NFX/NFX/NFX/AUDJPY
    Yes String
    fromWatchlistID Source watchlist Yes Integer
    toWatchlistID Destination watchlist Yes Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of FXInvest watchlist detail Object

    FXInvest Watchlist Detail

    Property Description Type
    watchlistId Watch list ID Integer
    watchlistName Watch list name String
    counters List of watchlist items
    PropertyDescriptionType
    nameContract nameString
    codeContract codeString
    indexOrder numberInteger
    symbolContract symbolString
    feedCodeContract feed codeString
    productProduct nameString
    exchangeExchange codeString
    exchangeDisplayExchange displayString
    marketContract marketString
    counterIDContract counter IdString
    pmpTopicPMP topic nameString
    isTradableFlag, whether contract is allowed for conversionBoolean
    isTradableMessageMessage is contract is not allowed for conversion If isTradable is false, display this messageString
    askAsk PriceString
    bidBid priceString
    openOpen priceString
    highHigh priceString
    lowLow priceString
    closePrevious close priceString
    timeLast update timeString
    List

    Validate Currency Ledger Balance

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger?currency=USD&osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 9abb433e-7edf-db36-5b18-c60e3eb107d8' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger?currency=USD&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "fe255727-c3ef-03d0-b26c-c84a76eb4d60")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"696ac0e4-e7a2-2612-8f0b-3649153e8f57" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger?currency=USD&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"696ac0e4-e7a2-2612-8f0b-3649153e8f57" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger?currency=USD&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'currency' => 'USD',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '1cba7e2e-824e-6b32-f400-0bc16ee7c201',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validateledger?currency=USD&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'ab4e4d33-724a-0dd0-7455-9869d7ba1447'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "hasAvailableFund": true,
        "validationMessage": ""
    }
    

    Performs checking whether account has available currency available ledger balance

    HTTP Request

    GET {url}/pmobile2/NFX/conversion/validateledger

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    currency Currency symbol to be check if has available ledger balance
    Eg. USD
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    hasAvailableFund Flag if the account has available fund for the currency ledger String
    validationMessage Validation message String

    Get FXInvest Trading Info

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo?counterID=NFX%2FNFX%2FNFX%2FUSDSGD&currency=USD&osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 6e9725c6-4279-37bb-d116-75177bea1385' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo?counterID=NFX%2FNFX%2FNFX%2FUSDSGD&currency=USD&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "c395a96f-7dd3-41ca-103f-bd2d8058ceff")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"05bf38fd-b431-4ddd-5e61-82bde236db56" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo?counterID=NFX%2FNFX%2FNFX%2FUSDSGD&currency=USD&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo?counterID=NFX%2FNFX%2FNFX%2FUSDSGD&currency=USD&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "5249a569-21c7-5b10-c4ea-4a1e4e3f3a65");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterID' => 'NFX/NFX/NFX/USDSGD',
      'currency' => 'USD',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'bba630e4-d1ee-5a40-d5a9-39e7f4504fd3',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/tradeinfo?counterID=NFX%2FNFX%2FNFX%2FUSDSGD&currency=USD&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '0415c7b4-ea08-7aa4-da74-981c46e5ff5c'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "name": "USD/SGD",
            "symbol": "USDSGD",
            "counterID": "NFX/NFX/NFX/USDSGD",
            "feedCode": "SGDUS",
            "currency": "SGD",
            "pmpTopic": "\\FXInvestFeeder\\USDSGD",
            "unitMultiplier": 1,
            "tickSize": "0.0001",
            "noOfDecimalsDisplay": 4,
            "askPrice": "1.3169",
            "bidPrice": "1.3144",
            "orderTypes": [
                {
                    "value": 1,
                    "text": "Market"
                },
                {
                    "value": 2,
                    "text": "Limit"
                }
            ],
            "actions": [
                {
                    "value": 1,
                    "text": "BUY"
                },
                {
                    "value": 0,
                    "text": "SELL"
                }
            ],
            "ledgerBalances": [
                {
                    "currency": "USD",
                    "ledgerBalance": "455.00",
                    "isTransactionAllowed": true,
                    "message": ""
                },
                {
                    "currency": "SGD",
                    "ledgerBalance": "58031.28",
                    "isTransactionAllowed": true,
                    "message": ""
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Get FXInvest contract trading information

    HTTP Request

    GET {url}/pmobile2/NFX/conversion/tradeinfo

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Eg:
    NFX/NFX/NFX/AUDJPY
    Yes String
    currency 3 characters currency symbol
    Eg:
    For currency pair USDSGD
    If Bid price is tapped from watchlist, currency is USD
    If Ask price is tapped from watchlist, currency is SGD
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Resposen data container of FXInvest trading info Object

    FXInvest Trading Info

    Property Description Type
    name Contract name String
    symbol Contract symbol String
    counterID Contract counter ID String
    feedCode Contract feed code String
    currency Contract currency String
    pmpTopic Contract PMP Topic String
    unitMultiplier Contract unit multiplier Decimal
    tickSize Contract tick size String
    noOfDecimalsDisplay Contract price decimal limit Integer
    askPrice Contract static ask price String
    bidPrice Contract static bid price String
    orderTypes List of order types
    PropertyDescriptionType
    valueOrder type IdInteger
    textOrder type descriptionString
    List
    actions List of Trade action
    PropertyDescriptionType
    valueidAction Id IdInteger
    textAction descriptionString
    List
    ledgerBalances List of currency ledger balances of the account
    PropertyDescriptionType
    currencyCurrencyString
    ledgerBalanceCurrency Ledger BalanceString
    isTransactionAllowedFlag whether the currency can transact for conversion Boolean
    messageMessage to be displayed if isTransactionAllowed flag is falseString
    List
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Validate FXInvest Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0' \
      -H 'postman-token: 19ff58b1-fddc-016d-bb77-dad82badf81a' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "09842d82-134f-8455-59e9-4cae135e8588")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "09842d82-134f-8455-59e9-4cae135e8588")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "7c8a5b3b-f908-44c5-7038-b48041222639");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '661771a9-5a61-f675-c40e-fbd91f2381f9',
      'cache-control' => 'no-cache',
      'encryptedpin' => '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/validate")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '4e5f9ad6-f49c-d155-2904-a5c640ac7bc6'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "3614065F-3E3B-4CEC-B861-68B347D8B934"
    }
    

    Perform order validation for FXInvest

    HTTP Request

    POST {url}/pmobile2/NFX/conversion/validate

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String
    action Trade action type
    1 - BUY action
    0 - SELL action
    Integer
    orderType Order type
    1 - Market
    2 - Limit
    Integer
    price Market or Limit price Decimal
    fromCurrency Currency to convert String
    fromAmount Amount to convert Decimal
    toCurrency Currency converted String
    toAmount Amount converted Decimal
    symbol Contract symbol String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Generated “authentication token” to be use to submit order String

    Submit FXInvest Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'authtoken: 44927D18-274B-40F5-ACF5-8E195537D773' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0' \
      -H 'postman-token: 2e94875f-f74b-574b-452e-5b8f362762cf' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0' \
      -d 'action=1&orderType=2&symbol=USDSGD&price=1.3169&fromCurrency=SGD&fromAmount=10&toCurrency=USD&toAmount=7.59&osVersion=7.1.1&language=1'
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "action=1&orderType=2&symbol=USDSGD&price=1.3169&fromCurrency=SGD&fromAmount=10&toCurrency=USD&toAmount=7.59&osVersion=7.1.1&language=1");
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion")
      .post(body)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("authtoken", "44927D18-274B-40F5-ACF5-8E195537D773")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "d567a760-8e3e-4980-457f-b89516a49ec0")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"authtoken": @"44927D18-274B-40F5-ACF5-8E195537D773",
                               @"content-type": @"application/x-www-form-urlencoded",
                               @"encryptedpin": @"157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"ce7b137a-e079-90a2-3a32-ac0fd670a7ce" };
    
    NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"action=1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&orderType=2" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&symbol=USDSGD" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&price=1.3169" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&fromCurrency=SGD" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&fromAmount=10" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&toCurrency=USD" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&toAmount=7.59" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&osVersion=7.1.1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&language=1" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"POST"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "5ad490ba-3943-035d-b7e3-4bb33998086d");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("authtoken", "44927D18-274B-40F5-ACF5-8E195537D773");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    request.AddParameter("application/x-www-form-urlencoded", "action=1&orderType=2&symbol=USDSGD&price=1.3169&fromCurrency=SGD&fromAmount=10&toCurrency=USD&toAmount=7.59&osVersion=7.1.1&language=1", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => 'ca052fde-f5bb-9f83-c8f2-a23e9bc9f57b',
      'cache-control' => 'no-cache',
      'encryptedpin' => '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0',
      'content-type' => 'application/x-www-form-urlencoded',
      'authtoken' => '44927D18-274B-40F5-ACF5-8E195537D773',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
      'action' => '1',
      'orderType' => '2',
      'symbol' => 'USDSGD',
      'price' => '1.3169',
      'fromCurrency' => 'SGD',
      'fromAmount' => '10',
      'toCurrency' => 'USD',
      'toAmount' => '7.59',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["authtoken"] = '44927D18-274B-40F5-ACF5-8E195537D773'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '312174b3-b9af-831c-6096-424bca8f79b6'
    request.body = "action=1&orderType=2&symbol=USDSGD&price=1.3169&fromCurrency=SGD&fromAmount=10&toCurrency=USD&toAmount=7.59&osVersion=7.1.1&language=1"
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Conversion submitted",
        "orderDetailURI": null,
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Submit FXInvest conversion order

    HTTP Request

    POST {url}/pmobile2/NFX/conversion

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String
    authToken Authentication token generated from validation order request String
    action Trade action type
    1 - BUY action
    0 - SELL action
    Integer
    orderType Order type
    1 - Market
    2 - Limit
    Integer
    price Market or Limit price Decimal
    fromCurrency Currency to convert String
    fromAmount Amount to convert Decimal
    toCurrency Currency converted String
    toAmount Amount converted Decimal
    symbol Contract symbol String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    orderDetailURI Order detail URI. This will be available if order is successfully submitted String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Amend FXInvest Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219 \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0' \
      -H 'postman-token: 54340b2a-6734-9a6a-75f4-c831875a110b' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "a4cb7232-fcb2-7103-8ea5-bd9da58402f0")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "a4cb7232-fcb2-7103-8ea5-bd9da58402f0")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "1018dab4-8451-fd08-e222-39a192f3f789");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '50182ee4-936d-e21a-103d-0c087ade5a7b',
      'cache-control' => 'no-cache',
      'encryptedpin' => '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '5629414b-c713-4b7c-d2e9-d9e35e595768'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Amendment request has been sent",
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Perform amendment of FXInvest order

    HTTP Request

    POST {url}/pmobile2/NFX/conversion/amend/{orderNo}

    Container Description Constraints Type
    {orderNo} Order number 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    newPrice Amended price Yes Decimal
    toAmount Amount converted Yes Decimal

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Withdraw FXInvest Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219 \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0' \
      -H 'postman-token: 2c7f92ea-874e-8bc5-ea30-f2ea0927595f' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "1f96e6b6-a6d3-5449-4cd8-5a124e75f085")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219")
      .post(null)
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "1f96e6b6-a6d3-5449-4cd8-5a124e75f085")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "c1609d32-6357-1419-0c1d-13a21b28c62a");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => 'c2c4c896-4032-0412-0729-b67c967232b1',
      'cache-control' => 'no-cache',
      'encryptedpin' => '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/withdraw/219")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = '157DE54FC72101E865FBC323856FDD3F18C819AAEA6E80AF2A6E58DE7FCB2BAB9277050215627721F02B30270002652ADB27DE4B93AAFD0A79B7CE294B8C1AD58829A405B1E25063673D5CE48EDBF9DCD2C549481CE328FDC185D1B3BFB6658B8038887296FAC0E2980DA5FE54E26D69330A074C55A91FFB37390D028FDDBAE0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '9bac8b14-3eb7-8628-e44e-98337839c538'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Withdrawal request has been sent ",
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Perform FXInvest order withdrawal

    HTTP Request

    POST {url}/pmobile2/NFX/conversion/withdraw/{orderNo}

    Container Description Constraints Type
    {orderNo} Order number 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Order

    Get Trading Info

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo?counterID=FT%2FCME%2FCME%2FEUZ17&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: a400a279-b2d7-a7bb-126a-7a091b1b6812' \
      -H 'sessionid: B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo?counterID=FT%2FCME%2FCME%2FEUZ17&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "00d67ebc-f00a-75b7-7251-841f4ef4afae")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"bcdf150e-a205-2ade-febc-c9f6b0db66e0" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo?counterID=FT%2FCME%2FCME%2FEUZ17&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo?counterID=FT%2FCME%2FCME%2FEUZ17&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "a6870f81-d804-258b-19b1-eebf079c06b6");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterID' => 'FT/CME/CME/EUZ17',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '05022201-6b43-6abc-e050-e211bdbdaa41',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/tradeinfo?counterID=FT%2FCME%2FCME%2FEUZ17&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '8e8d1bf4-f1e3-452e-73c4-f26b0981855e'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for Futures

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "tickSize": "0.00005",
            "preSettlementPrice": "1.1758",
            "initialMargin": "2310",
            "maintenanceMargin": "2100",
            "marginCurrency": "USD",
            "noOfDecimalsDisplay": 5,
            "askPrice": "1.1758",
            "bidPrice": "1.1758",
            "lastDone": "0",
            "defaultQuantity": 1,
            "orderTypes": [
                {
                    "id": 2,
                    "display": "Limit"
                },
                {
                    "id": 4,
                    "display": "Stop Limit"
                }
            ],
            "expiry": [
                {
                    "id": 0,
                    "display": "Day"
                }
            ],
            "actions": [
                {
                    "value": 1,
                    "text": "BUY"
                },
                {
                    "value": 0,
                    "text": "SELL"
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Sample Response for Forex

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "tickSize": "0.00001",
            "displayLotSizeAndUnit": " X 100K",
            "currency": "USD",
            "initialMargin": "3261.9",
            "maintenanceMargin": "3261.9",
            "marginCurrency": "USD",
            "noOfDecimalsDisplay": 5,
            "askPrice": "1.24133",
            "bidPrice": "1.2413",
            "defaultQuantity": 1,
            "orderTypes": [
                {
                    "id": 2,
                    "display": "Limit"
                },
                {
                    "id": 3,
                    "display": "Stop on bid"
                },
                {
                    "id": 4,
                    "display": "Stop on offer"
                },
                {
                    "id": 5,
                    "display": "OCO Stop on bid"
                },
                {
                    "id": 6,
                    "display": "OCO Stop on offer"
                }
            ],
            "expiry": [
                {
                    "id": 1,
                    "display": "Day"
                },
                {
                    "id": 2,
                    "display": "GTC"
                }
            ],
            "actions": [
                {
                    "value": 1,
                    "text": "BUY"
                },
                {
                    "value": 0,
                    "text": "SELL"
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Get Futures and Forex contract trading information

    HTTP Request

    GET {url}/pmobile2/{product}/orders/tradeinfo

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    counterID Counter Id
    Format : {product}/{market}/{exchange}/{counterID}
    Eg :
    Futures - FT/BURSA/BURSA/FGLDG17
    Forex (Reg) – FX/FX/FX/EURUSD
    Forex (Mini) – FXMN/FX/FXMN/AUDCAD
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of Futures and Forex trading info Object

    Futures Trading Info

    Property Description Type
    tickSize Contract tick size String
    preSettlementPrice Pre-settlement price String
    initialMargin Contract initial price margin (IM) String
    maintenanceMargin Contract maintenance price margin (MM) String
    marginCurrency Contract margin currency for IM and MM String
    noOfDecimalsDisplay Contract price decimal limit Integer
    askPrice Contract static ask price String
    bidPrice Contract static bid price String
    deafultQuantity Contract default or minimum quantity Integer
    orderTypes Contract order types
    PropertyDescriptionType
    idOrder type IdInteger
    displayOrder type descriptionString
    List
    expiry Contract order expiry
    PropertyDescriptionType
    idExpiry Id IdInteger
    displayExpiry descriptionString
    List
    actions Trade action
    PropertyDescriptionType
    valueidAction Id IdInteger
    textAction descriptionString
    List
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Forex Trading Info

    Property Description Type
    tickSize Contract tick size String
    displayLotSizeAndUnit Contract Lot size and Unit display String
    currency Contract currency String
    initialMargin Contract initial price margin (IM) String
    maintenanceMargin Contract maintenance price margin (MM) String
    marginCurrency Contract margin currency for IM and MM String
    noOfDecimalsDisplay Contract price decimal limit Integer
    askPrice Contract static ask price String
    bidPrice Contract static bid price String
    deafultQuantity Contract default or minimum quantity Integer
    orderTypes Contract order types
    PropertyDescriptionType
    idOrder type IdInteger
    displayOrder type descriptionString
    List
    expiry Contract order expiry
    PropertyDescriptionType
    idExpiry Id IdInteger
    displayExpiry descriptionString
    List
    actions Trade action
    PropertyDescriptionType
    valueidAction Id IdInteger
    textAction descriptionString
    List
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Validate Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A' \
      -H 'osversion: 7.1.1' \
      -H 'postman-token: 4f90adcb-7564-22d3-b86a-e3a23a283c13' \
      -H 'sessionid: B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("osversion", "7.1.1")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ffc98149-f0a3-9036-ff9b-73414d92064d")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("osversion", "7.1.1")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ffc98149-f0a3-9036-ff9b-73414d92064d")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "e5587dea-f397-0f19-d03b-5b897fffca93");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("osversion", "7.1.1");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => 'a57dc5de-e324-cc6b-adfe-68d72db5ad05',
      'cache-control' => 'no-cache',
      'encryptedpin' => 'A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A',
      'content-type' => 'application/x-www-form-urlencoded',
      'osversion' => '7.1.1',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/validate")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["osversion"] = '7.1.1'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = 'A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '603bb9d0-b27f-7891-0587-10073be4b528'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "0796497E-DE09-4B4B-A8E9-39C8737F4066"
    }
    

    Perform order validation for Futures/ Forex order submissin and Forex order amendment

    HTTP Request

    POST {url}/pmobile2/{product}/orders/validate

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    orderNo Order number
    (Applicable for Order Amendment only)
    String
    action Trade action
    1 – Buy Action
    2 – Sell Action
    Yes Integer
    orderType Order type
    FX Order Types
    1 – Market
    2 – Limit
    3 – Stop On Bid
    4 - Stop On Offer
    5 – OCO Stop On Bid
    6 – OCO Stop On Offer

    FT Order Types
    2 – Limit
    3 – Stop
    4 – Stop Limit
    Yes Integer
    symbol Contract symbol Yes String
    exchange Contract Exchange
    (Only applicable for Futures transaction)
    Yes String
    expiry Expiry or Validity
    FX Expiry
    1 - Day
    2 - GTC

    FT Expiry
    0 – Day
    Yes Integer
    qty Quantity Yes Integer
    price Represents Price, Limit Price and Stop Price Yes String
    stopLimitPrice Represents Stop Limit Price Yes String
    ocoPrice Represents OCO Price Yes String

    Order Submission Required Parameter

    Product Order Type Required Parameter
    Futures Limit - exchange
    - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop - exchange
    - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop Limit - exchange
    - symbol
    - orderType
    - action
    - price
    - stopLimitPrice
    - qty
    - expiry
    Forex Limit - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop On Bid - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop On Offer - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    OCO Stop On Bid - symbol
    - orderType
    - action
    - price
    - qty
    - ocoPrice
    - expiry
    OCO Stop On Offer - symbol
    - orderType
    - action
    - price
    - qty
    - ocoPrice
    - expiry

    Forex Order Amendment Required Parameter

    Product Order Type Required Parameter
    Forex All FX Order Type - orderNo
    - price
    - ocoPrice

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Generated “auth-token” to be use to submit order String

    Submit Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/FX/orders \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'authtoken: 62FC653E-BD0D-4860-8D68-112EA803279C' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A' \
      -H 'osversion: 7.1.1' \
      -H 'postman-token: 0c37ef97-29ce-f1f9-3d1b-6578bcb04e52' \
      -H 'sessionid: B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD' \
      -H 'versionno: 2.0.0' \
      -d 'action=1&orderType=2&symbol=EURUSD&expiry=2&qty=1&price=135.29'
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "action=1&orderType=2&symbol=EURUSD&expiry=2&qty=1&price=135.29");
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/orders")
      .post(body)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("osversion", "7.1.1")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A")
      .addHeader("authtoken", "62FC653E-BD0D-4860-8D68-112EA803279C")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "508ce604-436d-2e83-b38d-edaf313cd9f9")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"osversion": @"7.1.1",
                               @"content-type": @"application/x-www-form-urlencoded",
                               @"encryptedpin": @"A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A",
                               @"authtoken": @"62FC653E-BD0D-4860-8D68-112EA803279C",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"06d0e117-2ad8-8f3a-8488-ef45871c08ab" };
    
    NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"action=1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&orderType=2" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&symbol=EURUSD" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&expiry=2" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&qty=1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&price=135.29" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/orders"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"POST"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/orders");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "2e2d4a24-8cb6-dd0b-bc29-5a1a2bd2ca4f");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authtoken", "62FC653E-BD0D-4860-8D68-112EA803279C");
    request.AddHeader("encryptedpin", "A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("osversion", "7.1.1");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD");
    request.AddHeader("accountno", "0000000");
    request.AddParameter("application/x-www-form-urlencoded", "action=1&orderType=2&symbol=EURUSD&expiry=2&qty=1&price=135.29", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/orders');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '56854073-d961-217e-ce14-d5eb30a03a39',
      'cache-control' => 'no-cache',
      'authtoken' => '62FC653E-BD0D-4860-8D68-112EA803279C',
      'encryptedpin' => 'A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A',
      'content-type' => 'application/x-www-form-urlencoded',
      'osversion' => '7.1.1',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
      'action' => '1',
      'orderType' => '2',
      'symbol' => 'EURUSD',
      'expiry' => '2',
      'qty' => '1',
      'price' => '135.29'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/orders")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'B455CC9B-BD50-4CF5-9A19-9EB93DA9F3BD'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["osversion"] = '7.1.1'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = 'A16D3D24D42D4C7CD25A01844322310CBDA501AB76AC6340FBD36CA7B89FB1ED30033B0915C771EAC1FE7294A04C206327069D515D04B58ECC28FEFD688B30C6C87BE835AEAE7A70DC2A1883ABDF9B42A4F97522120915F1D524EBA9DC7041946DA901BBC5B8BB3321CC807436B979DA0A918BF8A8B1BFDBEC1F6281C2FA031A'
    request["authtoken"] = '62FC653E-BD0D-4860-8D68-112EA803279C'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'e67a6973-c370-3aa2-8d50-19146a0d3114'
    request.body = "action=1&orderType=2&symbol=EURUSD&expiry=2&qty=1&price=135.29"
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Order submitted successfully",
        "orderDetailURI": null,
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Submit Futures or Forex order

    HTTP Request

    POST {url}/pmobile2/{product}/orders

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    authToken Auth token generated from validate order String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    orderNo Order number
    (Applicable for Order Amendment only)
    String
    action Trade action
    1 – Buy Action
    2 – Sell Action
    Yes Integer
    orderType Order type
    FX Order Types
    1 – Market
    2 – Limit
    3 – Stop On Bid
    4 - Stop On Offer
    5 – OCO Stop On Bid
    6 – OCO Stop On Offer

    FT Order Types
    2 – Limit
    3 – Stop
    4 – Stop Limit
    Yes Integer
    symbol Contract symbol Yes String
    exchange Contract Exchange
    (Only applicable for Futures transaction)
    Yes String
    expiry Expiry or Validity
    FX Expiry
    1 - Day
    2 - GTC

    FT Expiry
    0 – Day
    Yes Integer
    qty Quantity Yes Integer
    price Represents Price, Limit Price and Stop Price Yes String
    stopLimitPrice Represents Stop Limit Price Yes String
    ocoPrice Represents OCO Price Yes String

    Order Submission Required Parameter

    Product Order Type Required Parameter
    Futures Limit - exchange
    - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop - exchange
    - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop Limit - exchange
    - symbol
    - orderType
    - action
    - price
    - stopLimitPrice
    - qty
    - expiry
    Forex Limit - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop On Bid - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    Stop On Offer - symbol
    - orderType
    - action
    - price
    - qty
    - expiry
    OCO Stop On Bid - symbol
    - orderType
    - action
    - price
    - qty
    - ocoPrice
    - expiry
    OCO Stop On Offer - symbol
    - orderType
    - action
    - price
    - qty
    - ocoPrice
    - expiry

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    orderDetailURI Order detail URI. This will be available if order is successfully submitted String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Amend Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219 \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1' \
      -H 'postman-token: 90a4d7c7-4c11-2eb7-13c7-23b8f793ca8f' \
      -H 'sessionid: 55E54434-2138-4605-8E11-4FF816883D5C' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "55E54434-2138-4605-8E11-4FF816883D5C")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "0467130d-aa92-4f0c-8d96-52c767d3617f")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "55E54434-2138-4605-8E11-4FF816883D5C")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("encryptedpin", "6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "0467130d-aa92-4f0c-8d96-52c767d3617f")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "87f7e6d8-38c6-f026-a66e-00e94e267bed");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("encryptedpin", "6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "55E54434-2138-4605-8E11-4FF816883D5C");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '6d81ffcf-711f-880e-7d03-ddad94c98e40',
      'cache-control' => 'no-cache',
      'encryptedpin' => '6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1',
      'content-type' => 'application/x-www-form-urlencoded',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '55E54434-2138-4605-8E11-4FF816883D5C',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/conversion/amend/219")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '55E54434-2138-4605-8E11-4FF816883D5C'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["encryptedpin"] = '6F95205308FF3C6A94774358F3717B999A3811B361E98B6BFB1AFA314D086D5A020435CA6F2DF17D5B53A55851BC9857F2F7E40992C506E3B7AA4379D0B37EE189F24A819C5B2D4DB49951FC7FFCBAADDC9D72D4622CC9C97C888B83B1FFD7FDB6F7BAA67798B75680FFA9645E08F4221A7DF9D1615986B0E6A858CFC1E2C1B1'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '6a389238-5768-1e82-fa77-142bcc0dd0d6'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    
    

    Perform order amendment

    HTTP Request

    POST [url}]/pmobile2/{product}/orders/amend/{orderNo}

    Container Description Constraints Type
    {product} Product code FX
    FXMN
    NFX
    String
    {orderNo} Order number 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    price Limit price Yes String
    ocoPrice OCO price No

    Note : This is only required if the order type is OCO
    String

    Response

    Property Description Type
    code Response code Integer
    msg Result message of amendment of order String
    orderDetailURI Order detail URI String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Withdraw Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312 \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502' \
      -H 'postman-token: 32ab5e82-c903-7556-cbcb-117ad161cecc' \
      -H 'sessionid: 875457E8-1544-440A-9CB3-6C060E2BEC29' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "875457E8-1544-440A-9CB3-6C060E2BEC29")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("encryptedpin", "5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "16df3ea9-111e-5220-3d3a-e396b4df8006")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "875457E8-1544-440A-9CB3-6C060E2BEC29")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("encryptedpin", "5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "16df3ea9-111e-5220-3d3a-e396b4df8006")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "e8db0f3d-f43f-4522-713d-dca8659a2df3");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("encryptedpin", "5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "875457E8-1544-440A-9CB3-6C060E2BEC29");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '72076e0b-c3f8-bffb-eece-a219239c43fa',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'encryptedpin' => '5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '875457E8-1544-440A-9CB3-6C060E2BEC29',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/orders/withdraw/85312")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '875457E8-1544-440A-9CB3-6C060E2BEC29'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["encryptedpin"] = '5BDB0D5560CFA88DFA9A2B1CFBE0EA471DAC9B136FF040F8D13167C4CB31713743B87803BB37238BA3074A9ACCC7A8469299FD4C219ADA6960C911DF1A4831B42F25DD20DB040F0BBD919F49F52440DD620A0F9A83FDFC93B7FC2165A45C484CFA132629BAE270FC06D2E0A12443D4D087784730EB37CD66C1597297C7F54502'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '68248ddd-ded5-e592-398c-283d6a44bb0d'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Withdrawal request has been sent",
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Perform order withdrawal for Futures and Forex order

    HTTP Request

    POST {url}/pmobile2/{product}/orders/withdraw/{orderNo}

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String
    {orderNo} Order number 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    Property Description Type
    code Response code Integer
    msg Result message of withdrawal of order String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Get Order Detail

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 6a0718c7-d217-fec5-8bce-0b1b74e3501f' \
      -H 'sessionid: 875457E8-1544-440A-9CB3-6C060E2BEC29' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "875457E8-1544-440A-9CB3-6C060E2BEC29")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "27fd69f4-154b-4caf-c18e-f2e9c33b294f")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"875457E8-1544-440A-9CB3-6C060E2BEC29",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"60ea6932-e8e8-4e60-ccd4-fa8fd8fbb639" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "d83204d2-f924-5ef1-7275-29c684201c90");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "875457E8-1544-440A-9CB3-6C060E2BEC29");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '221077a6-5c09-a200-5dfd-7875d9501dc2',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '875457E8-1544-440A-9CB3-6C060E2BEC29',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/orders/today/34601?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '875457E8-1544-440A-9CB3-6C060E2BEC29'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '17ebf7cd-ec68-cf49-d99e-aa35a8434f5a'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for Futures

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "productIcon": "FUT",
            "product": "FT",
            "orderNo": "85329",
            "counterID": "FT/CBOT/CBOT/CRNH18",
            "symbol": "CRNH18",
            "name": "CORN - MAR 2018",
            "exchange": "CBOT",
            "orderType": "Limit",
            "action": "BUY",
            "submittedPrice": "399.5",
            "limitPrice": "399.5",
            "stopPrice": null,
            "stopLimitPrice": null,
            "currency": "",
            "submittedQty": "1",
            "submittedTime": "Mar 27, 2018 10:15:48AM",
            "executedPrice": "0",
            "executedQty": "0",
            "executedTime": "",
            "expiry": "Day",
            "status": "PW",
            "statusDescription": "Pending Withdrawal",
            "statusColor": "#808080",
            "statusColorName": "Gray",
            "message": "Pending Withdrawal",
            "orderDetailURI": "/FT/orders/today/85329",
            "withdrawURI": "",
            "orderHistory": [
                {
                    "status": "PW",
                    "statusDescription": "Pending Withdrawal",
                    "statusColor": "#808080",
                    "statusColorName": "Gray",
                    "price": "399.5",
                    "triggerPrice": "-",
                    "quantity": "1",
                    "remainingQuantity": "0",
                    "transactionDateTime": "Mar 27, 2018 10:16:10AM",
                    "message": "Pending Withdrawal"
                },
                {
                    "status": "OP",
                    "statusDescription": "Order Pending",
                    "statusColor": "#808080",
                    "statusColorName": "Gray",
                    "price": "399.5",
                    "triggerPrice": "-",
                    "quantity": "1",
                    "remainingQuantity": "1",
                    "transactionDateTime": "Mar 27, 2018 10:15:48AM",
                    "message": ""
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Sample Response for Forex

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "productIcon": "REG\r\nFX",
            "product": "FX",
            "orderNo": "34601",
            "counterID": "FX/FX/FX/EURUSD",
            "symbol": "EURUSD",
            "name": "EUR/USD",
            "exchange": "FX",
            "orderType": "Limit",
            "action": "BUY",
            "submittedPrice": "135.29",
            "ocoPrice": null,
            "ocoType": null,
            "currency": "USD",
            "submittedQty": "100000",
            "submittedTime": "Mar 28, 2018 12:14:05AM",
            "executedPrice": "0",
            "executedQty": "",
            "executedTime": "",
            "expiry": "GTC",
            "status": "OP",
            "statusDescription": "Order Pending",
            "statusColor": "#808080",
            "statusColorName": "Gray",
            "displayUnit": "K",
            "displayLotSize": "100",
            "message": "",
            "tickSize": "0.00001",
            "orderDetailURI": "/FX/orders/today/34601",
            "amendURI": null,
            "withdrawURI": "/FX/orders/withdraw/34601",
            "orderHistory": [
                {
                    "status": "OP",
                    "statusDescription": "Order Pending",
                    "statusColor": "#808080",
                    "statusColorName": "Gray",
                    "price": "135.29",
                    "ocoPrice": "-",
                    "quantity": "100000",
                    "remainingQuantity": "100000",
                    "transactionDateTime": "",
                    "message": ""
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Get Futures/Forex order details

    HTTP Request

    GET {url]/pmobile2/{product}/orders/{type}/{orderNo}

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String
    {type} History type - today
    - past
    String
    {orderNo} Order number 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of Futures and Forex order detail Object

    Futures Order Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    orderNo Order unique identifier String
    counterID Contract counter ID String
    symbol Contract symbol String
    name Contract display name String
    exchange Contract exchange String
    orderType Order order type name String
    action Order action String
    submittedPrice Order submitted price String
    stopLimitPrice Order stop limit price String
    currency Contract margin currency String
    submittedQty Order submitted quantity String
    submittedTime Order submitted time String
    executedPrice Order executed price String
    executedQty Order executed quantity String
    executedTime Order executed time String
    expiry Order validity String
    status Order status code String
    statusDescription Order status description String
    statusColor Order status color hex code String
    statusColorName Order status color name String
    message Order message/remarks String
    orderDetailURI Order detail URI String
    withdrawURI Order withdrawal URI String
    orderHistory List of Order Log History
    PropertyDescriptionType
    statusOrder status codeString
    statusDescriptionOrder status descriptionString
    statusColorOrder status color hex codeString
    statusColorNameOrder status color nameString
    priceOrder submitted/executed priceString
    triggerPriceOrder stop limit priceString
    qtyOrder submitted/executed quantityString
    remainingOrder remaining quantityString
    datetimeOrder executed timeString
    messageOrder remarks String
    List
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Forex Order Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    orderNo Order unique identifier String
    counterID Contract counter ID String
    symbol Contract symbol String
    name Contract display name String
    exchange Contract exchange String
    orderType Order order type name String
    action Order action String
    submittedPrice Order submitted price String
    ocoPrice OCO price
    Applicable only for OCO order type
    String
    currency Contract margin currency String
    submittedQty Order submitted quantity String
    submittedTime Order submitted time String
    executedPrice Order executed price String
    executedQty Order executed quantity String
    executedTime Order executed time String
    expiry Order validity String
    status Order status code String
    statusDescription Order status description String
    statusColor Order status color hex code String
    statusColorName Order status color name String
    displayUnit Contract display unit String
    displayLotSize Contract display lot size String
    message Order message/remarks String
    tickSize Contract Tick Size String
    orderDetailURI Order detail URI String
    amendURI Order amend URI
    Applicable only if order status is Order Received
    String
    withdrawURI Order withdrawal URI String
    orderHistory List of Order Log History
    PropertyDescriptionType
    statusOrder status codeString
    statusDescriptionOrder status descriptionString
    statusColorOrder status color hex codeString
    statusColorNameOrder status color nameString
    priceOrder submitted/executed priceString
    ocoPriceOrder OCO priceString
    qtyOrder submitted/executed quantityString
    remainingOrder remaining quantityString
    datetimeOrder executed timeString
    messageOrder remarks String
    List
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    News

    Provide API function to support the retrieval of Futures/Forex related News

    News Category

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category?osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: bc67fd50-a7d0-4815-bef3-43479009a3b8' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "822054f2-027f-5363-6309-c416c9375a34")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"29a5d13e-7c51-03c3-0001-64c2c6777877" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "fa7651da-2444-614a-bb68-d5175c12b6bc");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '13441621-3161-43c6-03fd-e458f1aeda04',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FXMN/news/category?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '2f320186-ccb2-f6f1-2b8f-cb45eddb88ba'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "id": "1",
                "name": "Forex",
                "description": "Forex news category"
            },
            {
                "id": "2",
                "name": "Equity and Commodity",
                "description": "Equity and Commodity news category"
            },
            {
                "id": "0",
                "name": "Others",
                "description": "Other Category"
            }
        ]
    }
    

    Get all news category

    HTTP Request

    GET {url}/pmobile2/{product}/news/category

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of news category
    PropertyDescriptionType
    idCategory unique IDString
    nameCategory nameString
    descriptionCategory descriptionString
    List

    News Headline

    Sample Request for all news headlines

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/news/all?keyword=&count=&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: d1c63d9a-e310-2c46-5ecf-1b095054a042' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/news/all?keyword=&count=&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "49ed6115-234b-6a66-5958-809ad623b2a8")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"65755383-d76e-1287-b907-f82271b146c1" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/news/all?keyword=&count=&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/news/all?keyword=&count=&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "8ac48965-841b-999b-52ef-889e0db4d99e");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/news/all');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'keyword' => '',
      'count' => '',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '1a58fa3c-ef2e-35f9-ff97-4324d52c9042',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/news/all?keyword=&count=&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '3ae35483-6cf4-c607-5d6d-9f0f7ba43820'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "categoryID": "0",
                "id": "2887",
                "title": "CHINA: The National Development and Reform...[More]",
                "publishedTime": "6 mins ago",
                "contentURI": "FX/news/0/2887"
            },
            {
                "categoryID": "0",
                "id": "2884",
                "title": "MNI: CHINA SHANGHAI COMPOSITE INDEX OPENS UP 0.17%...[More]",
                "publishedTime": "6 mins ago",
                "contentURI": "FX/news/0/2884"
            }
        ]
    }
    

    Sample Request for specific category

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/news/0?keyword=&count=&osVersion=7.1.1&language=1&=' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: e6aa2b0f-6626-71ff-d288-bb483e5baad6' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0?keyword=&count=&osVersion=7.1.1&language=1&=")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "2f78a289-851b-a798-0000-cdaa444eaaf2")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"9f7f4215-03dd-26cb-b6f5-73f0eeb2f963" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/news/0?keyword=&count=&osVersion=7.1.1&language=1&="]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0?keyword=&count=&osVersion=7.1.1&language=1&=");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "8c94ac10-4fbd-1ce4-7ced-8aa1dba463e6");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/news/0');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'keyword' => '',
      'count' => '',
      'osVersion' => '7.1.1',
      'language' => '1',
      '' => ''
    ));
    
    $request->setHeaders(array(
      'postman-token' => '89fc06a5-963b-9d11-8eb5-7d1f65ad0791',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0?keyword=&count=&osVersion=7.1.1&language=1&=")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '93aeb1c2-d155-19b3-f78b-020004203874'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for specific category

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "categoryID": "0",
                "id": "2887",
                "title": "CHINA: The National Development and Reform...[More]",
                "publishedTime": "11 mins ago",
                "contentURI": "FX/news/0/2887"
            },
            {
                "categoryID": "0",
                "id": "2884",
                "title": "MNI: CHINA SHANGHAI COMPOSITE INDEX OPENS UP 0.17%...[More]",
                "publishedTime": "11 mins ago",
                "contentURI": "FX/news/0/2884"
            },
            {
                "categoryID": "0",
                "id": "2883",
                "title": "MNI: CHINA SETS YUAN CENTRAL PARITY AT 6.6305 TUES...[More]",
                "publishedTime": "11 mins ago",
                "contentURI": "FX/news/0/2883"
            }
        ]
    }
    

    Get news headlines list per category

    HTTP Request

    All news headlines from all Category

    GET {url}/pmobile2/{product}/news/all

    Container Description Constraints Type
    {product} Product code FX
    FXMN
    String

    Single or multiple category ID

    GET {url}/pmobile2/{product}/news/{categoryID}

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String
    {categoryID}} Category ID delimited with pipe 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    count Number of return news 30 No Integer
    keyword Search keyword
    If no value, it will return all
    No String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of news headline
    PropertyDescriptionType
    categoryIDNews category IDString
    idNews IDString
    titleNews titleString
    publishedTimeNews published date timeString
    contentURINews details URIString
    List

    News Details

    Get news details

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887?osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 1c49b660-6d4f-8296-2ad0-8915cfa3ae0f' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "29af4254-27c6-2e87-b9c5-75611024fdf6")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"422539df-9c41-612e-3aa1-033c903a97a7" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "c7791241-4c40-49ee-813e-f8e17e6c37a8");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '49ad2a56-d44b-f8f5-0e56-d7a8171671b5',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/news/0/2887?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'acd85082-0ca4-a3db-338d-ef32b871850a'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "categoryID": "0",
            "id": "2887",
            "title": "CHINA: The National Development and Reform...",
            "content": "CHINA: The National Development and Reform Commission approved a total of CNY59.4 billion for 18 fixed asset investment projects in July, according to a statement issued at a briefing by the economic planner.",
            "publishedTime": "0 seconds ago"
        }
    }
    

    HTTP Request

    GET {url}/pmobile2/{product}/news/{categoryID}/{newsID}

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String
    {categoryID} News category Id 0-9 Integer
    {newsID} News Id 0-9 Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of news detail
    PropertyDescriptionType
    categoryIDNews category IdString
    idNews IdString
    titleNews titleString
    contentNews full content detailsString
    publishedTimeNews published date timeString
    Object

    myNews

    Get my news headlines list

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews?counterIDs=&keyword=&count=30&categoryID=0%2C1%2C2&osVersion=7.1.1&language=1' \
      -H 'accountno: AAA1111' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: a600c02b-2f0a-9a4d-8247-3e72305c1f07' \
      -H 'sessionid: 194B5702-28AA-4D1C-A495-59CCAD4592BF' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews?counterIDs=&keyword=&count=30&categoryID=0%2C1%2C2&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "AAA1111")
      .addHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "c9cf8a23-f386-4427-77ea-da259dc7c404")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"AAA1111",
                               @"sessionid": @"194B5702-28AA-4D1C-A495-59CCAD4592BF",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"bbb72152-2ad1-bf4f-db7b-e5f6280a9c61" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews?counterIDs=&keyword=&count=30&categoryID=0%2C1%2C2&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews?counterIDs=&keyword=&count=30&categoryID=0%2C1%2C2&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "224a51e0-7c98-a080-188e-ea25261071d1");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "194B5702-28AA-4D1C-A495-59CCAD4592BF");
    request.AddHeader("accountno", "AAA1111");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'counterIDs' => '',
      'keyword' => '',
      'count' => '30',
      'categoryID' => '0,1,2',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'be35e971-ca47-fb6b-4802-fa6bb75a5458',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '194B5702-28AA-4D1C-A495-59CCAD4592BF',
      'accountno' => 'AAA1111'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/news/mynews?counterIDs=&keyword=&count=30&categoryID=0%2C1%2C2&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = 'AAA1111'
    request["sessionid"] = '194B5702-28AA-4D1C-A495-59CCAD4592BF'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '5d5df27c-e349-4f4e-24f0-585316df0c1d'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "categoryID": "2",
                "id": "2688",
                "title": "SILVER TECHS: $19.229-576 Support Region Key *RES...[More]",
                "publishedTime": "02 Apr 2018 08:10 AM",
                "contentURI": "FX/news/2/2688"
            },
            {
                "categoryID": "2",
                "id": "2685",
                "title": "OIL TECHS: NYMEX WTI: (V16) Below 21-DMA To Shift...[More]",
                "publishedTime": "02 Apr 2018 08:10 AM",
                "contentURI": "FX/news/2/2685"
            },
            {
                "categoryID": "2",
                "id": "2683",
                "title": "OIL TECHS: NYMEX RBOB: (V16) Focus Shifts To...[More]",
                "publishedTime": "02 Apr 2018 08:10 AM",
                "contentURI": "FX/news/2/2683"
            }
        ]
    }
    

    HTTP Request

    GET {url}/pmobile2/{product}/news/mynews

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    count Number of return news headline 30 No Integer
    counterIDs Comma delimited list of counterIDs
    Format : {product}/{market}/{exchange}/{counterID}
    Yes String
    keyword Search keyword
    Optional : Yes
    If no value, it will return all
    No String
    categoryID Category ID delimited with comma
    Eg: “0,1,2”
    Yes String

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of news headline
    PropertyDescriptionType
    categoryIDNews category IDString
    idNews IDString
    titleNews titleString
    publishedTimeNews published date timeString
    contentURINews details URIString
    List

    Net Position

    Provide API functions to support the retrieval of Futures/Forex Net Position summary and details

    Get Disclaimer

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: c6caa658-01b3-8cb6-bba8-5de9e18ec219' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "ddbbb476-42e5-20ce-bc26-64903b67b321")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"39236f2e-2ad1-f02f-595e-8e3ab772be7c" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "cc59300e-214a-4f65-aaf3-0be78582b3b5");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '97f2ec3f-3785-7e6f-59d6-40dfb4710e3d',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/position/disclaimer?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '2a8b3031-e6e7-bf99-7dd1-89b545f238c6'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "Use of <b>Position</b> in POEMS should only serve as a guide and should not be relied upon. PFPL accepts no liability whatsoever for any losses or damages resulting from the use of reliance on this program. The <b>Net</b> position shown under <b>Position</b> modules is not a reflection of your entire positions in PFPL.<br><br> Please take note that for <u>futures call in trades through dealer or trade done through platforms other than POEMS / POEMS MOBILE </u> will NOT be considered in the <b>Net</b> positions calculation."
    }
    

    Get net position disclaimer

    HTTP Request

    GET {url}/pmobile2/{product}/position/disclaimer

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Type
    osVersion Client's device OS version number String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Net Position disclaimer String

    Get All Net Position Summary

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/position/all?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 5ea88e0c-d578-7bc0-a8ae-df3e107605ec' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/position/all?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "a07e5711-7e65-e83e-4cec-865ba16a936a")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"4cab2b5c-2836-814c-d5b4-7990879b9668" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/position/all?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/position/all?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "c12687f4-e5f5-9a5f-8b89-db818edb7f87");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/position/all');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '5954e90d-399c-28fc-079c-1c0904d8502a',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/position/all?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'ab6f36f8-0ce1-34d4-34c6-3aea5a800881'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "ft": [
                {
                    "productIcon": "FUT",
                    "product": "FT",
                    "market": "NYX",
                    "exchange": "NYX",
                    "exchangeDisplay": "NYX",
                    "symbol": "MCQ17",
                    "code": "MCQ17",
                    "counterID": "FT/NYX/NYX/MCQ17",
                    "name": "MINICRUDE (E)\r\nAug 2017",
                    "commodityType": "F",
                    "pmpTopic": "\\PATSFeeder\\[NYX]MCQ17R",
                    "delayIndicator": null,
                    "accountNo": "ABC1234",
                    "commodityCode": "MC",
                    "month": "8",
                    "year": "2017",
                    "broughtForward": "-7",
                    "intraday": "3",
                    "net": "-4",
                    "netPositionList": [
                        {
                            "productIcon": "FUT",
                            "product": "FT",
                            "market": "NYX",
                            "exchange": "NYX",
                            "exchangeDisplay": "NYX",
                            "symbol": "MCQ17",
                            "code": "MCQ17",
                            "counterID": "FT/NYX/NYX/MCQ17",
                            "name": "MINICRUDE (E)\r\nAug 2017",
                            "commodityType": "F",
                            "pmpTopic": "\\PATSFeeder\\[NYX]MCQ17R",
                            "delayIndicator": null,
                            "broughtForward": "-",
                            "intraDay": "2",
                            "currency": null,
                            "transactionID": "27",
                            "orderID": "67371",
                            "commodityCode": "MC",
                            "action": "Buy",
                            "netPosition": "-",
                            "quantity": "2",
                            "price": "46.3",
                            "month": "8",
                            "year": "2017",
                            "expiry": "AUG 2017",
                            "transactionTime": "10:19:41AM",
                            "positionDetailURI": "FT/position/MCQ17/27/67371"
                        }
                    ]
                }            
            ],
            "fx": [
                {
                    "productIcon": "REG\r\nFX",
                    "product": "FX",
                    "market": "FX",
                    "exchange": "FX",
                    "exchangeDisplay": "FX",
                    "symbol": "GLDUSD",
                    "code": "GLDUSD",
                    "counterID": "FX/FX/FX/GLDUSD",
                    "name": "Loco London Gold",
                    "commodityType": "B",
                    "pmpTopic": "\\FX100KFeeder\\GLDUSD[1]",
                    "delayIndicator": null,
                    "accountNo": "ABC1234",
                    "broughtForward": "100",
                    "intraday": "-100",
                    "net": "0",
                    "productType": "1",
                    "displayUnits": "OZ",
                    "displayLotSize": "100",
                    "netPositionList": [
                        {
                            "productIcon": "REG\r\nFX",
                            "product": "FX",
                            "market": "FX",
                            "exchange": "FX",
                            "exchangeDisplay": "FX",
                            "symbol": "GLDUSD",
                            "code": "GLDUSD",
                            "counterID": "FX/FX/FX/GLDUSD",
                            "name": "Loco London Gold",
                            "commodityType": "B",
                            "pmpTopic": "\\FX100KFeeder\\GLDUSD[1]",
                            "delayIndicator": null,
                            "broughtForward": "-",
                            "intraDay": "100",
                            "currencyPair": "GLD/USD",
                            "currency": "USD",
                            "transactionID": "30",
                            "orderID": "8064",
                            "productType": "1",
                            "netPosition": "-",
                            "quantity": "100",
                            "price": "1267",
                            "action": "Buy",
                            "displayUnits": "OZ",
                            "displayLotSize": "100",
                            "transactionTime": "11:19:47AM",
                            "positionDetailURI": "FX/position/GLDUSD/30/8064"
                        }
                    ]
                }
            ],
            "fxmn": [
                {
                    "productIcon": "Mini\r\nFX",
                    "product": "FXMN",
                    "market": "FX",
                    "exchange": "FXMN",
                    "exchangeDisplay": "FXMN",
                    "symbol": "AUDUSD",
                    "code": "AUDUSD",
                    "counterID": "FXMN/FX/FXMN/AUDUSD",
                    "name": "Australian Dollar against US Dollar",
                    "commodityType": "X",
                    "pmpTopic": "\\FX100KFeeder\\AUDUSD[2]",
                    "delayIndicator": null,
                    "accountNo": "ABC1234",
                    "broughtForward": "20000",
                    "intraday": "-20000",
                    "net": "0",
                    "productType": "2",
                    "displayUnits": "K",
                    "displayLotSize": "10",
                    "netPositionList": [
                        {
                            "productIcon": "Mini\r\nFX",
                            "product": "FXMN",
                            "market": "FX",
                            "exchange": "FXMN",
                            "exchangeDisplay": "FXMN",
                            "symbol": "AUDUSD",
                            "code": "AUDUSD",
                            "counterID": "FXMN/FX/FXMN/AUDUSD",
                            "name": "Australian Dollar against US Dollar",
                            "commodityType": "X",
                            "pmpTopic": "\\FX100KFeeder\\AUDUSD[2]",
                            "delayIndicator": null,
                            "broughtForward": "-",
                            "intraDay": "10000",
                            "currencyPair": "AUD/USD",
                            "currency": "USD",
                            "transactionID": "32",
                            "orderID": "8118",
                            "productType": "2",
                            "netPosition": "-",
                            "quantity": "10000",
                            "price": "0.7528",
                            "action": "Buy",
                            "displayUnits": "K",
                            "displayLotSize": "10",
                            "transactionTime": "1:18:03PM",
                            "positionDetailURI": "FXMN/position/AUDUSD/32/8118"
                        }
                    ]
                }
            ],
            "needDisclaimer": false,
            "disclaimers": [
                "Use of <b>Position</b> in POEMS should only serve as a guide and should not be relied upon. PFPL accepts no liability whatsoever for any losses or damages resulting from the use of reliance on this program. The <b>Net</b> position shown under <b>Position</b> modules is not a reflection of your entire positions in PFPL.<br><br> Please take note that for <u>futures call in trades through dealer or trade done through platforms other than POEMS / POEMS MOBILE </u> will NOT be considered in the <b>Net</b> positions calculation."
            ]
        }
    }
    

    Get all product products Net Position summary

    HTTP Request

    GET {url}/pmobile2/{product}/position/all

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Type
    osVersion Client's device OS version number String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container Object
    PropertyDescriptionType
    ftList of Futures Net Position SummaryList of FT Position
    fxList of Regular Forex Net Position SummaryList of FX Position
    fxmnList of Mini Forex Net Position SummaryList of FX Position
    needDisclaimerFlag if disclaimer is need to be displayedBoolean
    disclaimersList of disclaimerList of String

    Futures Net Position Summary

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchangeDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products String
    name Contract display name String
    commodityType Contract commodity type String
    pmpTopic PMP topic String
    delayIndicator Delay Indicator String
    accountNo Client account number String
    broughtForward brought forward amount String
    intraday Intraday amount String
    net Net amount String
    productType Product Type String
    displayUnits Display unit String
    displayLotSize Display lot size String
    netPositionList List of Futures Net position summary details
    PropertyDescriptionType
    productIconProduct iconString
    productProduct where the contract belongString
    marketMarket where the contract belongString
    exchangeContract exchangeString
    exchangeDisplayContract exchange display nameString
    symbolContract symbolString
    codeContract code String
    counterIDUnique identifier for contract across multiple productsString
    nameContract display nameString
    commodityTypeContract commodity typeString
    pmpTopicPMP topicString
    delayIndicatorDelay IndicatorString
    broughtForwardPosition brought forwardString
    intradayPosition intradayString
    currencyPairCurrency PairString
    transactionIDTransaction IdString
    orderIDOrder IdString
    productTypeProduct typeString
    netPositionNet position amountString
    quantityQuantityString
    pricePriceString
    actionActionString
    displayUnitsDisplay unitString
    displayLotSizeDisplay lot sizeString
    transactionTimeTransaction TimeString
    positionDetailURIPosition detail URIString
    List

    Forex (Regular/Mini) Net Position Summary

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchangeDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products String
    name Contract display name String
    commodityType Contract commodity type String
    pmpTopic PMP topic String
    delayIndicator Delay Indicator String
    accountNo Client account number String
    broughtForward Brought forward amount String
    intraday Intraday amount String
    net Net amount String
    productType Product Type String
    displayUnits Display unit String
    displayLotSize Display lot size String
    netPositionList List of Forex Net position summary details
    PropertyDescriptionType
    productIconProduct iconString
    productProduct where the contract belongString
    marketMarket where the contract belongString
    exchangeContract exchangeString
    exchangeDisplayContract exchange display nameString
    symbolContract symbolString
    codeContract codeString
    counterIDUnique identifier for contract across multiple productsString
    nameContract display nameString
    commodityTypeContract commodity typeString
    pmpTopicPMP topicString
    delayIndicatorDelay IndicatorString
    broughtForwardPosition brought forwardString
    intradayPosition intradayString
    currencyPairCurrency PairString
    transactionIDTransaction IdString
    orderIDOrder IdString
    productTypeProduct typeString
    netPositionNet position amountString
    quantityQuantityString
    pricePriceString
    actionActionString
    displayUnitsDisplay unitString
    displayLotSizeDisplay lot sizeString
    transactionTimeTransaction TimeString
    positionDetailURIPosition detail URIString
    List

    Get Futures Net Position Detail

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371?exchangeCode=NYX&month=8&year=2017&osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 8d435501-e840-608e-935d-be2f9225e770' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371?exchangeCode=NYX&month=8&year=2017&osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "f2d2d623-3a6d-648c-1842-9c54acb3cb2b")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"a70bf28b-df49-d5d4-8598-e94d1ee6fefe" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371?exchangeCode=NYX&month=8&year=2017&osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371?exchangeCode=NYX&month=8&year=2017&osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "1c60ce5f-04da-606c-97bc-10be61bcd70c");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'exchangeCode' => 'NYX',
      'month' => '8',
      'year' => '2017',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '15948a08-9527-e35c-4278-87f7397a5892',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/position/MCQ17/27/67371?exchangeCode=NYX&month=8&year=2017&osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '6369ca94-d617-3992-114e-519d4858a618'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "productIcon": "FUT",
            "product": "FT",
            "market": "NYX",
            "exchange": "NYX",
            "exchangeDisplay": "NYX",
            "symbol": "MCQ17",
            "code": "MCQ17",
            "counterID": "FT/NYX/NYX/MCQ17",
            "name": "MINICRUDE (E)\r\nAug 2017",
            "commodityType": "F",
            "pmpTopic": "\\PATSFeeder\\[NYX]MCQ17R",
            "delayIndicator": null,
            "broughtForward": "-",
            "intraDay": "2",
            "currency": "USD",
            "transactionID": "27",
            "orderID": "67371",
            "commodityCode": "MC",
            "action": "Buy",
            "netPosition": "-",
            "quantity": "2",
            "price": "46.3",
            "month": "8",
            "year": "2017",
            "expiry": "AUG 2017",
            "transactionTime": "10:19:41AM",
            "lastUpdated": "12-Jun 2017 10:19AM",
            "positionDetailURI": "FT/position/MCQ17/27/67371"
        }
    }
    

    Get Futures Net Position detail

    HTTP Request

    GET {url}/pmobile2/FT/position/{symbol}/{transactionID}/{orderID}

    Container Description Constraints Type
    {symbol} Contract symbol String
    {transactionID} Net position transaction id Integer
    {orderID} Net position order id Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    exchangeCode Contract Exchange code String
    Month Contract month Yes Integer
    year Contract year Yes Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of Futrues net position detail Object

    Futures Net Position Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchangeDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products String
    name Contract display name String
    commodityType Contract commodity type String
    pmpTopic PMP Topic String
    delayIndicator Delay Indicator String
    broughtForward Position brought forward String
    intraDay Position Intraday String
    currency Contract currency String
    transactionID Transaction Id String
    orderid Order Id String
    commodityCode Contract commodity code String
    action Action String
    netPosition Net position amount String
    quantity Quantity String
    price Price String
    month Contract month String
    year Contract year String
    expiry Contract expiry String
    transactionTime Transaction Time String
    lastUpdated Last Updated date and time String
    positionDetailURI Position detail URI String

    Get Forex Net Position Detail

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 2c9ab024-e3a0-6c13-8981-587b16ab88d7' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "358f5c7c-a74c-ef99-016c-369eea192f35")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"0ba91c94-3942-9106-c9a2-4261209be0de" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "fc649442-4ddb-2f6d-bf13-a764cf826a25");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '76b70743-205b-93de-c347-92df29873fb2',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FX/position/GLDUSD/30/8064?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '85308039-bedf-9017-51ff-713f6da001dc'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "productIcon": "REG\r\nFX",
            "product": "FX",
            "market": "FX",
            "exchange": "FX",
            "exchangeDisplay": "FX",
            "symbol": "GLDUSD",
            "code": "GLDUSD",
            "counterID": "FX/FX/FX/GLDUSD",
            "name": "Loco London Gold",
            "commodityType": "B",
            "pmpTopic": "\\FX100KFeeder\\GLDUSD[1]",
            "delayIndicator": null,
            "broughtForward": "-",
            "intraDay": "100",
            "currencyPair": "GLD/USD",
            "currency": "USD",
            "transactionID": "30",
            "orderID": "8064",
            "productType": "1",
            "netPosition": "-",
            "quantity": "100",
            "price": "1267",
            "action": "Buy",
            "displayUnits": "OZ",
            "displayLotSize": "100",
            "transactionTime": "11:19:47AM",
            "lastUpdated": "12-Jun 2017 11:19AM",
            "positionDetailURI": "FX/position/GLDUSD/30/8064"
        }
    }
    

    Get Regular and Mini Forex Net Position detail

    HTTP Request

    GET {url}/pmobile2/FX/position/{symbol}/{transactionID}/{orderID}

    Container Description Constraints Type
    {symbol} Contract symbol String
    {transactionID} Net position transaction id Integer
    {orderID} Net position order id Integer

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of Forex net position detail Object

    Forex Net Position Detail

    Property Description Type
    productIcon Product icon String
    product Product where the contract belong String
    market Market where the contract belong String
    exchange Contract exchange String
    exchangeDisplay Contract exchange display name String
    symbol Contract symbol String
    code Contract code String
    counterID Unique identifier for contract across multiple products String
    name Contract display name String
    commodityType Contract commodity type String
    delayIndicator Delay Indicator String
    broughtForward Position brought forward String
    intraDay Position Intraday String
    currencyPair Contract currency pair (symbol1 / symbol2) String
    currency Contract currency (right currency) String
    transactionID Transaction Id String
    orderid Order Id String
    productType Product type String
    netPosition Net position amount String
    quantity Quantity String
    price Price String
    action Action String
    displayUnits Display unit String
    displayLotSize Display lot size String
    transactionTime Transaction Time String
    lastUpdated Last Updated date and time String
    positionDetailURI Position detail URI String

    Online Forms

    Provide API functions to support the Online Withdrawal of Futures/Forex account such as order submission, retrieval of information

    Get Online Withdrawal Ledger

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 0d325dd0-a5a8-f6fc-8810-d3f494093a61' \
      -H 'sessionid: 64CEC939-7B74-47B0-B66F-4B870F583150' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "18888fce-5bc2-4f1f-a642-1b6c9d817ee9")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"64CEC939-7B74-47B0-B66F-4B870F583150",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"95f6b474-44f7-afa8-faea-227201965336" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "a76c6f38-e2e0-b53c-c80b-8557e32f07e3");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "64CEC939-7B74-47B0-B66F-4B870F583150");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'd471be51-18df-3419-fc8a-286603875b84',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '64CEC939-7B74-47B0-B66F-4B870F583150',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/funds?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '64CEC939-7B74-47B0-B66F-4B870F583150'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '09baa922-a1bc-3e6b-20cf-ad4d5aff80e7'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "ledgers": [
                {
                    "currency": "SGD",
                    "balance": "58031.28",
                    "withdrawable": true,
                    "message": ""
                },
                {
                    "currency": "THB",
                    "balance": "50000.00",
                    "withdrawable": false,
                    "message": "You are not allowed to withdraw <THB> via online withdrawal form"
                },
                {
                    "currency": "USD",
                    "balance": "455.00",
                    "withdrawable": true,
                    "message": ""
                }
            ],
            "passwordRequired": true,
            "twoFARequired": false
        }
    }
    

    Get account ledger for online withdrawal

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/funds

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container
    PropertyDescriptionType
    ledgersList of ledgersList
    passwordRequiredFlag if password is required for the accountBoolean
    twoFARequiredFlag if the 2FA is required for the accountBoolean
    Object

    Get Withdrawal Type

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/withdrawaltype/USD?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 98fdaa74-1e6b-fa0c-a399-94bda54913d9' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/withdrawaltype/USD?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "8215378b-880f-e207-6f13-14232e4d24e3")
      .build();
    
    Response response = client.newCall(request).execute();
    
    //Objective-C code here
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"868ebbfa-5c40-0c11-36b2-3006e9b56a7c" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/withdrawaltype/USD?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/withdrawaltype/USD');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '0fd5a7dc-3cb7-b864-9fbd-7496e72add61',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/withdrawaltype/USD?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '675f1686-2fb7-06de-f650-57cd6ee67430'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "id": 1,
                "display": "Quick Cheque Deposit"
            },
            {
                "id": 2,
                "display": "Cheque to be collected personally"
            },
            {
                "id": 3,
                "display": "Authorisation for cheque collection"
            },
            {
                "id": 5,
                "display": "Internal transfer within Phillip Futures"
            },
            {
                "id": 6,
                "display": "Internal transfer within Phillip group"
            },
            {
                "id": 7,
                "display": "Remittance to bank"
            }
        ]
    }
    

    Get the list of Withdrawal type used for Online Withdrawal

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/withdrawaltype/{currency}

    Container Description Constraints Type
    {currency} Currency symbol
    Eg. USD, SGD
    3 characters String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of withdrawal types
    PropertyDescriptionType
    idWithdrawal type idInteger
    displayWithdrawal Type display name.String
    List

    Get Important Notes

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 56a56553-bfd3-286b-8f79-04ae212a09c2' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "aeee9ba9-8a20-2a6b-22bd-34281f767b6b")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"4a110a80-f292-a616-f97d-92205247e9ca" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "414bd7f0-350b-332a-04f7-e346d59ef3f1");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'cb53b7d1-f701-a2f5-d0fa-76ac6f98353d',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/notes?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '51e2db47-66df-e097-1dee-9e16572cb44b'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "<ul><li>Withdrawal request submitted after 08:30 AM will only be processed on the next working day.</li><li>Withdrawal request status will be updated after  1:00 PM on POEMS</li><li>No cancellation of withdrawal upon submission.</li></ul>"
    }
    

    Get the Important Notes details for Online Withdrawal

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/notes

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response container of online forms important notes String

    Get Terms and Conditions

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 068540bc-4508-ca88-c3ab-c1732b0c632b' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "aadec53a-19ec-a6d3-6375-8cc23b6d1784")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"dcfdea86-777d-5ed7-7b6e-6b28f05bf402" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "df3724cb-1521-3cd4-c4ea-8abf968d9432");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'ee9c5509-5fe1-5c48-64cc-387e9069adc9',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/terms?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '3310903c-4e04-1533-fbbf-68e3b7ec2258'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "<ul><li>All Instructions for withdrawal are subject to the following terms & conditions:</li><li>The customer acknowledges and agrees that the withdrawal instructions shall not be taken to have been received or executed by Phillip Futures Pte Ltd (\"\"PFPL\"\") until he has received PFPL's confirmation of receipt of the withdrawal form.</li><li>PFPL shall not be obliged to effect the customer’s withdrawal instruction if, on the stipulated date, his trading account does not have sufficient funds to meet such withdrawal or the bank account specified by him is closed, frozen or inaccessible for any reason whatsoever.</li><li>The customer shall be solely responsible for ensuring the accuracy, adequacy and completeness of his withdrawal instructions and PFPL will not be obliged to verify the accuracy, adequacy and completeness of his instructions. PFPL shall not be responsible for any loss or damage suffered by him as a result of his instructions being inaccurate, inadequate or incomplete in any way.</li><li>Withdrawals, whether by way of telegraphic transfer or cheque, will only be paid out in the name of the account holder.</li><li>Countermand of any instructions for withdrawal will only be effected and will only be effective if it is received by PFPL in sufficient time for PFPL to accommodate such countermand and before PFPL has actually carried out the instructions which the customer intended to countermand. Any countermand of such instructions may be effected orally, in writing, by facsimile, by electronic mail or in person.</li><li>PFPL reserves the right <b><u>not to</u></b> execute the customer’s instructions at any time without prior notice to him and without assigning any reason whatsoever; PFPL shall not be responsible for any loss or damage suffered by the customer as a result.</li><li>Not withstanding the termination of the customer’s POEMS access, PFPL shall carry out any withstanding conversion instructions.</li><li>The customer agrees to indemnify PFPL in full against any claim, demand, action or proceeding which may be made against PFPL and/or any damage, liability, loss and expense including legal costs on a full indemnity basis which PFPL may incur or suffer directly or indirectly in acting upon any instructions which he may give in relation to any withdrawal or transfer due to the customer’s negligence, misconduct or breach of any term herein.</li><li>These terms and conditions are in addition to the Conditions Governing Phillip Futures Trading Accounts. PFPL reserves the right to add or vary any of these terms and conditions at any time at its discretion and such additions and/or variations shall be deemed to have effect on the date specified by PFPL.</li></ul>"
    }
    

    Get Online Withdrawal Terms and Conditions

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/terms

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response container of online forms terms and conditions String

    Get Interest Rates URL

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 06144906-0264-f321-f496-ad8054acddcc' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "78c82d90-b6e1-bcea-e68d-6c575e2942d5")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"09ab111e-a535-78c1-8c9e-3e01fc33584e" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "ae5cc32f-f876-44d9-3bb9-47cbbd6dcf59");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '098fcacf-f7f0-e31d-e2b1-84d8e6c0b941',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/interestrate?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '14950a33-1c11-0002-5dab-245419ba7944'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "http://www.phillipfutures.com.sg/products/intrate.htm"
    }
    

    Get the URL of Online Withdrawal Interest Rate

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/interestrate

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response container of online forms interest rate url String

    Get Quick Deposit Bank List

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 114978f1-a371-c9bb-5c68-3ab027a1b98d' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "30ab3b04-13fc-cc9c-d76c-d18006bafcb4")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"dc1d34d4-0d6a-0aff-d9ab-1d43fa8cc256" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "a29eb0e8-e577-fb9e-c732-9abf504a4369");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => 'ff4d1453-adc1-565d-c943-fe5d147467a7',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/banks?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'aa6db75e-e5f0-dcf4-b9b8-5b02f3aeb529'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [        
            {
                "code": "BOA",
                "displayName": "Bank of America"
            },
            {
                "code": "BOC",
                "displayName": "Bank of China"
            },
            {
                "code": "BOS",
                "displayName": "Bank of Singapore"
            },
            {
                "code": "CITI",
                "displayName": "Citibank"
            },
            {
                "code": "DBS",
                "displayName": "Development Bank of Singapore"
            },
            {
                "code": "UOB",
                "displayName": "United Overseas Bank "
            }
        ]
    }
    

    Get list of banks for quick deposit

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/banks

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of bank
    PropertyDescriptionType
    codeBank codeString
    displayNameBank display nameString
    List

    Get Phillip Group List

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'osversion: 7.1.1' \
      -H 'postman-token: bec4a945-9f20-956e-352f-c2f4325878c0' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("osversion", "7.1.1")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "1a682023-d350-ff35-06a5-68b3061bebe6")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"osversion": @"7.1.1",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"15aebaff-32f2-f768-d6f3-d08557098d32" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "c9022ed6-91ee-a3e4-6d34-bac2827867d6");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("osversion", "7.1.1");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '83fb83b2-835a-6b62-9815-c21eab384644',
      'cache-control' => 'no-cache',
      'osversion' => '7.1.1',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/phillipgroups?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["osversion"] = '7.1.1'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '01c816e8-ca76-11e9-42c1-bb730de71e62'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": [
            {
                "code": "0000000 (;V",
                "displayName": "0000000 ((V))"
            },
            {
                "code": "1000107 (;V",
                "displayName": "1000107 ((V))"
            },
            {
                "code": "1000115 (;V",
                "displayName": "1000115 ((V))"
            },
            {
                "code": "Others",
                "displayName": "Others"
            }
        ]
    }
    

    Get the list of Phillip Group accounts

    HTTP Request

    GET {url}/pmobile2/NFX/onlinewithdrawal/phillipgroups

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of list of bank
    PropertyDescriptionType
    codeGroup codeString
    displayNameGroup display nameString
    List

    Validate Online Withdrawal Order

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0' \
      -H 'postman-token: 241770af-48db-b2b3-d9f7-3b7c5a29ca33' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("encryptedpin", "2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "1f2c0596-f4fa-a359-e0a0-dfee6f9fd4b6")
      .build();
    
    Response response = client.newCall(request).execute();
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate")
      .post(null)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("encryptedpin", "2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "1f2c0596-f4fa-a359-e0a0-dfee6f9fd4b6")
      .build();
    
    Response response = client.newCall(request).execute();
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "5ea8cc88-a2bf-bcc8-9425-d2438f6ab400");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("encryptedpin", "2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '95bcd108-86ee-e8cf-f90d-03f05f532336',
      'cache-control' => 'no-cache',
      'content-type' => 'application/x-www-form-urlencoded',
      'encryptedpin' => '2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
    
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal/validate")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["encryptedpin"] = '2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '8bb96636-f0ef-ec19-08ca-23b24bbcead9'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": "6CCD9519-F980-4AF4-A922-5E41E57C1910",
        "confirmationMessage": "Quick Cheque Deposit\nAmount : USD 20.00",
        "note": "No cancellation of withdrawal upon submission",
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Validate Online Withdrawal order

    HTTP Request

    POST {url}/pmobile2/NFX/onlinewithdrawal/validate

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    currency Currency to be withdrawn Yes String
    amountWithdrawn Total amount to withdraw Yes Decimal
    withdrawalType Withdrawal type Yes Integer
    bankName Bank name No String
    bankAccountNo Bank account number No String
    accountNo Represents Phillip account No String
    name Represents account name No String
    nricPassport NRIC or Passport No String
    swiftCode Swift code No String
    beneficiary Beneficiary name No String
    otherInfo Represents other information No String

    Requried Parameter Mapping for each Withdrawal Type

    Parameter Form Field Name
    bankName Bank Name
    bankAccountNo Bank A/C No

    N/A

    Parameter Form Field Name
    name Name
    nricPassport NRIC/Passport No.
    Parameter Form Field Name
    accountNo A/C No.
    name Name
    Parameter Form Field Name
    accountNo A/C No.
    otherInfo Others, please specify
    Parameter Form Field Name
    bankName Bank
    bankAccountNo A/C No.
    swiftCode Swift Code
    beneficiary Beneficiary
    otherInfo Other Information(Eg:IBAN No, BIC Code, ABA No, Chips UID,Address etc.)

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Generated “auth-token” to be use to submit order String
    confirmationMessage Confirmation message String
    note Note message String
    passwordRequired Flag if password is required for the account Boolean
    twoFARequired Flag if the 2FA is required for the account Boolean

    Submit Online Withdrawal

    Sample Request

    curl -X POST \
      https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'authtoken: D68DD267-45A4-4E7F-8C88-9CCE22646A05' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'deviceid: deviceid' \
      -H 'encryptedpin: 2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0' \
      -H 'postman-token: a605bbe0-8b52-f82f-72dc-d6fa2dc83b24' \
      -H 'sessionid: 71A041D9-2646-464F-BC98-E1FC6AEB9BCC' \
      -H 'versionno: 2.0.0' \
      -d 'currency=USD&amountWithdrawn=20&withdrawalType=1&bankName=DBS&bankAccountNo=DBS1234&accountNo=&name=&nricPassport=&swiftCode=&beneficiary=&otherInfo=&osVersion=7.1.1&language=1'
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "currency=USD&amountWithdrawn=20&withdrawalType=1&bankName=DBS&bankAccountNo=DBS1234&accountNo=&name=&nricPassport=&swiftCode=&beneficiary=&otherInfo=&osVersion=7.1.1&language=1");
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal")
      .post(body)
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("encryptedpin", "2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0")
      .addHeader("content-type", "application/x-www-form-urlencoded")
      .addHeader("authtoken", "D68DD267-45A4-4E7F-8C88-9CCE22646A05")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "71b14c2b-f689-c134-4905-e5b60a4da62b")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"71A041D9-2646-464F-BC98-E1FC6AEB9BCC",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"encryptedpin": @"2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0",
                               @"content-type": @"application/x-www-form-urlencoded",
                               @"authtoken": @"D68DD267-45A4-4E7F-8C88-9CCE22646A05",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"42580237-af78-0d8a-b5ee-acddc9459e8d" };
    
    NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"currency=USD" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&amountWithdrawn=20" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&withdrawalType=1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&bankName=DBS" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&bankAccountNo=DBS1234" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&accountNo=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&name=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&nricPassport=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&swiftCode=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&beneficiary=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&otherInfo=" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&osVersion=7.1.1" dataUsingEncoding:NSUTF8StringEncoding]];
    [postData appendData:[@"&language=1" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"POST"];
    [request setAllHTTPHeaderFields:headers];
    [request setHTTPBody:postData];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal");
    var request = new RestRequest(Method.POST);
    request.AddHeader("postman-token", "9571b0af-ced4-7183-6445-1f278f605d8e");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("authtoken", "D68DD267-45A4-4E7F-8C88-9CCE22646A05");
    request.AddHeader("content-type", "application/x-www-form-urlencoded");
    request.AddHeader("encryptedpin", "2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "71A041D9-2646-464F-BC98-E1FC6AEB9BCC");
    request.AddHeader("accountno", "0000000");
    request.AddParameter("application/x-www-form-urlencoded", "currency=USD&amountWithdrawn=20&withdrawalType=1&bankName=DBS&bankAccountNo=DBS1234&accountNo=&name=&nricPassport=&swiftCode=&beneficiary=&otherInfo=&osVersion=7.1.1&language=1", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'postman-token' => '1b6815b0-be24-a61b-01dd-18ad6d7c92a1',
      'cache-control' => 'no-cache',
      'authtoken' => 'D68DD267-45A4-4E7F-8C88-9CCE22646A05',
      'content-type' => 'application/x-www-form-urlencoded',
      'encryptedpin' => '2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => '71A041D9-2646-464F-BC98-E1FC6AEB9BCC',
      'accountno' => '0000000'
    ));
    
    $request->setContentType('application/x-www-form-urlencoded');
    $request->setPostFields(array(
      'currency' => 'USD',
      'amountWithdrawn' => '20',
      'withdrawalType' => '1',
      'bankName' => 'DBS',
      'bankAccountNo' => 'DBS1234',
      'accountNo' => '',
      'name' => '',
      'nricPassport' => '',
      'swiftCode' => '',
      'beneficiary' => '',
      'otherInfo' => '',
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/NFX/onlinewithdrawal")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = '71A041D9-2646-464F-BC98-E1FC6AEB9BCC'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["encryptedpin"] = '2634123EBA3C384F2A8A685E35FD21B74377F80AF406C315F816869C20A9CB4AF262F8B5657903357503BBE4C5549BBB46B19227E02E77880767F34C05BD402EC673E8DA2BFA30739925EB62B30209861BA667948275C7A10A64139C0B0E03E186CD3487FB33DEFCCB1A9FCE09F2E763F16EC4176DECA9B0B2CBE93CBD95BAC0'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request["authtoken"] = 'D68DD267-45A4-4E7F-8C88-9CCE22646A05'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'e2cb0ea8-c73a-ce81-47e5-958919802c83'
    request.body = "currency=USD&amountWithdrawn=20&withdrawalType=1&bankName=DBS&bankAccountNo=DBS1234&accountNo=&name=&nricPassport=&swiftCode=&beneficiary=&otherInfo=&osVersion=7.1.1&language=1"
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Withdrawal request submitted",
        "orderDetailURI": null,
        "passwordRequired": true,
        "twoFARequired": false
    }
    

    Submit Online Withdrawal order

    HTTP Request

    POST {url}/pmobile2/NFX/onlinewithdrawal

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String
    encryptedPIN Encrypted PIN String
    authToken Authentication token generated from validation order request String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer
    currency Currency to be withdrawn Yes String
    amountWithdrawn Total amount to withdraw Yes Decimal
    withdrawalType Withdrawal type Yes Integer
    bankName Bank name No String
    bankAccountNo Bank account number No String
    accountNo Represents Phillip account No String
    name Represents account name No String
    nricPassport NRIC or Passport No String
    swiftCode Swift code No String
    beneficiary Beneficiary name No String
    otherInfo Represents other information No String

    Requried Parameter Mapping for each Withdrawal Type

    Parameter Form Field Name
    bankName Bank Name
    bankAccountNo Bank A/C No

    N/A

    Parameter Form Field Name
    name Name
    nricPassport NRIC/Passport No.
    Parameter Form Field Name
    accountNo A/C No.
    name Name
    Parameter Form Field Name
    accountNo A/C No.
    otherInfo Others, please specify
    Parameter Form Field Name
    bankName Bank
    bankAccountNo A/C No.
    swiftCode Swift Code
    beneficiary Beneficiary
    otherInfo Other Information(Eg:IBAN No, BIC Code, ABA No, Chips UID,Address etc.)

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    orderDetailURI Order detail URI String
    passwordRequired Flag if password is required for the account Booelan
    twoFARequired Flag if the 2FA is required for the account Boolean

    Settings

    Provide API function to get the product specific settings like PMP settings

    PMP HTTP Setting

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: 0d0ee29b-c327-2087-9baa-4d178d849c24' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "e136f839-c0e9-2c99-3805-459ccda8437c")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"e88c8ab3-b0e9-9b1f-2994-f2a8655300a7" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "9d39a8a1-67ab-af12-7006-37a79a6faf56");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '6e80ef5f-0a09-a2e9-a048-d87d229fdff7',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmp?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = 'bc2c2505-590c-9bf1-d0b9-3767d07395e6'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response for specific product

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "product": "FT",
            "market": "SIMEX,CME,CBOT,HKFE,CMX,EUREX,INDEX,BURSA,TOCOM,NYX,OSE,ICEUS,ICEEUF,ICEEUC,ICESG,KRX",
            "primaryURL": "https://pmpfut01.poems.com.sg",
            "alternativeURLs": [
                "https://pmpfut01.poems.com.sg"
            ]
        }
    }
    

    Get the PMP settings of all or specific product

    HTTP Request

    Specific Product

    GET {url}/pmobile2/{product}/settings

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Query Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of PMP setting Object

    PMP Setting

    Property Description Type
    product Product String
    market List of markets
    FT –shows list of markets or exchanges
    FX – default to “FX”
    FXMN – default to “FXMN”
    NFX – defaults to “NFX”
    String
    primaryURL Primary PMP url String
    alternativeURLs List of alternative PMP URL List of String

    PMP WebSocket Setting

    Sample Request

    curl -X GET \
      'https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket?osVersion=7.1.1&language=1' \
      -H 'accountno: 0000000' \
      -H 'apikey: 3FA5B748-9EC7-41EF-93FA-8C93AC349312' \
      -H 'cache-control: no-cache' \
      -H 'deviceid: deviceid' \
      -H 'postman-token: aceb4a63-6cb6-9c39-3586-feb05d356c12' \
      -H 'sessionid: D49D0CB2-C7A3-4AA9-B3F4-9DF801841013' \
      -H 'versionno: 2.0.0'
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket?osVersion=7.1.1&language=1")
      .get()
      .addHeader("accountno", "0000000")
      .addHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013")
      .addHeader("deviceid", "deviceid")
      .addHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312")
      .addHeader("versionno", "2.0.0")
      .addHeader("cache-control", "no-cache")
      .addHeader("postman-token", "d3c687a8-2a37-2408-590a-200950fb1c0c")
      .build();
    
    Response response = client.newCall(request).execute();
    
    #import <Foundation/Foundation.h>
    
    NSDictionary *headers = @{ @"accountno": @"0000000",
                               @"sessionid": @"D49D0CB2-C7A3-4AA9-B3F4-9DF801841013",
                               @"deviceid": @"deviceid",
                               @"apikey": @"3FA5B748-9EC7-41EF-93FA-8C93AC349312",
                               @"versionno": @"2.0.0",
                               @"cache-control": @"no-cache",
                               @"postman-token": @"db868412-6ec2-2599-9e6a-1f2f8dec57d0" };
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket?osVersion=7.1.1&language=1"]
                                                           cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                       timeoutInterval:10.0];
    [request setHTTPMethod:@"GET"];
    [request setAllHTTPHeaderFields:headers];
    
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                                completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                    if (error) {
                                                        NSLog(@"%@", error);
                                                    } else {
                                                        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                        NSLog(@"%@", httpResponse);
                                                    }
                                                }];
    [dataTask resume];
    
    var client = new RestClient("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket?osVersion=7.1.1&language=1");
    var request = new RestRequest(Method.GET);
    request.AddHeader("postman-token", "30e33e38-d402-3a4e-b793-7461a1378393");
    request.AddHeader("cache-control", "no-cache");
    request.AddHeader("versionno", "2.0.0");
    request.AddHeader("apikey", "3FA5B748-9EC7-41EF-93FA-8C93AC349312");
    request.AddHeader("deviceid", "deviceid");
    request.AddHeader("sessionid", "D49D0CB2-C7A3-4AA9-B3F4-9DF801841013");
    request.AddHeader("accountno", "0000000");
    IRestResponse response = client.Execute(request);
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setQueryData(array(
      'osVersion' => '7.1.1',
      'language' => '1'
    ));
    
    $request->setHeaders(array(
      'postman-token' => '16de08c9-f1f5-1bd4-b01c-69184d91e243',
      'cache-control' => 'no-cache',
      'versionno' => '2.0.0',
      'apikey' => '3FA5B748-9EC7-41EF-93FA-8C93AC349312',
      'deviceid' => 'deviceid',
      'sessionid' => 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013',
      'accountno' => '0000000'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://sandboxapi.poems.com.sg/pmobile2/FT/settings/pmpwebsocket?osVersion=7.1.1&language=1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["accountno"] = '0000000'
    request["sessionid"] = 'D49D0CB2-C7A3-4AA9-B3F4-9DF801841013'
    request["deviceid"] = 'deviceid'
    request["apikey"] = '3FA5B748-9EC7-41EF-93FA-8C93AC349312'
    request["versionno"] = '2.0.0'
    request["cache-control"] = 'no-cache'
    request["postman-token"] = '1097166f-144e-aa78-33ed-ecfd59fe5eb4'
    
    response = http.request(request)
    puts response.read_body
    

    Sample Response

    {
        "code": 1,
        "msg": "Successful Transaction",
        "data": {
            "product": "FT",
            "market": "SIMEX,CME,CBOT,HKFE,CMX,EUREX,INDEX,BURSA,TOCOM,NYX,OSE,ICEUS,ICEEUF,ICEEUC,ICESG,KRX",
            "primaryURL": "wss://pmpfut04.poems.com.sg:4439",
            "alternativeURLs": [
                "wss://pmpfut04.poems.com.sg:4439"
            ]
        }
    }
    

    Get the PMP websocket settings of all or specific product

    HTTP Request

    Specific Product

    GET {url}/pmobile2/{product}/settings/pmpwebsocket

    Container Description Constraints Type
    {product} Product code FT
    FX
    FXMN
    NFX
    String

    Header Parameter

    Parameter Description Type
    accountNo Client's account number String
    sessionID Sessioin Id String
    deviceID Client's device id String
    apiKey Application key to access the API String
    versionNo Application version number String

    Form Parameter

    Parameter Description Default Required Type
    osVersion Client's device OS version number Yes String
    language Supported Language
    1 - English
    2 - Simplified Chinese
    1 No Integer

    Response

    Property Description Type
    code Response code Integer
    msg Response message String
    data Response data container of PMP setting Object

    PMP Setting

    Property Description Type
    product Product String
    market List of markets
    FT –shows list of markets or exchanges
    FX – default to “FX”
    FXMN – default to “FXMN”
    NFX – defaults to “NFX”
    String
    primaryURL Primary PMP url String
    alternativeURLs List of alternative PMP URL List of String

    Error Code

    This API uses the following error codes:

    Code Description
    1 Successful Request
    -1 Error or Request Failed
    -2 Online Form Error Code
    -42 Session Expired
    -333 Confirmation or Warning
    -335 Trade Confirmation