HTTP API
Accounts
account = indexer_client.account()
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.
Method Declaration
async def get_subaccounts(
self,
address: str,
limit: Optional[int] = None,
) -> Any
Unification Plan
- Rust implementation doesn't have optional parameters.
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | path | Address | true | The primary address for which to retrieve associated subaccounts. |
limit | query | u32 | false | Maximum number of subaccounts in the response. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | AddressResponse | The subaccounts data. |
400 | Bad Request | The request was malformed or invalid. |
Get Subaccount
Retrieves a specific subaccount associated with a given address and subaccount number.
Method Declaration
async def get_subaccount(
self,
address: str,
subaccount_number: int,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The primary address to which the subaccount belongs. |
subaccountNumber | query | SubaccountNumber | true | The specific subaccount number to retrieve. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | SubaccountResponseObject ⛁ | The subaccount data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
List Positions
Retrieves perpetual positions for a specific subaccount. Both open and closed/historical positions can be queried.
Method Declaration
async def get_subaccount_perpetual_positions(
self,
address: str,
subaccount_number: int,
status: Optional[PositionStatus] = None,
limit: Optional[int] = None,
created_before_or_at_height: Optional[int] = None,
created_before_or_at: Optional[str] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
status | query | PerpetualPositionStatus | false | Filter to retrieve positions with a specific status. If not provided, all positions will be returned regardless of status. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PerpetualPositionResponseObject ⛁ | The perpetual positions data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
API Example
Examples: Guide - List Positions
Get Asset Positions
Retrieves asset positions and respective details of a specific subaccount.
Method Declaration
async def get_subaccount_asset_positions(
self,
address: str,
subaccount_number: int,
status: Optional[PositionStatus] = None,
limit: Optional[int] = None,
created_before_or_at_height: Optional[int] = None,
created_before_or_at: Optional[str] = None,
) -> Any
Unification Plan
- Rename all methods to
get_asset_positions
- shorter is better. - Add a
Subaccount
pair to Python and JavaScript, since it's always a pair - Add options to the Rust version
- Rename
created_before_or_at_time
parameter tocreated_before_or_at
- Rename
PerpetualPositionStatus
toPositionStatus
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
status | query | PerpetualPositionStatus | false | Filter to retrieve positions with a specific status. If not provided, all positions will be returned regardless of status. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
Response
A data structure containing the requested asset positions. Typically includes details such as asset ID, size, side (buy/sell), entry price, realized PnL, and other position-specific information.
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | AssetPositionResponseObject ⛁ | The asset positions data. |
Get Transfers
Retrieves the transfer history for a specific subaccount.
Method Declaration
async def get_subaccount_transfers(
self,
address: str,
subaccount_number: int,
limit: Optional[int] = None,
created_before_or_at_height: Optional[int] = None,
created_before_or_at: Optional[str] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccount_number | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of items in the response. |
createdBeforeOrAtHeight | query | Height | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime | false | Restricts results to positions created at or before a specific timestamp. |
page | query | u32 | false | The page number for paginated results. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | TransferResponseObject ⛁ | The transfers data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Get Transfers Between
Fetch information regarding a transfer between two subaccounts.
Method Declaration
Unification Plan
- Response object does not have defined structure in TypeScript client. Will have to work on it.
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
sourceAddress | query | string | true | Sender's wallet address |
sourceSubaccountNumber | query | string | true | The identifier for the specific subaccount within the sender wallet address. |
recipientAddress | query | string | true | Receiver wallet address |
recipientSubaccountNumber | query | string | true | The identifier for the specific subaccount within the receiver wallet address. |
createdBeforeOrAtHeight | query | number | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | string | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
Response
List Orders
Retrieves orders for a specific subaccount, with various filtering options to narrow down the results based on order characteristics.
Method Declaration
async def get_subaccount_orders(
self,
address: str,
subaccount_number: int,
ticker: Optional[str] = None,
ticker_type: TickerType = TickerType.PERPETUAL,
side: Optional[OrderSide] = None,
status: Optional[OrderStatus] = None,
type: Optional[OrderType] = None,
limit: Optional[int] = None,
good_til_block_before_or_at: Optional[int] = None,
good_til_block_time_before_or_at: Optional[str] = None,
return_latest_orders: Optional[bool] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
ticker | query | Ticker | false | The ticker filter. |
side | query | OrderSide | false | The order side filter. |
status | query | OrderStatus | false | The order status filter. |
type | query | OrderType | false | The order type filter. |
goodTilBlockBeforeOrAt | query | Height | false | The block number filter for orders good until before or at. |
goodTilBlockTimeBeforeOrAt | query | DateTime in UTC | false | The timestamp filter for orders good until before or at. |
returnLatestOrders | query | bool | false | Whether to return only the latest orders. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ListOrdersResponse | The orders data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Examples: Guide - List Orders
Get Order
Retrieves detailed information about a specific order based on its unique identifier (the order ID). To get the order ID, see how to create it or fetch the order history.
Method Declaration
async def get_order(
self,
order_id: str,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
orderId | path | OrderId | true | The order ID. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | OrderResponseObject ⛁ | The order data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The order was not found. |
Get Fills
Retrieves fill records for a specific subaccount on the exchange. A fill represents a trade that has been executed.
Method Declaration
async def get_subaccount_fills(
self,
address: str,
subaccount_number: int,
ticker: Optional[str] = None,
ticker_type: TickerType = TickerType.PERPETUAL,
limit: Optional[int] = None,
created_before_or_at_height: Optional[int] = None,
created_before_or_at: Optional[str] = None,
) -> Any
Unification Plan
- Rename all methods to
get_fills
- shorter is better. - Add a
Subaccount
pair to Python and JavaScript, since it's always a pair - Rename
created_before_or_at_time
parameter tocreated_before_or_at
page
optional parameter is missing in Pythonpage
optional parameter is missing in Rust- In Rust
market
field of the options struct must beticker
- In Rust
market_type
field of the options struct must beticker_type
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
ticker | query | Ticker | false | The market symbol to filter fills by (e.g., "BTC-USD"). If not provided, fills for all markets will be returned. |
tickerType | query | MarketType | false | The type of market to filter by. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Filters results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime | false | Filters results to positions created at or before a specific timestamp (ISO 8601 format). |
page | query | u32 | false | The page number for paginated results. |
Response
A promise that resolves to fill data containing details such as order ID, market, side (buy/sell), size, price, execution time, and other fill-specific information.
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | FillResponseObject ⛁ | The fills data. |
Examples: Guide - Get Fills
Get Historical PNL
Retrieves historical profit and loss (PNL) data for a specific subaccount on the exchange. These records provide insights into the trading performance over time.
Method Declaration
async def get_subaccount_historical_pnls(
self,
address: str,
subaccount_number: int,
effective_before_or_at: Optional[str] = None,
effective_at_or_after: Optional[str] = None,
) -> Any
Unification Plan
- Parameter
created_on_or_after_height
is missing - Parameter
created_on_or_after
is missing
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccount_number | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Filters results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime in UTC | false | Filters results to positions created at or before a specific timestamp (ISO 8601 format). |
createdOnOrAfterHeight | query | Height | false | Filters results to positions created on or after a specific blockchain height. |
createdOnOrAfter | query | DateTime in UTC | false | Filters results to positions created on or after a specific timestamp (ISO 8601 format). |
page | query | u32 | false | The page number for paginated results. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PnlTicksResponseObject ⛁ | The historical PnLs data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Get Rewards
Retrieves historical block trading rewards for the specified address.
Method Declaration
async def get_historical_block_trading_rewards(
self,
address: str,
limit: Optional[int] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | path | Address | true | The wallet address that owns the account. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
startingBeforeOrAtHeight | query | Height | false | The timestamp filter for rewards starting before or at. |
startingBeforeOrAt | query | DateTime in UTC | false | The block height filter for rewards starting before or at. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | HistoricalBlockTradingReward ⛁ | The historical block trading rewards data. |
400 | Bad Request | The request was malformed or invalid. |
Get Rewards Aggregated
Retrieves aggregated historical trading rewards for the specified address.
Method Declaration
async def get_historical_trading_rewards_aggregated(
self,
address: str,
period: TradingRewardAggregationPeriod = TradingRewardAggregationPeriod.DAILY,
limit: Optional[int] = None,
starting_before_or_at: Optional[str] = None,
starting_before_or_at_height: Optional[int] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | path | Address | true | The wallet address that owns the account. |
period | query | TradingRewardAggregationPeriod | true | The aggregation period. |
limit | query | u32 | false | The maximum number of aggregated rewards to retrieve. |
startingBeforeOrAt | query | DateTime | false | The timestamp filter for rewards starting before or at. |
startingBeforeOrAtHeight | query | Height | false | The block height filter for rewards starting before or at. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | HistoricalTradingRewardAggregation ⛁ | The aggregated historical trading rewards data. |
400 | Bad Request | The request was malformed or invalid. |
Get Parent Subaccount
Query for the parent subaccount, its child subaccounts, equity, collateral and margin. See more information on parent subaccounts here.
Method Declaration
pub async fn get_parent_subaccount(
&self,
subaccount: &ParentSubaccount,
) -> Result<ParentSubaccountResponseObject, Error>
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | path | Address | true | The wallet address that owns the parent subaccount. |
number | path | [SubaccountNumber] | true | The identifier for the specific subaccount within the wallet address. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ParentSubaccountResponseObject ⛁ | The parent subaccount data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The parent subaccount was not found. |
List Parent Positions
List all positions of a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
parentSubaccountNumber | query | SubaccountNumber | true | Subaccount number of the parent subaccount. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PerpetualPositionResponseObject ⛁ | The perpetual positions data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
API Example
Get Parent Asset Positions
Query for asset positions (size, buy/sell etc) for a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
parentSubaccountNumber | query | SubaccountNumber | true | The parent subaccount number of this wallet |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | AssetPositionResponseObject ⛁ | The asset positions data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The parent subaccount was not found. |
Get Parent Transfers
Query for transfers between subaccounts associated with a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the parent subaccount. |
parentSubaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime in UTC | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | TransferResponseObject ⛁ |
List Parent Orders
Query for orders filtered by order params of a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
parentSubaccountNumber | query | SubaccountNumber | true | Parent subaccount number |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
ticker | query | Ticker | false | The ticker filter. |
side | query | OrderSide | false | The order side filter. |
status | query | OrderStatus | false | The order status filter. |
type | query | OrderType | false | The order type filter. |
goodTilBlockBeforeOrAt | query | Height | false | The block number filter for orders good until before or at. |
goodTilBlockTimeBeforeOrAt | query | DateTime in UTC | false | The timestamp filter for orders good until before or at. |
returnLatestOrders | query | bool | false | Whether to return only the latest orders. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ListOrdersResponse | The orders data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Get Parent Fills
Query for fills (i.e. filled orders data) for a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the parent subaccount. |
parentSubaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Filters results to positions created at or before a specific blockchain height. |
market | query | Ticker | false | Market id like USD-BTC, ETH-USD |
marketType | query | MarketType | false | Market type of filled order Data |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | FillResponseObject ⛁ | The fills data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The parent subaccount was not found. |
Get Parent Historical Pnl
Query for profit and loss report for the specified time/block range of a parent subaccount.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the parent subaccount. |
parentSubaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
createdBeforeOrAtHeight | query | Height | false | Restricts results to positions created at or before a specific blockchain height. |
createdBeforeOrAt | query | DateTime in UTC | false | Restricts results to positions created at or before a specific timestamp (ISO 8601 format). |
createdOnOrAfterHeight | query | Height | false | Restricts results to positions created on or after a specific blockchain height. |
createdOnOrAfter | query | DateTime in UTC | false | Restricts results to positions created on or after a specific timestamp (ISO 8601 format). |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PnlTicksResponseObject ⛁ | The historical PnLs data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The parent subaccount was not found. |
Markets
TODO: How to access to the accounts
space.
market = indexer_client.markets()
Get Perpetual Markets
Retrieves perpetual markets.
Method Declaration
def get_perpetual_markets(self, market: str = None) -> Response
Unification Plan
- Add alias for the return type in Rust:
PerpetualMarketsMap
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
market | query | Ticker | false | The specific market ticker to retrieve. If not provided, all markets are returned. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PerpetualMarketMap | The perpetual markets data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The market was not found. |
Get Perpetual Market Orderbook
Retrieves the orderbook for a specific perpetual market.
Method Declaration
async def get_perpetual_market_orderbook(
self,
market: str,
) -> dict
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
market | path | Ticker | true | The market ticker. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | OrderBookResponseObject ⛁ | The orderbook data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The market was not found. |
API Example
Get Trades
Retrieves trades for a specific perpetual market.
Method Declaration
async def get_perpetual_market_trades(
self,
market: str,
starting_before_or_at_height: Optional[int] = None,
limit: Optional[int] = None,
) -> dict
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
market | path | Ticker | true | The market ticker. |
limit | query | u32 | false | The maximum number of trades to retrieve. |
startingBeforeOrAtHeight | query | Height | false | The block height to start retrieving trades from. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | TradeResponseObject ⛁ | The trades data. |
400 | [Bad Request] | The request was malformed or invalid. | |
404 | [Not Found] | The market was not found. |
API Example
Get Candles
Retrieves candle data for a specific perpetual market.
Method Declaration
async def get_perpetual_market_candles(
self,
market: str,
resolution: str,
from_iso: Optional[str] = None,
to_iso: Optional[str] = None,
limit: Optional[int] = None,
) -> dict
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
market | path | Ticker | true | The market ticker. |
resolution | query | CandleResolution | true | The candle resolution (e.g., "1DAY", "1HOUR", "1MIN"). |
limit | query | u32 | false | The maximum number of candles to retrieve. |
fromIso | query | DateTime | false | The start timestamp in ISO format. |
toIso | query | DateTime | false | The end timestamp in ISO format. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | CandleResponseObject ⛁ | The candle data. |
400 | Bad Request | The request was malformed or invalid. |
API Example
Get Historical Funding
Retrieves historical funding rates for a specific perpetual market.
Method Declaration
async def get_perpetual_market_historical_funding(
self,
market: str,
effective_before_or_at: Optional[str] = None,
effective_before_or_at_height: Optional[int] = None,
limit: Optional[int] = None,
) -> dict
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
market | path | Ticker | true | The market ticker. |
limit | query | u32 | false | The maximum number of funding rates to retrieve. |
effectiveBeforeOrAt | query | DateTime | false | The timestamp to retrieve funding rates effective before or at. |
effectiveBeforeOrAtHeight | query | Height | false | The block height to retrieve funding rates effective before or at. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | HistoricalFundingResponseObject ⛁ | The historical funding rates data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The market was not found. |
API Example
Get Sparklines
Retrieves sparkline data for perpetual markets.
Method Declaration
async def get_perpetual_market_sparklines(
self,
period: str = TimePeriod.ONE_DAY
) -> dict
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
timePeriod | query | SparklineTimePeriod | true | The time period for the sparkline data (e.g., "ONE_DAY", "SEVEN_DAYS"). |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | SparklineResponseObject ⛁ | The sparkline data. |
400 | Bad Request | The request was malformed or invalid. |
Utility
// TODO: Add description
Method Declaration
Get Time
Get current server time of the Indexer.
Method Declaration
async def get_time(self) -> Dict[str, str]
Parameters
Parameter | Location | Type | Required | Description |
---|
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | TimeResponse |
Get Height
Current block height and block time (UTC) parsed by the Indexer.
Method Declaration
async def get_height(self) -> Dict[str, str]
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | HeightResponse ⛁ | Dictionary containing the block height and time. |
Get Screen
Query for screening results (compliance) of the address.
Method Declaration
async def screen(self, address: str) -> Dict[str, bool]:
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ComplianceResponse ⛁ | The compliance data. |
400 | Bad Request | The request was malformed or invalid. |
API Example
Get Compliance Screen
Screen an address to see if it is restricted.
Method Declaration
Unification Plan
Implement Python and rust method
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | Path | string | true | evm or dydx address |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ComplianceV2Response | whether the specified address is restricted |
400 | [Bad Request] | The request was malformed or invalid. |
API Example
Vaults
TODO: How to access to the vaults
space.
let vaults = indexer_client.vaults();
Get MegaVault Historical Pnl
MegaVault historical PnL.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
resolution | query | PnlTickInterval | true | PnL tick resolution. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | PnlTicksResponseObject ⛁ | The PnL ticks data. |
400 | Bad Request | The request was malformed or invalid. |
API Example
Get Vaults Historical Pnl
Vaults historical PnL.
Method Declaration
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
resolution | query | PnlTickInterval | true | PnL tick resolution. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | VaultHistoricalPnl ⛁ | The vault historical PnL data. |
400 | Bad Request | The request was malformed or invalid. |
API Example
Get MegaVaults Positions
MegaVault positions.
Method Declaration
Unification Plan
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | VaultPosition ⛁ |