Danh sách các API

FastConnect Trading hỗ trợ API về Đặt/ Hủy/ Sửa lệnh, Chuyển tiền nội bộ, Nộp/ Rút ký quỹ, Chuyển chứng khoán, Ứng trước tiền bán, Đăng ký quyền mua và Tra cứu thông tin tài khoản.

Danh sách API

  • Các API liên quan đến Token và xác thực 2FA

  • Các API tra cứu thông tin tài khoản cơ sở và phái sinh

  • Các API đặt lệnh cơ sở/ phái sinh

  • Các API liên quan đến Chuyển tiền nội bộ, Nộp/ Rút ký quỹ và Ứng trước tiền bán

  • Các API liên quan đến Chuyển chứng khoán

  • Các API liên quan đến Đăng ký quyền mua

Yêu cầu Config

API Details

POST AccessToken

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

Dùng để tạo access token truy cập vào các api của FC Trading.

Thông tin chi tiết

Ví dụ

  • Trường hợp thành công

Input: 
{
  consumerID: "38f5fdfa56b44d5ab8b95895eb588e99",
  consumerSecret: "6d61bffefc6540fc837c71afd2ca4bcf",
  twoFactorType: 1,
  code: "123456789",
  isSave: false
}
Output: 
{
    message: "Success",
    status: 200,
    data: {
        "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ”
}
  • Trường hợp lỗi

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

Dùng để lấy mã OTP nếu tài khoản đã đăng ký sử dụng SMS OTP và Email OTP.

Nếu lấy OTP quá 5 lần mà không xác thực thì dịch vụ OTP sẽ bị tạm khóa.

Thông tin chi tiết

Ví dụ

  • Trường hợp thành công

Input: 
{
  "consumerID": "968d7b5940f5437583021aea2b038f35",
  "consumerSecret": "11ab3fc6af954c59ba646fac016f30cb"
}
Output: 
{
    message: "Success",
    status: 200
}
  • Trường hợp lỗi

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

GET auditOrderBook

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

Trả ra lịch sử cập nhật của lệnh.

Thông tin chi tiết

Ví dụ

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
      }     
    ]
  }
}

GET OrderBook

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

Tra cứu lệnh đặt trong ngày của cả tài khoản cơ sở và phái sinh.

Thông tin chi tiết

Ví dụ

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

Truy vấn lịch sử lệnh

Thông tin chi tiết

Ví dụ

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

Truy vấn thông tin tiền của tài khoản cơ sở.

Thông tin chi tiết

Ví dụ

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

Truy vấn danh mục của tài khoản cơ sở.

Thông tin chi tiết

Ví dụ

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

Kiểm tra số dư tiền tài khoản phái sinh.

Thông tin chi tiết

Ví dụ

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

Truy vấn vị thế của tài khoản phái sinh.

Thông tin chi tiết

Ví dụ

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

Truy vấn số lượng mua tối đa, sử dụng cho cả tài khoản cơ sở và phái sinh.

Thông tin chi tiết

Ví dụ

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

Truy vấn số lượng bán tối đa, sử dụng cho cả tài khoản cơ sở và phái sinh.

Thông tin chi tiết

Ví dụ

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

Dùng để đặt lệnh, sử dụng cho cả tài khoản cơ sở và phái sinh. Khi gửi thông tin lệnh thành công, api trả 200. Để xem lệnh có đẩy lên sàn thành công hay không cần kết nối streaming để nhận kết quả (hoặc call api oderBook)

Thông tin chi tiết

Ví dụ

  • Thành công

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: "8C-EC-4B-D3-0B-96",
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
}
    }
}
  • Trường hợp lỗi

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: "8C-EC-4B-D3-0B-96",
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

Dùng để sửa lệnh, sử dụng cho cả tài khoản cơ sở và phái sinh.

Thông tin chi tiết

Ví dụ

  • Thành công

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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"
      }
  }
}
  • Trường hợp lỗi

Input: 
{
requestID: "93235971",
orderID: "",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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

Sử dụng để hủy lệnh, sử dụng cho cả tài khoản cơ sở và phái sinh.

Thông tin chi tiết

Ví dụ

  • Thành công

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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"
      }
  }
}
  • Trường hợp lỗi

Input: 
{
requestID: "93235971",
orderID: "",
price: 1410,
quantity: 2,
account: "0901358",
instrumentID: "VN30F2106",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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

Dùng để đặt lệnh phái sinh.

Thông tin chi tiết

Ví dụ

  • Thành công

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: "8C-EC-4B-D3-0B-96",
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
    }
  }
}
  • Trường hợp lỗi

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: "8C-EC-4B-D3-0B-96",
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

Dùng để sửa lệnh phái sinh.

Thông tin chi tiết

Ví dụ

  • Thành công

