API Specs

API List

  • Token and Authentication code

APIMethodPath

AccessToken

POST

Trading/AccessToken

GetOTP

POST

Trading/GetOTP

  • Query cash and derivatives accounts

APIMethodPath

orderBook

GET

Trading/orderBook

auditOrderBook

GET

Trading/auditOrderBook

cashAcctBal

GET

Trading/cashAcctBal

derivAcctBal

GET

Trading/derivAcctBal

ppmmraccount

GET

Trading/ppmmraccount

stockPosition

GET

Trading/stockPosition

derivPosition

GET

Trading/derivPosition

maxBuyQty

GET

Trading/maxBuyQty

maxSellQty

GET

Trading/maxSellQty

orderHistory

GET

Trading/orderHistory

rateLimit

GET

Trading/rateLimit

  • Order placing

APIMethodPath

NewOrder

POST

Trading/NewOrder

CancelOrder

POST

Trading/CancelOrder

derNewOrder

POST

Trading/derNewOrder

ModifyOrder

POST

Trading/ModifyOrder

derCancelOrder

POST

Trading/derCancelOrder

derModifyOrder

POST

Trading/derModifyOrder

  • Cash

APIMethodPath

cashInAdvanceAmount

GET

cash/cashInAdvanceAmount

unsettleSoldTransaction

GET

cash/unsettleSoldTransaction

transferHistories

GET

cash/transferHistories

cashInAdvanceHistories

GET

cash/cashInAdvanceHistories

estCashInAdvanceFee

GET

cash/estCashInAdvanceFee

vsdCashDW

POST

cash/vsdCashDW

transferInternal

POST

cash/transferInternal

createCashInAdvance

POST

cash/createCashInAdvance

  • Stock

APIMethodPath

transferable

GET

stock/transferable

transferHistories

GET

stock/transferHistories

transfer

POST

stock/transfer

  • Online Right Subscription

APIMethodPath

dividend

GET

ors/dividend

exercisableQuantity

GET

ors/exercisableQuantity

histories

GET

ors/histories

create

POST

ors/create

Configuration

MethodContentContent

Post

Header (Authorization, Content-Type)

Body (json)

Get

Header (Authorization)

Params

Request access

POST AccessToken

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/AccessToken

To get token to access APIs.

Details

FieldTypeRequired?Description

consumerID

string

Yes

Your consumerID

consumerSecret

string

Yes

Your consumerSecret

code

string

No

Authentication code. Refer to General Information for details. Required if isSave = true.

TwoFactorType

string

Yes

Your account's authentication type. Supported values: 0 (PIN), 1 (OTP)

isSave

boolean

Yes

  • If true: you will not have to fill in authentication code for each transaction. The code will be saved within the login sesion.

  • If false: you will have to fill in authentication code for each transaction.

Sample

  • Successfull request:

Input: 
{
  consumerID: "38f5fdfa56b44d5ab8b95895eb588e99",
  consumerSecret: "6d61bffefc6540fc837c71afd2ca4bcf",
  twoFactorType: 1,
  code: "123456789",
  isSave: false
}
Output: 
{
    message: "Success",
    status: 200,
    data: {
        "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ”
}
  • Error request:

Input: 
{
  consumerID: "38f5fdfa56b44d5ab8b95895eb588e99",
  consumerSecret: "6d61bffefc6540fc837c71afd2ca4bcf",
  twoFactorType: 0,
  code: "123456789",
  isSave: true
}
Output: 
{
message: "Key does not exist.",
status: 400,
data: null
 }

POST GetOTP

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/GetOTP

To get OTP code if you registered SMS OTP/Email OTP.

If you get OTP code for 5 times without verification, your OTP service will be temporarily blocked and then automatically unlocked after sometimes.

Details

FieldTypeRequired?Description

consumerID

string

Yes

You consumerID

consumerSecret

string

Yes

Your consumerSecret

Sample

  • Successfull request:

Input: 
{
  "consumerID": "968d7b5940f5437583021aea2b038f35",
  "consumerSecret": "11ab3fc6af954c59ba646fac016f30cb"
}
Output: 
{
    message: "Success",
    status: 200
}
  • Error request:

Input: 
{
  "consumerID": "968d7b5940f5437583021aea2b038f351",
  "consumerSecret": "11ab3fc6af954c59ba646fac016f30cb"
}
Output: 
{
  "message": "ConsumerID is invalid",
  "status": 400
}

GET auditOrderBook

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/auditOrderBook

To get the audit of the orders.

Details

FieldTypeRequired?Description

account

string

Yes

Sample

Input: 
{
account: "1184418"
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "1184418",
    "orders": [
      {
        "uniqueID": "73885549",
        "orderID": "T202306146w273885549",
        "buySell": "B",
        "price": 1000,
        "quantity": 100,
        "filledQty": 0,
        "orderStatus": "RJ",
        "marketID": "VNFE",
        "inputTime": "1686730747945",
        "modifiedTime": "1686730747945",
        "instrumentID": "VN30F2306",
        "orderType": "LO",
        "cancelQty": 0,
        "avgPrice": 0,
        "isForcesell": "F",
        "isShortsell": "F",
        "rejectReason": "Invalid market status",
        "lastErrorEvent": null
      }     
    ]
  }
}

