Skip to main content

Authentication requirements

All routes under /oapi/accounts/:accountId/orders/underlying require Authorization: Bearer <access_token>. Use the access_token and otp_token returned by POST /oapi/auth/gen-secret-key/underlying. GET requests require the Bearer token only. POST, PUT, and DELETE requests also require these headers:
  • x-otp-token: <otp_token>
In sandbox, use the exact fixture OTP token: 552066a35eb30a9815afc952b14287a8.

Place order

Places a new underlying order for an account.

Required path parameters

  • accountId — Sub underlying account ID.

Required body parameters

  • instrument — Instrument code. Example: ACB
  • qty — Order quantity. Example: 1
  • side — Order side. Example: buy
  • type — Order type. Example: LO
  • limitPrice — Limit price. Example: 23000
  • timetype — Time-in-force type. Example: T

Response fields

  • s (string) — Request status. Example: ok
  • d.orderid (string) — Created order ID.

cURL

Example response

Update order

Updates quantity and limit price for an existing underlying order.

Required path parameters

  • accountId — Sub-underlying account ID.
  • orderId — Order ID to update.

Required body parameters

  • qty — Updated order quantity. Example: 1
  • limitPrice — Updated limit price. Example: 23000

cURL

Example response

Cancel order

Cancels an existing underlying order.

Required path parameters

  • accountId — Sub underlying account ID.
  • orderId — Order ID to cancel.

Required query parameters

  • timetype — Time-in-force type. Example: T
  • isbuyin — Buy-in flag. Example: N

cURL

Example response

Get Underlying Buying Power

Retrieves the available buying power for trading underlying securities.

Required Path Parameters

  • accountId — underlying sub account ID.

Required Query Parameters

  • symbol — Stock symbol. Example: VIC.
  • quotePrice — Order price used to calculate buying power. Example: 222000.

cURL

Example Response

Response fields

Replace BASE_URL, ACCOUNT_ID, ACCESS_TOKEN, OTP_TOKEN, and ORDER_ID with your values.