Common Order Gateway Errors

🚧

Error Code O124 : Order Cancellation Due to Corporate Actions

Corporate actions are processed between 4-6 AM ET. Any pending orders placed prior to that time will be cancelled. Pending Orders placed after 6AM ET and before Market Open (9:30 AM ET), and any subsequent Market orders should not be affected.

Please find below DriveWealth order gateway errors that will be returned in the case of rejected order status

Error Code

Status

Description

O100

ERROR_SIDE_NULL

side attribute left blank

O101

ERROR_INSTRUMENT_UNKNOWN

Invalid instrumentID provided in the request

O102

ERROR_INSTRUMENT_INACTIVE

instrumentID's status listed as INACTIVE

O103

ERROR_INSTRUMENT_CLOSE_POSITIONS_ONLY

instrumentID's status listed as CLOSE_POSITIONS_ONLY

O104

ERROR_STOP_ORDER_INV_SIDE

Order value not supported

O105

ERROR_CANNOT_SELL_SHORT

orderQty exceeds quantity available for sale

O107

ERROR_INVALID_STOP_PRICE_NULL

Stop price entered as null

O108

ERROR_STOP_PRICE_NARROW

Stop price to close to NBBO

O109

ERROR_LIMIT_PRICE_TOO_FAR

Limit price too far from NBBO

O111

ERROR_SIDE_INVALID

Invalid side input used

O112

ERROR_INSTRUMENT_NOT_ENABLED_FOR_USER

Requested instrument is not part of user's instrument group

O113

ERROR_ORDER_TYPE_INVALID

Invalid order type used

O114

ERROR_LIMIT_PRICE_MISSING

price missing, required field for limit orders

O119

ERROR_COMMISSION_NULL

Commission field left blank

O121

ERROR_BUY_STOP_PRICE_NARROW

Buy stop price must be >= NBBO ask + $0.05

O122

ERROR_SELL_STOP_PRICE_NARROW

Sell stop price must be <= NBBO bid - $0.05

O124

STOCK_SPINOFF, DIVIDEND_CASH

Corporate action cancellation. Stock Spinoff, Dividends

O201

ERROR_MARKET_DATA_MISSING

Market data is missing

O202

ERROR_ORDERQTY_INVALID

Specified orderQty is invalid

O300

ERROR_REJECT_1600_TO_1615

New orders rejected between 4:00PM ET to 4:15PM ET

O301

ERROR_ORDER_CLOSED

Order is closed and cannot be executed or cancelled

O302

ERROR_ORDER_FILLED_CUMQTY

Order filled cumQty duplicate execution

O303

ERROR_ORDER_FILLED_LEAVES

Order filled leaves duplicate execution

O304

ERROR_ORDER_PART_FILLED

Order is part filled cannot be re-executed

O305

ERROR_ORDER_NOT_FOUND

Order not found in system

O306

ERROR_ORDER_PREV_SENT_TO_MKT

Order was previously sent to the market

O307

ERROR_ORDER_PENDING_CANCEL

Order is pending cancellation cannot be executed

O400

ERROR_ACCOUNT_CLOSED

Account status is CLOSED

O401

ERROR_ACCOUNT_PENDING

Account status is PENDING

O402

ERROR_ACCOUNT_CLOSE_POSITIONS_ONLY

Account status is CLOSE_POSITIONS_ONLY

O403

ERROR_ACCOUNT_NULL

accountID/ accountNo is null

O404

ERROR_ACCOUNT_INVALID

accountID / accountNo is invalid

O405

ERROR_ACCOUNT_MKT_NOS_NOT_LIVE

accountType not LIVE as required

O406

ERROR_ACCOUNT_MAX_ORDER_VALUE_EXCEEDED

Order value exceed's accounts maximum order value

O407

ERROR_ACCOUNT_MAX_ORDER_QTY_EXCEEDED

orderQty exceeds account's maximum order quantity

O409

ERROR_REJECT_MARKET_CLOSED

