Finance::Alpaca::Struct::Order - A Single Order Object
use Finance::Alpaca; my @orders = Finance::Alpaca->new( ... )->orders( status => 'all' ); say $orders[0]->id;
The orders API allows a user to monitor, place and cancel their orders with Alpaca. Each order has a unique identifier provided by the client. This client-side unique order ID will be automatically generated by the system if not provided by the client, and will be returned as part of the order object along with the rest of the fields described below. Once an order is placed, it can be queried using the client-side order ID to check the status. Updates on open orders at Alpaca will also be sent over the streaming interface, which is the recommended method of maintaining order state.
The following properties are contained in the object.
$trade->id();
id
client_order_id
created_at
updated_at
submitted_at
filled_at
expired_at
canceled_at
failed_at
replaced_at
replaced_by
replaces
asset_id
symbol
asset_class
notional
qty( )
9
qty
notional( )
filled_qty
filled_avg_price
order_class
simple
bracket
oco
oto
type
market
limit
stop
stop_limit
trailing_stop
side
buy
sell
time_in_force
day
gtc
opg
cls
ioc
fok
limit_price
stop_price
status
extended_hours
legs
trail_percent
trail_price
hwm
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.
Sanko Robinson <sanko@cpan.org>
To install Finance::Alpaca, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Alpaca
CPAN shell
perl -MCPAN -e shell install Finance::Alpaca
For more information on module installation, please visit the detailed CPAN module installation guide.