Ejemplo n.º 1
0
def load_account_profile(access_token, info=None):
    """Gets the information associated with the accounts profile,including day
    trading information and cash being held by Robinhood.

    :param info: The name of the key whose value is to be returned from the function.
    :type info: Optional[str]
    :returns: The function returns a dictionary of key/value pairs. \
    If a string is passed in to the info parameter, then the function will return \
    a string corresponding to the value of the key whose name matches the info parameter.
    :Dictionary Keys: * url
                      * portfolio_cash
                      * can_downgrade_to_cash
                      * user
                      * account_number
                      * type
                      * created_at
                      * updated_at
                      * deactivated
                      * deposit_halted
                      * only_position_closing_trades
                      * buying_power
                      * cash_available_for_withdrawal
                      * cash
                      * cash_held_for_orders
                      * uncleared_deposits
                      * sma
                      * sma_held_for_orders
                      * unsettled_funds
                      * unsettled_debit
                      * crypto_buying_power
                      * max_ach_early_access_amount
                      * cash_balances
                      * margin_balances
                      * sweep_enabled
                      * instant_eligibility
                      * option_level
                      * is_pinnacle_account
                      * rhs_account_number
                      * state
                      * active_subscription_id
                      * locked
                      * permanently_deactivated
                      * received_ach_debit_locked
                      * drip_enabled
                      * eligible_for_fractionals
                      * eligible_for_drip
                      * eligible_for_cash_management
                      * eligible_for_trading_on_expiration
                      * cash_management_enabled
                      * option_trading_on_expiration_enabled
                      * cash_held_for_options_collateral
                      * fractional_position_closing_only
                      * user_id
                      * rhs_stock_loan_consent_status

    """
    url = urls.account_profile()
    data = helper.request_get(url, 'indexzero', access_token=access_token)
    return (helper.filter(data, info))
Ejemplo n.º 2
0
def load_account_profile(info=None):
    """Gets the information associated with the accounts profile,including day
    trading information and cash being held by Robinhood.

    :param info: The name of the key whose value is to be returned from the function.
    :type info: Optional[str]
    :returns: The function returns a dictionary of key/value pairs. \
    If a string is passed in to the info parameter, then the function will return \
    a string corresponding to the value of the key whose name matches the info parameter.

    """
    url = urls.account_profile()
    data = helper.request_get(url, 'indexzero')
    return (helper.filter(data, info))