Authentication requirements
All routes under/oapi/accounts/:accountId/orders/derivative require Authorization: Bearer <access_token>.
Use the access_token and otp_token returned by POST /oapi/auth/gen-secret-key/derivative.
GET requests require the Bearer token only.
POST, PUT, and DELETE requests also require these headers:
x-otp-token: <otp_token>
2c897da51e69cd6f3a0701884ed706ac.
Place order
POST /oapi/accounts/:accountId/orders/derivative
Places a new derivative order for an account.
Required path parameters
accountId— Trading account ID.
Required body parameters
instrument— Instrument code. Example:41BAG4000qty— Order quantity. Example:1side— Order side. Example:buytype— Order type. Example:LOlimitPrice— Limit price. Example:1802- timetype — 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/derivative/:orderId
Updates quantity and limit price for an existing derivative 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:1802
cURL
Example response
Cancel order
DELETE /oapi/accounts/:accountId/orders/derivative/:orderId?timeType=T&isbuyin=N&otp=e176078d1876e71a856f968b8864da22
Cancels an existing derivative 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:Notp— OTP value passed in the query string. Example:e176078d1876e71a856f968b8864da22
Example body
qty— Quantity used in the provided request example. Example:1limitPrice— Limit price used in the provided request example. Example:1802