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>
552066a35eb30a9815afc952b14287a8.
Place order
POST /oapi/accounts/:accountId/orders/underlying
Places a new underlying order for an account.
Required path parameters
accountId— Trading account ID.
Required body parameters
instrument— Instrument code. Example:ACBqty— Order quantity. Example:1side— Order side. Example:buytype— Order type. Example:LOlimitPrice— Limit price. Example:23000timeType— Time-in-force type. Example:T
Response fields
s(string) — Request status. Example:okd.orderid(string) — Created order ID.
cURL
Example response
Update order
PUT /oapi/accounts/:accountId/orders/underlying/:orderId
Updates quantity and limit price for an existing underlying order.
Required path parameters
accountId— Trading account ID.orderId— Order ID to update.
Required body parameters
qty— Updated order quantity. Example:1limitPrice— Updated limit price. Example:23000
cURL
Example response
Cancel order
DELETE /oapi/accounts/:accountId/orders/underlying/:orderId?timeType=T&isbuyin=N
Cancels an existing underlying order.
Required path parameters
accountId— Trading account ID.orderId— Order ID to cancel.
Required query parameters
timeType— Time-in-force type. Example:Tisbuyin— Buy-in flag. Example:N
cURL
Example response
ReplaceBASE_URL,ACCOUNT_ID,ACCESS_TOKEN,OTP_TOKEN, andORDER_IDwith your values.