![]() Logging in allows you to buy and sell securities with your Robinhood account. ) my $token = $rh->login($user, $password) On the bright side, for future logins, you can store the authorization token and use it rather than having to pass your username and password around anymore. Before you can buy or sell or do almost anything else, you must log in manually. Without arguments, a new Finance::Robinhood object is created without account information. This would create a new Finance::Robinhood object ready to go. My $rh = Finance::Robinhood->new( token =>. ) # Passing the token is the preferred way of handling authorization ) or log in with your username and password. To get this token, you must either pass it as an argument to new(. Robinhood requires an authorization token for most API calls. Let's start at the very beginning: let's log in! Logging In ![]() I've attempted to organize everything according to how and when they are used. ![]() ![]() There are parts of this package that are object oriented (because they require persistant login information) and others which may also be used functionally (because they do not require login information). METHODSįinance::Robinhood wraps a powerfully capable API which has many options. If you're looking to just buy and sell without lot of reading, head over to the Finance::Robinhood::Order and pay special attention to the order cheat sheet and apply what you learn to the eg/buy.pl example script. Gathering quote and fundamental information is only the beginning.įinance::Robinhood::Watchlist objects represent persistant lists of securities you'd like to keep track of. Individual securities are represented by Finance::Robinhood::Instrument objects. If you'd like to view or edit any of the information Robinhood has on you, start there. Quote information can be accessed with Finance::Robinhood::Quote.Īccount information is handled by Finance::Robinhood::Account. You'll find recipes for market, limit, as well as stop loss and stop limit order types. If you're looking to make this as simple as possible, go check out the cheat sheet. Orders to buy and sell are created in Finance::Robinhood::Order. This package is organized into very easy to understand parts: Before we get into how, please read the Legal section below. Find it on github: DESCRIPTIONįinance::Robinhood allows you to buy, sell, and gather information related to stocks and ETFs traded in the U.S commission free. In addition to those examples, you should check out the unofficial documentation of Robinhood trade's API. You can dump the CSV to STDOUT by leaving -output undefined.īoth scripts provide help when called without arguments. eg/export_Įxport your entire Robinhood order history to a CSV file from the command line buy -username=getMoney -password=*** -output=Robinhood.csv I might update it myself if I find a round tuit somewhere this summer. If that's you, the quickest way to get in without a load of looking through documentation would be to move over to any of the example scripts that I've included with this distributio: eg/buy.plīuy stocks from the command line buy.pl -username=getMoney -password=*** -symbol=MSFT -quantity=2000Ĭurrently only market orders are supported but adding all the different limit order types is really rather simple. Some people have really only be reading this to get an automated stock trading bot up and running. My $token = $rh->login($user, $password) # Store it for later Finance::Robinhood - Trade Stocks and ETFs with Commission Free Brokerage Robinhood SYNOPSIS use Finance::Robinhood ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |