Skip to main content

· 3 min read
Mahesh Pathirana

Introduced New APIs Change

Version 1.1.1 to Version 1.2.0

Changes to existing APIs

path changes

Endpoints paths have been changed as followings,

APIChange
Place Order
Newly added parameters to the request"amount": 0,
"instrumentType": "string",
"investmentId": "string",
"isPartialRedemption": 0
Cancel Order
Newly added parameters to the request"orderReferenceId": "string"
Get Commission and Vat
Newly added parameters to the request"amount": 0,
"instrumentType": "string"
Get Order Details
Newly added parameters to the request"externalOrderId": "string",
"securityType": "string"
Newly added fields to the response"amount": 0,
"blockedAmount": 0,
"executedNav": 0,
"expiryDate": "string",
"grossAmount": 0,
"initialNav": 0,
"investmentId": "string",
"isPartialRedemption": 0,
"issueSettleRate": 0,
"marketCode": "string",
"netSettle": 0,
"netValue": 0,
"requestType": 0,
"units": 0,
Within "executionList"
"amount": 0,
Changed fields in response"date": "string" -> "createdDate": "string",
Order Search
Newly added parameters to request"securityType": "string",
"timeFilter": "string",
"investmentId": "string"
Changed parameters in request"lastUpdatedTime": "string" -> "lastUpdatedDate": "string"
Newly added fields to response"amount": 0,
"blockedAmount": 0,
"executedNav": 0,
"filledQty": 0,
"initialNav": 0,
"investmentId": "string",
"isPartialRedemption": 0,
"issueSettleRate": 0,
"lastPrice": 0,
"netSettle": 0,
"netValue": 0,
"requestType": 0,
"requestType - copy": 0,
"units": 0,
"vat": 0
Removed fields in response"orderRejectReason": "string",
"originalOrderReferenceId": "string",
"price": 0
Get Open Orders
Newly added parameters to request"pageNo": "number"
"pageWidth": "number"
"securityType": "string"
"investmentId": "string"
Newly added fields to response"isNextPageAvailable": true,
"pageNo": 0,
"pageWidth": 0,
"totalNoOfRecords": 0
Within "list":
"blockedAmount": 0,
"currency": "string",
"executedNav": 0,
"externalOrderId": "string",
"filledQty": 0,
"grossAmount": 0,
"initialNav": 0,
"investmentId": "string",
"isPartialRedemption": 0,
"issueSettleRate": 0,
"lastPrice": 0,
"lastUpdatedDate": "string",
"marketCode": "string",
"netSettle": 0,
"netValue": 0,
"requestType": 0,
"settleCurrency": "string",
"tif": 0,
"units": 0,
"vat": 0
Removed fields in response"openOrders": [] -> "list":[]
"quantity": 0 -> "orderQty": 0,
"rejectReason": "string" -> "orderRejectReason": "string"
Get Positions
Newly added fields to responseWithin "positions":
"accruedInterest": 0,
"amount": 0,
"collectedCoupons": 0,
"costValue": 0,
"fullyRedeem": 0,
"investmentId": "string",
"isin": "string",
"redeemAmount": 0,
"startDate": "string",
"totalCost": 0
Get Holding Statement
Changed parameters in request"accountType": 0 -> "securityType": "CS"
Newly added fields to responseWithin symbol "list":
"totalAmount": 0,
Within transactions "list":
"amount": 0

· One min read
Mahesh Pathirana

Get Top Stocks Data API

"Top stocks data" generally refers to information about the best-performing or most popular stocks in the financial markets. This data can include various metrics and indicators that investors use to evaluate the performance of stocks.

TOP STOCK TYPEREFERENCE
Top gainers by percentage change1
Top loosers by percentage change3
Most active by volume4
Most active by value6

NOTE: Above mentioned top stock types are available. Others are deprecated.

· One min read
Mahesh Pathirana

Updated Error Codes

ErrorStatusError CodeDescription
Bad Request400400001required parameter missing
Bad Request400400002invalid date format
Bad Request400400003undefined field value
Bad Request400400004invalid type for field value
Bad Request400400005invalid response type
Bad Request400400006request failed
Unauthorized401-user has no access
Unauthorized4011007token expired
Unauthorized4011008invalid token
Forbiiden403-authorization failed
Internal Server Error500-system error, internal error handling request

· 6 min read
Mahesh Pathirana

Introduced New APIs