POST OrderBook

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/OrderBook

To get latest orderbook, for both cash and derivatives accounts.

Details

FieldTypeRequired?Description

account

string

Yes

Input the account to query. Accept both cash and derivatives accounts.

Sample

Input: 
{
account: "1184418"
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "1184418",
    "orders": [
      {
        "uniqueID": "73885549",
        "orderID": "T202306146w273885549",
        "buySell": "B",
        "price": 1000,
        "quantity": 100,
        "filledQty": 0,
        "orderStatus": "RJ",
        "marketID": "VNFE",
        "inputTime": "1686730747945",
        "modifiedTime": "1686730747945",
        "instrumentID": "VN30F2306",
        "orderType": "LO",
        "cancelQty": 0,
        "avgPrice": 0,
        "isForcesell": "F",
        "isShortsell": "F",
        "rejectReason": "Invalid market status"
      }     
    ]
  }
}

GET orderHistory

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/orderHistory

To get order history, for both cash and derivatives accounts.

Details

FieldTypeRequired?Description

account

string

Yes

startDate

date

Yes

Format dd/mm/yyyy

endDate

date

Yes

Format dd/mm/yyyy

Sample

Input: 
{
account: "0901358",
startDate:18/11/2020,
endDate:18/11/2020
}
Output: 
{
    message: "Success",
    status: 200,
    data: {
        orderHistories: [
      {
                uniqueID: null,
                orderID: "12626539",
                buySell: "B",
                price: 800.0,
                quantity: 10,
                filledQty: 0,
                orderStatus: "RJ",
                marketID: "VNFE",
                inputTime: "1603157594668",
                modifiedTime: "1603157594668",
                instrumentID: "VN30F2012",
                orderType: "LO",
                cancelQty: 0,
                avgPrice: 0.0,
                isForcesell: null,
                isShortsell: null
            }
],
        account: "0901358"
    }
 }

GET cashAccountBalance

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/cashAcctBal

To get cash account's balance.

Details

FieldTypeRequiredDescription

account

string

Yes

Sample

Input: 
{
    account: "0901351",
}
Output: 
{
message: "Success",
status: 200,
data: {
account: "0901351",
cashBal: 7459369481,
cashOnHold: 0,
secureAmount: 0,
withdrawable: 7459367581,
receivingCashT1: 0,
receivingCashT2: 0,
matchedBuyVolume: 0,
matchedSellVolume: 0,
debt: 1900,
unMatchedBuyVolume: 0,
unMatchedSellVolume: 864619337,
paidCashT1: 0,
paidCashT2: 0,
cia: 0,
purchasingPower: 7459367581,
totalAssets: 9726161481
       }
}

GET stockPosition

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/stockPosition

To query stock positions of cash accounts.

Details

FieldTypeRequired?Description

account

string

Yes

Input account number

Sample

Input: 
{
account: "0901351",
}
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0001011",
    "totalMarketValue": 0,
    "stockPositions": [
      {
        "marketID": "VN",
        "instrumentID": "AMC",
        "onHand": 300,
        "block": 0,
        "bonus": 3819,
        "buyT0": 0,
        "buyT1": 0,
        "buyT2": 0,
        "sellT0": 0,
        "sellT1": 0,
        "sellT2": 0,
        "avgPrice": 1529,
        "mortgage": 0,
        "sellableQty": 300,
        "holdForTrade": 0,
        "marketPrice": 0
      }
    ]
  }
}

GET derivativeAccountBalance

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/derivAcctBal

To get derivatives account's balance.

