Skip to main content

openbb-0xarchive

Hyperliquid and Lighter market data from 0xArchive inside the OpenBB Platform and OpenBB Workspace.

Order books down to every resting order, trades, candles, funding, open interest, liquidations, order flow, positions and wallets. Venues: Hyperliquid perps, HIP-3 builder markets, HIP-4 outcome markets, Hyperliquid spot, Lighter, and Lighter on Robinhood Chain.

Install

pip install openbb openbb-0xarchive

Add openbb-derivatives to also list 0xArchive perps under obb.derivatives.futures.

API key

Create a key at 0xarchive.io, then set it once:

from openbb import obb

obb.user.credentials.oxarchive_api_key = "YOUR_KEY"

Or add "oxarchive_api_key": "YOUR_KEY" to credentials in ~/.openbb_platform/user_settings.json.

Use

from datetime import date, datetime, timedelta, timezone

from openbb import obb

week_ago = date.today() - timedelta(days=7)
hour_ago = datetime.now(timezone.utc) - timedelta(hours=1)

# Find a market
obb.crypto.search("nvda", provider="oxarchive").to_df()

# Candles, through OpenBB's standard crypto command
obb.crypto.price.historical("BTC", provider="oxarchive").to_df()
obb.crypto.price.historical("xyz:NVDA", provider="oxarchive", venue="hip3", interval="1h", start_date=week_ago)

# Order books: one row per price level, or per resting order for L4
obb.oxarchive.orderbook.snapshot(symbol="ETH", venue="lighter").to_df()
obb.oxarchive.orderbook.history(symbol="BTC", start_date=hour_ago, depth=20)
obb.oxarchive.orderbook.l4(symbol="BTC")
obb.oxarchive.orderbook.l4_diffs(symbol="BTC", start_date=hour_ago)  # order-by-order changes

# Liquidations and positioning
obb.oxarchive.liquidations.levels(symbol="BTC")
obb.oxarchive.liquidations.volume(symbol="SOL", venue="lighter", interval="1d", start_date=week_ago)

# Funding, open interest and trades
obb.oxarchive.market.funding_rates(symbol="BTC", start_date=week_ago)
obb.oxarchive.market.trades(symbol="HYPE", venue="spot", side="buy", start_date=hour_ago, limit=5000)

# A wallet
obb.oxarchive.wallets.positions(account="0x...")

Every command takes venue where more than one applies. Symbols use the 0xArchive form: BTC, xyz:NVDA, HYPE, and #<id> for HIP-4 outcomes. BTC-USD and BTC-PERP are accepted and mapped to BTC.

History commands return rows oldest first, from start_date to end_date, and page through the API for you. Without dates they cover the last 24 hours; candles cover the last 29 days, or less for minute intervals. limit caps the rows returned (snapshots, for order book history). For the latest trades, pass a recent start_date, or use market.trades_recent on venues that offer it. Funding, open interest, prices and similar series default to hourly; pass interval="raw" for every update.

History depth and dataset access depend on your plan. A request outside your plan returns the reason and a link to pricing. Full field documentation is in the API docs.

OpenBB Workspace

Every command is also a Workspace widget under Crypto, grouped as below. Run openbb-api and add the backend in Workspace.

Commands

Also through OpenBB's standard commands: obb.crypto.price.historical, obb.crypto.search, and with openbb-derivatives, obb.derivatives.futures.historical and obb.derivatives.futures.instruments.

Market data

Command What it returns Venues
obb.oxarchive.market.trades Trades HL, Lighter, HIP-3, HIP-4, Spot, Lighter (Robinhood)
obb.oxarchive.market.trades_recent Most recent trades Lighter, HIP-3, HIP-4, Spot, Lighter (Robinhood)
obb.oxarchive.market.candles OHLCV candles HL, Lighter, HIP-3, HIP-4, Spot, Lighter (Robinhood)
obb.oxarchive.market.funding_rates Funding rate history HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.market.funding_current Current funding rate HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.market.open_interest Open interest history HL, Lighter, HIP-3, Lighter (Robinhood), HIP-4
obb.oxarchive.market.open_interest_current Current open interest HL, Lighter, HIP-3, Lighter (Robinhood), HIP-4
obb.oxarchive.market.prices Mark, oracle and mid price history HL, Lighter, HIP-3, Lighter (Robinhood), HIP-4
obb.oxarchive.market.summary Market summary: price, funding, open interest, volume and liquidations HL, Lighter, HIP-3, Lighter (Robinhood), HIP-4

