HomeGuidesRecipesAPI ReferenceGraphQLChangelogDiscussionsv2023.08
HomeLog In
API Reference
These docs are for v2023.08. Click to read the latest docs for v2023.12.

Create an Order for an Account.

Creating an order for your end customer. Each trading request must pass in the account_id in the URL.

Note that when submitting crypto orders, Market, Limit and Stop Limit orders are supported while the supported time_in_force values are gtc, and ioc. We accept fractional orders as well with either notional or qty provided.

Path Params
uuid
required

Account identifier.

Body Params
string
required

Symbol or asset ID to identify the asset to trade

string

Number of shares to trade. Can be fractionable for only market and day order types.

string

Dollar amount to trade. Cannot work with qty. Can only work for market order types and time_in_force = day.

string
enum
required

Represents what side of the transaction an order was on.

string
enum
required
Allowed:
string
enum
required
Allowed:
string

Required if type is limit or stop_limit

string

Required if type is stop or stop_limit

string

If type is trailing_stop, then one of trail_price or trail_percent is required

string

If type is trailing_stop, then one of trail_price or trail_percent is required

boolean

Defaults to false. If true, order will be eligible to execute in premarket/afterhours. Only works with type limit and time_in_force = day.

string
length ≤ 48

A unique identifier for the order. Automatically generated if not sent. (<= 48 characters)

string
enum
Allowed:
take_profit
object

Takes in a string/number value for limit_price

stop_loss
object

Takes in a string/number values for stop_price and limit_price

string

The commission you want to collect from the user.

string

The percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission

string
string
string
string
Responses

422

Some parameters are not valid

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

©2023. Prime Industries, Services, and Trinkets LLC. We are not responsible