Sample

FieldTypeRequired?Description

account

string

Yes

Sample

Input: 
{
    account: "0901358",
}
Output: 
{
message: "Success",
status: 200,
data: {
account: "0901358",
accountBalance: 11166309263,
fee: 0,
commission: 0,
interest: 1514965,
loan: 0,
deliveryAmount: 0,
floatingPL: 0,
totalPL: 0,
marginable: 0,
depositable: 1148597520,
rcCall: 0,
withdrawable: 10912447363,
nonCashDrawableRCCall: 0,
internalAssets: {
cash: 1165730020,
validNonCash: 0,
totalValue: 11166309263,
maxValidNonCash: 0,
cashWithdrawable: 1148597520,
ee: 8197059272
        },
exchangeAssets: {
cash: 10000579243,
validNonCash: 0,
totalValue: 10000579243,
maxValidNonCash: 0,
cashWithdrawable: 9763849843,
ee: 7322887382
         },
        internalMargin: {
initialMargin: 172660800,
deliveryMargin: 0,
marginReq: 172660800,
accountRatio: 1.5462656096416592,
usedLimitWarningLevel1: 75,
usedLimitWarningLevel2: 85,
usedLimitWarningLevel3: 90,
marginCall: 0
        },
      exchangeMargin: {
marginReq: 172660800,
accountRatio: 1.7265079932330476,
usedLimitWarningLevel1: 75,
usedLimitWarningLevel2: 85,
usedLimitWarningLevel3: 90,
marginCall: 0
        }
     }
}

GET derivativePosition

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/derivPosition

To get dervatives account's position. After getting the snapshot, you can subscribed streaming to get realtime update.

Details

FieldTypeRequired?Description

account

string

Yes

querySummary

boolean

Yes

  • True: Netoff position

  • False: don't netoff position

Sample

Input: 
{
account: "0901358",
querySummary: true
}
Output: 
{
message: "Success",
status: 200,
data: {
       account: "0901358",
       openPosition: [
       {
           marketID: "VNFE",
           instrumentID: "VN30F2106",
           longQty: 8,
           shortQty: 0,
           net: 8,
           bidAvgPrice: 0,
           askAvgPrice: 0,
           tradePrice: 1452.7,
           marketPrice: 1452.7,
           floatingPL: 0,
           tradingPL: 0
          }   ],
        closePosition: [ ]
    }
}

GET maxBuyQty

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/maxBuyQty

To get max buy quantity. Applied for both cash and derivatives accounts.

Details

FieldTypeRequired?Description

account

string

Yes

instrumentID

string

Yes

price

number

Yes

Sample

Input: 
{
account: "0041691",
instrumentD: “SSI”,
price:17
}
Output: 
{
    message: "Success",
    status: 200,
    data: {
        account: "0041691",
        maxBuyQty: 8241440,
        marginRatio: "50%",
        purchasingPower: 99292902171
    }
}

GET maxSellQty

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/maxSellQty

To get max sell quantity. Applied for both cash and derivatives accounts.

Details

FieldTypeRequired?Description

account

string

Yes

instrumentID

string

Yes

price

number

Yes

Sample

Input: 
{
account: "0041691",
intrumentID: “SSI”
}
Output: 
{
    "message": "Success",
    "status": 200,
    "data": {
        "account": "0041691",
        "maxSellQty": 2000
    }
}

POST NewOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/NewOrder

To place orders.

Details

FieldTypeRequired?Description

instrumentID

string

Yes

market

string

Yes

VN: cash market

VNFE: derivatives market

buySell

string

Yes

buy (B): mua/Sell (S): bán đã đặt theo orderID của lệnh

B: Buy

S: Sell

orderType

string

Yes

channelID

string

Yes

Kênh đặt lệnh VD: TA (trader API)

price

number

Yes

Giá đặt lệnh:

- Nếu loại lệnh là LO -> Giá đặt > 0

- Nếu loại lệnh khác LO -> Giá đặt = 0

quantity

number

Yes

account

string

Yes

requestID

string

Yes

ID đặt lệnh trong ngày. Bắt buộc 8 số random

stopOrder

string

Yes

  • True: conditional orders. Only applied for derivatives market.

  • False: normal orders

stopPrice

number

Yes

If stopOrder = true -> stopPrice > 0

stopType

string

Yes

Required if stopType = true:

  • D: Down

  • U: Up

  • V: Trailling Up

  • E: Trailing Down

  • O: OCO

  • B: BullBear

