> ## 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.

# Xác thực OTP

> Xác thực mã OTP theo phương thức xác thực (Email OTP hoặc Smart OTP) đã đăng ký để lấy Trading Token. Đây là thông tin bắt buộc để xác thực quyền giao dịch, có hiệu lực trong 8 tiếng.



## OpenAPI

````yaml https://cdn.entrade.com.vn/dnse-openapi/doc/dnse-openapi-2026-07-23.yaml post /registration/trading-token
openapi: 3.0.0
info:
  title: OpenAPI-V2-Spec 260730
  version: 1.0.0
  description: DNSE OpenAPI spec and tests
servers:
  - url: https://openapi-uat.dnse.com.vn
security: []
paths:
  /registration/trading-token:
    post:
      tags:
        - trading
      summary: Xác thực OTP
      description: >-
        Xác thực mã OTP theo phương thức xác thực (Email OTP hoặc Smart OTP) đã
        đăng ký để lấy Trading Token. Đây là thông tin bắt buộc để xác thực
        quyền giao dịch, có hiệu lực trong 8 tiếng.
      parameters:
        - 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: API version (YYYY-MM-DD)
          schema:
            type: string
            format: date
          example: '2026-07-23'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                otpType:
                  type: string
                  example: email_otp
                  description: >-
                    Phương thức xác thực OTP

                    - email_otp: Áp dụng cho tài khoản đăng ký phương thức xác
                    thực lớp thứ 2 là Email OTP

                    - smart_otp: Áp dụng cho tài khoản đăng ký phương thức xác
                    thực lớp thứ 2 là Smart OTP
                passcode:
                  type: string
                  example: '519752'
                  description: Mã OTP tương ứng với phương thức xác thực
            example:
              otpType: email_otp
              passcode: '569542'
      responses:
        '200':
          description: OK
          headers:
            Content-Length:
              schema:
                type: integer
              example: 56
            Date:
              schema:
                type: string
              example: Wed, 18 Mar 2026 16:15:18 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Frame-Options:
              schema:
                type: string
              example: GOFORIT
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 300
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 299
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1773850517
            X-Request-Id:
              schema:
                type: string
              example: MnbLxZrRhSMHnXlfhYjjIswAMGqYVlzb
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
          content:
            application/json:
              schema:
                type: object
                properties:
                  tradingToken:
                    type: string
                    example: 9ab81e9c-8a81-45aa-8190-b69a1c179d52
                    description: Token đặt lệnh
              example:
                tradingToken: 9ab81e9c-8a81-45aa-8190-b69a1c179d52
        '400':
          description: Yêu cầu không hợp lệ
          headers:
            Content-Length:
              schema:
                type: integer
              example: 101
            Date:
              schema:
                type: string
              example: Wed, 25 Mar 2026 15:23:56 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Frame-Options:
              schema:
                type: string
              example: GOFORIT
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 300
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 298
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1774538632
            X-Request-Id:
              schema:
                type: string
              example: xrKYIYrVUPtXbYRUbeapUatkUHeliXhh
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-100
                    description: Mã lỗi
                  message:
                    type: string
                    example: 'Invalid input: otpType is not registered for this account'
                    description: Thông điệp lỗi
              example:
                status: 400
                code: OA-100
                message: 'Invalid input: otpType is not registered for this account'
        '500':
          description: Lỗi hệ thống
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-009
                    description: Mã lỗi
                  message:
                    type: string
                    example: Lỗi hệ thống
                    description: Thông điệp lỗi
              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.