Sharia Compliance API

This endpoint gives the Shariah compliant symbols for the given exchange.

Changes to existing APIs

path changes

Endpoints paths have been changed as followings,

APIVersion 1.0Version 1.1Change
Get Tokenauth/authentication/serverAuthTokenauth/tokenMoved basic authentication to header. Previously it was supported even in body. Removed following deprecated fields - Removed accessTokenExpiresIn and refreshTokenExpiresIn from response.
Token Refreshauth/authentication/refreshSeverAuthTokenauth/token/refreshChanged it to POST. Removed following deprecated fields. Removed accessTokenExpiresIn and refreshTokenExpiresIn from response.
Get Customer Tokenauth/customer/tokenauth/token/refreshRemoved following deprecated fields. Removed accessTokenExpiresIn and refreshTokenExpiresIn from response.
Customer Token Refreshauth/authentication/refreshCustomerAuthTokenauth/customer/token/refreshChanged it to POST. Removed following deprecated fields - same response. Removed accessTokenExpiresIn and refreshTokenExpiresIn from response.
Validate Usernamebo/customer/validateUserNamebo/customer/username/validateno change other than path.
Register Customerbo/register-customerbo/customer/registerno change other than path.
Get Registration Statusbo/registration-statusbo/v1.1/customer/registration/statusno change other than path.
Get Registration Requestsbo/registration-requestsbo/v1.1/customer/register /requestsno change other than path.
Get Customer Detailsbo/customer-accountbo/v1.1/customer/accountget customer details - in response externalRefNo > referenceNumber
Create Customerbo/customer-accountbo/v1.1/customer/accountno change other than path.
Update Customerbo/customer-accountbo/v1.1/customer/accountno change other than path.
Place Orderfo/order/createfo/v1.1/order/createorder path has been changed. This will return only orderReferenceId, status & reason. using get order details API, you can fetch orderId. expiryDate was added to the request as optional to be set for Tif Type 6 GTD Orders.
Amend Orderfo/order/amendfo/v1.1/order/createorder path has been changed. This will return only orderReferenceId, status & reason. using get order details API, you can fetch orderId.orderValue is added to request.
Cancel Orderfo/order/cancelfo/v1.1/order/createorder path has been changed. This will return only orderReferenceId, status & reason. using get order details API, you can fetch orderId.
Get Commision & Vatfo/commission & fo/vatfo/v1.1/order/commission-vatboth commision and vat has been merged to one API. remove orderCategory & institutionCode as input and added securityType which use enums - CS, OPT, BND. Response gives both commission & vat.
Get Order Detailsfo/order/detailsfo/v1.1/orderorder path has been changed. orderRefereceId added to request. originalOrderReferenceId removed from response and added currency, settleCurrency, lastUpdatedDate, tif, price, expiryDate, accruedInterest to response.
Order Searchfo/order/searchfo/v1.1/orders/searchchanged it to GET.- pageNo and pageWidth not reuired as before. page no default 1, page width default and max = 100. clientOrderId removed from request. clientOrderId, orderReferenceId, originalClientOrderId, originalOrderReferenceId, orderNumber, cumulativeVatAmount, cumulativeStampDutyAmount are removed from response.
Get Open Ordersfo/order/open-ordersfo/v1.1/orders/openorder path has been changed. clientOrderId is removed from request. clientOrderId, originalOrderReferenceId are removed from response.
Get Customer Account Listbo/customer-account-listbo/v1.1/customer/accountspage no default - 1, pagewidth default and max - 100.
Get Cash Accountbo/cash-accountbo/v1.1/customer/account/cashno change other than path.
Create Cash Accountbo/cash-accountbo/v1.1/customer/account/cashno change other than path.
Delete Cash Accountbo/cash-accountbo/v1.1/customer/account/cashno change other than path.
Update Cash Accountbo/cash-accountbo/v1.1/customer/account/cashno change other than path.
Get Security Accountbo/security-accountbo/v1.1/customer/account/securityno change other than path.
Create Security Accountbo/security-accountbo/v1.1/customer/account/securityno change other than path
Delete Security Accountbo/security-accountbo/v1.1/customer/account/securityno change other than path
Update Security Accountbo/security-accountbo/security-accountbo/v1.1/customer/account/security
Get Exchange Accountbo/exchange-accountbo/v1.1/customer/account/exchangeno change other than path.
Create Exchange Accountbo/exchange-accountbo/v1.1/customer/account/exchangeno change other than path.
Delete Exchange Accountbo/exchange-accountbo/v1.1/customer/account/exchangeno change other than path.
Update Exchange Accountbo/exchange-accountbo/v1.1/customer/account/exchangeno change other than path.
Enable Tradingbo/trading-enablebo/v1.1/customer/account/exchange/trading-enableno change other than path.
Get Customer Bank Accbo/customer-bank-accountbo/v1.1/customer/account/bankno change other than path.
Create Customer Bank Accbo/customer-bank-accountbo/v1.1/customer/account/bankno change other than path.
Create Customer Bank Accbo/customer-bank-accountbo/v1.1/customer/account/bankno change other than path.
Update Customer Bank Accbo/customer-bank-accountbo/v1.1/customer/account/bankno change other than path.
Get Customer Bank Accountsbo/customer-bank-account-listbo/v1.1/customer/account/banks/account/banks/no change other than path.
Get Feed Level Detailsbo/feed-levelbo/v1.1/customer/account/exchange/feed-levelno change other than path.
Feed Level Upgrade & Downgradebo/feed-level-changebo/v1.1/customer/account/exchange/feed-level/changeno change other than path.
Depositbo/deposit-requestbo/v1.1/finance/depositno change other than path.
Withdrawbo/withdraw-requestbo/v1.1/finance/withdrawno change other than path.
Deposit Withdraw Statusbo/deposit-withdraw-statusbo/v1.1/finance/deposit-withdraw/statusno change other than path.
Get Account Summarybo/cash-statementfo/v1.1/customer/account/cash/summaryno change other than path.
Get Positionsbo/deposit-withdraw-statusfo/v1.1/customer/account/security/summaryno change other than path.
Get Cash Statementbo/deposit-withdraw-statusbo/v1.1/statement/cashno change other than path.
Get Holding Statementbo/holding-statementbo/v1.1/statement/positionsno change other than path.
Stock Transactionsbo/stock-trans-detailsbo/v1.1/statement/positionsno change other than path.
Cashbo/ca/cashbo/v1.1/statement/ca/cashno change other than path.
Positionsbo/ca/positionsbo/v1.1/statement/ca/positionsno change other than path.
Get Institution Currency Ratesbo/currency-ratesbo/v1.1/master-data/currency-ratesno change other than path.
Get Country Listbo/country-listbo/v1.1/master-data/countriesno change other than path.
Get Institutional Bank Accountsbo/institution-bank-accountsbo/v1.1/master-data/institution/bank-accountsno change other than path.
Get Support Trading Sessionsbo/support-trading-sessionsbo/v1.1/master-data/exchange/trading-sessionsno change other than path.
Get Exchange TIF Typesbo/tif-typesbo/v1.1/master-data/exchange/tif-typesno change other than path.
Get Exchange Order Typesbo/order-typesbo/v1.1/master-data/exchange/order-typesno change other than path.
Get Exchange Listbo/exchange-listbo/v1.1/master-data/institution/exchangesno change other than path.
Get Bank Branch Detailsbo/bank-branch-listbo/v1.1/master-data/bank/branchesno change other than path.
Get Shariah Compliant SymbolsN/Abo/v1.1/master-data/symbols/shariaIntroduction of New API to obtain Sharia complian symbols for a given institute.

· One min read
Mahesh Pathirana

Changes to existing APIs

changes to existing fields

country > countryCode

  • customer account APIs

nationalIdNumber > nin

  • customer account list
  • get customer details

tradingSession field not required and set default to "REG".

  • place an order
  • commission
  • vat

· One min read
Mahesh Pathirana

Changes to existing APIs

new fields

Following field were added to the responses of ,

  • get order details
  • order search
  • get open orders APIs.
fielddescriptiontype
cumulativeQtyfilled qtynumber
cumulativeOrderValuefilled order valuenumber
cumulativeOrderNetValueorderValue + totalCommission + vatAmount + stampDutyAmount;number
cumulativeCommissiontotal commission for filled ordersnumber
cumulativeOrderNetSettlenetValue * issueSettleRatenumber

IssueSettleRate ; fx rate from symbol currency to cash account currency

removed fields

Removed netSecurityValue from account summary API. since this need to be calculated using current market prices.

changes to existing fields

All the date formats of the trade management responses changed to this format - yyyy/MM/dd-HH:mm:ss