stopStep

number

Yes

Stop loss amount, only applied for BullBear (stopType = B)

profitStep

number

Yes

Take profit amount, only applied for BullBear (stopType = B)

code

number

No

Authentication code: PIN/OTP (depending on your registered authentication type)

deviceID

string

Yes

userAgent

string

No

Sample

  • Successful request:

Input: 
{ 
instrumentID: "SSI",
market: "VN",
buySell: "B",
orderType: "LO",
channelID: "IW",
price: 21000,
quantity: 300,
account: "0901351",
stopOrder: false,
stopPrice: 0,
stopType: "string",
stopStep: 0,
lossStep: 0,
profitStep: 0
requestID: "1678195",
code:123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
 }
 Output: 
 {
message: "Success",
status: 200,
data: {
requestID: "1678195",
requestData: 
{
instrumentID: "SSI",
market: "VN",
buySell: "B",
orderType: "LO",
channelID: "IW",
price: 21000,
quantity: 300,
account: "0901351",
stopOrder: false,
stopPrice: 0,
stopType: "string",
stopStep: 0,
lossStep: 0,
profitStep: 0
}
    }
}
  • Error request:

Input: 
{  
instrumentID: "SSI",
market: "VN",
buySell: "B",
orderType: "ATO",
channelID: "IW",
price: 21000,
quantity: 300,
account: "0901351",
stopOrder: false,
stopPrice: 0,
stopType: "string",
stopStep: 0,
lossStep: 0,
profitStep: 0
requestID: "1678195",
code:123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
 }
Output: 
 {
    message: "Price is null or equal zero when order is market order",
    status: 400,
    data: null
}

POST ModifyOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/ModifyOrder

To amend an order.

Details

FieldTypeRequired?Description

orderID

string

Yes

instrumentID

string

Yes

instrument of the amended order

marketID

string

Yes

VN: cash market

VNFE: derivatives market

buySell

string

Yes

side of the amended order

orderType

string

Yes

channelID

string

Yes

price

number

Yes

New price

quantity

number

Yes

New quantity

account

string

Yes

requestID

string

Yes

Unique id of the request generated by client. Required 8 digits.

code

number

No

deviceID

string

Yes

userAgent

string

No

Sample

  • Successful request:

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
message: "Success",
status: 200,
data: {
   requestID: "93235974",
   requestData: {
         orderID: "12658867",
         price: 1410,
         quantity: 2,
         account: "0901358",
         instrumentID: "VN30F2106",
         marketID: "VNFE",
         buySell: "B",
         orderType: "LO"
      }
  }
}
  • Error request:

Input: 
{
requestID: "93235971",
orderID: "",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
data: null,
message: "’Order ID’ must not be empty ",
status: 400
}

POST CancelOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/CancelOrder

To cancel an order.

Details

FieldTypeRequired?Description

orderID

string

Yes

instrumentID

string

Yes

market

string

Yes

buySell

string

Yes

orderType

string

Yes

channelID

string

Yes

price

number

Yes

quantity

number

Yes

account

string

Yes

requestID

string

Yes

code

number

No

deviceID

string

Yes

userAgent

string

No

Sample

  • Successful request:

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
message: "Success",
status: 200,
data: {
   requestID: "93235974",
   requestData: {
         orderID: "12658867",
         price: 1410,
         quantity: 2,
         account: "0901358",
         instrumentID: "VN30F2106",
         marketID: "VNFE",
         buySell: "B",
         orderType: "LO"
      }
  }
}
  • Error request:

Input: 
{
requestID: "93235971",
orderID: "",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
data: null,
message: "’Order ID’ must not be empty ",
status: 400
}

POST derNewOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/derNewOrder

To place derivatives orders.

Details

FieldTypeRequired?Description

instrumentID

string

Yes

market

string

Yes

VNFE: derivatives market

buySell

string

Yes

B: Buy

S: Sell

orderType

string

Yes

channelID

string

Yes

price

number

Yes

quantity

number

Yes

account

string

Yes

requestID

string

Yes

stopOrder

string

Yes

  • True: conditional order, applied to derivatives market only.

  • False: normal order

stopPrice

number

Yes

If stopOrder = true -> stopPrice > 0

stopType

string

Yes

Required if stopType = true:

  • D: Down

  • U: Up

  • V: Trailling Up

  • E: Trailing Down

  • O: OCO

  • B: BullBear