Order marked preventQueuing = TRUE, rejected due to market not open

O501

ERROR_ORDER_STOP_SIZE

Fractional component specified greater than allowed orderSizeStep

O502

ERROR_FRACT_NOT_SUPPORTED

Fractional quantity not supported

O504

ERROR_FRACT_NOT_SUPPORTED_FOR_LIMIT

Fractional share quantity not supported by limit orders

O505

ERROR_AMOUNT_CASH_NON_FRAC_INSTRUMENT

Cannot specify amountCash for non-fractionalizable instruments

O506

ERROR_SELL_SMALL_NOT_LIQUIDATED

Sell order < $1.00, but not liquidating a position

O507

ERROR_ORDER_QTY_LESS_THAN_MIN

Order quantity specified less than instrument minimum size

O601

ERROR_NO_QTY_NO_PX

Quantity and cash amount both not specified

O602

ERROR_BOTH_QTY_PX_SPECIFIED

Quantity and cash amount both specified

O603

ERROR_MONEY_TOO_SMALL

Money specified too small for any fractional part of security

O604

ERROR_MONEY_LESS_THAN_ONE_DOLLAR

Money specified is less than $1.00

O605

ERROR_LIMIT_PX_MORE_THAN_PENNIES

Limit price specified must be greater than $0.01

O606

ERROR_STOP_PX_MORE_THAN_PENNIES

Stop price specified must be greater than $0.01

O607

ERROR_INSUFFICIENT_FUNDS

Customer does not have enough funds to complete order

O609

ERROR_QUANTITY_NULL_OR_ZERO

The quantity requested is less than 0.0001 or 0.

O610

ERROR_MARGIN_INSUFFICIENT_FUNDS

Margin account cannot buy due to insufficient funds (not margin call)

O611

ERROR_MARGIN_HOUSE_CALL_STATE

Margin account cannot buy because account is in house margin call state

O612

ERROR_MARGIN_EXISTING_ORDERS

Margin account cannot buy because existing resting orders will place account in house margin call state

O613

ERROR_MARGIN_EXCHANGE_CALL_STATE

Margin account cannot buy because account is in exchange margin call state

O614

ERROR_MARGIN_RESTRICTED_ACCOUNT

Margin account cannot bu because equity in account < 50% of holdings (not margin call)

O615

ERROR_MARGIN_EFFECTIVE_SMA_ZERO

Margin account cannot buy because effective money = 0 (not margin call)

O617

ERROR_MARGIN_INSUFFICIENT_FUNDS_REGT

Margin account cannot buy insufficient funds. Instrument leverage requirement rule

O618

ERROR_MARGIN_5DOLLAR_RULE

Margin account cannot buy insufficient funds. Limit or market price is < $5.00, can only use 1:1 margin (effectiveSMA)

O619

ERROR_MOC_SPECIFIED_CASH

Market on Close orders cannot be cash based

O620

ERROR_MARGIN_EQUITY_NOT_MET

Margin account minimum equity is not met. (Equity = Long Market Value - Debit Balance)

O621

ERROR_LIMIT_PX_AMOUNT_MORE_THAN_PENNIES

Limit price cannot exceed 2 decimals, must be rounded to nearest penny

O622

ERROR_MARGIN_TRADER_RESTRICTED

Margin account is Pattern Day Trader, equity < $25,000, account restricted, buying power = 0

O640

ERROR_LIMIT_ORDER_MARKET_5CENT

Exchange requirement for this instrument: limit price must be in $0.05 increments

O701

ERROR_USER_NULL

User is null

O702

ERROR_USER_INVALID

User is invalid

O703

ERROR_USERID_NOT_EQ_ACCOUNTID

userID != account.userID

O704

ERROR_IGNORING_DROPCOPY

Ignoring dropcopy order, should not be in the database

O705

ERROR_CXL_USERID_NOT_ORDER_USERID

Cancel userID not equal to order userID

O801