Order books

Command What it returns Venues
obb.oxarchive.orderbook.snapshot Order book snapshot, one row per price level HL, Lighter, HIP-3, HIP-4, Spot, Lighter (Robinhood)
obb.oxarchive.orderbook.history Order book history, one row per price level per snapshot HL, Lighter, HIP-3, HIP-4, Spot, Lighter (Robinhood)
obb.oxarchive.orderbook.l2 Full-depth L2 order book snapshot HL, HIP-3
obb.oxarchive.orderbook.l2_history Full-depth L2 order book history HL, HIP-3
obb.oxarchive.orderbook.l2_diffs Full-depth L2 order book changes HL, HIP-3
obb.oxarchive.orderbook.l4 L4 order book: every resting order with its wallet HL, HIP-3, HIP-4, Spot
obb.oxarchive.orderbook.l4_history L4 order book history HL, HIP-3, HIP-4, Spot
obb.oxarchive.orderbook.l4_diffs L4 order book changes, order by order HL, HIP-3, HIP-4, Spot
obb.oxarchive.orderbook.l3 Lighter L3 order book: every resting order with its account Lighter
obb.oxarchive.orderbook.l3_history Lighter L3 order book history Lighter

Liquidations

Command What it returns Venues
obb.oxarchive.liquidations.events Liquidation events HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.liquidations.volume Liquidation volume by interval, long and short HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.liquidations.levels Projected forced-liquidation price levels HL, HIP-3
obb.oxarchive.liquidations.levels_history Projected forced-liquidation price level history HL, HIP-3
obb.oxarchive.liquidations.by_wallet Liquidations of one wallet HL

Order flow

Command What it returns Venues
obb.oxarchive.flow.cvd Cumulative volume delta HL, HIP-3
obb.oxarchive.flow.order_flow Order placement, cancel and fill flow by interval HL, HIP-3, HIP-4
obb.oxarchive.flow.orders Order history: placements, cancels, fills and triggers HL, HIP-3, HIP-4, Spot
obb.oxarchive.flow.tpsl Take-profit and stop-loss orders HL, HIP-3, HIP-4
obb.oxarchive.flow.trigger_levels Resting trigger orders by price level HL, HIP-3
obb.oxarchive.flow.trigger_levels_history Resting trigger order level history HL, HIP-3
obb.oxarchive.flow.twap TWAP orders on a market HL, HIP-3, HIP-4, Spot
obb.oxarchive.flow.twap_by_wallet TWAP orders of one wallet HL, HIP-3, HIP-4, Spot
obb.oxarchive.flow.trade_intent Fill volume by intent: opens, take-profits, stops, flips HL, HIP-3
obb.oxarchive.flow.positioning Positioning by market: open interest and taker flow over a window HL, HIP-3

Market breadth

Command What it returns Venues
obb.oxarchive.breadth.above_vwap Share of markets above session VWAP, history HL, HIP-3
obb.oxarchive.breadth.above_vwap_current Share of markets above session VWAP, now HL, HIP-3
obb.oxarchive.breadth.above_ma Share of markets above a moving average, history HL, HIP-3
obb.oxarchive.breadth.above_ma_current Share of markets above a moving average, now HL, HIP-3

Positions

Command What it returns Venues
obb.oxarchive.positions.market Every open position on a market HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.positions.long_short Long and short position totals on a market, history HL, Lighter, HIP-3, Lighter (Robinhood)
obb.oxarchive.positions.all Every open position on every market HL, Lighter, HIP-3, Lighter (Robinhood)

Wallets and accounts