stopStep

number

Yes

only applied for BullBear (stopType = B)

profitStep

number

Yes

Only applied for BullBear (stopType = B)

code

number

No

deviceID

string

Yes

userAgent

string

No

Sample

  • Successful request:

Input: 
{  
instrumentID: "VN30F2306",
market: "VNFE",
buySell: "B",
orderType: "LO",
channelID: "TA",
price: 1200,
quantity: 10,
account: "1184418",
stopOrder: false,
stopPrice: 0,
stopType: "string",
stopStep: 0,
lossStep: 0,
profitStep: 0
requestID: "1678198",
code:123456789,
deviceID: "MAC Address",
userAgent: “FCTrading"
 }
 Output: 
 {
  "message": "Success",
  "status": 200,
  "data": {
    "requestID": "3407154",
    "requestData": {
      "instrumentID": "VN30F2306",
      "market": "VNFE",
      "buySell": "B",
      "orderType": "LO",
      "channelID": "TA",
      "price": 1200,
      "quantity": 100,
      "account": "1184418",
      "stopOrder": false,
      "stopPrice": 0,
      "stopType": "",
      "stopStep": 0,
      "lossStep": 0,
      "profitStep": 0
    }
  }
}
  • Error request:

Input: 
{  
instrumentID: "SSI",
market: "VN",
buySell: "B",
orderType: "ATO",
channelID: "IW",
price: 21000,
quantity: 300,
account: "0901351",
stopOrder: false,
stopPrice: 0,
stopType: "string",
stopStep: 0,
lossStep: 0,
profitStep: 0
requestID: "1678195",
code:123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
 }
 Output: 
{
    message: "Price is null or equal zero when order is market order",
    status: 400,
    data: null
}

POST derModifyOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/derModifyOrder

To amend a derivatives order.

Details

FieldTypeRequired?Description

orderID

string

Yes

instrumentID

string

Yes

marketID

string

Yes

buySell

string

Yes

orderType

string

Yes

channelID

string

Yes

price

number

Yes

quantity

number

Yes

account

string

Yes

requestID

string

Yes

uniqueid of the request

code

number

No

Authentication code: PIN, OTP (depending your registered authentication type)

deviceID

string

Yes

userAgent

string

No

Sample

  • Successful request:

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 3,
account: "1184418",
instrumentID: "VN30F2306",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
message: "Success",
status: 200,
data: {
   requestID: "93235974",
   requestData: {
         orderID: "12658867",
         price: 1410,
         quantity: 3,
         account: "1184418",
         instrumentID: "VN30F2306",
         marketID: "VNFE",
         buySell: "B",
         orderType: "LO"
      }
  }
}
  • Error request:

Input: 
{
requestID: "93235974",
orderID: "",
price: 1410,
quantity: 3,
account: "1184418",
instrumentID: "VN30F2306",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
data: null,
message: "’Order ID’ must not be empty ",
status: 400
}

POST derCancelOrder

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/derCancelOrder

To cancel a derivatives order.

Details

FieldTypeRequired?Description

orderID

string

Yes

instrumentID

string

Yes

market

string

Yes

VNFE

buySell

string

Yes

orderType

string

Yes

channelID

string

Yes

price

number

Yes

quantity

number

Yes

account

string

Yes

requestID

string

Yes

code

number

No

Authentication code: PIN/OTP depending on your registered authentication type

deviceID

string

Yes

userAgent

string

No

Sample

  • Successfull request:

Input: 
{
orderID: "12658867",
account: "1184418",
marketID: "VNFE",
instrumentID: "VN30F2306",
buySell: "B",
requestID: "52513603"
code:”123456789,
      deviceID: "MAC Address",
      userAgent: “FCTrading”
}
Output: 
{
message: "Success",
status: 200,
data: {
    requestID: "52513603",
    requestData: {
         orderID: "12658867",
         account: "1184418",
         marketID: "VNFE",
         instrumentID: "VN30F2106",
         buySell: "B",
         requestID: "52513603"
       }
    }
}
  • Error request:

Input: 
{
orderID: " ",
account: "0901358",
marketID: "VNFE",
instrumentID: "VN30F2106",
buySell: "B",
requestID: "52513603"
code:”123456789,
deviceID: "MAC Address",
userAgent: “FCTrading”
}
Output: 
{
message: "’Order ID' must not be empty.",
status: 400,
data: null
}