ERROR_SYSTEM_ORDER_STORAGE

System error storing order, order rejected

O802

ERROR_MARKET_DATA_UNAVAILABLE

System market data unavailable

O803

ERROR_NOS_ORDER_RCVD_TWICE

Specified order received before, duplicate order

O820

ERROR_MANAGED_ACCOUNT_CANNOT_TRADE

RIA Managed accounts cannot place trades

O901

INTERNAL_SYSTEM_PROBLEM

System internal process problem

O902

IMPROPERLY_FORMED_FIX_MSG

Improperly formed FIX message

O903

NEW_ORDERS_DISABLED

Client disabled for creating new orders, allowed to CXL/FILLS only

O904

ORDER_TOO_OLD

Order has expired

O905

DUPLICATE_ORDER

Duplicate ClOrdId

O906

MAM_MISSING_USE_CLIENT_FUNDS

allocateAccountID field specified but missing field useClientFunds

O907

MAM_INVALID_ACCOUNT_ID_NO

Invalid allocateAccountID speified

0908

MAM_INVALID_USE_CLIENT_FUNDS

Invalid useClientFunds specified, valid values are {0 | 1 }

O909

MAM_CANNOT_SPECIFY_AUTO_ALLOCATE

You are not configured to send in auto-allocation orders

O910

MIT_ORDERS_DISABLED

Market if Touched orders are disabled

O911

MAM_AUTO_ALLOCATE_REQUIRES_USECLIENTFUNDS

Auto allocate orders must specify parameter useClientFunds

O912

MAM_AUTO_ALLOCATE_NOT_ENABLED

RIA not enabled to send in auto-allocation orders

O913

MAM_NOT_ALLOWED_USE_CLIENT_FUNDS

May not set field useClientFunds for non-RIA account

O914

MAM_NOT_ALLOWED_JOURNAL_EXCESS_FUNDS

May not set field orderJournalExcessFunds for non-RIA account

O915

MAM_NO_HOUSE_ACCOUNT

May not specify useClientFunds=0=false with no house account configured

O916

MAM_AUTO_ALLOCATE_ACCOUNTID_REQUIRED

This order must contain field allocateAccountID but this field is null

O1001

ALGO_MISSING_USERID

ALGO missing field userID

O1002

ALGO_ORDER_CLIENT_NOT_ENABLED

ALGO account not enabled for special orders

O1003

ALGO_CANNOT_COMBINE_ALG_DEST_MOC

ALGO cannot combine algorithm / destination / MOC

O1004

ALGO_CONNOT_COMBINE_ALG_DEST

ALGO cannot combine algorithm / destination

O1005

ALGO_CANNOT_COMBINE_ALG_MOC

ALGO cannot combine algorithm / MOC

O1006

ALGO_MOC_MISSING_DESTINATION

ALGO MOC order missing destination

O1007

ALGO_INVALID_DESTINATION

ALGO MOC invalid destination

O1008

ALGO_UNSUPPORTED_ORDER_TYPE

ALGO unsupported orderType

O1009

ALGO_INVALID_ALFO_NAME

ALGO invalid algo name

O1010

ALGO_INVALID_MAX_PCT_VOLUME

ALGO invalid max percent volume

O1011

ALGO_INVALID_YN_VALUE

ALGO invalid Y N value specified

O1012

ALGO_INVALID_COMPLETION_PRICE

ALGO invalid completion price specified

O1013

ALGO_INVALID_EXECUTION_STYLE

ALGO invalid execution style specified

O1014

ALGO_INVALID_START_END_TIME

ALGO invalid start / end dateTime specified

O1015

ALGO_POV_MISSING_TARGET_VOL_PCT

ALGO POV missing target volume percent

O1016

ALGO_INVALID_TARGET_VOL_PCT

ALGO POV invalid target volume percent

O1017

ALGO_ILLEGAL_TARGET_VOL_PCT

ALGO cannot set target volume percentage for non-POV algo