| orders | R Documentation |
The orders API allows a user to monitor, place and cancel their orders with Alpaca. Times are returned as yyyy-mm-dd hh-mm-ss POSIXct, quantity and price as numeric, and all others as a string. See Orders GETfor more details.
orders(
symbol_id = NULL,
status = "open",
limit = NULL,
after = NULL,
until = NULL,
direction = "desc",
client_order_id = NULL,
nested = T,
live = get_live()
)
symbol_id |
|
status |
|
limit |
|
after |
|
until |
|
direction |
|
client_order_id |
|
nested |
|
live |
|
Order (tibble) Order object or Array of Order Objects with the following information:
id(character) order id
client_order_id(character) client unique order id
created_at(POSIXct) nullable When the order was created
updated_at(POSIXct) nullable When the order was updated
submitted_at(POSIXct) nullable When the order was submitted
filled_at(POSIXct) nullable When the order was filled
expired_at(POSIXct) nullable When the order was expired
canceled_at(POSIXct) nullable When the order was canceled
failed_at(POSIXct) nullable When the order failed
replaced_at(POSIXct) nullable When the order was replaced
replaced_by(character) id of replacement order
replaces(character) id of the replaced order
asset_id(character) asset ID
symbol(character) Asset symbol
exchange(character) Asset exchange
asset_class(character) Asset class
qty(integer) Ordered quantity
filled_qty(integer) Filled quantity
filled_avg_price(numeric) Filled average price
order_class(character)
order_type(character)
type(character) Valid values: market, limit, stop, stop_limit
side(character) Valid values: buy, sell
time_in_force(character) time in force
limit_price(numeric) Limit price
stop_price(numeric) Stop price
status(character) Status of the order
extended_hours(logical) If true, eligible for execution outside regular trading hours.
legs(character) When querying non-simple order_class orders in a nested style, an array of Order entities associated with this order. Otherwise, null.
Other Orders:
order_submit()
orders(live = FALSE)
orders(status = "all")
# For a specific symbol:
orders("AAPL", status = "all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.