Execution: venue.trade() in chat code, strategy.execute() in strategy agents.
Overview
Robinhood connects to Scalar Field via OAuth. Once linked, the account is a tradable venue: Scalar Field reads positions, balances, and order history, and places equity and ETF orders in the account.
| Specification | Value |
|---|
| Instruments | US equities and ETFs (no options or crypto orders) |
| Connection | OAuth |
| Fractional | Yes |
| Hours | US market hours |
| Quotes | Last, bid, ask, volume (no order-book depth) |
| Currency | USD |
Order Semantics
- Symbols are plain tickers (
AAPL, SPY).
- Options and crypto orders are not supported — equities and ETFs only.
- Fractional quantities are supported. Size from a dollar budget with
round(budget / price, 2).
- The
slippage_bps parameter does not apply to brokerage venues.
Connecting
Click “Connect” on the portfolio page and authorize with your Robinhood account.
Usage
from scalarlib import venue
# Account snapshot
data = venue.account(account="ROBINHOOD")
print(data["accounts"][0]["portfolio_value"])
# Buy 2 shares of AAPL
resp = venue.trade("buy", "AAPL", 2, account="ROBINHOOD")
print(resp["status"], resp["avg_price"])
In strategy agents, use strategy.execute(symbol, target_qty) instead — see Strategies.
Data Functions
Equity research uses the cross-asset market-data functions; each links to its full reference:
| Function / dataset | Purpose |
|---|
| Equity & ETF OHLCV | Historical price bars for backtesting and signals |
| Latest Price Snapshot | Live last/bid/ask quotes for sizing and execution checks |
| Earnings | Earnings calendar and results |
| Insider Trades | SEC Form 4 insider transactions |
| Congressional Trades | Congressional trading disclosures |
| Institutional Holdings | 13F institutional positions |
| Economic Releases / FRED | Macro event and series data |
Notes
- Avoid trading directly in the Robinhood app while strategies are active on the account — see Reconciliation for how position mismatches are handled.
- Orders submitted outside market hours are queued for the next market open.
Related