Trading

trade-position

Retrieve position information for an account.

GET
/api/v3/trading/position

Authorization

Bearer
AuthorizationBearer <token>

Enter the JWT token in the format Bearer <token>.

In: header

Header Parameters

Content-Typestringrequired

The format of the request body content. Primarily application/json.

User-Agentstringoptional

Information about the client sending the request.

Accept-Languagestringoptional

The desired response language. If this header is absent, the system will default to en

Query Parameters

clientIdstringoptional

The 6-digit account that identifies the customer at SSI. If the account number is 003C123888 then clientId = 123888

accountNostringrequired

The trading account for which to retrieve position information. Accounts ending in 1, 6, 8 respectively (CASH, MARGIN, DERIVATIVE) will have different position information.

querySummarybooleanoptional

If true, returns derivative position summary. If false, returns detailed positions. Only applicable for derivative accounts. Default is true.

Response Headers

X-RATELIMIT-LIMITstringoptional

The request limit within the cycle.

X-RATELIMIT-REMAININGstringoptional

The number of requests remaining in the current cycle.

X-RATELIMIT-RESETstringoptional

The time at which the request limit resets.

Response Body

application/json

application/json

curl -X GET "https://api.ssi.com.vn/api/v3/trading/position?accountNo=string" \  -H "Content-Type: application/json"

Success

{
  "data": {
    "equity": [
      {
        "accountNo": "string",
        "symbol": "string",
        "quantity": "string",
        "blockQuantity": "string",
        "dividendQuantity": "string",
        "buyingQuantity": "string",
        "boughtQuantity": "string",
        "sellingQuantity": "string",
        "soldQuantity": "string",
        "t1SellQuantity": "string",
        "t2SellQuantity": "string",
        "t1BuyQuantity": "string",
        "t2BuyQuantity": "string",
        "costPrice": "string",
        "mortgageQuantity": "string",
        "sellableQuantity": "string",
        "restrictedQuantity": "string"
      }
    ],
    "derivative": {
      "accountNo": "string",
      "derOpenPositions": [
        {
          "symbol": "string",
          "long": "string",
          "short": "string",
          "net": "string",
          "bidAvgPrice": "string",
          "askAvgPrice": "string",
          "tradePrice": "string",
          "tradingPL": "string",
          "floatingPL": "string"
        }
      ],
      "derClosePositions": [
        {
          "symbol": "string",
          "long": "string",
          "short": "string",
          "net": "string",
          "bidAvgPrice": "string",
          "askAvgPrice": "string",
          "tradePrice": "string",
          "tradingPL": "string",
          "floatingPL": "string"
        }
      ]
    }
  }
}

Invalid request.

{
  "code": "400",
  "msg": "Invalid request"
}