{"id":25841260,"url":"https://github.com/gunnarpdx/ex_robinhood","last_synced_at":"2025-03-01T05:22:50.505Z","repository":{"id":62429422,"uuid":"302538604","full_name":"GunnarPDX/ex_robinhood","owner":"GunnarPDX","description":"An Elixir client for the unofficial Robinhood API","archived":false,"fork":false,"pushed_at":"2020-10-15T03:52:24.000Z","size":97,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-23T07:38:11.935Z","etag":null,"topics":["algo-tr","elixir","robinhood"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GunnarPDX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T05:09:55.000Z","updated_at":"2021-09-13T04:43:38.000Z","dependencies_parsed_at":"2022-11-01T19:47:09.684Z","dependency_job_id":null,"html_url":"https://github.com/GunnarPDX/ex_robinhood","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GunnarPDX%2Fex_robinhood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GunnarPDX%2Fex_robinhood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GunnarPDX%2Fex_robinhood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GunnarPDX%2Fex_robinhood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GunnarPDX","download_url":"https://codeload.github.com/GunnarPDX/ex_robinhood/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241319561,"owners_count":19943554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algo-tr","elixir","robinhood"],"created_at":"2025-03-01T05:22:49.493Z","updated_at":"2025-03-01T05:22:50.497Z","avatar_url":"https://github.com/GunnarPDX.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"![alt text](https://github.com/GunnarPDX/ex_robinhood/blob/master/ex_robinhood_logo.svg?raw=true)\n# \n[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/GunnarPDX/ex_robinhood/blob/master/LICENSE)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/ex_robinhood.svg?style=flat)](https://hex.pm/packages/ex_robinhood)\n\n\nA Robinhood API client for Elixir.  Currently under development.\n\n## Installation\n\nThe package can be installed by adding `ex_robinhood` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_robinhood, \"~\u003e 0.0.0\"}\n  ]\nend\n```\n\n#### ex_robinhood uses:\n```elixir\n{:elixir_uuid, \"~\u003e 1.2\"} # for generating device tokens\n{:jason, \"~\u003e 1.2\"} # decode responses\n{:httpoison, \"~\u003e 1.7\"} # http client\n```\n\n## Usage\n\n```elixir\nalias ExRobinhood, as: RH\n\n# Unsuccessful response\n{:error, reason} = RH.login(\"badEmail@example.com\", \"notMyPassword\")\n\n# Successful response\n{:ok, \"Challenge Required\"} = RH.login(\"email@example.com\", \"myPassword\")\n\n# Submit 2FA sms code\n{:ok, \"Success\"} = RH.challenge(\"123456\")\n\n# Query by symbol\n{:ok, stock} = RH.query_instruments(\"nvda\")\n\n```\n\n### Return Values\n\nRequests return a 2-tuple with the standard `:ok` or `:error` status.\n\n# Auth Functions\n\n## Login\n#### Used to sign into your Robinhood account\n```elixir\ndef login(username, password)\n```\n\n## Challenge\n#### Used to submit 2FA verification code as a string\n```elixir\ndef challenge(sms_code)\n```\n\n## Logout\n#### Used to end your Robinhood session\n```elixir\ndef logout\n```\n\n# Account Functions\n\n## Account\n#### Gets account data\n```elixir\ndef account\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"next\" =\u003e nil,\n   \"previous\" =\u003e nil,\n   \"results\" =\u003e [\n     %{\n       \"option_trading_on_expiration_enabled\" =\u003e true,\n       \"crypto_buying_power\" =\u003e \"0.0000\",\n       \"cash_held_for_options_collateral\" =\u003e \"0.0000\",\n       \"rhs_stock_loan_consent_status\" =\u003e \"...\",\n       \"cash_management_enabled\" =\u003e false,\n       \"account_number\" =\u003e \"XXXXXXXX\",\n       \"unsettled_debit\" =\u003e \"0.0000\",\n       \"locked\" =\u003e false,\n       \"eligible_for_drip\" =\u003e false,\n       \"eligible_for_cash_management\" =\u003e true,\n       \"only_position_closing_trades\" =\u003e false,\n       \"deactivated\" =\u003e false,\n       \"drip_enabled\" =\u003e false,\n       \"user_id\" =\u003e \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n       \"instant_eligibility\" =\u003e %{\n         \"additional_deposit_needed\" =\u003e \"0.0000\",\n         \"compliance_user_major_oak_email\" =\u003e nil,\n         \"created_at\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n         \"created_by\" =\u003e nil,\n         \"reason\" =\u003e \"\",\n         \"reinstatement_date\" =\u003e nil,\n         \"reversal\" =\u003e nil,\n         \"state\" =\u003e \"ok\",\n         \"updated_at\" =\u003e nil\n       },\n       \"user\" =\u003e \"api.robinhood.com/user/\",\n       \"unsettled_funds\" =\u003e \"0.0000\",\n       \"type\" =\u003e \"margin\",\n       \"portfolio_cash\" =\u003e \"0.0000\",\n       \"cash_balances\" =\u003e nil,\n       \"cash_available_for_withdrawal\" =\u003e \"0.0000\",\n       \"margin_balances\" =\u003e %{\n         \"day_trades_protection\" =\u003e true,\n         \"crypto_buying_power\" =\u003e \"0.0000\",\n         \"cash_held_for_options_collateral\" =\u003e \"0.0000\",\n         \"instant_used\" =\u003e \"0.0000\",\n         \"start_of_day_overnight_buying_power\" =\u003e \"0.0000\",\n         \"marked_pattern_day_trader_date\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n         \"cash_held_for_dividends\" =\u003e \"0.0000\",\n         \"margin_withdrawal_limit\" =\u003e nil,\n         \"unsettled_debit\" =\u003e \"0.0000\",\n         \"cash_held_for_restrictions\" =\u003e \"0.0000\",\n         \"funding_hold_balance\" =\u003e \"0.0000\",\n         \"margin_limit\" =\u003e \"0.0000\",\n         \"overnight_buying_power\" =\u003e \"0.0000\",\n         \"day_trade_buying_power\" =\u003e \"0.0000\",\n         \"gold_equity_requirement\" =\u003e \"0.0000\",\n         \"unsettled_funds\" =\u003e \"0.0000\",\n         \"cash_held_for_nummus_restrictions\" =\u003e \"0.0000\",\n         \"portfolio_cash\" =\u003e \"0.0000\",\n         \"eligible_deposit_as_instant\" =\u003e \"0.0000\",\n         \"cash_available_for_withdrawal\" =\u003e \"0.0000\",\n         \"uncleared_nummus_deposits\" =\u003e \"0.0000\",\n         ...\n       },\n       \"received_ach_debit_locked\" =\u003e false,\n       \"uncleared_deposits\" =\u003e \"0.0000\",\n       \"sweep_enabled\" =\u003e false,\n       \"withdrawal_halted\" =\u003e false,\n       \"active_subscription_id\" =\u003e nil,\n       \"cash_held_for_orders\" =\u003e \"0.0000\",\n       \"state\" =\u003e \"active\",\n       \"created_at\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n       \"buying_power\" =\u003e \"0.0000\",\n       \"cash\" =\u003e \"0.0000\",\n       \"sma\" =\u003e \"0.0000\",\n       \"eligible_for_fractionals\" =\u003e true,\n       \"rhs_account_number\" =\u003e 123456789,\n       \"is_pinnacle_account\" =\u003e true,\n       \"url\" =\u003e \"https://api.robinhood.com/accounts/XXXXXXXX/\",\n       \"deposit_halted\" =\u003e false,\n       \"can_downgrade_to_cash\" =\u003e \"https://api.robinhood.com/accounts/XXXXXXXX/can_downgrade_to_cash/\",\n       \"permanently_deactivated\" =\u003e false,\n       \"max_ach_early_access_amount\" =\u003e \"1000.00\",\n       \"sma_held_for_orders\" =\u003e \"0.0000\",\n       \"fractional_position_closing_only\" =\u003e false,\n       ...\n     }\n   ]\n }}\n\n```\n\n## User\n#### Gets user info\n```elixir\ndef user\n```\nreturns:\n```elixir\n{ \n  :ok,\n  %{\n    \"created_at\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n    \"email\" =\u003e \"email@example.com\",\n    \"email_verified\" =\u003e true,\n    \"first_name\" =\u003e \"First\",\n    \"id\" =\u003e \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n    \"id_info\" =\u003e \"https://api.robinhood.com/user/id/\",\n    \"last_name\" =\u003e \"Last\",\n    \"origin\" =\u003e %{\"locality\" =\u003e \"US\"},\n    \"profile_name\" =\u003e \"FirstL12345\",\n    \"url\" =\u003e \"https://api.robinhood.com/user/\",\n    \"username\" =\u003e \"first.last\"\n  }\n}\n```\n\n## Investment Profile\n#### Gets users investment-profile\n```elixir\ndef investment_profile\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"annual_income\" =\u003e \"...\",\n   \"interested_in_options\" =\u003e \"...\",\n   \"investment_experience\" =\u003e \"...\",\n   \"investment_experience_collected\" =\u003e true,\n   \"investment_objective\" =\u003e \"...\",\n   \"liquid_net_worth\" =\u003e \"...\",\n   \"liquidity_needs\" =\u003e \"...\",\n   \"option_trading_experience\" =\u003e \"...\",\n   \"professional_trader\" =\u003e \"...\",\n   \"risk_tolerance\" =\u003e \"...\",\n   \"source_of_funds\" =\u003e \"...\",\n   \"suitability_verified\" =\u003e true,\n   \"tax_bracket\" =\u003e \"...\",\n   \"time_horizon\" =\u003e \"...\",\n   \"total_net_worth\" =\u003e \"...\",\n   \"understand_option_spreads\" =\u003e \"...\",\n   \"updated_at\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n   \"user\" =\u003e \"api.robinhood.com/user/\"\n }\n}\n```\n\n## Portfolios\n#### Gets portfolios data\n```elixir\ndef portfolios\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"results\" =\u003e [\n     %{\n       \"account\" =\u003e \"https://api.robinhood.com/accounts/XXXXXXXX/\",\n       \"adjusted_equity_previous_close\" =\u003e \"0.0000\",\n       \"adjusted_portfolio_equity_previous_close\" =\u003e \"0.0000\",\n       \"equity\" =\u003e \"0.0000\",\n       \"equity_previous_close\" =\u003e \"0.0000\",\n       \"excess_maintenance\" =\u003e \"0.0000\",\n       \"excess_maintenance_with_uncleared_deposits\" =\u003e \"0.0000\",\n       \"excess_margin\" =\u003e \"0.0000\",\n       \"excess_margin_with_uncleared_deposits\" =\u003e \"0.0000\",\n       \"extended_hours_equity\" =\u003e \"0.0000\",\n       \"extended_hours_market_value\" =\u003e \"0.0000\",\n       \"extended_hours_portfolio_equity\" =\u003e \"0.0000\",\n       \"last_core_equity\" =\u003e \"0.0000\",\n       \"last_core_market_value\" =\u003e \"0.0000\",\n       \"last_core_portfolio_equity\" =\u003e \"0.0000\",\n       \"market_value\" =\u003e \"0.0000\",\n       \"portfolio_equity_previous_close\" =\u003e \"0.0000\",\n       \"start_date\" =\u003e \"1920-01-10T00:00:00.000000-04:00\",\n       \"unwithdrawable_deposits\" =\u003e \"0.0000\",\n       \"unwithdrawable_grants\" =\u003e \"0.0000\",\n       \"url\" =\u003e \"https://api.robinhood.com/portfolios/XXXXXXXX/\",\n       \"withdrawable_amount\" =\u003e \"0.0000\"\n     }\n   ]\n }\n}\n```\n\n## Dividends\n#### Gets your dividends\n```elixir\ndef dividends\n```\n\n## Positions\n#### Gets your positions\n```elixir\ndef positions\n```\n\n## Securities Owned\n#### Gets your currently owned securities\n```elixir\ndef securities_owned\n```\n\n# Product Functions\n\n## Query Instruments\n#### Gets instrument by `symbol`, (can be used to get stocks `id`)\n```elixir\ndef query_instruments(stock)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"next\" =\u003e nil,\n   \"previous\" =\u003e nil,\n   \"results\" =\u003e [\n     %{\n       \"bloomberg_unique\" =\u003e \"EQ0010169500001000\",\n       \"country\" =\u003e \"US\",\n       \"day_trade_ratio\" =\u003e \"0.2500\",\n       \"default_collar_fraction\" =\u003e \"0.05\",\n       \"fractional_tradability\" =\u003e \"tradable\",\n       \"fundamentals\" =\u003e \"https://api.robinhood.com/fundamentals/AAPL/\",\n       \"id\" =\u003e \"450dfc6d-5510-4d40-abfb-f633b7d9be3e\",\n       \"list_date\" =\u003e \"1990-01-02\",\n       \"maintenance_ratio\" =\u003e \"0.2500\",\n       \"margin_initial_ratio\" =\u003e \"0.5000\",\n       \"market\" =\u003e \"https://api.robinhood.com/markets/XNAS/\",\n       \"min_tick_size\" =\u003e nil,\n       \"name\" =\u003e \"Apple Inc. Common Stock\",\n       \"quote\" =\u003e \"https://api.robinhood.com/quotes/AAPL/\",\n       \"rhs_tradability\" =\u003e \"tradable\",\n       \"simple_name\" =\u003e \"Apple\",\n       \"splits\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/splits/\",\n       \"state\" =\u003e \"active\",\n       \"symbol\" =\u003e \"AAPL\",\n       \"tradability\" =\u003e \"tradable\",\n       \"tradable_chain_id\" =\u003e \"7dd906e5-7d4b-4161-a3fe-2c3b62038482\",\n       \"tradeable\" =\u003e true,\n       \"type\" =\u003e \"stock\",\n       \"url\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\"\n     }\n   ]\n }\n}\n```\n\n## Instruments\n#### Gets instrument by `symbol`\n```elixir\ndef instrument(symbol)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"next\" =\u003e nil,\n   \"previous\" =\u003e nil,\n   \"results\" =\u003e [\n     %{\n       \"bloomberg_unique\" =\u003e \"EQ0010169500001000\",\n       \"country\" =\u003e \"US\",\n       \"day_trade_ratio\" =\u003e \"0.2500\",\n       \"default_collar_fraction\" =\u003e \"0.05\",\n       \"fractional_tradability\" =\u003e \"tradable\",\n       \"fundamentals\" =\u003e \"https://api.robinhood.com/fundamentals/AAPL/\",\n       \"id\" =\u003e \"450dfc6d-5510-4d40-abfb-f633b7d9be3e\",\n       \"list_date\" =\u003e \"1990-01-02\",\n       \"maintenance_ratio\" =\u003e \"0.2500\",\n       \"margin_initial_ratio\" =\u003e \"0.5000\",\n       \"market\" =\u003e \"https://api.robinhood.com/markets/XNAS/\",\n       \"min_tick_size\" =\u003e nil,\n       \"name\" =\u003e \"Apple Inc. Common Stock\",\n       \"quote\" =\u003e \"https://api.robinhood.com/quotes/AAPL/\",\n       \"rhs_tradability\" =\u003e \"tradable\",\n       \"simple_name\" =\u003e \"Apple\",\n       \"splits\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/splits/\",\n       \"state\" =\u003e \"active\",\n       \"symbol\" =\u003e \"AAPL\",\n       \"tradability\" =\u003e \"tradable\",\n       \"tradable_chain_id\" =\u003e \"7dd906e5-7d4b-4161-a3fe-2c3b62038482\",\n       \"tradeable\" =\u003e true,\n       \"type\" =\u003e \"stock\",\n       \"url\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\"\n     }\n   ]\n }\n}\n```\n\n## Quote\n#### Gets quote for product by `id` or `symbol`\n```elixir\ndef quote(id)\n```\nreturns: \n```elixir\n{\n :ok,\n %{\n   \"adjusted_previous_close\" =\u003e \"121.100000\",\n   \"ask_price\" =\u003e \"120.870000\",\n   \"ask_size\" =\u003e 236,\n   \"bid_price\" =\u003e \"120.830000\",\n   \"bid_size\" =\u003e 100,\n   \"has_traded\" =\u003e true,\n   \"instrument\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\",\n   \"last_extended_hours_trade_price\" =\u003e \"120.850000\",\n   \"last_trade_price\" =\u003e \"121.190000\",\n   \"last_trade_price_source\" =\u003e \"consolidated\",\n   \"previous_close\" =\u003e \"121.100000\",\n   \"previous_close_date\" =\u003e \"2020-10-13\",\n   \"symbol\" =\u003e \"AAPL\",\n   \"trading_halted\" =\u003e false,\n   \"updated_at\" =\u003e \"2020-10-14T22:46:28Z\"\n }\n}\n```\n\n## Quote List\n#### Gets quote list for list or comma separated string of products by `id` or `symbol` (min: 2 items)\n```elixir\ndef quote_list(ids)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"results\" =\u003e [\n     %{\n       \"adjusted_previous_close\" =\u003e \"121.100000\",\n       \"ask_price\" =\u003e \"121.100000\",\n       \"ask_size\" =\u003e 50,\n       \"bid_price\" =\u003e \"120.920000\",\n       \"bid_size\" =\u003e 10,\n       \"has_traded\" =\u003e true,\n       \"instrument\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\",\n       \"last_extended_hours_trade_price\" =\u003e \"121.060000\",\n       \"last_trade_price\" =\u003e \"121.190000\",\n       \"last_trade_price_source\" =\u003e \"consolidated\",\n       \"previous_close\" =\u003e \"121.100000\",\n       \"previous_close_date\" =\u003e \"2020-10-13\",\n       \"symbol\" =\u003e \"AAPL\",\n       \"trading_halted\" =\u003e false,\n       \"updated_at\" =\u003e \"2020-10-14T23:13:18Z\"\n     }, \n     %{\n       \"adjusted_previous_close\" =\u003e \"222.860000\",\n       \"ask_price\" =\u003e \"220.800000\",\n       \"ask_size\" =\u003e 6,\n       \"bid_price\" =\u003e \"220.350000\",\n       \"bid_size\" =\u003e 1,\n       \"has_traded\" =\u003e true,\n       \"instrument\" =\u003e \"https://api.robinhood.com/instruments/50810c35-d215-4866-9758-0ada4ac79ffa/\",\n       \"last_extended_hours_trade_price\" =\u003e \"220.600000\",\n       \"last_trade_price\" =\u003e \"220.860000\",\n       \"last_trade_price_source\" =\u003e \"consolidated\",\n       \"previous_close\" =\u003e \"222.860000\",\n       \"previous_close_date\" =\u003e \"2020-10-13\",\n       \"symbol\" =\u003e \"MSFT\",\n       \"trading_halted\" =\u003e false,\n       \"updated_at\" =\u003e \"2020-10-14T23:12:07Z\"\n     },\n     nil\n   ]\n }\n}\n```\n\n\n## Stock Marketdata\n#### Gets marketdata for stocks\n```elixir\ndef stock_marketdata(symbols) # !\n```\n\n## Historical Quotes\n#### Gets historical quotes for\nArgs:\n- stock (str): stock ticker/s\n- interval (str): resolution of data ~~\u003e Values are `5minute`, `10minute`, `hour`, `day`, `week`.\n- span (str): length of data ~~\u003e `day`, `week`, `month`, `3month`, `year`, or `5year`.\n- bounds (atom ~~\u003e `:extended` | `:regular`): extended or regular trading hours ~~\u003e default is `:regular`\n```elixir\ndef historical_quotes(symbol, interval, span, bounds \\\\ :regular)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"results\" =\u003e [\n     %{\n       \"InstrumentID\" =\u003e \"450dfc6d-5510-4d40-abfb-f633b7d9be3e\",\n       \"bounds\" =\u003e \"regular\",\n       \"historicals\" =\u003e [\n         %{\n           \"begins_at\" =\u003e \"2020-10-14T14:00:00Z\",\n           \"close_price\" =\u003e \"122.120000\",\n           \"high_price\" =\u003e \"122.820000\",\n           \"interpolated\" =\u003e false,\n           \"low_price\" =\u003e \"121.180000\",\n           \"open_price\" =\u003e \"122.690700\",\n           \"session\" =\u003e \"reg\",\n           \"volume\" =\u003e 13558258\n         },\n         %{\n           \"begins_at\" =\u003e \"2020-10-14T15:00:00Z\",\n           \"close_price\" =\u003e \"120.815000\",\n           \"high_price\" =\u003e \"122.270000\",\n           \"interpolated\" =\u003e false,\n           \"low_price\" =\u003e \"120.720000\",\n           \"open_price\" =\u003e \"122.130000\",\n           \"session\" =\u003e \"reg\",\n           \"volume\" =\u003e 7667417\n         },\n         ...\n       ],\n       \"instrument\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\",\n       \"interval\" =\u003e \"hour\",\n       \"open_price\" =\u003e \"121.000000\",\n       \"open_time\" =\u003e \"2020-10-14T13:30:00Z\",\n       \"previous_close_price\" =\u003e \"121.100000\",\n       \"previous_close_time\" =\u003e \"2020-10-13T20:00:00Z\",\n       \"quote\" =\u003e \"https://api.robinhood.com/quotes/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\",\n       \"span\" =\u003e \"day\",\n       \"symbol\" =\u003e \"AAPL\"\n     }\n   ]\n }\n}\n```\n\n## Popularity\n#### Gets a stocks popularity on robinhood by `id`\n```elixir\ndef popularity(id) # !\n```\n\n## Tickers by Tag\n#### Gets lists of tickers for selected category\nArgs: tag - Tags may include but are not limited to:\n- `top-movers`\n- `etf`\n- `100-most-popular`\n- `mutual-fund`\n- `finance`\n- `cap-weighted`\n- `investment-trust-or-fund`\n\n```elixir\ndef tickers_by_tag(tag)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"canonical_examples\" =\u003e \"\",\n   \"description\" =\u003e \"\",\n   \"instruments\" =\u003e [\n    \"https://api.robinhood.com/instruments/9f1399e5-5023-425a-9eb5-cd3f91560189/\",\n    \"https://api.robinhood.com/instruments/681574a9-a045-490d-a5f2-889f188c4605/\",\n    \"https://api.robinhood.com/instruments/01f5cac5-56e1-46d9-a782-b1a07a3ec3da/\",\n    \"https://api.robinhood.com/instruments/9f91a18c-b34d-4e67-a68b-2c29d20aa99c/\",\n    \"https://api.robinhood.com/instruments/894f3199-42be-4fcd-b725-d29ba4a8e821/\",\n    \"https://api.robinhood.com/instruments/0c7c5024-5431-4068-9034-0b0e2bfb4277/\",\n    \"https://api.robinhood.com/instruments/ece8cb62-ea02-4b9e-92fc-b404af27753f/\",\n    \"https://api.robinhood.com/instruments/8802a289-bdb5-4003-ae33-4dcd54abb1b7/\",\n    \"https://api.robinhood.com/instruments/c241e363-7635-49c4-9f98-a4a144f158eb/\",\n    \"https://api.robinhood.com/instruments/05411449-2743-475e-ab15-2f86e43e06a4/\",\n    \"https://api.robinhood.com/instruments/991a1c9b-6161-4c7a-b6ae-9a710c4fbff3/\",\n    \"https://api.robinhood.com/instruments/ea6bf532-d3ff-4094-9e6b-4fb473b2c702/\",\n    \"https://api.robinhood.com/instruments/52f36ef8-ae45-410d-8af7-0b7aaa2d276c/\",\n    \"https://api.robinhood.com/instruments/33c3c43d-d6b9-4df5-963a-7611acc416e9/\",\n    \"https://api.robinhood.com/instruments/c43ecf94-68e0-4fd8-a2a3-3ab5492ecf30/\",\n    \"https://api.robinhood.com/instruments/082877c8-2cbb-414a-9f46-e57c23b500df/\",\n    \"https://api.robinhood.com/instruments/ead8ebd4-3804-40f1-95ac-7c1b98818f9d/\",\n    \"https://api.robinhood.com/instruments/f551545a-16c0-4561-a44f-d5bcc6d316fc/\",\n    \"https://api.robinhood.com/instruments/8b486a6b-0632-4526-acf7-2167b22d8d94/\",\n    \"https://api.robinhood.com/instruments/3582a151-efd3-4e80-9496-667dfe3c86de/\"\n    ],\n   \"membership_count\" =\u003e 20,\n   \"name\" =\u003e \"Top Movers\",\n   \"slug\" =\u003e \"top-movers\"\n }\n}\n```\n\n## Fundamentals\n#### Gets a stocks fundamentals info\n```elixir\ndef fundamentals(symbol)\n```\nreturns:\n```elixir\n{\n :ok,\n %{\n   \"average_volume\" =\u003e \"155470041.000000\",\n   \"average_volume_2_weeks\" =\u003e \"155470041.000000\",\n   \"ceo\" =\u003e \"Timothy Donald Cook\",\n   \"description\" =\u003e \"Apple, Inc. engages in the design, manufacture, and sale of smartphones, personal computers, tablets, wearables and accessories, and other variety of related services. It operates through the following geographical segments: Americas, Europe, Greater China, Japan, and Rest of Asia Pacific. The Americas segment includes North and South America. The Europe segment consists of European countries, as well as India, the Middle East, and Africa. The Greater China segment comprises of China, Hong Kong, and Taiwan. The Rest of Asia Pacific segment includes Australia and Asian countries. Its products and services include iPhone, Mac, iPad, AirPods, Apple TV, Apple Watch, Beats products, Apple Care, iCloud, digital content stores, streaming, and licensing services. The company was founded by Steven Paul Jobs, Ronald Gerald Wayne, and Stephen G. Wozniak on April 1, 1976 and is headquartered in Cupertino, CA.\",\n   \"dividend_yield\" =\u003e \"0.639068\",\n   \"float\" =\u003e \"17320118735.700001\",\n   \"headquarters_city\" =\u003e \"Cupertino\",\n   \"headquarters_state\" =\u003e \"California\",\n   \"high\" =\u003e \"123.030000\",\n   \"high_52_weeks\" =\u003e \"137.980000\",\n   \"industry\" =\u003e \"Telecommunications Equipment\",\n   \"instrument\" =\u003e \"https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/\",\n   \"low\" =\u003e \"119.620000\",\n   \"low_52_weeks\" =\u003e \"53.152500\",\n   \"market_cap\" =\u003e \"2101107387000.000000\",\n   \"num_employees\" =\u003e 137000,\n   \"open\" =\u003e \"121.000000\",\n   \"pb_ratio\" =\u003e \"29.491300\",\n   \"pe_ratio\" =\u003e \"37.819600\",\n   \"sector\" =\u003e \"Electronic Technology\",\n   \"shares_outstanding\" =\u003e \"17337300000.000000\",\n   \"volume\" =\u003e \"150969107.000000\",\n   \"year_founded\" =\u003e 1976\n }\n}\n```\n\n# Order Functions\nArgs:\n- instrument_url: the RH URL for the instrument (str)\n- symbol: the ticker symbol for the instrument (str)\n- order_type: 'market' or 'limit'\n- time_in_force: 'gfd' or 'gtc' (day or until cancelled) (str)\n- trigger: 'immediate' or 'stop' (str)\n- price: The share price you'll accept (float)\n- stop_price: The price at which the order becomes a market or limit order (float)\n- quantity: The number of shares to buy/sell (int)\n- side: 'buy' or 'sell' (str)\n\n## Order\n#### Gets order by `id`\n```elixir\ndef order(order_id)\n```\n\n## Order History\n#### Gets your order history\n```elixir\ndef order_history\n```\n\n## Place Market Buy Order\n#### used to place market buy order\n```elixir\ndef place_market_buy_order(instrument_url, symbol, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Limit Buy Order\n#### used to place limit buy order\n```elixir\ndef place_limit_buy_order(instrument_url, symbol, price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Stop Loss Buy Order\n#### used to stop loss buy order\n```elixir\ndef place_stop_loss_buy_order(instrument_url, symbol, stop_price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Stop Limit Buy Order\n#### used to place limit buy order\n```elixir\ndef place_stop_limit_buy_order(instrument_url, symbol, price, stop_price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Market Sell Order\n#### used to place market sell order\n```elixir\ndef place_market_sell_order(instrument_url, symbol, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Limit Sell Order\n#### used to place limit sell order\n```elixir\ndef place_limit_sell_order(instrument_url, symbol, price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Stop Loss Sell Order\n#### used to place stop loss sell order\n```elixir\ndef place_stop_loss_sell_order(instrument_url, symbol, stop_price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Place Stop Limit Sell Order\n#### used to place stop limit sell order\n```elixir\ndef place_stop_limit_sell_order(instrument_url, symbol, price, stop_price, quantity, time_in_force \\\\ \"gtc\")\n```\n\n## Cancel Order\n#### used to cancel an open order\n```elixir\ndef cancel_order(order_id)\n```\n\n\n# MSC...\n#### (these shouldn't be needed)\n\n## Set Account Data\n#### You can run this if it fails to run automatically during login, its needed for placing orders.\n```elixir\ndef set_account_url\n```\n\n## Place Order\nit's easier to use: `place_market_buy_order()`, `place_limit_sell_order()`, `etc...`\n#### Used to submit orders\nArgs:\n- instrument_URL: the RH URL for the instrument (str)\n- symbol: the ticker symbol for the instrument (str)\n- order_type: 'market' or 'limit'\n- time_in_force: 'gfd' or 'gtc' (day or until cancelled) (str)\n- trigger: 'immediate' or 'stop' (str)\n- price: The share price you'll accept (float)\n- stop_price: The price at which the order becomes a market or limit order (float)\n- quantity: The number of shares to buy/sell (int)\n- side: 'buy' or 'sell' (str)\n```elixir\ndef place_order(instrument_url, symbol, order_type, time_in_force, trigger, price, stop_price, quantity, side)\n```\n\n## getting device token manually (instructions)\n\n- Go to robinhood.com. Log out if you're already logged in\n- Right click \u003e Inspect element\n- Click on Network tab\n- Enter `token` in the input line at the top where it says \"Filter\"\n- With the network monitor-er open, login to Robinhood\n- You'll see two new urls pop up that say \"api.robinhood.com\" and \"/oauth2/token\"\n- Click the one that's not 0 bytes in size\n- Click on Headers, then scroll down to the Request Payload section\n- Here, you'll see new JSON parameters for your login. What you'll need here is the device token.\n- Make sure you keep this saved\n- If using the device_token from this method then 2FA will probably be bypassed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnarpdx%2Fex_robinhood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunnarpdx%2Fex_robinhood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnarpdx%2Fex_robinhood/lists"}