NAME
Finance::Robinhood::Forex::Pair - Represents a Single Forex Currency Pair Watchlist
SYNOPSIS
use Finance::Robinhood;
my $rh = Finance::Robinhood->new;
# TODO
METHODS
id( )
Returns a UUID.
display_only( )
Returns a boolean. If this is true, you can only add the pair to a forex watchlist to monitor the price for now.
max_order_size( )
Largest amount of this asset you may trade in a single order.
min_order_price_increment( )
Smallest price of the quote currency you may place an order for.
min_order_quantity_increment( )
Smallest increment of the asset you may place an order for.
min_order_size( )
Smallest amount of the asset you may place an order for.
name( )
Returns a string suited for display. And example would be 'Bitcoin to US Dollar'.
symbol( )
String used for display. Example of this might be 'BTC-USD'.
tradability( )
Either tradable
or untradable
.
asset_currency( )
Returns a Finance::Robinhood::Forex::Currency object.
quote_currency( )
Returns a Finance::Robinhood::Forex::Currency object.
quote( )
my $quote = $pair->quote();
Builds a Finance::Robinhood::Forex::Quote object with this currency pair's quote data.
You do not need to be logged in for this to work.
historicals( ... )
my $data = $pair->historicals( interval => '15second' );
Returns a Finance::Robinhood::Forex::Historicals object.
You may provide the following arguments:
interval
Required and must be on eof the following:span
- Optional and must be one of the following:
buy( ... )
my $order = $pair->buy(34);
Returns a Finance::Robinhood::Forex::OrderBuilder object.
Without any additional method calls, this will create an order that looks like this:
{
account => "XXXXXXXXX",
currency_pair_id => "3d961844-d360-45fc-989b-f6fca761d511",
price => "111.700000", # Automatically grabs bid price quote on submission
quantity => 4, # Actually the amount of crypto you requested
side => "buy",
time_in_force => "ioc",
type => "market"
}
sell( ... )
my $order = $btc->sell(34);
Returns a Finance::Robinhood::Forex::OrderBuilder object.
Without any additional method calls, this will create an order that looks like this:
{
account => "XXXXXXXXXX",
pair_id => "3d961844-d360-45fc-989b-f6fca761d511",
price => "111.700000", # Automatically grabs ask price quote on submission
quantity => 4, # Actually the amount of currency you requested
side => "sell",
time_in_force => "ioc",
type => "market"
}
LEGAL
This is a simple wrapper around the API used in the official apps. The author provides no investment, legal, or tax advice and is not responsible for any damages incurred while using this software. This software is not affiliated with Robinhood Financial LLC in any way.
For Robinhood's terms and disclosures, please see their website at https://robinhood.com/legal/
LICENSE
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. Please refer to the LEGAL section.
AUTHOR
Sanko Robinson <sanko@cpan.org>