Skip to main content

Robin SDK

A Python SDK for the Robinhood MCP (Model Context Protocol) Trading API.

Zero third-party runtime dependencies — uses only the Python standard library to eliminate supply-chain attack surface.

Installation

pip install robin-sdk

Or install from source:

git clone https://github.com/gordil/robin-python-SDK.git
cd robin-python-SDK
pip install -e .

Security

This SDK has zero runtime dependencies. Every import is from the Python standard library. This eliminates the risk of supply-chain attacks through transitive dependencies.

Quick Start

Async Usage

import asyncio
from robin_sdk import RobinClient

async def main():
    async with RobinClient() as client:
        # List accounts
        accounts = await client.get_accounts()
        print(accounts)

        # Get portfolio
        portfolio = await client.get_portfolio(account_number="YOUR_ACCOUNT")
        print(portfolio)

        # Search for a ticker
        results = await client.search(query="Apple")
        print(results)

        # Get real-time quotes
        quotes = await client.get_equity_quotes(symbols=["AAPL", "GOOGL"])
        print(quotes)

        # Place an order
        order = await client.place_equity_order(
            account_number="YOUR_ACCOUNT",
            symbol="AAPL",
            quantity="1",
            side="buy",
            type="market",
        )
        print(order)

asyncio.run(main())

Sync Usage

from robin_sdk import RobinClient

client = RobinClient()
client.authenticate()

accounts = client.get_accounts_sync()
portfolio = client.get_portfolio_sync(account_number="YOUR_ACCOUNT")

Environment Variables

No environment variables are required to run the SDK client. If you already have a registered Robinhood OAuth2 client ID, you may optionally set it:

Variable Description Required
ROBINHOOD_CLIENT_ID Optional pre-registered OAuth2 client ID No

API Reference

Detailed documentation with inputs, outputs, and notes is available in the documentation/ folder.

Account & Portfolio

Method Description Details
get_accounts() View all Robinhood accounts account-portfolio.md
get_portfolio(account_number) Get portfolio snapshot with values by asset class account-portfolio.md
search(query) Find a company name or partial name to a ticker account-portfolio.md

Watchlists

Method Description Details
get_watchlists() List user's watchlists watchlists.md
get_watchlist_items(watchlist_id) List symbols in a watchlist watchlists.md
get_option_watchlist() Load an options watchlist watchlists.md
get_popular_watchlists() Discover Robinhood lists watchlists.md
create_watchlist(name, ...) Create a new custom watchlist watchlists.md
update_watchlist(watchlist_id, ...) Rename or update a watchlist watchlists.md
follow_list(list_id) Follow a Robinhood list watchlists.md
unfollow_list(list_id) Unfollow a Robinhood list watchlists.md
add_to_watchlist(watchlist_id, symbols) Add symbols to a watchlist watchlists.md
remove_from_watchlist(watchlist_id, symbols) Remove symbols from a watchlist watchlists.md
add_option_to_watchlist(watchlist_id, ...) Add options contract to watchlist watchlists.md
remove_option_from_watchlist(watchlist_id, ...) Remove options contract from watchlist watchlists.md

Market Data

Method Description Details
get_equity_historicals(symbol, ...) Get OHLCV price bars market-data.md
get_indexes(symbols) Look up market indexes market-data.md
get_indexes_quotes(symbols) Get real-time index values market-data.md

Equities

Method Description Details
get_equity_positions(account_number) View open equity positions equities.md
get_equity_quotes(symbols) Real-time quotes for up to 20 symbols equities.md
get_equity_orders(account_number) Equity order status history equities.md
get_equity_tradability(symbol) Check if symbol can be traded equities.md
review_equity_order(...) Simulate an order with pre-trade warnings equities.md
place_equity_order(...) Place an equity order equities.md
cancel_equity_order(order_id) Cancel an open equity order equities.md

Options

Method Description
get_option_chains(symbol) Load option chains
get_option_instruments(...) Load option contracts by filters
get_option_quotes(instruments) Real-time option quotes
get_option_positions(account_number) View option positions
get_option_orders(account_number) Options order history
review_option_order(...) Simulate options order
place_option_order(...) Place a real options order
cancel_option_order(order_id) Cancel an open options order

License

Apache License 2.0

Metadata

Release files for robin-sdk 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robin-sdk 0.1.4
File Size Uploaded Provenance Actions
robin_sdk-0.1.4.tar.gz 48.9 kB Without provenance Details for robin_sdk-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robin-sdk 0.1.4
File Interpreter ABI Platform Actions
robin_sdk-0.1.4-py3-none-any.whl Python 3 none any Details for robin_sdk-0.1.4-py3-none-any.whl

Total release size: 77.9 kB

Release files / robin_sdk-0.1.4.tar.gz

Download URL robin_sdk-0.1.4.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
63abb156797f8248d1541ac9345155200cfae022f117811e4ea8711dda6dffe3
BLAKE2b-256 checksum
How to use checksums
94473968639524f500e9a7f87f1eb5e338a18a93ba4f93a4ada801060b97d736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Release files / robin_sdk-0.1.4-py3-none-any.whl

Download URL robin_sdk-0.1.4-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f147ff7f465f823370a921beb633f285ad82637737fb457ed12cb2e40b5b7993
BLAKE2b-256 checksum
How to use checksums
1cceda7e653126cfc051d202e738b9cc2432674fc65d1e5fdc57c0de7f2ce7ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Security for robin-sdk 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page