GET rateLimit

https://fc-tradeapi.ssi.com.vn/api/v2/Trading/rateLimit

Get rate Limit

Details

FieldTypeDescription

message

string

status

number

data

list

List data

endpoint

string

The set rateLimit information includes one of the following cases: * -> All APIs post:* -> API method POST get:* -> API method GET *:*/api_name -> rateLimit API name

period

string

format: s,m,h,d

limit

number

Sample:

Output: 
{
  "message": "Success",
  "status": 200,
  "data": [
    {
      "endpoint": "*",
      "period": "1s",
      "limit": 5
    },
    {
      "endpoint": "*",
      "period": "5s",
      "limit": 30
    }
  ]
}

Cash

GET cashInAdvanceAmount

https://fc-tradeapi.ssi.com.vn/api/v2/cash/cashInAdvanceAmount

Query cash in advance available amount

Details

FieldTypeRequired?Description

account

string

Yes

Sample:

Input: 
{
  account: "8888881"
}
Output: 
{
    "message": "Success",
    "status": 200,
    "data": {
        "account": "8888881",
        "ciaAmounts": [
            {
                "dueDate": "08/03/2023",
                "sellValue": 3000000.0,
                "netSellValue": 0.0,
                "advance": 0.0,
                "cashAdvance": 0.0
            }
        ]
    }
}

GET unsettleSoldTransaction

https://fc-tradeapi.ssi.com.vn/api/v2/cash/unsettleSoldTransaction

Query unsettle sold transactions

Details

FieldTypeRequired?Description

account

string

Yes

settleDate

string

No

Format: dd/mm/yyyy

Sample:

Input: 
{
  account: "8888881",
  settleDate: "10/03/2023"
}
Output: 
{
    "message": "Success",
    "status": 200,
    "data": {
        "account": "8888881",
        "unsettledSoldTransactions": [
            {
                "tradeDate": "08/03/2023",
                "instrumentID": "SSI",
                "quantity": 100,
                "price": 0.0,
                "netSellValue": 1990000.0
            },
            {
                "tradeDate": "08/03/2023",
                "instrumentID": "SSI",
                "quantity": 100,
                "price": 0.0,
                "netSellValue": 1990000.0
            },
            {
                "tradeDate": "08/03/2023",
                "instrumentID": "SSI",
                "quantity": 100,
                "price": 0.0,
                "netSellValue": 117410.0
            }
        ]
    }
}

GET transferHistories

https://fc-tradeapi.ssi.com.vn/api/v2/cash/transferHistories

Query cash transfer histories

Details

FieldTypeRequired?Description

account

string

Yes

fromDate

string

Yes

format: dd/mm/yyyy

toDate

string

Yes

format: dd/mm/yyyy

Sample:

Input: 
account:8888881
fromDate: 10/01/2023
toDate: 10/08/2023
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "transferHistories": [
      {
        "transactionID": "101660519",
        "date": "07/03/2023 11:54:22",
        "account": "8888881",
        "beneficiaryAccount": "8888886",
        "amount": 1000000,
        "bankName": "TECHCOMBANK_NH KỸ THƯƠNG",
        "bankBranchName": "CN THANG LONG",
        "beneficiary": "TK tự doanh CK niêm yết (TK 8)",
        "remark": "Huyen test chuyen tien sang 6",
        "type": "W",
        "status": "A"
      }
    ]
  }
}

GET cashInAdvanceHistories

https://fc-tradeapi.ssi.com.vn/api/v2/cash/cashInAdvanceHistories

Query cash in advance histories

Details

FieldTypeRequired?Description

account

string

Yes

fromDate

string

Yes

Format: dd/mm/yyyy

toDate

string

Yes

Format: dd/mm/yyyy

Note:

  • fromDate - toDate not more than 1 month

  • The time for searching the past should not exceed 6 months

Sample:

Input: 
account:0001011
fromDate: 10/01/2023
toDate: 10/08/2023
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0001011",
    "ciaHistories": [
      {
        "transactionID": "20230731-45895",
        "dateTime": "31/07/2023 09:01:56",
        "totalAmount": 200000,
        "details": [
          {
            "type": "D",
            "value": 200000,
            "settleDate": null
          },
          {
            "type": "I",
            "value": 50000,
            "settleDate": null
          },
          {
            "type": "W",
            "value": 200000,
            "settleDate": "01/08/2023"
          }
        ],
        "status": "A"
      }
        ],
        "status": "A"
      }
    ]
  }
}

