IndexerData
HTTP methods exposed under Indexer.data.
Indexer.data includes endpoint methods along with convenience helpers such as get_market, get_open_position, and the *_paged iterators.
Market And Utility Methods
get_markets
Retrieve perpetual market metadata from the indexer. When market is provided, the request filters to a single market.
market: Specific market ticker to retrieve, for exampleBTC-USD.limit: Maximum number of market entries to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_markets.py
get_market
Retrieves a single perpetual market by ticker.
Source code in pkg/src/dydx/indexer/data/get_market.py
get_order_book
Retrieve the orderbook for a perpetual market.
market: Perpetual market ticker.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_order_book.py
get_trades
Retrieve trades for a perpetual market.
market: Perpetual market ticker.starting_before_or_at_height: Latest block height to include.limit: Maximum number of trades to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_trades.py
get_candles
Retrieve candle data for a perpetual market.
market: Perpetual market ticker.resolution: Candle resolution.from_iso: Start timestamp in ISO 8601 format.to_iso: End timestamp in ISO 8601 format.limit: Maximum number of candles to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_candles.py
get_candles_paged
Retrieves candle data for a specific perpetual market, paging as needed.
market: The market ticker (e.g.'BTC-USD').resolution: The resolution of the candles.start: If given, fetches candles starting from the given timestamp.end: If given, fetches candles up to and including the given timestamp.limit: The max. number of candles to retrieve per request (default: 1000, max: 1000).
Source code in pkg/src/dydx/indexer/data/get_candles_paged.py
get_historical_funding
Retrieve historical funding data for a perpetual market.
market: Perpetual market ticker.effective_before_or_at: Latest effective timestamp to include.effective_before_or_at_height: Latest effective block height to include.limit: Maximum number of funding entries to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_historical_funding.py
get_historical_funding_paged
Retrieves historical funding rates for a specific perpetual market, automatically paginating.
market: The market ticker (e.g.'BTC-USD').effective_before_or_at: If given, fetches funding rates up to and including the given timestamp.effective_before_or_at_height: If given, fetches funding rates up to and including the given block height.limit: The max. number of candles to retrieve (default: 1000, max: 1000).
Source code in pkg/src/dydx/indexer/data/get_historical_funding_paged.py
get_sparklines
Get sparklines
time_period: Sparkline time period.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_sparklines.py
get_height
Get height
validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_height.py
get_time
Get time
validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_time.py
get_screen
Get screen
address: Wallet address to screen.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_screen.py
get_compliance_screen
Get compliance screen
address: EVM or dYdX address.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_compliance_screen.py
Account Methods
get_subaccount
Retrieve a single subaccount.
address: Account address.subaccount: Subaccount number.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_subaccount.py
get_subaccounts
Retrieve subaccounts for an address.
address: Account address.limit: Maximum number of subaccounts to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_subaccounts.py
get_asset_positions
Get asset positions
address: Wallet address that owns the account.subaccount: Subaccount number.status: Position status filter.limit: Maximum number of results to return.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Restrict results to entries created at or before a specific timestamp.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_asset_positions.py
get_fills
Retrieve fill records for a subaccount.
address: Wallet address that owns the subaccount.subaccount: Subaccount number.market: Market ticker filter.market_type: Market type filter.created_before_or_at_height: Latest block height to include.created_before_or_at: Latest timestamp to include.limit: Maximum number of fills to return.page: Page number for paginated results.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_fills.py
get_fills_paged
Retrieves fill records for a specific subaccount on the exchange. A fill represents a trade that has been executed.
address: The wallet address that owns the account.subaccount: The identifier for the specific subaccount within the wallet address.market: The market name (e.g.'BTC-USD').market_type: The market type ('PERPETUAL'or'SPOT'). Must be provided ifmarketis provided.created_before_or_at_height: If given, fetches fills up to and including the given block height.created_before_or_at: If given, fetches fills up to and including the given timestamp.limit: The max. number of fills to retrieve (default: 1000, max: 1000).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_fills_paged.py
get_funding_payments
Retrieve funding payment history for a subaccount.
address: Wallet address that owns the subaccount.subaccount: Subaccount number.ticker: Market ticker filter.after_or_at: Earliest timestamp to include.limit: Maximum number of funding payments to return.page: Page number for paginated results.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_funding_payments.py
get_funding_payments_paged
Retrieves funding payment history for a specific subaccount. Funding payments are periodic settlements that occur between long and short positions based on the funding rate.
address: The wallet address that owns the account.subaccount: The identifier for the specific subaccount within the wallet address.ticker: The market ticker (e.g.'BTC-USD').after_or_at: If given, fetches funding payments starting from the given timestamp.limit: The max. number of funding payments to retrieve.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_funding_payments_paged.py
get_transfers
Retrieve transfer history for a subaccount.
address: Wallet address that owns the subaccount.subaccount: Subaccount number.created_before_or_at_height: Latest block height to include.created_before_or_at: Latest timestamp to include.limit: Maximum number of transfers to return.page: Page number for paginated results.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_transfers.py
get_transfers_paged
Retrieves the transfer history for a specific subaccount.
address: The wallet address that owns the account.subaccount: The identifier for the specific subaccount within the wallet address.created_before_or_at_height: If given, fetches transfers up to and including the given block height.created_before_or_at: If given, fetches transfers up to and including the given timestamp.limit: The max. number of transfers to retrieve (default: 1000, max: 1000).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_transfers_paged.py
get_transfers_between
Get transfers between subaccounts
source_address: Sender wallet address.source_subaccount: Sender subaccount number.recipient_address: Recipient wallet address.recipient_subaccount: Recipient subaccount number.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Restrict results to entries created at or before a specific timestamp.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_transfers_between.py
list_orders
Retrieve orders for a subaccount with optional filters.
address: Wallet address that owns the subaccount.subaccount: Subaccount number.limit: Maximum number of orders to return.ticker: Ticker filter.side: Order side filter.status: Order status filter.type: Order type filter.good_til_block_before_or_at: Latest good-til-block to include.good_til_block_time_before_or_at: Latest good-til-block time to include.return_latest_orders: Whether to return only the latest orders.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/list_orders.py
get_order
Retrieve a single order by order id.
order_id: Order id.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_order.py
list_positions
Retrieve perpetual positions for a subaccount.
address: Wallet address that owns the subaccount.subaccount: Subaccount number.status: Position status filter.limit: Maximum number of positions to return.created_before_or_at_height: Latest block height to include.created_before_or_at: Latest timestamp to include.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/list_positions.py
get_open_position
Retrieves the open perpetual position for a specific subaccount.
Source code in pkg/src/dydx/indexer/data/get_open_position.py
get_historical_pnl
Get historical pnl
address: Wallet address that owns the account.subaccount: Subaccount number.limit: Maximum number of results to return.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Restrict results to entries created at or before a specific timestamp.created_on_or_after_height: Restrict results to entries created on or after a specific block height.created_on_or_after: Restrict results to entries created on or after a specific timestamp.page: Page number for paginated results.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_historical_pnl.py
get_rewards
Get historical block trading rewards
address: Wallet address that owns the account.limit: Maximum number of results to return.starting_before_or_at_height: Only include rewards starting at or before this block height.starting_before_or_at: Only include rewards starting at or before this timestamp.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_rewards.py
get_rewards_aggregated
Get aggregated trading rewards
address: Wallet address that owns the account.period: Aggregation period.limit: Maximum number of results to return.starting_before_or_at: Only include aggregations starting at or before this timestamp.starting_before_or_at_height: Only include aggregations starting at or before this block height.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_rewards_aggregated.py
Parent Subaccount And Vault Methods
get_parent_subaccount
Get parent subaccount
address: Wallet address that owns the parent subaccount.parent_subaccount: Parent subaccount number.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_parent_subaccount.py
get_parent_asset_positions
Get parent asset positions
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_parent_asset_positions.py
get_parent_fills
Get parent fills
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Latest timestamp to include.market: Ticker filter.market_type: Market type filter.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_parent_fills.py
get_parent_historical_pnl
Get parent historical pnl
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Restrict results to entries created at or before a specific timestamp.created_on_or_after_height: Restrict results to entries created on or after a specific block height.created_on_or_after: Restrict results to entries created on or after a specific timestamp.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_parent_historical_pnl.py
get_parent_transfers
Get parent transfers
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.created_before_or_at_height: Restrict results to entries created at or before a specific block height.created_before_or_at: Restrict results to entries created at or before a specific timestamp.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_parent_transfers.py
get_funding_payments_for_parent_subaccount
Get funding payments for parent subaccount
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.after_or_at: Only include payments created at or after this timestamp.page: Page number for paginated results.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_funding_payments_for_parent_subaccount.py
list_parent_orders
List parent orders
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.ticker: Ticker filter.side: Order side filter.status: Order status filter.type: Order type filter.good_til_block_before_or_at: Latest good-til-block to include.good_til_block_time_before_or_at: Latest good-til-block time to include.return_latest_orders: Whether to return only the latest orders.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/list_parent_orders.py
list_parent_positions
List parent positions
address: Wallet address that owns the account.parent_subaccount: Parent subaccount number.limit: Maximum number of results to return.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/list_parent_positions.py
get_megavault_historical_pnl
Get megavault historical pnl
resolution: PnL tick resolution.validate: Whether to validate the response against the generated schema.
Source code in pkg/src/dydx/indexer/data/api/get_megavault_historical_pnl.py
get_vaults_historical_pnl
Get vaults historical pnl
resolution: PnL tick resolution.validate: Whether to validate the response against the generated schema.