IndexerData
HTTP methods exposed under Indexer.data.
get_markets
Retrieves perpetual markets.
market: The specific market ticker to retrieve (e.g.'BTC-USD'). If not provided, all markets are returned.limit: Maximum number of asset positions to return in the response.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_markets.py
get_market
Retrieves perpetual markets.
market: The specific market ticker to retrieve (e.g.'BTC-USD'). If not provided, all markets are returned.limit: Maximum number of asset positions to return in the response.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_markets.py
get_order_book
Retrieves the orderbook for a specific perpetual market.
market: The market ticker (e.g.'BTC-USD').validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_order_book.py
get_trades
Retrieves trades for a specific perpetual market.
market: The market ticker (e.g.'BTC-USD').start_height: The block height to start retrieving trades from.limit: The max. number of trades 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_trades.py
get_candles
Retrieves candle data for a specific perpetual market.
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 the given timestamp.limit: The max. number of candles 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_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.py
get_subaccount
Retrieves a specific subaccount associated with a given address and subaccount number.
address: The address of the subaccount.subaccount: The subaccount number.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_subaccount.py
get_subaccounts
Retrieves a list of subaccounts associated with a given address. Subaccounts are related addresses that fall under the authority or ownership of the primary address.
address: The address of the subaccount.limit: The max. number of subaccounts to retrieve.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_subaccounts.py
get_fills
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.end_height: If given, fetches fills up to and including the given block height.end: If given, fetches fills up to and including the given timestamp.limit: The max. number of fills to retrieve (default: 1000, max: 1000).page: The page number for paginated results (default: 1).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/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.end_height: If given, fetches fills up to and including the given block height.end: 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.py
get_funding_payments
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').start: If given, fetches funding payments starting from the given timestamp.limit: The max. number of funding payments to retrieve.page: The page number for paginated results (default: 1).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/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').start: If given, fetches funding payments starting from the given timestamp.limit: The max. number of funding payments to retrieve.page: The page number for paginated results (default: 1).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_funding_payments.py
get_transfers
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.end_height: If given, fetches transfers up to and including the given block height.end: If given, fetches transfers up to and including the given timestamp.limit: The max. number of transfers to retrieve (default: 1000, max: 1000).page: The page number for paginated results (default: 1).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/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.end_height: If given, fetches transfers up to and including the given block height.end: 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.py
list_orders
Retrieves orders for a specific subaccount, with various filtering options to narrow down the results based on order characteristics.
address: The wallet address that owns the account.subaccount: The identifier for the specific subaccount within the wallet address.limit: Maximum number of asset positions to return in the response.ticker: The ticker filter.side: The order side filter (LONG or SHORT).status: The order status filter (Open, Filled, Canceled, etc).type: The order type filter (LIMIT, MARKET, STOP_LIMIT, etc).good_til_block_end: The block number filter for orders good until before or at.good_til_block_time_end: The timestamp filter for orders good until before or at (UTC).latest_only: Whether to return only the latest orders.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/list_orders.py
get_order
Retrieves detailed information about a specific order based on its unique identifier (the order ID).
id: The ID of the order to retrieve.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/get_order.py
list_positions
Retrieves perpetual positions for a specific subaccount. Both open and closed/historical positions can be queried.
address: The wallet address that owns the account.subaccount: The identifier for the specific subaccount within the wallet address.status: Status filter.limit: Maximum number of perpetual positions to return in the response.end_height: Restricts results to positions created at or before a specific blockchain height.end: Restricts results to positions created at or before a specific timestamp.validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/list_positions.py
get_open_position
Retrieves the open perpetual position for a specific subaccount.
Source code in pkg/src/dydx/indexer/data/list_positions.py
get_historical_funding
Retrieves historical funding rates for a specific perpetual market..
market: The market ticker (e.g.'BTC-USD').end: If given, fetches funding rates up to and including the given timestamp.end_block: 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).validate: Whether to validate the response against the expected schema.
Source code in pkg/src/dydx/indexer/data/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').end: If given, fetches funding rates up to and including the given timestamp.end_block: 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).validate: Whether to validate the response against the expected schema.