GET estCashInAdvanceFee

https://fc-tradeapi.ssi.com.vn/api/v2/cash/estCashInAdvanceFee

Query estimate cash in advance fee

Details

FieldTypeRequired?Description

account

string

Yes

ciaAmount

string

No

receiveAmount

string

No

Sample:

Input: 
account:0001011
ciaAmount: 50000
Output:
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0001011",
    "ciaAmount": 0,
    "receiveAmount": 0,
    "fee": 0
  }
}

POST vsdCashDW

https://fc-tradeapi.ssi.com.vn/api/v2/cash/vsdCashDW

Tranfer cash with VSD (only support for derivatives account)

Details

FieldTypeRequired?Description

account

string

Yes

amount

number

Yes

type

string

Yes

Include:

W = withdraw

D = deposit

remark

string

No

code

string

No

isSave = false -> Required PIN/ OTP isSave = true -> no required

Sample:

  • Successfull request:

Input: 
{
  "account": "0901358",
  "amount": 50000,
  "type": "D",
  "remark": "string",
  "code": "string"
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "transactionID": "579108"
  }
}
  • Error request:

Input: 
{
  "account": "0901351",
  "amount": 50000,
  "type": "D",
  "remark": "string",
  "code":"string"
}
Output: 
{
  "message": "Not support cash transfer with vsd for stock account",
  "status": 400,
  "data": null
}

POST transferInternal

https://fc-tradeapi.ssi.com.vn/api/v2/cash/transferInternal

Transfer cash inside

Note:

The source account number and the receiving account number must have the same name and money can only be transferred between sub-accounts

Thông tin chi tiết

FieldTypeRequired?Description

account

string

Yes

beneficiaryAccount

string

Yes

amount

number

Yes

type

string

Yes

Include:

W = withdraw

D = deposit

remark

string

No

code

string

No

isSave = false -> Required PIN/ OTP isSave = true -> no required

Ví dụ

  • Successfull request:

Input: 
{
  "account": "0901351",
  "beneficiaryAccount": "0901356",
  "amount": 50000,
  "remark": "string", 
  "code":"string"
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "transactionID": "101844165"
  }
}
  • Error request:

Input: 
{
  "account": "0901351",
  "beneficiaryAccount": "0901356",
  "amount": 50000,
  "remark": "string",
  "code":"string"
}
Output: 
{
  "message": "Account 0901352 is not exist",
  "status": 400,
  "data": null
}

POST createCashInAdvance

https://fc-tradeapi.ssi.com.vn/api/v2/cash/createCashInAdvance

Create cash in advance transaction

Details

FieldTypeRequired?Description

account

string

Yes

ciaAmount

string

No

receiveAmount

string

No

code

string

Yes

OTP/PIN

Sample

  • Successfull request:

Input: 
{
  "account": "8888881",
  "ciaAmount": 50000,
  "code": 1234567
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "1158851",
    "transactionID": "20230824-46286"
  }
}
  • Error request:

Input: 
{
  "account": "8888881",
  "ciaAmount": 50000, 
  "code":1234567
}
Output: 
{
  "message": "Not support derivatives account",
  "status": 400,
  "data": null
}

Online Right Subscription

GET dividend

https://fc-tradeapi.ssi.com.vn/api/v2/ors/dividend

Get history dividend

Details

FieldTypeRequired?Description

account

string

Yes

Sample

Input: 
account: 0901351
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "dividends": [
      {
        "stockDividend": "STOCK DIVIDEND",
        "instrumentID": "SSI",
        "quantity": 49500,
        "executedRate": "100:15",
        "closeDate": "05/10/2020",
        "paidDate": "07/10/2020",
        "amount": 0,
        "status": "A",
        "receivedQuantity": 7425,
        "issueInstrument": "SSI",
        "distributedFlag": "N",
        "payableDate": null,
        "subscriptionPrice": 0,
        "subscriptionAmount": 0,
        "subscriptionQuantity": 0,
        "subscriptionPeriodFrom": null,
        "subscriptionPeriodTo": null,
        "entitlementID": null
      }
      ]
  }
}

GET exercisableQuantity

https://fc-tradeapi.ssi.com.vn/api/v2/ors/exercisableQuantity

Query stock quantity can register subscription

Details

FieldTypeRequired?Description