Command What it returns Venues
obb.oxarchive.wallets.profile Trading profile of a wallet HL, HIP-3
obb.oxarchive.wallets.screen Screen wallets by trading behaviour HL, HIP-3
obb.oxarchive.wallets.positions Open positions of a wallet or account HL, HIP-3, Lighter, Lighter (Robinhood)
obb.oxarchive.wallets.positions_history Position history of a wallet or account HL, HIP-3, Lighter, Lighter (Robinhood)
obb.oxarchive.wallets.position_changes Position changes of a wallet or account HL, HIP-3, Lighter, Lighter (Robinhood)
obb.oxarchive.wallets.account Account value and margin of a wallet or account HL, HIP-3, Lighter, Lighter (Robinhood)
obb.oxarchive.wallets.account_history Account value and margin history HL, HIP-3, Lighter, Lighter (Robinhood)
obb.oxarchive.wallets.funding Funding paid and received by a wallet HL, HIP-3
obb.oxarchive.wallets.lighter_accounts Lighter accounts owned by an address Lighter
obb.oxarchive.wallets.usdc_flows Hyperliquid USDC deposits, withdrawals and EVM transfers HL
obb.oxarchive.wallets.usdc_flow_volume Hyperliquid USDC flow totals by interval HL

Reference

Command What it returns Venues
obb.oxarchive.reference.instruments Listed markets with their trading rules HL, Lighter, HIP-3, Lighter (Robinhood), HIP-4
obb.oxarchive.reference.spot_pairs Hyperliquid spot pairs Spot
obb.oxarchive.reference.outcomes HIP-4 outcome markets HIP-4
obb.oxarchive.reference.questions HIP-4 questions and their outcomes HIP-4
obb.oxarchive.reference.oracle_price HIP-3 external oracle price HIP-3
obb.oxarchive.reference.discovery_bounds HIP-3 price discovery bounds HIP-3

Develop

Commands are defined as data in openbb_oxarchive/registry.py. codegen/generate.py writes the models and router from that table, the OpenAPI spec and live samples.

uv sync --locked --group live                 # installs exactly what uv.lock pins, hash-checked
uv run pytest                                 # offline tests
OXARCHIVE_API_KEY=... uv run pytest -m live   # quick live checks
OXARCHIVE_API_KEY=... uv run codegen/generate.py --refresh-spec   # regenerate after an API change
OXARCHIVE_API_KEY=... uv run codegen/live_sweep.py                # every command on every venue

Security

Report a vulnerability privately through this repository's Security tab (Report a vulnerability) or 0xArchive support, not in a public issue. Releases are built and published from GitHub Actions through PyPI Trusted Publishing, with every action pinned to a commit and the build backend pinned by hash.

License

MIT

Metadata

Release files for openbb-0xarchive 0.2.0

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

Source distribution (sdist)

Source distribution for openbb-0xarchive 0.2.0
File Size Uploaded Provenance Actions
openbb_0xarchive-0.2.0.tar.gz 587.3 kB With provenance Details for openbb_0xarchive-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openbb-0xarchive 0.2.0
File Interpreter ABI Platform Actions
openbb_0xarchive-0.2.0-py3-none-any.whl Python 3 none any Details for openbb_0xarchive-0.2.0-py3-none-any.whl

Total release size: 632.5 kB

Release files / openbb_0xarchive-0.2.0.tar.gz

Download URL openbb_0xarchive-0.2.0.tar.gz
Size 587.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f64bc3243e0262a8d16230bc7b68e327d2fbf8fead2f3cd353619191baa1be7b
BLAKE2b-256 checksum
How to use checksums
497bf6c011f2e520b0f5b658f7d59bd6d586c3aef99215fcb4f1d13c12d0f38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / openbb_0xarchive-0.2.0-py3-none-any.whl

Download URL openbb_0xarchive-0.2.0-py3-none-any.whl
Size 45.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0d8fb77602a8d5ca0e228273b7e2f39a4164eeeaf7f75d17d62d07e355208aa
BLAKE2b-256 checksum
How to use checksums
2dc1d69a3978558acfcf50b08e6e20bec0f908f4afffcc5747c19313a64746aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for openbb-0xarchive 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openbb_0xarchive-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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