DriveWealth Orders API
The Orders API from DriveWealth — 6 operation(s) for orders.
The Orders API from DriveWealth — 6 operation(s) for orders.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/drivewealth-orders-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: DriveWealth Accounts Orders API
version: '1.0'
servers:
- url: https://bo-api.drivewealth.io/back-office
description: Sandbox server (Uses test data)
- url: https://bo-api.drivewealth.net/back-office
description: Production Server (Uses LIVE data)
tags:
- name: Orders
x-displayName: Orders
paths:
/accounts/{accountID}/summary/orders:
get:
tags:
- Orders
summary: List Account resting Orders
description: Retrives a list of Account Orders by accountID. The orders returned will all be currently pending Orders that are awaiting a fill or cancellation.
parameters:
- in: path
name: accountID
schema:
$ref: '#/components/schemas/accountID'
required: true
responses:
'200':
description: Retrieving a list of Account Orders was Successful.
content:
application/json:
schema:
$ref: '#/components/schemas/PendingOrders'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
/accounts/{accountID}/reports/order-history:
get:
tags:
- Orders
summary: List Account historical Orders
description: Retrieves a list of Account Orders by accountID. The orders returned are ones that have been previously closed, either by being filled or by being canceled.
parameters:
- in: path
name: accountID
schema:
$ref: '#/components/schemas/accountID'
required: true
- in: query
name: from
schema:
type: string
required: true
example: '2022-06-16'
description: Date start time of data. Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
- in: query
name: to
schema:
type: string
required: true
example: '2022-07-16'
description: Date end time of data. Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
- in: query
name: limit
schema:
type: number
required: false
example: 25
description: The number of orders to be returned per page.
- in: query
name: offset
schema:
type: string
required: false
example: '2022-07-16'
description: Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
- in: query
name: direction
schema:
type: string
enum:
- prev
- next
required: false
example: prev
description: The direction of pagination.
responses:
'200':
description: Retrieving a list of Account Orders was Successful
content:
application/json:
schema:
$ref: '#/components/schemas/OrderHistoryRes'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
/orders:
post:
tags:
- Orders
summary: Create Order
description: Create an Order.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
examples:
'Market Cash Amount Order ':
value:
accountNo: DWFS001102
orderType: MARKET
symbol: SBUX
side: BUY
amountCash: 100
Market Quantity Order:
value:
accountNo: DWFS001102
orderType: MARKET
symbol: SBUX
side: BUY
quantity: 2
Market Quantity Order w/ Lot Disposition:
value:
accountNo: DWFS001102
orderType: MARKET
symbol: SBUX
side: SELL
quantity: 2
taxLotDisposition:
- taxLotID: 3db27e74626adac3be7b549f2bbc0ab2480852a7
Limit GTC Order:
value:
accountNo: DWFS001102
orderType: LIMIT
symbol: AAPL
price: 165.25
quantity: 10
timeInForce: GTC
expiration: '2023-12-31'
side: BUY
Option Order:
value:
accountNo: DWFS001102
orderType: LIMIT
timeInForce: GTC
expiration: '2023-08-01'
symbol: AAPL230818C00195000
side: BUY_OPEN
quantity: 1
price: 3.42
Fixed Income Order:
value:
accountNo: DWFS001102
orderType: LIMIT
side: SELL
symbol: US459058GX53
quantity: 3
commission: 3.567
price: 4.5
currency: USD
timeInForce: DAY
limitType: YIELD
Order With Commission:
value:
accountNo: DWFS001102
orderType: LIMIT
side: SELL
symbol: AAPL
quantity: 3
commission: 3.5
price: 4.5
Order With CommissionRate:
value:
accountNo: DWFS001102
orderType: LIMIT
side: SELL
symbol: AAPL
quantity: 3
commissionRate: 0.3
price: 4.5
Market Order With Travel Rule Enforced:
value:
accountNo: DWFS001102
orderType: MARKET
symbol: SBUX
side: BUY
quantity: 2
travelRuleBankAccountID: bank_485ba18c-009d-4c4a-a6e9-99b104c800b2
Market Order With deptType:
value:
accountNo: DWFS001102
orderType: MARKET
symbol: SBUX
side: BUY
quantity: 2
deptType: ATS
required: true
responses:
'200':
description: Creating an Order was Successful.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseModel'
examples:
Both Commission and CommissionRate are present in the request:
value:
errorCode: E032
message: Invalid or missing parameters in the request body. Refer to the API documentation for details.
errorDetails:
detail: Cannot specify both 'commission' and 'commissionRate'. Provide either 'commission' or 'commissionRate'
field: commission/commissionRate
type: DECIMAL
CommissionRate decimal places more than 4:
value:
errorCode: E032
message: Invalid or missing parameters in the request body. Refer to the API documentation for details.
errorDetails:
detail: Commission rate should not exceed 4 decimal places
field: commissionRate
type: DECIMAL
Invalid commissionRate range:
value:
errorCode: E032
message: Invalid or missing parameters in the request body. Refer to the API documentation for details.
errorDetails:
detail: Commission rate should be between 0.0001 and 1.0
field: commissionRate
type: DECIMAL
'403':
description: Account restricted to make day trades
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseModel'
examples:
Account is restricted from making day trades:
value:
errorCode: A051
message: 'Account has been restricted. Check account status and notes for details. Forbidden: Account is restricted from making day trades. accountID=<accountID>'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
/orders/{orderID}:
get:
tags:
- Orders
parameters:
- in: path
name: orderID
schema:
$ref: '#/components/schemas/orderID'
required: true
summary: Retrieve Order
description: Retrieves an Order details by orderID.
responses:
'200':
description: Fetching Order status was successful.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderStatusResponse'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
patch:
tags:
- Orders
parameters:
- in: path
name: orderID
schema:
$ref: '#/components/schemas/orderID'
required: true
summary: Update Order
description: Updates an Order by orderID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrder'
required: true
responses:
'200':
description: The Order was Successfully Updated.
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrderResponse'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
/orders/byOrderNo/{orderNo}:
get:
tags:
- Orders
summary: Retrieve Order by Order Number
description: Retrieves an Order by OrderNo.
parameters:
- in: path
name: orderNo
schema:
$ref: '#/components/schemas/orderNo'
required: true
responses:
'200':
description: ' Retrieving an Order by OrderNo was Successful.'
content:
application/json:
schema:
$ref: '#/components/schemas/OrderStatusResponse'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
/orders/{orderID}/audit:
get:
tags:
- Orders
summary: Retrieve Order Audit Details
description: Retrieves an Order Audit Details by Order
parameters:
- in: path
name: orderID
schema:
$ref: '#/components/schemas/orderID'
required: true
responses:
'200':
description: Retrieving an Order Audit by OrderID was Successful.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderAuditResponse'
examples:
Order Audit Example:
value:
orderID: LL.203309cd-91c7-4f9a-9f33-632d0109cc77
orderNo: LLFE048977
accountID: a8888112-92d3-65d9-h20a-f333aeb4ae76.1646639525528
accountNo: XXXR000004
quantities:
requestedQuantity: 10
totalFilledQuantity: 10
ordStatus: FILLED
side: SELL
symbol: HOOD
ordType: LIMIT
amountCash: 0
violationExempt: false
preventQueuing: false
extendedHours: false
pricing:
avgPxRaw: 44.22
avgPx: 44.22
stopPx: 0
mitTriggerPrice: 0
instrumentID: 4ab39131-2ca0-466c-b96c-332357bc0826
orderExpires: '2025-03-07T21:00:00.000Z'
commissionOverride:
commissionOverrideType: RAW_COMMISSION
commissionID: null
commissionOverrideDesc: Standard Commission
commissionAmount: 1.28
secOverride: 0.01
tafOverride: 0.01
commissionAndFees:
total: 1.3
tefra: 0
ptp: 0
auditOrders:
- status: NEW
quantities:
cumulativeQuantity: 0
filledQuantity: 0
remainingQuantity: 0
pricing:
averagePrice: 0
averagePriceRaw: 0
lastPrice: 0
rateAsk: 0
rateBid: 0
commissionAndFees:
commission: 1.28
feeSec: 0
feeTaf: 0
feeBase: 0
feeXtraShares: 0
feeExchange: 0
pnl: 0
transactTime: '2024-12-10T01:57:53.109Z'
comment: NOS started
createdWhen: '2024-12-10T01:57:53.109Z'
- status: CANCELED
quantities:
cumulativeQuantity: 0
filledQuantity: 0
remainingQuantity: 0
pricing:
averagePrice: 0
averagePriceRaw: 0
lastPrice: 0
rateAsk: 37.44
rateBid: 37.4
commissionAndFees:
commission: 0
feeSec: 0
feeTaf: 0
feeBase: 0
feeXtraShares: 0
feeExchange: 0
pnl: 0
transactTime: '2024-12-10T21:25:00.358Z'
comment: oNo LLFE048977 aNo RAXR000004
eventID: event_cc97eaa0-a245-469b-83f4-1f5b8374f77e
createdWhen: '2024-12-10T21:25:00.375Z'
- status: NEW
quantities:
cumulativeQuantity: 0
filledQuantity: 0
remainingQuantity: 10
pricing:
averagePrice: 0
averagePriceRaw: 0
lastPrice: 0
rateAsk: 38.74
rateBid: 38.7
commissionAndFees:
commission: 0
feeSec: 0
feeTaf: 0
feeBase: 0
feeXtraShares: 0
feeExchange: 0
pnl: 0
transactTime: '2024-12-11T14:05:32.600Z'
comment: NOS Sending to sor when open
createdWhen: '2024-12-11T14:05:32.600Z'
- status: FILLED
quantities:
cumulativeQuantity: 0
filledQuantity: 0
remainingQuantity: 0
pricing:
averagePrice: 44.22
averagePriceRaw: 44.22
lastPrice: 0
rateAsk: 38
rateBid: 37.84
commissionAndFees:
commission: 0
feeSec: 0
feeTaf: 0
feeBase: 0
feeXtraShares: 0
feeExchange: 0
pnl: 0
transactTime: '2024-12-11T21:00:05.494Z'
comment: oNo LLFE048977 aNo RAXR000004
eventID: event_539cae86-9c77-48a1-b2d7-5efe111a638c
createdWhen: '2024-12-11T21:00:05.523Z'
security:
- bearerAuth: []
dwAppKey: []
- sessionToken: []
dwAppKey: []
components:
schemas:
ErrorCodeMessage:
type: string
description: The error message that is returned when an error occurs.
extendedHours:
type: boolean
example: false
description: Whether the order is eligible for Extended Hours Trading. The `timeInForce` must be set to `GTX` when this field is `true`. Only applicable to Equity Orders.
enum:
- true
- false
commissionOverrideType:
type: string
enum:
- NO_OVERRIDE
- RAW_COMMISSION
example: RAW_COMMISSION
description: The type of commission override applied to the order
expiration:
type: string
format: date
example: YYYY-MM-DD
description: The date of expiration for a good-til-canceled order, in “YYYY-MM-DD” format. The order will be canceled if not executed by the market close on this date. If not set, a good-til-canceled Stop and MIT order will be assumed to expire 90 days after creation. If not set, a limit order will be considered GTD and will cancel at the end of the trading day.
updated:
type: string
example: '2022-12-11T22:28:21.810Z'
description: ''
ErrorDetails:
type: object
properties:
field:
type: string
description: JSON field name from the request body that caused an error
type:
type: string
enum:
- STRING
- ARRAY
- INT
- DECIMAL
- BOOL
- TEXT
- UUID
- DATE
- MAP
- OBJECT
description: Expected data type of the field
allowedValues:
type: string
description: Example values which are allowed in the field
commissionOverride:
oneOf:
- type: object
properties:
commissionOverrideType:
$ref: '#/components/schemas/commissionOverrideType'
commissionID:
$ref: '#/components/schemas/commissionID'
commissionOverrideDesc:
$ref: '#/components/schemas/commissionOverrideDesc'
- type: object
properties:
commissionOverrideType:
$ref: '#/components/schemas/commissionOverrideType'
commissionID:
$ref: '#/components/schemas/commissionID'
commissionOverrideDesc:
$ref: '#/components/schemas/commissionOverrideDesc'
commissionAmount:
example: 3.5
secOverride:
example: 0.01
tafOverride:
example: 0.01
- type: object
properties:
commissionOverrideType:
example: '#/components/schemas/commissionOverrideType'
commissionID:
$ref: '#/components/schemas/commissionID'
commissionOverrideDesc:
example: '#/components/schemas/commissionOverrideDesc'
commissionRate:
example: 0.5
secOverride:
example: 0.01
tafOverride:
example: 0.01
orderID:
type: string
example: IC.0e352bb7-9869-4233-9861-9673544efedd
description: A unique DriveWealth order identifier created when an order is placed.
clientOrderID:
type: string
example: 5a1762d5-4562
description: A unique identifier that represents the order, as defined by the partner. This detail will be reported to the CAT system for US brokers to more easily reconcile reported information.
taxLotID:
type: string
example: 3db27e74626adac3be7b549f2bbc0ab2480852a7
description: A unique tax lot identifier.
note:
type: string
example: Hey! Welcome to DriveWealth Developer Docs!
description: A way to store a message/comment on the this object.
ErrorResponseModel:
type: object
description: The error response model that is returned when an error occurs.
required:
- errorCode
- message
properties:
errorCode:
$ref: '#/components/schemas/ErrorCode'
message:
$ref: '#/components/schemas/ErrorCodeMessage'
errorDetails:
$ref: '#/components/schemas/ErrorDetails'
deptType:
type: string
example: ATS
description: The name of the department in abbreviation form.
enum:
- A
- ATS
- DMA
- SA
- T
- O
PendingOrders:
type: object
description: A list of pending orders.
properties:
accountID:
$ref: '#/components/schemas/accountID'
accountNo:
$ref: '#/components/schemas/accountNo'
tradingType:
$ref: '#/components/schemas/tradingType'
updated:
type: string
example: '2021-04-23T18:41:32.440Z'
description: The time of the last update to the Pending Orders Object.
orders:
type: array
description: An array that holds a list of currently pending orders.
items:
oneOf:
- type: object
properties:
orderID:
$ref: '#/components/schemas/orderID'
orderNo:
$ref: '#/components/schemas/orderNo'
createdWhen:
$ref: '#/components/schemas/created'
symbol:
$ref: '#/components/schemas/instrumentSymbol'
cumQty:
$ref: '#/components/schemas/orderCumulativeQuantity'
orderStatus:
type: string
example: '2'
description: The current status of the order.
enum:
- '0'
- '1'
- '2'
- '3'
- '4'
- '6'
- '7'
- '8'
- '9'
- A
- B
- C
orderType:
type: string
example: '1'
description: The type of order that is placed.
enum:
- '0'
- '1'
- '2'
- '3'
- '4'
- '6'
- '7'
- m
orderQty:
$ref: '#/components/schemas/orderQuantity'
isoTimeRestingOrderExpires:
type: string
example: null
description: The time when the limit order expires.
limitPrice:
type: number
example: null
description: The price set for the limit order.
side:
$ref: '#/components/schemas/sideAbbreviated'
orderCashAmt:
type: number
example: null
description: The amount of cash requested for an order (fractional shares only).
stopPrice:
type: number
example: 200
description: The stop price of a limit order.
ISIN:
$ref: '#/components/schemas/instrumentISIN'
salesCredit:
$ref: '#/components/schemas/SalesCredit'
instrumentType:
$ref: '#/components/schemas/instrumentType'
amountCash:
type: number
format: double
example: null
description: The USD-denominated amount to purchase or sell.
orderTypesRequest:
type: string
example: MARKET
description: The type of the Order.
enum:
- MARKET
- LIMIT
- STOP
- MARKET_IF_TOUCHED
instrumentSymbol:
type:
- string
- 'null'
example: MS
description: The ticker symbol of the Instrument. Debt Instruments and Global Mutual Funds do not have symbols and are referred to buy their `instrumentID` or `ISIN`.
currency:
type: string
example: USD
description: The name of the currency in abbreviation form.
enum:
- USD
schemas-side:
type: string
example: BUY
description: Whether an order is to purchase or sell. Generally, the value should be set to `BUY` or `SELL`. For Options orders, `BUY_OPEN`, `BUY_CLOSE`, `SELL_OPEN`, `SELL_CLOSE` should be used.
enum:
- BUY
- SELL
- BUY_OPEN
- BUY_CLOSE
- SELL_OPEN
- SELL_CLOSE
commissionOverrideDesc:
type: string
example: Standard Commission
description: The description of commission override applied to the order
OrderStatusResponse:
type: object
description: Order details for a fixed income asset trade
properties:
id:
$ref: '#/components/schemas/orderID'
orderNo:
$ref: '#/components/schemas/orderNo'
type:
$ref: '#/components/schemas/orderTypes'
side:
$ref: '#/components/schemas/schemas-side'
status:
$ref: '#/components/schemas/localOrderStatus'
instrumentID:
$ref: '#/components/schemas/instrumentID'
ISIN:
$ref: '#/components/schemas/instrumentISIN'
CUSIP:
$ref: '#/components/schemas/instrumentCUSIP'
symbol:
$ref: '#/components/schemas/instrumentSymbol'
averagePrice:
$ref: '#/components/schemas/orderAveragePrice'
currency:
$ref: '#/components/schemas/currency'
totalOrderAmount:
type: number
format: double
example: 800
description: Total amount paid for the order.
cumulativeQuantity:
$ref: '#/components/schemas/orderCumulativeQuantity'
quantity:
$ref: '#/components/schemas/orderQuantity'
fees:
type: number
format: double
example: 0.01
description: Cost of the order.
ptpWithholdingFee:
type: number
format: double
example: 0.01
description: The publicly traded partnership (PTP) withholding fee for the order.
createdBy:
type: string
example: cc07f91b-7ee1-4868-b8fc-823c70a1b932
description: userID of the individual creating the order.
userID:
type: string
example: cc07f91b-7ee1-4868-b8fc-823c70a1b932
description: userID of the account holder the order relates to.
accountID:
type: string
example: cc07f91b-7ee1-4868-b8fc-823c70a1b932.1407776996299
description: accountID for the account the order relates to.
accountNo:
type: string
example: CSSW000001
description: accountNo for the account the order related to.
created:
type: string
example: '2019-02-14T18:56:07.411Z'
description: The time at which the order was created.
statusMessage:
type: object
description: If the Order was unsuccessful, this object will be present with additional details regarding why.
properties:
errorCode:
type: object
example: null
description: A DriveWealth error code.
message:
type: string
example: null
description: Description of the error code.
reason:
type: string
example: null
description: A longer reason for the error.
amountCash:
$ref: '#/components/schemas/amountCash'
OrderExpires:
type: string
example: null
description: The date of expiration for a good-til-canceled order, in “YYYY-MM-DD” format. The order will be canceled if not executed by the market close on this date. If not set, a good-til-canceled Stop and MIT order will be assumed to expire 90 days after creation. If not set, a limit order will be considered GTD and will cancel at the end of the trading day.
salesCredit:
$ref: '#/components/schemas/SalesCredit'
instrumentType:
$ref: '#/components/schemas/instrumentType'
dccs:
$ref: '#/components/schemas/dccs'
openQuantity:
$ref: '#/components/schemas/openQuantity'
availableForTradingQuantity:
$ref: '#/components/schemas/availableForTradingQuantity'
travelRuleBankAccountID:
type: string
example: bank_485ba18c-009d-4c4a-a6e9-99b104c800b2
description: Displays travel rule bank account ID which set while creating order
clientOrderTransactionTime:
$ref: '#/components/schemas/clientOrderTransactionTime'
clientOrderID:
$ref: '#/components/schemas/clientOrderID'
localOrderStatus:
type: string
example: FILLED
description: The current status of the order.
enum:
- NEW
- FILLED
- PARTIAL_FILL
- REJECTED
- CANCELED
- PENDING_CANCEL
OrderHistoryRes:
type: object
properties:
accountID:
$ref: '#/components/schemas/accountID'
accountNo:
$ref: '#/components/schemas/accountNo'
tradingType:
$ref: '#/components/schemas/tradingType'
updated:
type: string
example: '2017-06-16T15:35:30.617Z'
description: Time of last update.
orders:
type: array
description: An array that holds a list of completed orders.
items:
oneOf:
- type: object
properties:
orderID:
$ref: '#/components/schemas/orderID'
orderNo:
$ref: '#/components/schemas/orderNo'
createdWhen:
$ref: '#/components/schemas/created'
symbol:
$ref: '#/components/schemas/instrumentSymbol'
cumQty:
$ref: '#/components/schemas/orderCumulativeQuantity'
orderStatus:
$ref: '#/components/schemas/orderStatusNumber'
orderType:
$ref: '#/components/schemas/orderTypes'
orderQty:
$ref: '#/components/schemas/orderQuantity'
isoTimeRestingOrderExpires:
type: string
example: null
description: The time when the limit order expires.
limitPrice:
type: number
example: null
description: The price set for the limit order.
side:
$ref: '#/components/schemas/sideAbbreviated'
mitTriggerPrice:
type: number
example: 0
description: Market If Touched trigger price. For MIT orders.
triggered:
type: number
example: 0
description: The trigger price for limit orders.
averagePriceRaw:
type: number
example: 147.45
description: The average price of purchase for the order.
orderCashAmt:
type: number
example: null
description: The amount of cash requested for an order (notional orders only).
stopPrice:
type: number
example: 200
description: The stop price of a limit order.
ISIN:
$ref: '#/components/schemas/instrumentISIN'
CreateOrderResponse:
type: object
properties:
orderId:
type: string
example: EF.418a5506-256c-4c3c-9d4d-f491522cf7f2
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/drivewealth/refs/heads/main/openapi/drivewealth-orders-api-openapi.yml