Input: 
{
requestID: "93235974",
orderID: "12658867",
price: 1410,
quantity: 3,
account: "1184418",
instrumentID: "VN30F2306",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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"
      }
  }
}
  • Trường hợp lỗi

Input: 
{
requestID: "93235974",
orderID: "",
price: 1410,
quantity: 3,
account: "1184418",
instrumentID: "VN30F2306",
marketID: "VNFE",
buySell: "B",
orderType: "LO"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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

Dùng để hủy lệnh phái sinh.

Thông tin chi tiết

Ví dụ

  • Thành công

Input: 
{
orderID: "12658867",
account: "1184418",
marketID: "VNFE",
instrumentID: "VN30F2306",
buySell: "B",
requestID: "52513603"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
userAgent: “FCTrading”
}
Output: 
{
message: "Success",
status: 200,
data: {
    requestID: "52513603",
    requestData: {
         orderID: "12658867",
         account: "1184418",
         marketID: "VNFE",
         instrumentID: "VN30F2106",
         buySell: "B",
         requestID: "52513603"
       }
    }
}
  • Trường hợp lỗi

Input: 
{
orderID: " ",
account: "0901358",
marketID: "VNFE",
instrumentID: "VN30F2106",
buySell: "B",
requestID: "52513603"
code:”123456789,
deviceId: "8C-EC-4B-D3-0B-96",
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

Truy vấn thông tin những API được set rateLimit

Thông tin chi tiết

Ví dụ

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

Giao dịch liên quan đến tiền, Nộp/Rút ký quỹ, Ứng trước tiền bán

GET cashInAdvanceAmount

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

Trả danh sách giao dịch Ứng trước tiền bán và thông tin số tiền có thể ứng

Thông tin chi tiết

Ví dụ

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

Trả danh sách giao dịch chưa thanh toán (tiền chưa về tài khoản)

Thông tin chi tiết

Ví dụ

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

Tra cứu thông tin Lịch sử chuyển tiền nội bộ và Nộp/Rút kỹ quỹ

Thông tin chi tiết

Ví dụ

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

Truy vấn lịch sử giao dịch ứng trước tiền bán

Thông tin chi tiết

Lưu ý:

  • Tìm kiếm fromDate - toDate không quá 1 tháng

  • Thời gian tìm kiếm quá khứ không quá 6 tháng

Ví dụ

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

Truy vấn mức phí của giao dịch Ứng trước tiền bán

Thông tin chi tiết

Ví dụ

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

Tạo giao dịch nộp/ rút phái sinh

Thông tin chi tiết

Ví dụ

  • Thành công

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

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

Tạo giao dịch chuyển tiền giữa các tài khoản Cơ sở hoặc chuyển tiền từ tài khoản Phái sinh sang Cơ sở

Lưu ý:

Số tài khoản nguồn và Số tài khoản nhận phải cùng tên và chỉ được chuyển tiền giữa các tiểu khoản

Thông tin chi tiết

Ví dụ

  • Thành công

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

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

Tạo giao dịch ứng trước tiền bán

Thông tin chi tiết

Ví dụ

  • Thành công

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

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

Giao dịch liên quan đến đăng ký quyền mua

GET dividend

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

Truy vấn thông tin cổ tức bằng tiền, Chứng khoán mà khách hàng được nhận (không phải đăng ký)

Thông tin chi tiết

Ví dụ

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

Truy vấn số lượng chứng khoán có thể thực hiện đăng ký quyền

Thông tin chi tiết

Ví dụ

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

Truy vấn lịch sử giao dịch đăng ký quyền mua

Thông tin chi tiết

Lưu ý:

  • Tìm kiếm startDate - endDate không quá 1 tháng

  • Thời gian tìm kiếm quá khứ không quá 1 năm

Ví dụ

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

Tạo giao dịch đăng ký quyền

Thông tin chi tiết

Ví dụ

  • Thành công

Input: 
{  
   "account": "0901351",  
   "instrumentID": "SSI",  
   "entitlementID": "913312",  
   "quantity": 100,  
   "amount": 1000,
   "code":"569858" 
 }
Output: 
{
  "message": "Success",
  "status": 200,
  "data": {
    "account": "0901351",
    "transactionID": "17509268"
  }
}
  • Lỗi

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

Giao dịch chuyển chứng khoán

GET transferable

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

Truy vấn thông tin số lượng chứng khoán có thể chuyển nhượng của tài khoản

Thông tin chi tiết

Ví dụ

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

Truy vấn lịch sử giao dịch chuyển nhượng chứng khoán giữa các tài khoản

Thông tin chi tiết

Lưu ý:

  • Tìm kiếm startDate - endDate không quá 1 tháng

  • Thời gian tìm kiếm quá khứ không quá 6 tháng

Ví dụ

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

Tạo giao dịch chuyển chứng khoán có trong danh mục giữa các tài khoản cơ sở

Thông tin chi tiết

Ví dụ

  • Thành công

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

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