account

string

Yes

Sample:

Input: 
account: 0901351
Output:
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "exercisableQuantities": [
      {
        "entitlementID": "913279",
        "instrumentID": "HCB",
        "subscriptionPrice": 10000,
        "executedRateFrom": 1,
        "subscriptionPeriodFrom": "03/10/2022",
        "subscriptionPeriodTo": "03/10/2023",
        "exerciseableQuantity": 0,
        "exerciseableReceiveQuantity": 0,
        "exercisedReceiveQuantity": 0,
        "executedRateTo": 1,
        "exercisedQuantity": 0,
        "payableDate": null
      }
      ]
  }
}

GET histories

https://fc-tradeapi.ssi.com.vn/api/v2/ors/histories

Get histories

Details

FieldTypeRequired?Description

account

string

Yes

Số tài khoản nguồn truy vấn

startDate

string

Yes

Ngày bắt đầu tìm kiếm Định dạng: dd/mm/yyyy

endDate

string

Yes

Ngày kết thúc tìm kiếm Định dạng: dd/mm/yyyy

Note:

  • fromDate - toDate not more than 1 month

  • The time for searching the past should not exceed 1 year

Sample

Input: 
account: 1158851
startDate: 10/07/2023
endDate: 10/07/2023
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "1158851",
    "onlineRightSubscriptionHistories": []
  }
}

POST create

https://fc-tradeapi.ssi.com.vn/api/v2/ors/create

Create online right subscription

Thông tin chi tiết

FieldTypeRequired?Description

account

string

Yes

instrumentID

string

Yes

entitlementID

string

Yes

quantity

number

Yes

amount

number

Yes

code

string

No

PIN/ OTP

Sample

  • Successfull request:

Input: 
{  
   "account": "0901351",  
   "instrumentID": "SSI",  
   "entitlementID": "913312",  
   "quantity": 100,  
   "amount": 1000,
   "code":"string" 
 }
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "transactionID": "17509268"
  }
}
  • Error request:

Input: 
{  
   "account": "0901351",  
   "instrumentID": "VND",  
   "entitlementID": "913312",  
   "quantity": 100,  
   "amount": 1000,
   "code":"string"  
 }
Output: 
{
  "message": "Invalid ammount (max amount 1,459,882)",
  "status": 40006,
  "data": null
}

Stock

GET transferable

https://fc-tradeapi.ssi.com.vn/api/v2/stock/transferable

Get stock transferable

Details

FieldTypeRequired?Description

account

string

Yes

Sample:

Input: 
account: 0901351
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "transferableStocks": [
      {
        "instrumentID": "ACB",
        "quantity": 100,
        "instrumentType": "EQ"
      },
      {
        "instrumentID": "BTS",
        "quantity": 300,
        "instrumentType": "EQ"
      }
    ]
  }
}

GET transferHistories

https://fc-tradeapi.ssi.com.vn/api/v2/stock/transferHistories

Get stock transfer history

Details

FieldTypeRequired?Description

account

string

Yes

startDate

string

Yes

format: dd/mm/yyyy

endDate

string

Yes

format: dd/mm/yyyy

Note:

  • fromDate - toDate not more than 1 month

  • The time for searching the past should not exceed 6 months

Sample:

Input: 
account: 0901351
startDate: 10/07/2023
enđate: 10/08/2023
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "stockTransferHistories": []
  }
}

POST transfer

https://fc-tradeapi.ssi.com.vn/api/v2/stock/transfer

Transfer stock inside

Detail

FieldTypeRequired?Description

account

string

Yes

beneficiaryAccount

string

Yes

exchangeID

string

Yes

instrumentID

string

Yes

quantity

number

Yes

code

string

No

isSave = false -> required PIN/ OTP isSave = true -> no required

Sample:

  • Successfull request:

Input: 
{
  "account": "0901351",
  "beneficiaryAccount": "0901356",
  "exchangeID": "HOSE",
  "instrumentID": "SSI",
  "quantity": 100,
  "code": "string"
}
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "transactionID": "462764"
  }
}
  • Error request:

Input: 
{
  "account": "0901351",
  "beneficiaryAccount": "0901356",
  "exchangeID": "HOSE",
  "instrumentID": "SSI",
  "quantity": 100,
  "code": "string"
}
Output: 
{
  "message": "Account 0901352 is not exist",
  "status": 400,
  "data": null
}

Last updated