# amberdata_api rust At Amberdata.io we provide a rich set of high quality, real-time, raw & augmented blockchain data. Web3api enables you to easily gain access to this data. You can access the data in different ways: REST - Access comprehensive historical data with our RESTful APIs, designed for seamless integration and retrieval of extensive time-series information. Websockets - Connect to our Websockets API for instantaneous, real-time data streaming, ensuring minimal latency for dynamic and responsive applications. FIX - Leverage the robustness of the FIX protocol to obtain reliable and secure Market Data, facilitating swift and standardized financial information exchange. RPC - Utilize our RPC interface for direct and efficient queries to our blockchain nodes, offering you unfettered access to decentralized data with precision. Amazon S3 - Access and download vast archives of historical data, systematically organized and delivered daily in the highly efficient Apache Parquet format via Amazon S3. Snowflake - Harness the power of Snowflake for dynamic data analysis within a cloud-native platform, offering advanced SQL querying capabilities and seamless scalability. BigQuery - Utilize BigQuery for comprehensive data analysis, leveraging Google's advanced infrastructure and smart analytics with interactive SQL queries. # Authentication ```rust use amberdata_api::Client; let client = Client::new(String::from("API_KEY")).unwrap(); ``` # get_all_addresses Retrieves every address that has been seen on the network. Without any parameters, returns all the known addresses on the blockchain, order by time of first appearance (ie when they first transacted) in reverse order, meaning the most recent addresses first. When used with a specific address, returns information about the address and the first time (block and transaction hash) it appeared on the blockchain. ```rust let response = client.get_all_addresses(GetAddressesRequest { block_number: None, block_number_gt: None, block_number_gte: None, block_number_lt: None, block_number_lte: None, end_date: None, hash: None, page: None, size: None, start_date: None, transaction_hash: None, type_query: None, }); ``` # address_balances_batch Retrieves the latest account and token balances for the specified addresses. This is super useful if you want to get an entire portfolio's summary in a single call. Get totals for ETH & all token amounts with market prices. ```rust let response = client.address_balances_batch(GetAddressesBalancesRequest { addresses: "string".to_string(), block_number: None, currency: None, include_price: None, time_format: None, }); ``` # extended_public_key Generates derived addresses based an x,y,z public address and a path. ```rust let response = client.extended_public_key(GetAddressesExtendedAddressRequest { address: "string".to_string(), page: None, path: None, size: None, type_query: None, }); ``` # all_address_metrics Get a rolling 24 hour active address count for a given blockchain. Default metrics are for Ethereum. ```rust let response = client.all_address_metrics(); ``` # get_historical_account_balances Retrieves the historical (time series) account balances for the specified address. ```rust let response = client.get_historical_account_balances(GetAddressesHashAccountBalancesHistoricalRequest { hash: "string".to_string(), block_number: None, currency: None, end_date: None, include_price: None, page: None, size: None, start_date: None, time_format: None, value: None, value_gt: None, value_gte: None, value_lt: None, value_lte: None, }); ``` # get_current_account_balance Retrieves the current account balance for the specified address. ```rust let response = client.get_current_account_balance(GetAddressesHashAccountBalancesLatestRequest { hash: "string".to_string(), currency: None, include_price: None, real_time: None, }); ``` # get_address_adoption Retrieves the historical adoption for the specified address on ethereum-mainnet. Adoption is defined by the number of unique addresses interacting with this contract for the entire span of time. Example: If an address makes a transaction to a contract in June, then again in July, this address will only be counted once for the adoption totals. ```rust let response = client.get_address_adoption(GetAddressesHashAdoptionRequest { hash: "string".to_string(), time_format: None, time_frame: None, time_period: None, }); ``` # address_balances Retrieves the latest account and token balances for the specified address. ```rust let response = client.address_balances(GetAddressesHashBalancesRequest { hash: "string".to_string(), currency: None, include_price: None, time_format: None, }); ``` # addresses_converter Converts the specified address in the Bitcoin Cash & Legacy formats. ```rust let response = client.addresses_converter(GetAddressesHashConverterRequest { hash: "string".to_string(), }); ``` # get_internal_messages Retrieves internal messages where this address is either the originator or a recipient. If you intend to traverse all the internal-messages, it is recommended to specify the flag `direction=ascending`, which will guarantee that the pagination is stable and will not change with the arrival of new internal messages. Please note that the returned payload can sometimes contain less records than the requested size - this is due to duplicates that can occur when the *from* and the *to* of a transaction are identical. In order to terminate the pagination effectively, please paginate until the returned payload is empty, do no rely on the size of the payload itself. ```rust let response = client.get_internal_messages(GetAddressesHashFunctionsRequest { hash: "string".to_string(), block_number: None, direction: None, end_date: None, from: None, page: None, size: None, start_date: None, to: None, transaction_hash: None, validation_method: None, }); ``` # get_account_information Retrieves information about the specified address: network(s) and blockchain(s) this address exist within. ```rust let response = client.get_account_information(GetAddressesHashInformationRequest { hash: "string".to_string(), include_price: None, }); ``` # get_address_logs Retrieves the logs for the transactions where this address is either the originator or a recipient. ```rust let response = client.get_address_logs(GetAddressesHashLogsRequest { hash: "string".to_string(), block_number: None, end_date: None, page: None, size: None, start_date: None, topic: None, transaction_hash: None, }); ``` # get_address_metadata Retrieves statistics about the specified address: balances, holdings, etc. ```rust let response = client.get_address_metadata(GetAddressesHashMetadataRequest { hash: "string".to_string(), time_format: None, }); ``` # get_token_balances Retrieves the historical (time series) token balances for the specified address. ```rust let response = client.get_token_balances(GetAddressesHashTokenBalancesHistoricalRequest { hash: "string".to_string(), amount: None, amount_gt: None, amount_gte: None, amount_lt: None, amount_lte: None, block_number: None, end_date: None, page: None, size: None, start_date: None, token_address: None, }); ``` # get_address_tokens Retrieves the tokens this address is holding. ```rust let response = client.get_address_tokens(GetAddressesHashTokenBalancesLatestRequest { hash: "string".to_string(), currency: None, direction: None, include_price: None, page: None, size: None, sort_type: None, }); ``` # token_transfers_by_address_pro Retrieves all token transfers involving the specified address. If you intend to traverse all the token-transfers, it is recommended to specify the flag `direction=ascending`, which will guarantee that the pagination is stable and will not change with the arrival of new token-transfers. ```rust let response = client.token_transfers_by_address_pro(GetAddressesHashTokenTransfersRequest { hash: "string".to_string(), amount: None, amount_gt: None, amount_gte: None, amount_lt: None, amount_lte: None, block_number: None, currency: None, direction: None, end_date: None, include_price: None, page: None, size: None, start_date: None, time_format: None, transaction_hash: None, validation_method: None, }); ``` # get_address_transactions Retrieves the transactions where this address was either the originator or a recipient. Note that transactions are returned in descending order by default (block number and transaction index), which means the most recent transactions are on page 0, and the oldest transactions are on the last page. If you intend to traverse all the transactions, it is recommended to specify the flag `direction=ascending`, which will guarantee that the pagination is stable and will not change with the arrival of new transactions. ```rust let response = client.get_address_transactions(GetAddressesHashTransactionsRequest { hash: "string".to_string(), block_number: None, decode_transactions: None, direction: None, end_date: None, from: None, include_functions: None, include_logs: None, include_price: None, include_token_transfers: None, page: None, size: None, start_date: None, to: None, validation_method: None, }); ``` # get_address_usage Retrieves the historical usage for the specified address. Usage is defined by the number of unique addresses interacting with this contract for a specific window of time. Example: If an address makes a transaction to a contract in June, then again in July, this address will be counted once for each period in the usage totals. ```rust let response = client.get_address_usage(GetAddressesHashUsageRequest { hash: "string".to_string(), time_format: None, time_frame: None, time_period: None, }); ``` # blockchains_metrics_latest Get metrics for a specific blockchain. ```rust let response = client.blockchains_metrics_latest(); ``` # get_all_blocks Retrieves all the blocks within the specified range. ```rust let response = client.get_all_blocks(GetBlocksRequest { end_number: "string".to_string(), start_number: "string".to_string(), size: None, validation_method: None, }); ``` # blocks_metrics_historical Get metrics for historical confirmed blocks for a given blockchain. Default metrics are for Ethereum over a 1d tick / 365d lookback period. Changing the header blockchain ID will return that blockchains metrics. ```rust let response = client.blocks_metrics_historical(GetBlocksMetricsHistoricalRequest { end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # blocks_metrics Get metrics for recent confirmed blocks for a given blockchain. Default metrics are for Ethereum over a 24h period. Changing the header blockchain ID will return that blockchains metrics. ```rust let response = client.blocks_metrics(GetBlocksMetricsLatestRequest { time_format: None, time_interval: None, }); ``` # get_block Retrieves the block specified by its id (number or hash). ```rust let response = client.get_block(GetBlocksIdRequest { id: "string".to_string(), time_format: None, validation_method: None, }); ``` # get_block_functions Retrieves all the functions which were called at the specified block number or hash. ```rust let response = client.get_block_functions(GetBlocksIdFunctionsRequest { id: "string".to_string(), validation_method: None, }); ``` # get_block_logs Retrieves all the logs at the specified block number or hash. ```rust let response = client.get_block_logs(GetBlocksIdLogsRequest { id: "string".to_string(), transaction_hash: None, validation_method: None, }); ``` # get_blocks_token_transfers Retrieves all the tokens which were transferred at the specified block number. ```rust let response = client.get_blocks_token_transfers(GetBlocksIdTokenTransfersRequest { id: "string".to_string(), amount: None, amount_gt: None, amount_gte: None, amount_lt: None, amount_lte: None, currency: None, from: None, to: None, token_address: None, transaction_hash: None, }); ``` # get_block_transactions Retrieves all the transactions included in a specified block id. ```rust let response = client.get_block_transactions(GetBlocksIdTransactionsRequest { id: "string".to_string(), decode_transactions: None, end_date: None, include_functions: None, include_logs: None, include_price: None, include_token_transfers: None, page: None, size: None, start_date: None, validation_method: None, }); ``` # get_contract_details Retrieves all the detailed information for the specified contract (ABI, bytecode, sourcecode...). ```rust let response = client.get_contract_details(GetContractsHashRequest { hash: "string".to_string(), }); ``` # get_contract_functions Retrieves the functions of the specified contract (if available) - if not available on chain, the byte code is decompiled and a list of functions is extracted from it. ```rust let response = client.get_contract_functions(GetContractsHashFunctionsRequest { hash: "string".to_string(), }); ``` # uniswap_v3_liquidity_distribution This API provides the **current** distribution of the liquidity in a specified Uniswap v3 pool. ```rust let response = client.uniswap_v3_liquidity_distribution(GetDefiDexUniswapv3PoolsPoolAddressLiquidityDistributionRequest { pool_address: "string".to_string(), active_tick: None, price0_usd_max: None, price0_usd_min: None, price1_usd_max: None, price1_usd_min: None, }); ``` # defi_dex_pool_lens This API retrieves information about all of the actions that occurred for a specific liquidity pool on the protocol within a certain timespan. ```rust let response = client.defi_dex_pool_lens(GetDefiDexProtocolIdPoolsPoolAddressRequest { protocol_id: "string".to_string(), pool_address: "string".to_string(), action: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # defi_dex_protocol_lens This API retrieves information about all of the actions that occurred on the protocol within a certain timespan. ```rust let response = client.defi_dex_protocol_lens(GetDefiDexProtocolIdProtocolRequest { protocol_id: "string".to_string(), action: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # defi_dex_wallet_lens This API retrieves information about all of the actions taken by a specific wallet on the protocol within a certain timespan. ```rust let response = client.defi_dex_wallet_lens(GetDefiDexProtocolIdWalletsWalletAddressRequest { protocol_id: "string".to_string(), wallet_address: "string".to_string(), action: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # defi_lending_information_assets This API lists the supported assets across the available lending protocols and provides snapshots of aggregate metrics. ```rust let response = client.defi_lending_information_assets(GetDefiLendingAssetsInformationRequest { asset: None, blockchain: None, end_date: None, market: None, protocol: None, }); ``` # defi_lending_information_protocols This API lists the supported DeFi lending protocols and provides snapshots of aggregate metrics. ```rust let response = client.defi_lending_information_protocols(GetDefiLendingProtocolsInformationRequest { blockchain: None, end_date: None, protocol: None, }); ``` # profit_and_loss_analytics_in_defi_lending Analyze a wallet's historical yield, net worth and interest owed from lending and borrowing assets across different DeFi protocols. ```rust let response = client.profit_and_loss_analytics_in_defi_lending(GetDefiLendingWalletsWalletAddressReturnsRequest { wallet_address: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # lending_asset_summary_metrics This API provides aggregated insights into the asset markets across various lending protocols. ```rust let response = client.lending_asset_summary_metrics(GetDefiLendingProtocolIdAssetsAssetIdMetricsSummaryRequest { protocol_id: "string".to_string(), asset_id: "string".to_string(), end_date: None, market: None, start_date: None, time_format: None, }); ``` # defi_lending_asset_lens This API retrieves information about all of the actions that occurred for a specific asset on the protocol within a certain timespan. ```rust let response = client.defi_lending_asset_lens(GetDefiLendingProtocolIdAssetsAssetRequest { protocol_id: "string".to_string(), asset: "string".to_string(), action: None, direction: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # defi_lending_governance_lens This API retrieves information about all of the governance actions that occurred for the protocol within a certain timespan. ```rust let response = client.defi_lending_governance_lens(GetDefiLendingProtocolIdGovernanceRequest { protocol_id: "string".to_string(), address: None, direction: None, end_date: None, proposal_id: None, size: None, start_date: None, support: None, time_format: None, }); ``` # lending_protocol_metrics_summary This API provides aggregated insights into the lending protocols. ```rust let response = client.lending_protocol_metrics_summary(GetDefiLendingProtocolIdMetricsSummaryRequest { protocol_id: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # defi_lending_protocol_lens This API retrieves information about all of the actions that occurred on the protocol within a certain timespan. ```rust let response = client.defi_lending_protocol_lens(GetDefiLendingProtocolIdProtocolRequest { protocol_id: "string".to_string(), action: None, direction: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # track_positions_lending_wallet This API retrieves the balances of a given address within supported lending protocols. ```rust let response = client.track_positions_lending_wallet(GetDefiLendingProtocolIdWalletsAddressPortfolioRequest { protocol_id: "string".to_string(), address: "string".to_string(), block_number: None, end_date: None, time_format: None, }); ``` # defi_lending_wallet_lens This API retrieves information about all of the actions taken by a specific wallet on the protocol within a certain timespan. ```rust let response = client.defi_lending_wallet_lens(GetDefiLendingProtocolIdWalletsWalletAddressRequest { protocol_id: "string".to_string(), wallet_address: "string".to_string(), action: None, direction: None, end_date: None, size: None, start_date: None, time_format: None, }); ``` # stablecoins_in_defi_lending_aggregate_insights Easily analyze a stablecoin's metrics across multiple DeFi lending protocols. ```rust let response = client.stablecoins_in_defi_lending_aggregate_insights(GetDefiStablecoinsAssetSymbolLendingMetricsSummaryRequest { asset_symbol: "string".to_string(), end_date: None, protocol: None, start_date: None, time_format: None, time_interval: None, }); ``` # defi_information_dex_exchanges Retrieves list of supported Ethereum decentralized exchanges (DEX). ```rust let response = client.defi_information_dex_exchanges(GetMarketDefiDexExchangesRequest { exchange: None, sort_by: None, }); ``` # defi_information_dex_pairs Retrieves supported DEX Pairs. ```rust let response = client.defi_information_dex_pairs(GetMarketDefiDexPairsRequest { exchange: "string".to_string(), asset: None, pair: None, size: None, }); ``` # dex_liquidity_positions_pairs_latest Retrieves the latest Liquidity Positions within the specified pool. Positions are ordered by providers, in descending order. ```rust let response = client.dex_liquidity_positions_pairs_latest(GetMarketDefiLiquidityPositionsPairsPairLatestRequest { pair: "string".to_string(), size: None, time_format: None, }); ``` # dex_liquidity_positions_providers_latest Retrieves the latest Liquidity Positions of a liquidity provider across all pools. Positions are ordered by pools, in descending order. ```rust let response = client.dex_liquidity_positions_providers_latest(GetMarketDefiLiquidityPositionsProvidersAddressLatestRequest { address: "string".to_string(), size: None, time_format: None, }); ``` # defi_liquidity_information Retrieves information about supported exchange-pairs for liquidity. ```rust let response = client.defi_liquidity_information(GetMarketDefiLiquidityInformationRequest { exchange: None, include_dates: None, include_metadata: None, size: None, time_format: None, }); ``` # defi_liquidity_pool_total_return Aggregates fees earned and impermanent loss for each liquidity provider in a pool to calculate pool level fees earned and impermanent loss. These values are calculated daily at midnight UTC. ```rust let response = client.defi_liquidity_pool_total_return(GetMarketDefiLiquidityPoolDailyReturnAddressRequest { address: "string".to_string(), date: None, time_format: None, }); ``` # defi_dex_liquidity_provider_return_since_inception Retrieves a liquidity provider's return since inception (the first time they provided liquidity or received LP tokens) including fees earned, impermanent loss and related metadata. These values are calculated daily at midnight UTC. ```rust let response = client.defi_dex_liquidity_provider_return_since_inception(GetMarketDefiLiquidityProvidersDailyReturnLiquidityPoolAddressRequest { liquidity_pool_address: "string".to_string(), addresses: None, date: None, time_format: None, }); ``` # defi_dex_liquidity_provider_historical_return Retrieves a liquidity provider’s return in a time interval including fees earned, impermanent loss and related metadata. ```rust let response = client.defi_dex_liquidity_provider_historical_return(GetMarketDefiLiquidityProvidersReturnLiquidityPoolAddressRequest { liquidity_pool_address: "string".to_string(), addresses: "string".to_string(), end_date: "1970-01-01T00:00:00".to_string(), start_date: "1970-01-01T00:00:00".to_string(), }); ``` # dex_liquidity_provider_events For a given wallet (EOA), this endpoint returns all events associated with the EOA's liquidity events across pools (mint, burn and swap). ```rust let response = client.dex_liquidity_provider_events(GetMarketDefiLiquidityProvidersProviderAddressEventsRequest { provider_address: "string".to_string(), end_date: None, exchange: None, include_all_transaction_events: None, include_metadata: None, page: None, pair: None, size: None, start_date: None, time_format: None, }); ``` # defi_liquidity_snapshots Retrieves a snapshot (a point in time) of the liquidity of the tokens in a pool. ```rust let response = client.defi_liquidity_snapshots(GetMarketDefiLiquidityPoolAddressSnapshotsRequest { pool_address: "string".to_string(), end_date: None, size: None, start_date: None, time_format: None, }); ``` # defi_liquidity_historical Retrieves the historical (time series) liquidity for the specified pair. ```rust let response = client.defi_liquidity_historical(GetMarketDefiLiquidityPoolHistoricalRequest { pool: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # defi_liquidity_latest Retrieves the latest liquidity information for the specified pool including both token liquidity prices. ```rust let response = client.defi_liquidity_latest(GetMarketDefiLiquidityPoolLatestRequest { pool: "string".to_string(), exchange: None, time_format: None, }); ``` # defi_metrics_assets_historical Retrieves historical daily metrics for the specified asset (for example DAI). ```rust let response = client.defi_metrics_assets_historical(GetMarketDefiMetricsExchangesExchangeAssetsAssetHistoricalRequest { exchange: "string".to_string(), asset: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # defi_metrics_assets_latest Retrieves the latest daily metrics for the specified asset (for example DAI). ```rust let response = client.defi_metrics_assets_latest(GetMarketDefiMetricsExchangesExchangeAssetsAssetLatestRequest { exchange: "string".to_string(), asset: "string".to_string(), time_format: None, }); ``` # defi_metrics_exchanges_historical Retrieves historical daily exchange metrics for the specified decentralized exchange. ```rust let response = client.defi_metrics_exchanges_historical(GetMarketDefiMetricsExchangesExchangeHistoricalRequest { exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # defi_metrics_exchanges_latest Retrieves the latest exchange daily metrics for the specified decentralized exchange. ```rust let response = client.defi_metrics_exchanges_latest(GetMarketDefiMetricsExchangesExchangeLatestRequest { exchange: "string".to_string(), time_format: None, }); ``` # defi_metrics_pairs_historical Retrieves historical daily metrics for the specified pair (for example DAI_WETH). ```rust let response = client.defi_metrics_pairs_historical(GetMarketDefiMetricsExchangesExchangePairsPairHistoricalRequest { exchange: "string".to_string(), pair: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # defi_metrics_pairs_latest Retrieves the latest minute by minute metrics for the specified pair (for example DAI_WETH). ```rust let response = client.defi_metrics_pairs_latest(GetMarketDefiMetricsExchangesExchangePairsPairLatestRequest { exchange: "string".to_string(), pair: "string".to_string(), time_format: None, }); ``` # defi_ohlcv_information Retrieves information about supported exchange-pairs for ohlcv. ```rust let response = client.defi_ohlcv_information(GetMarketDefiOhlcvInformationRequest { exchange: None, include_dates: None, include_metadata: None, page: None, size: None, time_format: None, }); ``` # defi_ohlcv_historical Retrieves the historical (time series) open-high-low-close for the specified pair. Includes data for exchanges depending on where the pair is traded. Base & Quote information is using the first and second asset in a pool/pair, which is the represented price. ```rust let response = client.defi_ohlcv_historical(GetMarketDefiOhlcvPoolHistoricalRequest { pool: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # defi_ohlcv_latest Retrieves the latest open-high-low-close for the specified pair. Includes data for exchanges depending on where the pair is traded. Asset information is included in the payload. Base & Quote information is using the first and second asset in a pool/pair, which is the represented price. ```rust let response = client.defi_ohlcv_latest(GetMarketDefiOhlcvPoolLatestRequest { pool: "string".to_string(), exchange: None, time_format: None, }); ``` # defi_prices_assets_information Retrieves the list of all available market asset price data sets. ```rust let response = client.defi_prices_assets_information(); ``` # defi_prices_assets_historical Retrieves the historical minute by minute price for the specified asset (for example DAI) in WETH. NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.defi_prices_assets_historical(GetMarketDefiPricesAssetAssetHistoricalRequest { asset: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # defi_prices_assets_latest Retrieves the latest minute by minute price for the specified asset (for example DAI) in WETH. NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.defi_prices_assets_latest(GetMarketDefiPricesAssetAssetLatestRequest { asset: "string".to_string(), lookback_period: None, time_format: None, }); ``` # defi_prices_pairs_historical Retrieves the historical minute by minute price for the specified pair (for example DAI_WETH). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.defi_prices_pairs_historical(GetMarketDefiPricesPairsBasesBaseQuotesQuoteHistoricalRequest { base: "string".to_string(), quote: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # defi_prices_pairs_latest_copy Retrieves the latest minute by minute price for the specified pair (for example DAI_WETH). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.defi_prices_pairs_latest_copy(GetMarketDefiPricesPairsBasesBaseQuotesQuoteLatestRequest { base: "string".to_string(), quote: "string".to_string(), time_format: None, }); ``` # defi_prices_pairs_information Retrieves the list of all available market pair price data sets. NOTE: DeFi Price is a reference rate established by liquidity data. ```rust let response = client.defi_prices_pairs_information(GetMarketDefiPricesPairsInformationRequest { base: None, quote: None, size: None, time_format: None, }); ``` # defi_trades_information Retrieves the list of all available Swaps datasets. ```rust let response = client.defi_trades_information(GetMarketDefiTradesInformationRequest { exchange: None, size: None, time_format: None, }); ``` # defi_trades_historical Retrieves the historical (time series) trade data for the specified pool/pair. - Asset information can be used from the metadata payload. - Base & Quote information is using the first and second asset in a pool/pair, which is the represented price. ```rust let response = client.defi_trades_historical(GetMarketDefiTradesPoolHistoricalRequest { pool: "string".to_string(), end_date: None, exchange: None, page: None, size: None, start_date: None, }); ``` # dex_twap_assets_information Retrieves the list of all available market asset twap data sets. ```rust let response = client.dex_twap_assets_information(); ``` # dex_twap_assets_historical Retrieves the historical minute by minute twap for the specified asset (for example DAI). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.dex_twap_assets_historical(GetMarketDefiTwapAssetAssetHistoricalRequest { asset: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # dex_twap_assets_latest Retrieves the latest minute by minute twap for the specified asset (for example DAI). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.dex_twap_assets_latest(GetMarketDefiTwapAssetAssetLatestRequest { asset: "string".to_string(), lookback_period: None, time_format: None, }); ``` # dex_twap_pairs_historical Retrieves the historical TWAP for the specified base, quote pair - this is the global TWAP across all supported contracts. Default results are over 1 minute intervals with a 60 minutes lookback period. TWAP is calculated as a time weighted moving average across all contracts. ```rust let response = client.dex_twap_pairs_historical(GetMarketDefiTwapPairsBasesBaseQuotesQuoteHistoricalRequest { base: "string".to_string(), quote: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # dex_twap_pairs_latest Retrieves the latest TWAP for the specified base, quote pair - this is the global TWAP across all supported contracts based on minutely data. Price is calculated as a time weighted moving average. ```rust let response = client.dex_twap_pairs_latest(GetMarketDefiTwapPairsBasesBaseQuotesQuoteLatestRequest { base: "string".to_string(), quote: "string".to_string(), lookback_period: None, time_format: None, }); ``` # dex_twap_pairs_information Retrieves the list of all available DeFi pair TWAP data sets. ```rust let response = client.dex_twap_pairs_information(GetMarketDefiTwapPairsInformationRequest { base: None, quote: None, size: None, time_format: None, }); ``` # dex_vwap_assets_information Retrieves the list of all available market asset vwap data sets. ```rust let response = client.dex_vwap_assets_information(); ``` # dex_vwap_assets_historical Retrieves the historical minute by minute twap for the specified asset (for example DAI). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.dex_vwap_assets_historical(GetMarketDefiVwapAssetAssetHistoricalRequest { asset: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # dex_vwap_assets_latest Retrieves the latest minute by minute vwap for the specified aset (for example DAI). NOTE: DeFi Price is a reference rate established by trade data. ```rust let response = client.dex_vwap_assets_latest(GetMarketDefiVwapAssetAssetLatestRequest { asset: "string".to_string(), lookback_period: None, time_format: None, }); ``` # dex_vwap_pairs_historical Retrieves the historical VWAP for the specified base, quote pair - this is the global VWAP across all supported contracts. Default results are over 1 minute intervals with 60 minutes lookback period. VWAP is calculated as a volume weighted moving average across all contracts. ```rust let response = client.dex_vwap_pairs_historical(GetMarketDefiVwapPairsBasesBaseQuotesQuoteHistoricalRequest { base: "string".to_string(), quote: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # defi_vwap_pairs_latest Retrieves the latest VWAP for the specified base, quote pair - this is the global VWAP across all supported contracts based on minutely data. Price is calculated as a volume weighted moving average. ```rust let response = client.defi_vwap_pairs_latest(GetMarketDefiVwapPairsBasesBaseQuotesQuoteLatestRequest { base: "string".to_string(), quote: "string".to_string(), lookback_period: None, time_format: None, }); ``` # defi_vwap_pairs_information Retrieves the list of all available market pair VWAP data sets. ```rust let response = client.defi_vwap_pairs_information(GetMarketDefiVwapPairsInformationRequest { base: None, quote: None, size: None, time_format: None, }); ``` # get_market_exchanges Retrieves information about supported exchange-pairs for these types of data: • ohlcv (open-high-low-close-volume) • order book snapshot • order book event • ticker • trade ```rust let response = client.get_market_exchanges(GetMarketExchangesRequest { exchange: None, include_dates: None, pair: None, time_format: None, }); ``` # futures_exchanges_pairs Retrieves information about supported exchange & instruments for these types of data: • funding rates • liquidations • long short ratio • ohlcv (open-high-low-close-volume) • open interest • order book snapshot • order book event • ticker • trade ```rust let response = client.futures_exchanges_pairs(GetMarketFuturesExchangesInformationRequest { exchange: None, include_dates: None, include_inactive: None, instrument: None, size: None, time_format: None, }); ``` # futures_exchanges_reference Retrieves reference information for each of the instruments. ```rust let response = client.futures_exchanges_reference(GetMarketFuturesExchangesReferenceRequest { end_date: None, exchange: None, include_inactive: None, include_original_reference: None, instrument: None, size: None, start_date: None, }); ``` # batch_historical_ent Retrieves the historical time series funding rates for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ent(GetMarketFuturesFundingRatesExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ent Retrieves the latest funding rates for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ent(GetMarketFuturesFundingRatesExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, }); ``` # futures_funding_rates_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_funding_rates_information(GetMarketFuturesFundingRatesInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_funding_rates_historical Retrieves the historical time series funding rates for the specified instrument and exchange(s). ```rust let response = client.futures_funding_rates_historical(GetMarketFuturesFundingRatesInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # futures_funding_rates_latest Retrieves the latest funding rates for the specified instrument. ```rust let response = client.futures_funding_rates_latest(GetMarketFuturesFundingRatesInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # futures_insurance_fund_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_insurance_fund_information(GetMarketFuturesInsuranceFundInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_insurance_fund_historical Retrieves the historical insurance fund for the specified instrument and exchange(s). ```rust let response = client.futures_insurance_fund_historical(GetMarketFuturesInsuranceFundInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # futures_insurance_fund_latest Retrieves the latest Insurance Fund for the specified instrument and exchange(s). ```rust let response = client.futures_insurance_fund_latest(GetMarketFuturesInsuranceFundInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # futures_liquidations_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_liquidations_information(GetMarketFuturesLiquidationsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_liquidations_historical Retrieves the historical time series liquidations for the specified instrument and exchange(s). ```rust let response = client.futures_liquidations_historical(GetMarketFuturesLiquidationsInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # futures_liquidations_latest Retrieves the latest liquidations for the specified instrument and exchange(s). ```rust let response = client.futures_liquidations_latest(GetMarketFuturesLiquidationsInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # futures_long_short_ratio_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_long_short_ratio_information(GetMarketFuturesLongShortRatioInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_long_short_ratio_historical Retrieves the historical time series Long/Short Ratio data for the specified instrument and exchange(s). ```rust let response = client.futures_long_short_ratio_historical(GetMarketFuturesLongShortRatioInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_frame: None, time_interval: None, }); ``` # futures_long_short_ratio_latest Retrieves the latest Long/Short Ratio data for the specified instrument. ```rust let response = client.futures_long_short_ratio_latest(GetMarketFuturesLongShortRatioInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, time_frame: None, }); ``` # ohlcv_ond Retrieves the historical time series OHLCV data for the specified exchange and instrument(s). ```rust let response = client.ohlcv_ond(GetMarketFuturesOhlcvExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ond Retrieves the latest Open High Low Close Volume data for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ond(GetMarketFuturesOhlcvExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, time_interval: None, }); ``` # futures_ohlcv_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_ohlcv_information(GetMarketFuturesOhlcvInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_ohlcv_historical Retrieves the historical time series OHLCV data for the specified instrument and exchange(s). ```rust let response = client.futures_ohlcv_historical(GetMarketFuturesOhlcvInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # futures_ohlcv_latest Retrieves the latest Open High Low Close Volume data for the specified instrument. ```rust let response = client.futures_ohlcv_latest(GetMarketFuturesOhlcvInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, time_interval: None, }); ``` # batch_historical_ent_1 Retrieves the historical time series open interest for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ent_1(GetMarketFuturesOpenInterestExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ent_2 Retrieves the latest open interest for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ent_2(GetMarketFuturesOpenInterestExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, }); ``` # futures_open_interest_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_open_interest_information(GetMarketFuturesOpenInterestInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_open_interest_historical Retrieves the historical time series open interest for the specified instrument and exchange(s). ```rust let response = client.futures_open_interest_historical(GetMarketFuturesOpenInterestInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # futures_open_interest_latest Retrieves the latest open interest for the specified instrument. ```rust let response = client.futures_open_interest_latest(GetMarketFuturesOpenInterestInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # futures_order_book_events_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_order_book_events_information(GetMarketFuturesOrderBookEventsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_order_book_events_historical Retrieves the historical time series order book events (bid and ask) for the specified instrument and exchange(s). Note: This endpoint returns a maximum of 1 hour of historical data per request. The parameters startDate and endDate can be used to specify any arbitrary time range. ```rust let response = client.futures_order_book_events_historical(GetMarketFuturesOrderBookEventsInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # futures_order_book_snapshots_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_order_book_snapshots_information(GetMarketFuturesOrderBookSnapshotsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_order_book_snapshots_historical Retrieves the historical time series order book snapshots (bid and ask) for the specified instrument and exchange(s). Note: This endpoint returns a maximum of 10 minutes of historical data per request. The parameters startDate and endDate can be used to specify any arbitrary time range. ```rust let response = client.futures_order_book_snapshots_historical(GetMarketFuturesOrderBookSnapshotsInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, timestamp: None, }); ``` # futures_tickers_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_tickers_information(GetMarketFuturesTickersInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_tickers_historical Retrieves the historical time series tickers for the specified instrument and exchange(s). ```rust let response = client.futures_tickers_historical(GetMarketFuturesTickersInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # futures_tickers_latest Retrieves the latest tickers for the specified instrument and exchange(s). ```rust let response = client.futures_tickers_latest(GetMarketFuturesTickersInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # futures_trades_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.futures_trades_information(GetMarketFuturesTradesInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # futures_trades_historical Retrieves the historical (time series) trade data for the specified instrument. Note: This endpoint returns a max of 1 hour historical data per request. In order to get more than 1 hour you must use the startDate & endDate parameters to move the time frame window to get the next n hours/days/months of data. ```rust let response = client.futures_trades_historical(GetMarketFuturesTradesInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # market_metrics_exchanges_volumes_historical Retrieves the total volume traded by the exchanges in USD. ```rust let response = client.market_metrics_exchanges_volumes_historical(GetMarketMetricsExchangesVolumesHistoricalRequest { direction: None, end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # market_metrics_exchanges_volumes_latest Retrieves the total volume traded by the exchanges in USD over a rolling 24h period, updated hourly. The timestamp returned represents the beginning of the daily bar, following the same approach as OHLCV. ```rust let response = client.market_metrics_exchanges_volumes_latest(GetMarketMetricsExchangesVolumesLatestRequest { direction: None, exchange: None, time_format: None, }); ``` # market_metrics_exchanges_assets_volumes_historical Retrieves the daily volume of assets on each exchange. ***Note**: This endpoint excludes data from LMAX. ```rust let response = client.market_metrics_exchanges_assets_volumes_historical(GetMarketMetricsExchangesExchangeAssetsVolumesHistoricalRequest { exchange: "string".to_string(), asset: None, direction: None, end_date: None, quote_volume: None, start_date: None, time_format: None, }); ``` # market_metrics_exchanges_assets_volumes_latest Retrieves the daily volume of assets on each exchange over a rolling 24h period, updated hourly. The timestamp returned represents the beginning of the daily bar, following the same approach as OHLCV. **Note**: This endpoint excludes data from LMAX. ```rust let response = client.market_metrics_exchanges_assets_volumes_latest(GetMarketMetricsExchangesExchangeAssetsVolumesLatestRequest { exchange: "string".to_string(), asset: None, curated_assets: None, direction: None, quote_volume: None, time_format: None, }); ``` # market_metrics_exchanges_pairs_volumes_historical Retrieves the daily volume of pairs on each exchange. ```rust let response = client.market_metrics_exchanges_pairs_volumes_historical(GetMarketMetricsExchangesExchangePairsVolumesHistoricalRequest { exchange: "string".to_string(), direction: None, end_date: None, pair: None, start_date: None, time_format: None, }); ``` # market_metrics_exchanges_pairs_volumes_latest Retrieves the daily volume of pairs on each exchange over a rolling 24h period, updated hourly. The timestamp returned represents the beginning of the daily bar, following the same approach as OHLCV. ```rust let response = client.market_metrics_exchanges_pairs_volumes_latest(GetMarketMetricsExchangesExchangePairsVolumesLatestRequest { exchange: "string".to_string(), direction: None, pair: None, time_format: None, }); ``` # implied_yield_latest Retrieves the implied yield of all available non-perpetual contracts for an asset on an exchange. ***Note**: Implied yield is only calculated for instruments which have not expired yet. ```rust let response = client.implied_yield_latest(GetMarketMetricsAssetImpliedYieldLatestRequest { asset: "string".to_string(), futures_exchange: "string".to_string(), spot_exchange: "string".to_string(), time_format: None, }); ``` # market_metrics_asset_supply_historical Retrieves historical supply data for blockchains and tokens from October 2019 forward. ***Note**: We get supply values directly from our data/nodes. Blockchains included in our supply data are: Ethereum, Bitcoin and Litecoin. ```rust let response = client.market_metrics_asset_supply_historical(GetMarketMetricsAssetSupplyHistoricalRequest { asset: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # market_metrics_asset_supply_latest Retrieves latest supply data for blockchains and tokens.***Note**: We get supply values directly from our data/nodes. Blockchains included in our supply data are: Ethereum, Bitcoin and Litecoin. ```rust let response = client.market_metrics_asset_supply_latest(GetMarketMetricsAssetSupplyLatestRequest { asset: "string".to_string(), }); ``` # implied_yield_historical Retrieves the historical basis APR for an instrument on an exchange. ***Note**: Implied yield is only calculated for instruments which have not expired yet. ```rust let response = client.implied_yield_historical(GetMarketMetricsInstrumentImpliedYieldHistoricalRequest { instrument: "string".to_string(), futures_exchange: "string".to_string(), spot_exchange: "string".to_string(), time_format: None, }); ``` # market_asset_metrics_historical_nvt_pro Get the NVT metric for a specific asset symbol over a period of time. ```rust let response = client.market_asset_metrics_historical_nvt_pro(GetMarketMetricsSymbolHistoricalNvtRequest { symbol: "string".to_string(), end_date: None, start_date: None, time_frame: None, }); ``` # market_asset_metrics_historical_sharpe_pro Get the Sharpe metric for a specific asset symbol over a period of time. ```rust let response = client.market_asset_metrics_historical_sharpe_pro(GetMarketMetricsSymbolHistoricalSharpeRequest { symbol: "string".to_string(), end_date: None, start_date: None, time_frame: None, }); ``` # market_asset_metrics_historical_stock_to_flow_pro Get the Stock to Flow metric for a specific asset symbol over a period of time. ```rust let response = client.market_asset_metrics_historical_stock_to_flow_pro(GetMarketMetricsSymbolHistoricalStockToFlowRequest { symbol: "string".to_string(), end_date: None, start_date: None, time_frame: None, }); ``` # market_asset_metrics_latest Get advanced metrics like NVT, Sharpe and Stock to Flow for a specific asset symbol. ```rust let response = client.market_asset_metrics_latest(GetMarketMetricsSymbolLatestRequest { symbol: "string".to_string(), }); ``` # options_exchanges_pairs Retrieves information about supported exchange & instruments for these types of data: • liquidations • ohlcv (open-high-low-close-volume) • open interest • order book snapshot • order book event • ticker • trade ```rust let response = client.options_exchanges_pairs(GetMarketOptionsExchangesInformationRequest { exchange: None, include_dates: None, include_inactive: None, instrument: None, size: None, time_format: None, }); ``` # options_exchanges_reference Retrieves reference information for each of the pairs. ```rust let response = client.options_exchanges_reference(GetMarketOptionsExchangesReferenceRequest { end_date: None, exchange: None, include_inactive: None, include_original_reference: None, instrument: None, size: None, start_date: None, }); ``` # options_liquidations_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_liquidations_information(GetMarketOptionsLiquidationsInformationRequest { exchange: None, include_dates: None, include_inactive: None, show_only_traded_instruments: None, time_format: None, }); ``` # options_liquidations_historical Retrieves the historical time series liquidations for the specified instrument and exchange(s). ```rust let response = client.options_liquidations_historical(GetMarketOptionsLiquidationsInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # options_liquidations_latest Retrieves the latest liquidations for the specified instrument and exchange(s). ```rust let response = client.options_liquidations_latest(GetMarketOptionsLiquidationsInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # batch_historical_ond_1 Retrieves the historical time series OHLCV data for the specified exchange and instrument(s). **Note:** Block trades are included in the calculation of OHCLV for Deribit. ```rust let response = client.batch_historical_ond_1(GetMarketOptionsOhlcvExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ond_1 Retrieves the latest Open High Low Close Volume data for the specified exchange. Instruments with no activity in the past 24 hours are ignored. **Note:** Block trades are included in the calculation of OHCLV for Deribit. ```rust let response = client.latest_by_exchange_ond_1(GetMarketOptionsOhlcvExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, time_interval: None, }); ``` # options_ohlcv_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_ohlcv_information(GetMarketOptionsOhlcvInformationRequest { exchange: None, include_inactive: None, show_only_traded_instruments: None, time_format: None, time_interval: None, }); ``` # options_ohlcv_historical Retrieves the historical time series OHLCV data for the specified instrument and exchange(s). **Note:** Block trades are included in the calculation of OHCLV for Deribit. ```rust let response = client.options_ohlcv_historical(GetMarketOptionsOhlcvInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # options_ohlcv_latest Retrieves the latest Open High Low Close Volume data for the specified instrument. **Note:** Block trades are included in the calculation of OHCLV for Deribit. ```rust let response = client.options_ohlcv_latest(GetMarketOptionsOhlcvInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, time_interval: None, }); ``` # batch_historical_ent_2 Retrieves the historical time series open interest for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ent_2(GetMarketOptionsOpenInterestExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ent_3 Retrieves the latest open interest for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ent_3(GetMarketOptionsOpenInterestExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, }); ``` # options_open_interest_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_open_interest_information(GetMarketOptionsOpenInterestInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # options_open_interest_historical Retrieves the historical time series open interest for the specified instrument and exchange(s). ```rust let response = client.options_open_interest_historical(GetMarketOptionsOpenInterestInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # options_open_interest_latest Retrieves the latest open interest for the specified instrument. ```rust let response = client.options_open_interest_latest(GetMarketOptionsOpenInterestInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # options_order_book_events_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_order_book_events_information(GetMarketOptionsOrderBookEventsInformationRequest { exchange: None, include_dates: None, include_inactive: None, time_format: None, }); ``` # options_order_book_events_historical Retrieves the historical time series order book events (bid and ask) for the specified instrument and exchange(s). ```rust let response = client.options_order_book_events_historical(GetMarketOptionsOrderBookEventsInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # options_order_book_snapshots_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_order_book_snapshots_information(GetMarketOptionsOrderBookSnapshotsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # options_order_book_snapshots_historical Retrieves the historical time series order book snapshots (bid and ask) for the specified instrument and exchange(s). ```rust let response = client.options_order_book_snapshots_historical(GetMarketOptionsOrderBookSnapshotsInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, timestamp: None, }); ``` # options_tickers_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_tickers_information(GetMarketOptionsTickersInformationRequest { exchange: None, include_dates: None, include_inactive: None, time_format: None, }); ``` # options_tickers_historical Retrieves the historical time series tickers for the specified instrument and exchange(s). ```rust let response = client.options_tickers_historical(GetMarketOptionsTickersInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # options_tickers_latest Retrieves the latest tickers for the specified instrument and exchange(s). ```rust let response = client.options_tickers_latest(GetMarketOptionsTickersInstrumentLatestRequest { instrument: "string".to_string(), exchange: "string".to_string(), time_format: None, }); ``` # options_trades_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.options_trades_information(GetMarketOptionsTradesInformationRequest { exchange: None, include_dates: None, include_inactive: None, show_only_traded_instruments: None, time_format: None, }); ``` # options_trades_historical Retrieves the historical (time series) trade data for the specified instrument. ```rust let response = client.options_trades_historical(GetMarketOptionsTradesInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # get_market_pairs Retrieves information about supported exchange-pairs for these types of data: • ohlcv (open-high-low-close-volume) • order book snapshot • order book event • ticker • trade ```rust let response = client.get_market_pairs(GetMarketPairsRequest { exchange: None, include_dates: None, pair: None, time_format: None, }); ``` # market_rankings_historical Retrieves the top ranked assets, tokens and native coins, by a specific metric. ```rust let response = client.market_rankings_historical(GetMarketRankingsHistoricalRequest { date: "string".to_string(), page: None, size: None, }); ``` # market_rankings Retrieves the top ranked assets, tokens and native coins, by a specific metric. ```rust let response = client.market_rankings(GetMarketRankingsLatestRequest { allowed_assets: None, direction: None, page: None, size: None, sort_type: None, type_query: None, }); ``` # spot_exchanges_reference Retrieves reference information for each of the pairs. ```rust let data = GetMarketSpotExchangesReferenceBody {raw_body: None}; let response = client.spot_exchanges_reference(GetMarketSpotExchangesReferenceRequest { data: data, exchange: None, include_inactive: None, include_original_reference: None, pair: None, }); ``` # batch_historical_ond Retrieves the historical (time series) open-high-low-close for the specified exchange and pairs. **Note:** The timestamp returned refers to the start of the candle. ```rust let response = client.batch_historical_ond(GetMarketSpotOhlcvExchangeExchangeHistoricalRequest { exchange: "string".to_string(), pair: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange Retrieves the latest open-high-low-close for the specified exchange. Pairs with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange(GetMarketSpotOhlcvExchangeExchangeLatestRequest { exchange: "string".to_string(), pair: None, time_format: None, time_interval: None, }); ``` # get_market_ohlc_information Retrieves information about supported exchange-pairs for ohlcv. Includes data for both centralized and decentralized exchange data. ```rust let response = client.get_market_ohlc_information(GetMarketSpotOhlcvInformationRequest { exchange: None, include_dates: None, include_inactive: None, time_format: None, time_interval: None, }); ``` # get_historical_ohlc Retrieves the historical (time series) open-high-low-close for the specified pair. **Note:** The timestamp returned refers to the start of the candle. ```rust let response = client.get_historical_ohlc(GetMarketSpotOhlcvPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # get_ohlcv_pair_latest Retrieves the latest open-high-low-close for the specified pair. ```rust let response = client.get_ohlcv_pair_latest(GetMarketSpotOhlcvPairLatestRequest { pair: "string".to_string(), exchange: None, time_format: None, time_interval: None, }); ``` # order_book_updates Retrieves order book update/events (bid and ask). The volume of this data is very large for many exchanges and pairs. ```rust let response = client.order_book_updates(GetMarketSpotOrderBookEventsPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # snapshots_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.snapshots_information(GetMarketSpotOrderBookSnapshotsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # get_market_orders Retrieves the order book data for the specified pair. ```rust let response = client.get_market_orders(GetMarketSpotOrderBookSnapshotsPairHistoricalRequest { pair: "string".to_string(), exchange: "string".to_string(), end_date: None, max_level: None, start_date: None, time_format: None, timestamp: None, }); ``` # spot_prices_assets_information Retrieves the list of all the available supported assets and time range availability. ```rust let response = client.spot_prices_assets_information(GetMarketSpotPricesAssetsInformationRequest { asset: None, include_inactive: None, page: None, time_format: None, }); ``` # spot_prices_assets_historical Retrieves the historical price for the specified asset - the price is calculated across all exchanges which supports this asset, including all cross rates pairs. Price of an asset is calculated as the VWAP (Volume Weighted Average Price) across all exchanges supporting this asset, with a 1 bar lookback period. ```rust let response = client.spot_prices_assets_historical(GetMarketSpotPricesAssetsAssetHistoricalRequest { asset: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_prices_assets_latest Retrieves the latest price for the specified asset - the global price is calculated across all exchanges which supports this asset, including all cross rates pairs. Price of an asset is calculated as the VWAP (Volume Weighted Average Price) across all exchanges supporting this asset, with a 1 bar lookback period. ```rust let response = client.spot_prices_assets_latest(GetMarketSpotPricesAssetsAssetLatestRequest { asset: "string".to_string(), time_format: None, }); ``` # spot_prices_pairs_information Retrieves the list of all the available supported pairs and time range availability. ```rust let response = client.spot_prices_pairs_information(GetMarketSpotPricesPairsInformationRequest { include_inactive: None, pair: None, time_format: None, }); ``` # spot_prices_pairs_historical Retrieves the historical price for the specified pair - the price is calculated across all exchanges which supports this pair, including all cross rates pairs. Price of a pair is calculated as the VWAP (Volume Weighted Average Price) across all exchanges supporting this pair, with a 1 bar lookback period. If the parameter exchange is specified, the data returned is the VWAP for that pair on that exchange. ```rust let response = client.spot_prices_pairs_historical(GetMarketSpotPricesPairsPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, include_cross_rates: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_prices_pairs_latest Retrieves the latest price for the specified pair - the price is calculated across all exchanges which supports this pair. Price of a pair is calculated as the VWAP (Volume Weighted Average Price) across all exchanges supporting this pair, with a 1 bar lookback period. If the parameter exchange is specified, the data returned is the price for that pair on that exchange. ```rust let response = client.spot_prices_pairs_latest(GetMarketSpotPricesPairsPairLatestRequest { pair: "string".to_string(), exchange: None, include_cross_rates: None, time_format: None, }); ``` # spot_reference_quotes_historical Retrieves the historical reference quotes for the specified pair. The default granularity is up to 1 second intervals (depending on the [exchange](https://docs.amberdata.io/docs/reference-quote#availability)). ```rust let response = client.spot_reference_quotes_historical(GetMarketSpotReferenceQuotesPairHistoricalRequest { pair: "string".to_string(), end_date: "1970-01-01T00:00:00".to_string(), start_date: "1970-01-01T00:00:00".to_string(), include_sources: None, sources: None, time_format: None, }); ``` # get_all_market_tickers Retrieves the list of all available market tickers. ```rust let response = client.get_all_market_tickers(GetMarketSpotTickersInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # get_market_ticker_pair_historical Retrieves the historical ticker, bid/ask/mid/last, for the specified pair. ```rust let response = client.get_market_ticker_pair_historical(GetMarketSpotTickersPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # get_latest_market_ticker Retrieves the latest market ticker Bid/Ask/Mid/Last for the specified pair. ```rust let response = client.get_latest_market_ticker(GetMarketSpotTickersPairLatestRequest { pair: "string".to_string(), exchange: None, time_format: None, }); ``` # trades Retrieves the list of all available market trade data sets. ```rust let response = client.trades(GetMarketSpotTradesInformationRequest { exchange: None, include_dates: None, include_inactive: None, time_format: None, }); ``` # market_trades Retrieves the historical (time series) trade data for the specified pair. ```rust let response = client.market_trades(GetMarketSpotTradesPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # spot_twap_assets_information Retrieves the list of all the available supported assets and time range availability. ```rust let response = client.spot_twap_assets_information(GetMarketSpotTwapAssetsInformationRequest { asset: None, time_format: None, }); ``` # spot_twap_assets_historical Retrieves the historical TWAP for the specified asset - this is the global TWAP across all exchanges which supports this asset, including all cross rates pairs. Price is calculated as a time weighted moving average across all exchanges. ```rust let response = client.spot_twap_assets_historical(GetMarketSpotTwapAssetsAssetHistoricalRequest { asset: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_twap_assets_latest Retrieves the latest TWAP for the specified asset - this is the global TWAP across all exchanges which supports this asset, including all cross rates pairs, based on minutely data. TWAP is calculated as a time weighted moving average across all exchanges. ```rust let response = client.spot_twap_assets_latest(GetMarketSpotTwapAssetsAssetLatestRequest { asset: "string".to_string(), lookback_period: None, time_format: None, }); ``` # spot_twap_pairs_information Retrieves the list of all the available supported pairs and time range availability. ```rust let response = client.spot_twap_pairs_information(GetMarketSpotTwapPairsInformationRequest { pair: None, time_format: None, }); ``` # spot_twap_pairs_historical Retrieves the historical TWAP for the specified pair - this is the global TWAP across all exchanges which supports this pair, including all cross rates pairs. Price is calculated as a time weighted moving average across all exchanges. If the parameter `exchange` is specified, the data returned is the TWAP for that pair on that exchange. ```rust let response = client.spot_twap_pairs_historical(GetMarketSpotTwapPairsPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, include_cross_rates: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_twap_pairs_latest Retrieves the latest TWAP for the specified pair - this is the global TWAP across all exchanges which supports this pair, based on minutely data. Price is calculated as a time weighted moving average across all exchanges. If the parameter `exchange` is specified, the data returned is the TWAP for that pair on that exchange. ```rust let response = client.spot_twap_pairs_latest(GetMarketSpotTwapPairsPairLatestRequest { pair: "string".to_string(), exchange: None, include_cross_rates: None, lookback_period: None, time_format: None, }); ``` # spot_vwap_assets_information Retrieves the list of all the available supported assets and time range availability. ```rust let response = client.spot_vwap_assets_information(GetMarketSpotVwapAssetsInformationRequest { asset: None, time_format: None, }); ``` # spot_vwap_assets_historical Retrieves the historical VWAP for the specified asset - this is the global VWAP across all exchanges which supports this asset, including all cross rates pairs. Price is calculated as a volume weighted moving average across all exchanges. ```rust let response = client.spot_vwap_assets_historical(GetMarketSpotVwapAssetsAssetHistoricalRequest { asset: "string".to_string(), end_date: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_vwap_assets_latest Retrieves the latest VWAP for the specified asset - this is the global VWAP across all exchanges which supports this asset, including all cross rates pairs, based on minutely data. VWAP is calculated as a volume weighted moving average across all exchanges. ```rust let response = client.spot_vwap_assets_latest(GetMarketSpotVwapAssetsAssetLatestRequest { asset: "string".to_string(), lookback_period: None, time_format: None, }); ``` # spot_vwap_pairs_information Retrieves the list of all the available supported pairs and time range availability. ```rust let response = client.spot_vwap_pairs_information(GetMarketSpotVwapPairsInformationRequest { pair: None, time_format: None, }); ``` # spot_vwap_pairs_historical Retrieves the historical VWAP for the specified pair - this is the global VWAP across all exchanges which supports this pair, including all cross rates pairs. Price is calculated as a volume weighted moving average across all exchanges. If the parameter `exchange` is specified, the data returned is the VWAP for that pair on that exchange. ```rust let response = client.spot_vwap_pairs_historical(GetMarketSpotVwapPairsPairHistoricalRequest { pair: "string".to_string(), end_date: None, exchange: None, include_cross_rates: None, lookback_period: None, start_date: None, time_format: None, time_interval: None, }); ``` # spot_vwap_pairs_latest Retrieves the latest VWAP for the specified pair - this is the global VWAP across all exchanges which supports this pair, based on minutely data. Price is calculated as a volume weighted moving average across all exchanges. If the parameter `exchange` is specified, the data returned is the VWAP for that pair on that exchange. ```rust let response = client.spot_vwap_pairs_latest(GetMarketSpotVwapPairsPairLatestRequest { pair: "string".to_string(), exchange: None, include_cross_rates: None, lookback_period: None, time_format: None, }); ``` # swaps_exchanges_pairs Retrieves information about supported exchange & pairs for these types of data: • funding rates • liquidations • ohlcv (open-high-low-close-volume) • open interest • order book snapshot • order book event • ticker • trade ```rust let response = client.swaps_exchanges_pairs(GetMarketSwapsExchangesInformationRequest { exchange: None, include_dates: None, include_inactive: None, instrument: None, size: None, time_format: None, }); ``` # swaps_exchanges_reference Retrieves reference information for each of the pairs. ```rust let response = client.swaps_exchanges_reference(GetMarketSwapsExchangesReferenceRequest { end_date: None, exchange: None, include_inactive: None, include_original_reference: None, instrument: None, size: None, start_date: None, }); ``` # batch_historical_ent_3 Retrieves the historical time series funding rates for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ent_3(GetMarketSwapsFundingRatesExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # latest_by_exchange_ent_1 Retrieves the latest funding rates for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ent_1(GetMarketSwapsFundingRatesExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, }); ``` # swaps_funding_rates_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_funding_rates_information(GetMarketSwapsFundingRatesInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_funding_rates_historical Retrieves the historical time series funding rates for the specified instrument and exchange(s). ```rust let response = client.swaps_funding_rates_historical(GetMarketSwapsFundingRatesInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # swaps_funding_rates_latest Retrieves the latest funding rates for the specified instrument. ```rust let response = client.swaps_funding_rates_latest(GetMarketSwapsFundingRatesInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # swaps_insurance_fund_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_insurance_fund_information(GetMarketSwapsInsuranceFundInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_insurance_fund_historical Retrieves the historical insurance fund for the specified instrument and exchange(s). ```rust let response = client.swaps_insurance_fund_historical(GetMarketSwapsInsuranceFundInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # swaps_insurance_fund_latest Retrieves the latest Insurance Fund for the specified instrument and exchange(s). ```rust let response = client.swaps_insurance_fund_latest(GetMarketSwapsInsuranceFundInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # swaps_liquidations_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_liquidations_information(GetMarketSwapsLiquidationsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_liquidations_historical Retrieves the historical time series liquidations for the specified instrument and exchange(s). ```rust let response = client.swaps_liquidations_historical(GetMarketSwapsLiquidationsInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # swaps_liquidations_latest Retrieves the latest liquidations for the specified instrument and exchange(s). ```rust let response = client.swaps_liquidations_latest(GetMarketSwapsLiquidationsInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # batch_historical_ond_2 Retrieves the historical time series OHLCV data for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ond_2(GetMarketSwapsOhlcvExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_ond Retrieves the latest Open High Low Close Volume data for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_ond(GetMarketSwapsOhlcvExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, time_interval: None, }); ``` # swaps_ohlcv_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_ohlcv_information(GetMarketSwapsOhlcvInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_ohlcv_historical Retrieves the historical time series OHLCV data for the specified instrument and exchange(s). ```rust let response = client.swaps_ohlcv_historical(GetMarketSwapsOhlcvInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # swaps_ohlcv_latest Retrieves the latest Open High Low Close Volume data for the specified instrument. ```rust let response = client.swaps_ohlcv_latest(GetMarketSwapsOhlcvInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, time_interval: None, }); ``` # batch_historical_ent_4 Retrieves the historical time series open interest for the specified exchange and instrument(s). ```rust let response = client.batch_historical_ent_4(GetMarketSwapsOpenInterestExchangeExchangeHistoricalRequest { exchange: "string".to_string(), instrument: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # latest_by_exchange_ent_4 Retrieves the latest open interest for the specified exchange. Instruments with no activity in the past 24 hours are ignored. ```rust let response = client.latest_by_exchange_ent_4(GetMarketSwapsOpenInterestExchangeExchangeLatestRequest { exchange: "string".to_string(), instrument: None, time_format: None, }); ``` # swaps_open_interest_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_open_interest_information(GetMarketSwapsOpenInterestInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_open_interest_historical Retrieves the historical time series open interest for the specified instrument and exchange(s). ```rust let response = client.swaps_open_interest_historical(GetMarketSwapsOpenInterestInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, time_interval: None, }); ``` # swaps_open_interest_latest Retrieves the latest open interest for the specified instrument. ```rust let response = client.swaps_open_interest_latest(GetMarketSwapsOpenInterestInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # swaps_order_book_events_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_order_book_events_information(GetMarketSwapsOrderBookEventsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_order_book_events_historical Retrieves the historical time series order book events (bid and ask) for the specified instrument and exchange(s). Note: This endpoint returns a maximum of 1 hour of historical data per request. The parameters startDate and endDate can be used to specify any arbitrary time range. ```rust let response = client.swaps_order_book_events_historical(GetMarketSwapsOrderBookEventsInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # swaps_order_book_snapshots_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_order_book_snapshots_information(GetMarketSwapsOrderBookSnapshotsInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_order_book_snapshots_historical Retrieves the historical time series order book snapshots (bid and ask) for the specified instrument and exchange(s). Note: This endpoint returns a maximum of 10 minutes of historical data per request. The parameters startDate and endDate can be used to specify any arbitrary time range. ```rust let response = client.swaps_order_book_snapshots_historical(GetMarketSwapsOrderBookSnapshotsInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, timestamp: None, }); ``` # swaps_tickers_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_tickers_information(GetMarketSwapsTickersInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_tickers_historical Retrieves the historical time series tickers for the specified instrument and exchange(s). ```rust let response = client.swaps_tickers_historical(GetMarketSwapsTickersInstrumentHistoricalRequest { instrument: "string".to_string(), end_date: None, exchange: None, start_date: None, time_format: None, }); ``` # swaps_tickers_latest Retrieves the latest liquidations for the specified instrument and exchange(s). ```rust let response = client.swaps_tickers_latest(GetMarketSwapsTickersInstrumentLatestRequest { instrument: "string".to_string(), exchange: None, time_format: None, }); ``` # swaps_trades_information Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_trades_information(GetMarketSwapsTradesInformationRequest { exchange: None, include_inactive: None, time_format: None, }); ``` # swaps_trades_historical Retrieves the list of all the available exchanges, supported instruments and time range availability. ```rust let response = client.swaps_trades_historical(GetMarketSwapsTradesInstrumentHistoricalRequest { instrument: "string".to_string(), exchange: "string".to_string(), end_date: None, start_date: None, time_format: None, }); ``` # get_historical_token_price Retrieves the historical prices (and other market information) for the specified token from October 2019 forward. Note: This endpoint returns a max of 6 months of historical data. In order to get more than 6 months you must use the `startDate` & `endDate` parameters to move the time frame window to get the next ***n*** days/months of data. ```rust let response = client.get_historical_token_price(GetMarketTokensPricesSymbolHistoricalRequest { symbol: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # get_current_token_price Retrieves the latest price (and other market information) for the specified token. Tokens with no activity in the past 24 hours are ignored. ```rust let response = client.get_current_token_price(GetMarketTokensPricesSymbolLatestRequest { symbol: "string".to_string(), time_format: None, }); ``` # get_4_byte_signature Retrieves detailed information about the specified signature hash. ```rust let response = client.get_4_byte_signature(GetSignaturesHashRequest { hash: "string".to_string(), }); ``` # token_metrics_historical Retrieves the historical metrics for the specified ERC token symbol. ```rust let response = client.token_metrics_historical(GetTokensMetricsSymbolHistoricalRequest { symbol: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # token_metrics_latest Retrieves the latest metrics for the specified ERC token symbol. ```rust let response = client.token_metrics_latest(GetTokensMetricsSymbolLatestRequest { symbol: "string".to_string(), time_frame: None, }); ``` # get_token_rankings Retrieves the top ranked Ethereum tokens by a specific metric. ```rust let response = client.get_token_rankings(GetTokensRankingsRequest { direction: None, page: None, size: None, sort_type: None, time_interval: None, type_query: None, }); ``` # token_rankings_historical Retrieves the top ranked Ethereum tokens by a specific metric, with a lookback window. Useful for viewing token trends. ```rust let response = client.token_rankings_historical(GetTokensRankingsHistoricalRequest { direction: None, end_date: None, sort_type: None, start_date: None, top_n: None, }); ``` # get_historical_token_holders Retrieves the historical (time series) token holders for the specified token address. ```rust let response = client.get_historical_token_holders(GetTokensHashHoldersHistoricalRequest { hash: "string".to_string(), holder_addresses: "string".to_string(), currency: None, include_price: None, time_format: None, time_frame: None, }); ``` # get_token_holders Retrieves the token holders for the specified address. ```rust let response = client.get_token_holders(GetTokensHashHoldersLatestRequest { hash: "string".to_string(), currency: None, include_price: None, num_tokens: None, num_tokens_gt: None, num_tokens_gte: None, num_tokens_lt: None, num_tokens_lte: None, page: None, size: None, time_format: None, timestamp_gt: None, timestamp_gte: None, timestamp_lt: None, timestamp_lte: None, token_address: None, }); ``` # get_historical_token_supply Retrieves the historical token supplies (and derivatives) for the specified address. Note: This endpoint returns a max of 6 months of historical data. In order to get more than 6 months you must use the `startDate` & `endDate` parameters to move the time frame window to get the next ***n*** days/months of data. ```rust let response = client.get_historical_token_supply(GetTokensHashSuppliesHistoricalRequest { hash: "string".to_string(), end_date: None, start_date: None, time_format: None, time_interval: None, }); ``` # get_token_supply_latest Retrieves the latest token supplies (and derivatives) for the specified address. ```rust let response = client.get_token_supply_latest(GetTokensHashSuppliesLatestRequest { hash: "string".to_string(), }); ``` # get_token_transfers Retrieves all token transfers involving the specified token address. ```rust let response = client.get_token_transfers(GetTokensHashTransfersRequest { hash: "string".to_string(), amount: None, amount_gt: None, amount_gte: None, amount_lt: None, amount_lte: None, block_number: None, currency: None, decode_transactions: None, direction: None, end_date: None, include_price: None, page: None, size: None, start_date: None, time_format: None, token_address: None, transaction_hash: None, validation_method: None, }); ``` # get_token_velocity Retrieves the historical velocity for the specified address. ```rust let response = client.get_token_velocity(GetTokensHashVelocityRequest { hash: "string".to_string(), time_format: None, time_frame: None, }); ``` # get_token_volume Retrieves the historical number of transfers for the specified address. ```rust let response = client.get_token_volume(GetTokensHashVolumeRequest { hash: "string".to_string(), time_format: None, time_frame: None, }); ``` # get_all_transactions Retrieves all transactions matching the specified filters. ```rust let response = client.get_all_transactions(GetTransactionsRequest { currency: None, decode_transactions: None, end_date: None, include_functions: None, include_logs: None, include_price: None, include_token_transfers: None, size: None, start_date: None, status: None, validation_method: None, }); ``` # mempool_all Retrieves the mempool for a specific blockchain matching the specified filters. Default results are for Ethereum, however, please make sure your "x-amberdata-blockchain-id" header matches the blockchain you want to retrieve data for. *Note: Mempool data is available for Ethereum, Bitcoin or Litecoin. ```rust let response = client.mempool_all(GetTransactions2Request { currency: None, end_date: None, include_functions: None, include_logs: None, include_price: None, include_token_transfers: None, page: None, size: None, start_date: None, status: None, validation_method: None, }); ``` # transactions_metrics_historical Get metrics for historical confirmed transactions for a given blockchain. Default metrics are for Ethereum over a 1d tick / 365d lookback period. Changing the header blockchain ID will return that blockchains metrics. ```rust let response = client.transactions_metrics_historical(GetTransactionsMetricsHistoricalRequest { end_date: None, start_date: None, time_format: None, time_frame: None, }); ``` # transactions_metrics Get metrics for recent confirmed transactions for a given blockchain. Default metrics are for Ethereum over a 24h period. Changing the header blockchain ID will return that blockchains metrics. ```rust let response = client.transactions_metrics(GetTransactionsMetricsLatestRequest { include_price: None, time_format: None, }); ``` # get_historical_transaction_volume Retrieves the historical (time series) volume of transactions. ```rust let response = client.get_historical_transaction_volume(GetTransactionsVolumeRequest { time_format: None, time_frame: None, }); ``` # get_transaction Retrieves the transaction information for the specified hash. ```rust let response = client.get_transaction(GetTransactionsHashRequest { hash: "string".to_string(), decode_transactions: None, include_functions: None, include_logs: None, include_price: None, include_token_transfers: None, validation_method: None, }); ``` # transaction_token_transfers Retrieves the token transfers that took place in the specified transaction. ```rust let response = client.transaction_token_transfers(GetTransactionsHashTokenTransfersRequest { hash: "string".to_string(), }); ``` # uncle_all Retrieves all the uncles within the specified range. ```rust let response = client.uncle_all(GetUnclesRequest { page: None, size: None, }); ``` # uncle_single Retrieves the uncle specified by its hash. ```rust let response = client.uncle_single(GetUnclesHashRequest { hash: "string".to_string(), }); ```