Skip to main content

US Stocks Error Codes

The US Stocks APIs return errors in the standard error response. Codes from UDAPI1300 to UDAPI1323 are specific to US stocks. The APIs also return the common error codes, including UDAPI10005 when you exceed the US Stocks rate limits, and shared validation codes such as UDAPI1026 (instrument key is required).

Validation errors​

These errors return HTTP 400. Fix the request before you retry.

Error codeDescription
UDAPI1300Invalid US instrument - The instrument_key is not in the US instruments file.
UDAPI1301This US stock is not tradable - The stock is listed but not currently tradable.
UDAPI1302Provide exactly one of quantity or amount - Send either quantity or amount, not both and not neither.
UDAPI1303Quantity must be greater than 0 with at most 9 decimal places.
UDAPI1304Fractional quantity is not allowed for this stock - The stock has fractionable: false.
UDAPI1305Amount must be greater than 0 with at most 2 decimal places.
UDAPI1306Amount orders are not allowed for this stock - Amount orders need a fractionable stock.
UDAPI1307Price must be greater than 0 for a limit order.
UDAPI1308Price is not allowed for a market order - Omit price or send 0.
UDAPI1309Price allows 2 decimal places at or above $1 and 4 below $1.
UDAPI1310Order value must be at least $1.
UDAPI1311Order size cannot exceed 999,999 - Applies to both quantity and amount.
UDAPI1323Order value cannot exceed $40,000. - Checked by Place Order when the value is fixed: an amount order, or a limit order at quantity × price. Not applied to estimates or the margin calculator.
UDAPI1313Quantity is required.
UDAPI1314Price must be greater than 0.
UDAPI1315Provide at least one order - The margin request instruments array is empty.

Account and order errors​

Error codeHTTP statusDescription
UDAPI1316403US stocks is not activated for this account - Activate US stocks on your Upstox account. See how to start investing in US stocks with Upstox.
UDAPI100500400US order was rejected - The US broker rejected a place or cancel request, or an estimate. The error message carries the broker's reason, for example insufficient funds or quantity.
UDAPI100040400Cancel of already cancelled/rejected/completed order is not allowed - The order has already finished: complete, cancelled, cancelled_partially, failed, failed_partially or expired.
UDAPI100010404Order not found - No US order exists with this order_id.
UDAPI1319500The US order service did not confirm this request in time. Check your order book before retrying. - A place or cancel request timed out and may still have gone through.

Service errors​

These errors return HTTP 423. They are temporary, so retry after some time.

Error codeDescription
UDAPI1317US stocks order service is unavailable. Please try again later.
UDAPI1318US stocks trading is in its daily maintenance window. Please try again later.
UDAPI1320US stocks funds service is unavailable. Please try again later.
UDAPI1321Last traded price is unavailable for this US stock. Send a price or try again later. - Returned by the charges and margin APIs for a MARKET order. Send a price to use as a fallback.
UDAPI1322US market status is unavailable, so the order was not placed. Please try again later. - Returned by Place Order, which needs the market status to decide whether the order is an after-market order.

Indian order API errors for US instruments​

The Indian Place Order, Place Order V3, Place Multi Order and Place GTT Order APIs reject instruments they cannot route.

Error codeDescription
UDAPI1250This instrument's segment cannot be traded through this API.
UDAPI1251US stocks cannot be ordered through this API. Use the US order API instead. - Use the US Place Order API.