> ## Documentation Index
> Fetch the complete documentation index at: https://hoalulab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chi tiết vị thế theo ID

>  Lấy thông tin chi tiết của một vị thế cơ sở hoặc phái sinh đang mở theo `positionId.`



## OpenAPI

````yaml https://cdn.entrade.com.vn/dnse-openapi/doc/dnse-openapi-2026-05-07.yaml get /accounts/positions/{positionId}
openapi: 3.0.0
info:
  title: DNSE-OpenAPI-V2
  version: 1.0.0
  description: DNSE OpenAPI spec and tests
servers:
  - url: https://openapi-uat.dnse.com.vn
security: []
paths:
  /accounts/positions/{positionId}:
    parameters:
      - name: positionId
        in: path
        required: true
        description: 'Id vị thế '
        deprecated: false
        schema:
          type: integer
        example: 177410795472387
    get:
      tags:
        - account
      summary: Chi tiết vị thế theo ID
      description: "\_Lấy thông tin chi tiết của một vị thế cơ sở hoặc phái sinh đang mở theo\_`positionId.`"
      parameters:
        - name: marketType
          in: query
          required: true
          description: |-
            Loại thị trường 
            - STOCK: Danh sách Deal cơ sở
            - DERIVATIVE: Danh sách Deal phái sinh
          deprecated: false
          schema:
            type: string
          example: DERIVATIVE
        - name: X-API-Key
          in: header
          required: true
          description: API Key được cấp khi đăng ký dịch vụ
          deprecated: false
          schema:
            type: string
          example: '{{apiKey}}'
        - name: X-Aux-Date
          in: header
          required: true
          description: Thời gian thực hiện yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{date}}'
        - name: X-Signature
          in: header
          required: true
          description: Chữ ký xác thực yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{signature}}'
        - name: version
          in: header
          description: 'Phiên bản API '
          schema:
            type: string
            format: date
          example: '2026-05-07'
      responses:
        '200':
          description: OK
          headers:
            Content-Length:
              schema:
                type: integer
              example: 584
            Date:
              schema:
                type: string
              example: Tue, 24 Mar 2026 03:53:37 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 10000
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 9995
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1774410234
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    example:
                      id: 177410795472387
                      symbol: 41I1G4000
                      marketType: DERIVATIVE
                      accountNo: '0001179019'
                      status: OPEN
                      loanPackageId: 2278
                      side: NB
                      accumulateQuantity: 6
                      tradeQuantity: 1
                      closedQuantity: 5
                      openQuantity: 1
                      overNightQuantity: 0
                      costPrice: 1834.5
                      averageCostPrice: 1834.5
                      averageClosePrice: 1750.96
                      marketPrice: 1706.1
                      breakEvenPrice: 1834.95691
                      createdDate: '2026-03-23T03:08:32.773651Z'
                      modifiedDate: '2026-03-23T04:07:45.692156Z'
                    description: ''
                    properties:
                      id:
                        type: integer
                        example: 177410795472387
                        description: ID vị thế
                        format: int64
                      symbol:
                        type: string
                        example: 41I1G4000
                        description: Mã chứng khoán
                      marketType:
                        type: string
                        example: DERIVATIVE
                        description: |-
                          Loại thị trường
                          - STOCK: Vị thế cơ sở
                          - DERIVATIVE: Vị thế phái sinh
                      accountNo:
                        type: string
                        example: '0001179019'
                        description: Số tiểu khoản
                      status:
                        type: string
                        example: OPEN
                        description: |-
                          Trạng thái của vị thế
                          - OPEN: Đang mở
                          - PENDING_CLOSE: Chờ đóng
                          - CLOSED: Đã đóng
                          - ODD_LOT: Lô lẻ (cơ sở)
                      loanPackageId:
                        type: integer
                        format: int32
                        example: 2278
                        description: Gói vay cơ sở hoặc phái sinh
                      side:
                        type: string
                        example: NB
                        description: |-
                          Loại vị thế
                          - NB: Mua
                          - NS: Bán
                      accumulateQuantity:
                        type: integer
                        example: 6
                        description: Khối lượng cộng dồn
                        format: int32
                      tradeQuantity:
                        type: integer
                        example: 1
                        description: Khối lượng được giao dịch
                        format: int32
                      closedQuantity:
                        type: integer
                        example: 5
                        description: Khối lượng đã đóng
                        format: int32
                      openQuantity:
                        type: integer
                        example: 1
                        description: Khối lượng mở
                        format: int32
                      overNightQuantity:
                        type: integer
                        example: 0
                        description: Khối lượng mở qua đêm (dành cho phái sinh)
                        format: int32
                      costPrice:
                        type: number
                        example: 1834.5
                        description: Giá vốn trung bình của khối lượng mở
                        format: float
                      averageCostPrice:
                        type: number
                        example: 1834.5
                        description: Giá vốn trung bình
                        format: float
                      averageClosePrice:
                        type: number
                        example: 1750.96
                        description: Giá đóng trung bình
                        format: double
                      marketPrice:
                        type: number
                        example: 1706.1
                        description: Giá thị trường
                        format: double
                      breakEvenPrice:
                        type: number
                        example: 1834.95691
                        description: Giá hòa vốn
                        format: double
                      createdDate:
                        type: string
                        example: '2026-03-23T03:08:32.773651Z'
                        description: Thời điểm mở
                        format: date-time
                      modifiedDate:
                        type: string
                        example: '2026-03-23T04:07:45.692156Z'
                        description: Thời điểm cập nhật
                        format: date-time
              example:
                data:
                  id: 177410795472387
                  symbol: 41I1G4000
                  marketType: DERIVATIVE
                  accountNo: '0001179019'
                  status: OPEN
                  loanPackageId: 2278
                  side: NB
                  accumulateQuantity: 6
                  tradeQuantity: 1
                  closedQuantity: 5
                  openQuantity: 1
                  overNightQuantity: 0
                  costPrice: 1834.5
                  averageCostPrice: 1834.5
                  averageClosePrice: 1750.96
                  marketPrice: 1706.1
                  breakEvenPrice: 1834.95691
                  createdDate: '2026-03-23T03:08:32.773651Z'
                  modifiedDate: '2026-03-23T04:07:45.692156Z'
        '400':
          description: Yêu cầu không hợp lệ
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-003
                    description: Mã lỗi
                  message:
                    type: string
                    example: Thông tin nhập không hợp lệ
                    description: Thông điệp lỗi
              example:
                code: OA-003
                message: Thông tin nhập không hợp lệ
                status: 400
        '500':
          description: Lỗi hệ thống
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  status:
                    type: integer
              example:
                code: OA-009
                message: Lỗi hệ thống
                status: 500

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.