1 个稳定版本
1.0.0 | 2023年11月9日 |
---|
#19 in #historical
745KB
14K SLoC
amberdata_api rust
在 Amberdata.io,我们提供丰富的高质量、实时、原始和增强型区块链数据。Web3api 使您能够轻松访问这些数据。
您可以通过不同的方式访问数据
REST - 通过我们的 RESTful API 访问全面的历史数据,这些 API 设计用于无缝集成和检索大量时间序列信息。
Websockets - 连接到我们的 Websockets API,以实现即时、实时的数据流,确保动态和响应式应用程序的最小延迟。
FIX - 利用 FIX 协议的稳健性,获取可靠和安全的市场数据,促进快速和标准化的金融信息交换。
RPC - 利用我们的 RPC 接口进行直接高效的查询,直接访问区块链节点,提供精确的无限制访问去中心化数据。
Amazon S3 - 通过 Amazon S3 访问和下载大量历史数据存档,这些数据按系统化方式组织,并通过每天的高效 Apache Parquet 格式通过 Amazon S3 交付。
Snowflake - 利用 Snowflake 在云原生平台上进行动态数据分析,提供高级 SQL 查询功能和无缝可伸缩性。
BigQuery - 利用 BigQuery 进行全面的数据分析,利用谷歌的先进基础设施和智能分析,提供交互式 SQL 查询。
身份验证
use amberdata_api::Client;
let client = Client::new(String::from("API_KEY")).unwrap();
get_all_addresses
检索网络上出现的每个地址。无参数时,返回区块链上所有已知地址,按首次出现的时间顺序反向排序,即最新的地址排在前面。当与特定地址一起使用时,返回有关地址及其首次在区块链上出现的时间(区块和交易哈希)的信息。
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
检索指定地址的最新账户和代币余额。如果您想在一个调用中获取整个投资组合的摘要,这非常有用。获取 ETH 及所有代币金额的总计,并使用市场价格。
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
基于 x,y,z 公共地址和路径生成派生地址。
let response = client.extended_public_key(GetAddressesExtendedAddressRequest {
address: "string".to_string(),
page: None,
path: None,
size: None,
type_query: None,
});
all_address_metrics
获取给定区块链的 24 小时滚动活跃地址计数。默认指标为以太坊。
let response = client.all_address_metrics();
get_historical_account_balances
检索指定地址的历史(时间序列)账户余额。
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
检索指定地址的当前账户余额。
let response = client.get_current_account_balance(GetAddressesHashAccountBalancesLatestRequest {
hash: "string".to_string(),
currency: None,
include_price: None,
real_time: None,
});
get_address_adoption
检索在ethereum-mainnet上指定地址的历史采用情况。
采用情况由与该合约在整个时间段内互动的唯一地址数量定义。例如:如果一个地址在六月向合约进行交易,然后在七月再次进行交易,该地址在采用总数中只会被计算一次。
let response = client.get_address_adoption(GetAddressesHashAdoptionRequest {
hash: "string".to_string(),
time_format: None,
time_frame: None,
time_period: None,
});
address_balances
检索指定地址的最新账户和代币余额。
let response = client.address_balances(GetAddressesHashBalancesRequest {
hash: "string".to_string(),
currency: None,
include_price: None,
time_format: None,
});
addresses_converter
将指定地址在比特币现金和旧格式中进行转换。
let response = client.addresses_converter(GetAddressesHashConverterRequest {
hash: "string".to_string(),
});
get_internal_messages
检索此地址是发起者或接收者的内部消息。
如果您打算遍历所有内部消息,建议指定标志 direction=ascending
,这将保证分页稳定,不会因新内部消息的到来而改变。
请注意,返回的有效负载有时可能包含比请求的大小更少的记录 - 这是由于当交易的 from 和 to 相同时可能发生的重复所导致的。为了有效地终止分页,请分页直到返回的有效负载为空,不要依赖于有效负载本身的大小。
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
检索有关指定地址的信息:该地址存在于哪些网络和区块链中。
let response = client.get_account_information(GetAddressesHashInformationRequest {
hash: "string".to_string(),
include_price: None,
});
get_address_logs
检索此地址是发起者或接收者的交易的日志。
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
检索有关指定地址的统计数据:余额、持有量等。
let response = client.get_address_metadata(GetAddressesHashMetadataRequest {
hash: "string".to_string(),
time_format: None,
});
get_token_balances
检索指定地址的历史(时间序列)代币余额。
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
检索该地址持有的代币。
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
检索涉及指定地址的所有代币转账。
如果您打算遍历所有代币转账,建议指定标志 direction=ascending
,这将保证分页稳定,不会因新代币转账的到来而改变。
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
检索此地址是发起者或接收者的交易。
请注意,默认情况下,交易按降序返回(区块号和交易索引),这意味着最新交易在页面0,最旧交易在最后一页。
如果您打算遍历所有交易,建议指定标志 direction=ascending
,这将保证分页稳定,不会因新交易的到来而改变。
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
检索指定地址的历史使用情况。使用情况由在特定时间段内与该合约互动的唯一地址数量定义。例如:如果一个地址在六月向合约进行交易,然后在七月再次进行交易,该地址在每个使用总数期间将被计算一次。
let response = client.get_address_usage(GetAddressesHashUsageRequest {
hash: "string".to_string(),
time_format: None,
time_frame: None,
time_period: None,
});
blockchains_metrics_latest
获取特定区块链的指标。
let response = client.blockchains_metrics_latest();
get_all_blocks
检索指定范围内的所有区块。
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
获取给定区块链历史确认区块的指标。默认指标是针对以太坊的1天周期/365天回溯期。更改标题区块链ID将返回该区块链的指标。
let response = client.blocks_metrics_historical(GetBlocksMetricsHistoricalRequest {
end_date: None,
start_date: None,
time_format: None,
time_interval: None,
});
blocks_metrics
获取给定区块链最近确认区块的指标。默认指标是针对以太坊的24小时周期。更改标题区块链ID将返回该区块链的指标。
let response = client.blocks_metrics(GetBlocksMetricsLatestRequest {
time_format: None,
time_interval: None,
});
get_block
通过ID(数字或哈希)检索指定的块。
let response = client.get_block(GetBlocksIdRequest {
id: "string".to_string(),
time_format: None,
validation_method: None,
});
get_block_functions
检索在指定块号或哈希处调用的所有函数。
let response = client.get_block_functions(GetBlocksIdFunctionsRequest {
id: "string".to_string(),
validation_method: None,
});
get_block_logs
检索指定块号或哈希处的所有日志。
let response = client.get_block_logs(GetBlocksIdLogsRequest {
id: "string".to_string(),
transaction_hash: None,
validation_method: None,
});
get_blocks_token_transfers
检索在指定块号处转移的所有代币。
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
检索包含在指定块ID中的所有交易。
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
检索指定合约的所有详细信息(ABI、字节码、源代码等)。
let response = client.get_contract_details(GetContractsHashRequest {
hash: "string".to_string(),
});
get_contract_functions
检索指定合约的函数(如果可用)- 如果在链上不可用,则反汇编字节码并从中提取函数列表。
let response = client.get_contract_functions(GetContractsHashFunctionsRequest {
hash: "string".to_string(),
});
uniswap_v3_liquidity_distribution
此API提供指定Uniswap v3池中当前流动性的分配。
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
此API检索在协议中特定时间段内针对特定流动性池发生的所有操作信息。
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
此API检索在特定时间段内发生的所有操作信息。
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
此API检索在特定时间段内特定钱包在协议上采取的所有操作信息。
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
此API列出所有可用贷款协议中支持的资产,并提供了聚合指标的快照。
let response = client.defi_lending_information_assets(GetDefiLendingAssetsInformationRequest {
asset: None,
blockchain: None,
end_date: None,
market: None,
protocol: None,
});
defi_lending_information_protocols
此API列出支持的DeFi贷款协议,并提供了聚合指标的快照。
let response = client.defi_lending_information_protocols(GetDefiLendingProtocolsInformationRequest {
blockchain: None,
end_date: None,
protocol: None,
});
profit_and_loss_analytics_in_defi_lending
分析钱包在多个DeFi协议中借贷资产的历史收益、净值和欠款。
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
此API提供了针对各种贷款协议的资产市场的聚合洞察。
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
此API检索在特定时间段内针对特定资产发生的所有操作信息。
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
此API检索在特定时间段内发生的所有治理操作信息。
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
此API提供了对贷款协议的聚合洞察。
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
此API检索在特定时间段内发生的所有操作信息。
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
此API检索在支持贷款协议中的给定地址的余额。
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
此API检索在特定时间段内特定钱包在协议上采取的所有操作信息。
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,
});
defi_lending_aggregate_insights_stablecoins
轻松分析稳定币在多个DeFi贷款协议中的指标。
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
检索支持的以太坊去中心化交易所(DEX)列表。
let response = client.defi_information_dex_exchanges(GetMarketDefiDexExchangesRequest {
exchange: None,
sort_by: None,
});
defi_information_dex_pairs
检索支持的DEX交易对。
let response = client.defi_information_dex_pairs(GetMarketDefiDexPairsRequest {
exchange: "string".to_string(),
asset: None,
pair: None,
size: None,
});
dex_liquidity_positions_pairs_latest
检索指定池中的最新流动性头寸。
头寸按提供者顺序排列,降序排列。
let response = client.dex_liquidity_positions_pairs_latest(GetMarketDefiLiquidityPositionsPairsPairLatestRequest {
pair: "string".to_string(),
size: None,
time_format: None,
});
dex_liquidity_positions_providers_latest
检索流动性提供者在所有池中的最新流动性头寸。
头寸按池顺序排列,降序排列。
let response = client.dex_liquidity_positions_providers_latest(GetMarketDefiLiquidityPositionsProvidersAddressLatestRequest {
address: "string".to_string(),
size: None,
time_format: None,
});
defi_liquidity_information
检索支持的流动性交换对信息。
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
聚合每个流动性提供者在池中赚取的费用和不可预见损失,以计算池级别赚取的费用和不可预见损失。这些值在UTC午夜每日计算。
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
检索自流动性提供者首次提供流动性或接收LP代币以来的回报(包括赚取的费用、不可预见损失和相关元数据)。这些值在UTC午夜每日计算。
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
检索在时间间隔内流动性提供者的回报,包括赚取的费用、不可预见损失和相关元数据。
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
对于给定的钱包(EOA),此端点返回与EOA的流动性事件(铸造、燃烧和交换)相关的所有事件。
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
检索池中代币流动性的快照(一个时间点)。
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
检索指定对的历史(时间序列)流动性。
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
检索指定池的最新流动性信息,包括代币流动性价格。
let response = client.defi_liquidity_latest(GetMarketDefiLiquidityPoolLatestRequest {
pool: "string".to_string(),
exchange: None,
time_format: None,
});
defi_metrics_assets_historical
检索指定资产(例如DAI)的历史每日指标。
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
检索指定资产(例如DAI)的最新每日指标。
let response = client.defi_metrics_assets_latest(GetMarketDefiMetricsExchangesExchangeAssetsAssetLatestRequest {
exchange: "string".to_string(),
asset: "string".to_string(),
time_format: None,
});
defi_metrics_exchanges_historical
检索指定去中心化交易所的历史每日交易所指标。
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
检索指定去中心化交易所的最新交易所每日指标。
let response = client.defi_metrics_exchanges_latest(GetMarketDefiMetricsExchangesExchangeLatestRequest {
exchange: "string".to_string(),
time_format: None,
});
defi_metrics_pairs_historical
检索指定对(例如DAI_WETH)的历史每日指标。
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
检索指定对(例如DAI_WETH)的最新分分钟指标。
let response = client.defi_metrics_pairs_latest(GetMarketDefiMetricsExchangesExchangePairsPairLatestRequest {
exchange: "string".to_string(),
pair: "string".to_string(),
time_format: None,
});
defi_ohlcv_information
检索关于支持的ohlcv交换对的详细信息。
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
检索指定对的历史(时间序列)开盘价、最高价、最低价、收盘价。包括该对在哪里交易交易所的数据。基价和报价信息使用池/对中的第一和第二资产,这是表示的价格。
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
检索指定对的最新开盘价、最高价、最低价、收盘价。包括该对在哪里交易交易所的数据。资产信息包含在有效载荷中。基价和报价信息使用池/对中的第一和第二资产,这是表示的价格。
let response = client.defi_ohlcv_latest(GetMarketDefiOhlcvPoolLatestRequest {
pool: "string".to_string(),
exchange: None,
time_format: None,
});
defi_prices_assets_information
检索所有可用的市场资产价格数据集列表。
let response = client.defi_prices_assets_information();
defi_prices_assets_historical
检索指定资产(例如DAI)在WETH中的历史分分钟价格。
注意:DeFi价格是由交易数据建立的参考汇率。
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
检索指定资产(例如DAI)在WETH中的最新分分钟价格。
注意:DeFi价格是由交易数据建立的参考汇率。
let response = client.defi_prices_assets_latest(GetMarketDefiPricesAssetAssetLatestRequest {
asset: "string".to_string(),
lookback_period: None,
time_format: None,
});
defi_prices_pairs_historical
检索指定对(例如DAI_WETH)的历史分分钟价格。
注意:DeFi价格是由交易数据建立的参考汇率。
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
检索指定对(例如DAI_WETH)的最新分分钟价格。
注意:DeFi价格是由交易数据建立的参考汇率。
let response = client.defi_prices_pairs_latest_copy(GetMarketDefiPricesPairsBasesBaseQuotesQuoteLatestRequest {
base: "string".to_string(),
quote: "string".to_string(),
time_format: None,
});
defi_prices_pairs_information
检索所有可用的市场对价格数据集列表。
注意:DeFi价格是由流动性数据建立的参考汇率。
let response = client.defi_prices_pairs_information(GetMarketDefiPricesPairsInformationRequest {
base: None,
quote: None,
size: None,
time_format: None,
});
defi_trades_information
检索所有可用的Swaps数据集列表。
let response = client.defi_trades_information(GetMarketDefiTradesInformationRequest {
exchange: None,
size: None,
time_format: None,
});
defi_trades_historical
检索指定池/对的历史(时间序列)交易数据。可以从元数据有效载荷中使用资产信息。
- 资产信息可以从元数据有效载荷中使用。
- 基价和报价信息使用池/对中的第一和第二资产,这是表示的价格。
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
检索所有可用的市场资产twap数据集列表。
let response = client.dex_twap_assets_information();
dex_twap_assets_historical
检索指定资产(例如DAI)的历史分分钟twap。
注意:DeFi价格是由交易数据建立的参考汇率。
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
检索指定资产(例如DAI)的最新分分钟twap。
注意:DeFi价格是由交易数据建立的参考汇率。
let response = client.dex_twap_assets_latest(GetMarketDefiTwapAssetAssetLatestRequest {
asset: "string".to_string(),
lookback_period: None,
time_format: None,
});
dex_twap_pairs_historical
检索指定基价、报价对的TWAP历史记录 - 这是所有支持的合约的全局TWAP。
默认结果为超过1分钟的间隔,回溯期60分钟。
TWAP是在所有合约上计算的时间加权移动平均。
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
检索指定基价、报价对的最新TWAP - 这是基于分钟数据的所有支持的合约的全局TWAP。
价格被计算为时间加权移动平均。
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
检索所有可用的DeFi对TWAP数据集列表。
let response = client.dex_twap_pairs_information(GetMarketDefiTwapPairsInformationRequest {
base: None,
quote: None,
size: None,
time_format: None,
});
dex_vwap_assets_information
获取所有可用市场资产VWAP数据集的列表。
let response = client.dex_vwap_assets_information();
dex_vwap_assets_historical
检索指定资产(例如DAI)的历史分分钟twap。
注意:DeFi价格是由交易数据建立的参考汇率。
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
获取指定资产(例如DAI)的最新分分VWAP。
注意:DeFi价格是由交易数据建立的参考汇率。
let response = client.dex_vwap_assets_latest(GetMarketDefiVwapAssetAssetLatestRequest {
asset: "string".to_string(),
lookback_period: None,
time_format: None,
});
dex_vwap_pairs_historical
获取指定基础、报价对的VWAP历史数据 - 这是所有支持的合约的全球VWAP。
默认结果为超过1分钟间隔,回溯期为60分钟。
VWAP是在所有合约中按成交量加权的移动平均。
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
获取指定基础、报价对的最新VWAP - 这是基于分钟数据的所有支持合约的全球VWAP。
价格计算为按成交量加权的移动平均。
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
获取所有可用市场对VWAP数据集的列表。
let response = client.defi_vwap_pairs_information(GetMarketDefiVwapPairsInformationRequest {
base: None,
quote: None,
size: None,
time_format: None,
});
get_market_exchanges
获取支持交易所对的信息,这些数据类型包括:• ohlcv(开盘价-最高价-最低价-收盘价-成交量)• 订单簿快照• 订单簿事件• 行情• 交易
let response = client.get_market_exchanges(GetMarketExchangesRequest {
exchange: None,
include_dates: None,
pair: None,
time_format: None,
});
futures_exchanges_pairs
获取支持交易所和工具的信息,这些数据类型包括:• 资金利率• 强平• 多空比• ohlcv(开盘价-最高价-最低价-收盘价-成交量)• 开仓兴趣• 订单簿快照• 订单簿事件• 行情• 交易
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
获取每个工具的参考信息。
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
获取指定交易所和工具的历史时间序列资金利率。
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
获取指定交易所的最新资金利率。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ent(GetMarketFuturesFundingRatesExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
});
futures_funding_rates_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_funding_rates_information(GetMarketFuturesFundingRatesInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_funding_rates_historical
获取指定工具和交易所的历史时间序列资金利率。
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
获取指定工具的最新资金利率。
let response = client.futures_funding_rates_latest(GetMarketFuturesFundingRatesInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
futures_insurance_fund_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_insurance_fund_information(GetMarketFuturesInsuranceFundInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_insurance_fund_historical
获取指定工具和交易所的历史保险基金。
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
获取指定工具和交易所的最新保险基金。
let response = client.futures_insurance_fund_latest(GetMarketFuturesInsuranceFundInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
futures_liquidations_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_liquidations_information(GetMarketFuturesLiquidationsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_liquidations_historical
获取指定工具和交易所的历史时间序列强平。
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
获取指定工具和交易所的最新强平。
let response = client.futures_liquidations_latest(GetMarketFuturesLiquidationsInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
futures_long_short_ratio_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_long_short_ratio_information(GetMarketFuturesLongShortRatioInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_long_short_ratio_historical
获取指定工具和交易所的历史时间序列多空比数据。
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
获取指定工具的最新多空比数据。
let response = client.futures_long_short_ratio_latest(GetMarketFuturesLongShortRatioInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
time_frame: None,
});
ohlcv_ond
获取指定交易所和工具的历史时间序列OHLCV数据。
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
获取指定交易所的最新开盘价-最高价-最低价-收盘价-成交量数据。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ond(GetMarketFuturesOhlcvExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
time_interval: None,
});
futures_ohlcv_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_ohlcv_information(GetMarketFuturesOhlcvInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_ohlcv_historical
获取指定工具和交易所的历史时间序列OHLCV数据。
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
获取指定工具的最新开盘价-最高价-最低价-收盘价-成交量数据。
let response = client.futures_ohlcv_latest(GetMarketFuturesOhlcvInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
time_interval: None,
});
batch_historical_ent_1
获取指定交易所和工具的历史时间序列开仓兴趣。
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
获取指定交易所的最新开仓兴趣。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ent_2(GetMarketFuturesOpenInterestExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
});
futures_open_interest_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_open_interest_information(GetMarketFuturesOpenInterestInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_open_interest_historical
获取指定工具和交易所的历史时间序列开仓兴趣。
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
获取指定工具的最新开仓兴趣。
let response = client.futures_open_interest_latest(GetMarketFuturesOpenInterestInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
futures_order_book_events_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_order_book_events_information(GetMarketFuturesOrderBookEventsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
futures_order_book_events_historical
检索指定工具和交易所的历史时间序列订单簿事件(买入和卖出)。
注意:此端点每次请求最多返回1小时的历史数据。可以使用startDate和endDate参数指定任何任意的时间范围。
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,
});
期货订单簿快照信息
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_order_book_snapshots_information(GetMarketFuturesOrderBookSnapshotsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
期货订单簿快照历史
检索指定工具和交易所的历史时间序列订单簿快照(买入和卖出)。
注意:此端点每次请求最多返回10分钟的历史数据。可以使用startDate和endDate参数指定任何任意的时间范围。
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,
});
期货指标信息
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_tickers_information(GetMarketFuturesTickersInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
期货指标历史
检索指定工具和交易所的历史时间序列指标。
let response = client.futures_tickers_historical(GetMarketFuturesTickersInstrumentHistoricalRequest {
instrument: "string".to_string(),
end_date: None,
exchange: None,
start_date: None,
time_format: None,
});
期货指标最新
检索指定工具和交易所的最新指标。
let response = client.futures_tickers_latest(GetMarketFuturesTickersInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
期货交易信息
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.futures_trades_information(GetMarketFuturesTradesInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
期货交易历史
检索指定工具的历史(时间序列)交易数据。
注意:此端点每次请求最多返回1小时的历史数据。为了获取超过1小时的数据,必须使用startDate和endDate参数来移动时间范围窗口,以获取下一个n小时/天/月的数据。
let response = client.futures_trades_historical(GetMarketFuturesTradesInstrumentHistoricalRequest {
instrument: "string".to_string(),
exchange: "string".to_string(),
end_date: None,
start_date: None,
time_format: None,
});
市场指标交易所交易量历史
检索交易所按美元计算的成交总量。
let response = client.market_metrics_exchanges_volumes_historical(GetMarketMetricsExchangesVolumesHistoricalRequest {
direction: None,
end_date: None,
exchange: None,
start_date: None,
time_format: None,
});
市场指标交易所交易量最新
检索在过去24小时滚动周期内交易所按美元计算的成交总量,每小时更新一次。返回的时间戳表示每日条形图的开头,遵循与OHLCV相同的方法。
let response = client.market_metrics_exchanges_volumes_latest(GetMarketMetricsExchangesVolumesLatestRequest {
direction: None,
exchange: None,
time_format: None,
});
市场指标交易所资产交易量历史
检索每个交易所的资产每日交易量。
*注意:此端点不包括LMAX的数据。
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,
});
市场指标交易所资产交易量最新
检索在过去24小时滚动周期内每个交易所的资产每日交易量,每小时更新一次。返回的时间戳表示每日条形图的开头,遵循与OHLCV相同的方法。注意:此端点不包括LMAX的数据。
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,
});
市场指标交易所对交易量历史
检索每个交易所的对每日交易量。
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,
});
市场指标交易所对交易量最新
检索在过去24小时滚动周期内每个交易所的对每日交易量,每小时更新一次。返回的时间戳表示每日条形图的开头,遵循与OHLCV相同的方法。
let response = client.market_metrics_exchanges_pairs_volumes_latest(GetMarketMetricsExchangesExchangePairsVolumesLatestRequest {
exchange: "string".to_string(),
direction: None,
pair: None,
time_format: None,
});
隐含收益率最新
检索交易所上资产的 所有可用非永久合约的隐含收益率。
*注意:隐含收益率仅针对尚未到期的工具进行计算。
let response = client.implied_yield_latest(GetMarketMetricsAssetImpliedYieldLatestRequest {
asset: "string".to_string(),
futures_exchange: "string".to_string(),
spot_exchange: "string".to_string(),
time_format: None,
});
市场指标资产供应历史
检索从2019年10月起的历史区块链和代币供应数据。*注意:我们直接从我们的数据/节点获取供应值。包括在我们的供应数据中的区块链是:以太坊、比特币和莱特币。
let response = client.market_metrics_asset_supply_historical(GetMarketMetricsAssetSupplyHistoricalRequest {
asset: "string".to_string(),
end_date: None,
start_date: None,
time_format: None,
});
市场指标资产供应最新
检索区块链和代币的最新供应数据。*注意:我们直接从我们的数据/节点获取供应值。包括在我们的供应数据中的区块链是:以太坊、比特币和莱特币。
let response = client.market_metrics_asset_supply_latest(GetMarketMetricsAssetSupplyLatestRequest {
asset: "string".to_string(),
});
隐含收益率历史
检索交易所上工具的历史基础APR。
*注意:隐含收益率仅针对尚未到期的工具进行计算。
let response = client.implied_yield_historical(GetMarketMetricsInstrumentImpliedYieldHistoricalRequest {
instrument: "string".to_string(),
futures_exchange: "string".to_string(),
spot_exchange: "string".to_string(),
time_format: None,
});
市场资产指标历史NVT专业版
获取特定资产符号在一段时间内的NVT指标。
let response = client.market_asset_metrics_historical_nvt_pro(GetMarketMetricsSymbolHistoricalNvtRequest {
symbol: "string".to_string(),
end_date: None,
start_date: None,
time_frame: None,
});
市场资产指标历史夏普率专业版
获取特定资产符号在一段时间内的夏普率指标。
let response = client.market_asset_metrics_historical_sharpe_pro(GetMarketMetricsSymbolHistoricalSharpeRequest {
symbol: "string".to_string(),
end_date: None,
start_date: None,
time_frame: None,
});
市场资产指标历史库存到流通率专业版
获取特定资产符号在一段时间内的库存到流通率指标。
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,
});
市场资产指标最新
获取特定资产符号的先进指标,如NVT、夏普率和库存到流通率。
let response = client.market_asset_metrics_latest(GetMarketMetricsSymbolLatestRequest {
symbol: "string".to_string(),
});
期权交易所对
检索支持这些类型数据(清仓、OHLCV(开盘-最高-最低-收盘-成交量)、未平仓合约、订单簿快照、订单簿事件、指标、交易)的交易所和工具信息。
let response = client.options_exchanges_pairs(GetMarketOptionsExchangesInformationRequest {
exchange: None,
include_dates: None,
include_inactive: None,
instrument: None,
size: None,
time_format: None,
});
期权交易所参考
检索每个对的参考信息。
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,
});
期权清仓信息
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.options_liquidations_information(GetMarketOptionsLiquidationsInformationRequest {
exchange: None,
include_dates: None,
include_inactive: None,
show_only_traded_instruments: None,
time_format: None,
});
期权清仓历史
获取指定工具和交易所的历史时间序列强平。
let response = client.options_liquidations_historical(GetMarketOptionsLiquidationsInstrumentHistoricalRequest {
instrument: "string".to_string(),
end_date: None,
exchange: None,
start_date: None,
time_format: None,
});
期权清仓最新
获取指定工具和交易所的最新强平。
let response = client.options_liquidations_latest(GetMarketOptionsLiquidationsInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
batch_historical_ond_1
获取指定交易所和工具的历史时间序列OHLCV数据。注意:Deribit的OHLCV计算中包含大宗交易。
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
获取指定交易所的最新开盘价、最高价、最低价、收盘价和成交量数据。过去24小时内无活动的工具将被忽略。注意:Deribit的OHLCV计算中包含大宗交易。
let response = client.latest_by_exchange_ond_1(GetMarketOptionsOhlcvExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
time_interval: None,
});
options_ohlcv_information
获取所有交易所、支持的工具和时间范围可用性的列表。
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
获取指定工具和交易所的历史时间序列OHLCV数据。注意:Deribit的OHLCV计算中包含大宗交易。
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
获取指定工具的最新开盘价、最高价、最低价、收盘价和成交量数据。注意:Deribit的OHLCV计算中包含大宗交易。
let response = client.options_ohlcv_latest(GetMarketOptionsOhlcvInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
time_interval: None,
});
batch_historical_ent_2
获取指定交易所和工具的历史时间序列开仓兴趣。
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
获取指定交易所的最新开仓兴趣。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ent_3(GetMarketOptionsOpenInterestExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
});
options_open_interest_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.options_open_interest_information(GetMarketOptionsOpenInterestInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
options_open_interest_historical
获取指定工具和交易所的历史时间序列开仓兴趣。
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
获取指定工具的最新开仓兴趣。
let response = client.options_open_interest_latest(GetMarketOptionsOpenInterestInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
options_order_book_events_information
获取所有交易所、支持的工具和时间范围可用性的列表。
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
检索指定工具和交易所的历史时间序列订单簿事件(买入和卖出)。
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
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.options_order_book_snapshots_information(GetMarketOptionsOrderBookSnapshotsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
options_order_book_snapshots_historical
检索指定工具和交易所的历史时间序列订单簿快照(买入和卖出)。
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
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.options_tickers_information(GetMarketOptionsTickersInformationRequest {
exchange: None,
include_dates: None,
include_inactive: None,
time_format: None,
});
options_tickers_historical
检索指定工具和交易所的历史时间序列指标。
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
检索指定工具和交易所的最新指标。
let response = client.options_tickers_latest(GetMarketOptionsTickersInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: "string".to_string(),
time_format: None,
});
options_trades_information
获取所有交易所、支持的工具和时间范围可用性的列表。
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
检索指定工具的历史(时间序列)交易数据。
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
获取支持交易所对的信息,这些数据类型包括:• ohlcv(开盘价-最高价-最低价-收盘价-成交量)• 订单簿快照• 订单簿事件• 行情• 交易
let response = client.get_market_pairs(GetMarketPairsRequest {
exchange: None,
include_dates: None,
pair: None,
time_format: None,
});
market_rankings_historical
根据特定指标检索排名前位的资产、代币和原生币。
let response = client.market_rankings_historical(GetMarketRankingsHistoricalRequest {
date: "string".to_string(),
page: None,
size: None,
});
market_rankings
根据特定指标检索排名前位的资产、代币和原生币。
let response = client.market_rankings(GetMarketRankingsLatestRequest {
allowed_assets: None,
direction: None,
page: None,
size: None,
sort_type: None,
type_query: None,
});
spot_exchanges_reference
检索每个对的参考信息。
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
获取指定交易所和对的指定历史(时间序列)开盘价、最高价、最低价、收盘价。注意:返回的时间戳指的是蜡烛图的开头。
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
获取指定交易所的最新开盘价、最高价、最低价、收盘价。过去24小时内无活动的对将被忽略。
let response = client.latest_by_exchange(GetMarketSpotOhlcvExchangeExchangeLatestRequest {
exchange: "string".to_string(),
pair: None,
time_format: None,
time_interval: None,
});
get_market_ohlc_information
检索关于支持的交易所对OHLCV的信息。包括中心化和去中心化交易所的数据。
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
检索指定对的指定历史(时间序列)开盘价、最高价、最低价、收盘价。注意:返回的时间戳指的是蜡烛图的开头。
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
检索指定对的最新开盘价、最高价、最低价、收盘价。
let response = client.get_ohlcv_pair_latest(GetMarketSpotOhlcvPairLatestRequest {
pair: "string".to_string(),
exchange: None,
time_format: None,
time_interval: None,
});
order_book_updates
检索订单簿更新/事件(买入价和卖出价)。许多交易所和对的此数据量非常大。
let response = client.order_book_updates(GetMarketSpotOrderBookEventsPairHistoricalRequest {
pair: "string".to_string(),
end_date: None,
exchange: None,
start_date: None,
time_format: None,
});
snapshots_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.snapshots_information(GetMarketSpotOrderBookSnapshotsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
get_market_orders
检索指定对的订单簿数据。
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
检索所有可用支持的资产及其时间范围可用性列表。
let response = client.spot_prices_assets_information(GetMarketSpotPricesAssetsInformationRequest {
asset: None,
include_inactive: None,
page: None,
time_format: None,
});
spot_prices_assets_historical
检索指定资产的历史价格 - 价格是跨所有支持此资产的交易所计算的,包括所有交叉汇率对。
资产价格是通过所有支持此资产的交易所计算得出的VWAP(成交量加权平均价格),回溯期为一根蜡烛图。
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
检索指定资产的最新价格 - 全球价格是跨所有支持此资产的交易所计算的,包括所有交叉汇率对。
资产价格是通过所有支持此资产的交易所计算得出的VWAP(成交量加权平均价格),回溯期为一根蜡烛图。
let response = client.spot_prices_assets_latest(GetMarketSpotPricesAssetsAssetLatestRequest {
asset: "string".to_string(),
time_format: None,
});
spot_prices_pairs_information
检索所有可用支持的对及其时间范围可用性列表。
let response = client.spot_prices_pairs_information(GetMarketSpotPricesPairsInformationRequest {
include_inactive: None,
pair: None,
time_format: None,
});
spot_prices_pairs_historical
检索指定对的历史价格 - 价格是跨所有支持此对的交易所计算的,包括所有交叉汇率对。
对的价格是通过所有支持此对的交易所计算得出的VWAP(成交量加权平均价格),回溯期为一根蜡烛图。如果指定了交易所参数,则返回的数据是该对在该交易所的VWAP。
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
检索指定对的最新价格 - 价格是跨所有支持此对的交易所计算的。
一对货币的价格是根据所有支持该对货币的交易所的VWAP(成交量加权平均价格)计算的,回溯期为1个时间单位。
如果指定了exchange参数,返回的数据是该对货币在该交易所的价格。
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
检索指定对货币的历史参考报价。
默认粒度为1秒(取决于交易所)。
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
检索所有可用市场指标列表。
let response = client.get_all_market_tickers(GetMarketSpotTickersInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
get_market_ticker_pair_historical
检索指定对货币的历史指标,包括买入价/卖出价/中间价/最后成交价。
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
检索指定对货币的最新市场指标,包括买入价/卖出价/中间价/最后成交价。
let response = client.get_latest_market_ticker(GetMarketSpotTickersPairLatestRequest {
pair: "string".to_string(),
exchange: None,
time_format: None,
});
trades
检索所有可用的市场交易数据集。
let response = client.trades(GetMarketSpotTradesInformationRequest {
exchange: None,
include_dates: None,
include_inactive: None,
time_format: None,
});
market_trades
检索指定对货币的历史(时间序列)交易数据。
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
检索所有可用支持的资产及其时间范围可用性列表。
let response = client.spot_twap_assets_information(GetMarketSpotTwapAssetsInformationRequest {
asset: None,
time_format: None,
});
spot_twap_assets_historical
检索指定资产的历史TWAP - 这是支持该资产的全球TWAP,包括所有交叉汇率对。
价格是在所有交易所上按时间加权的移动平均计算的。
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
检索指定资产的最新TWAP - 这是支持该资产的全球TWAP,包括所有交叉汇率对,基于分钟数据。
TWAP是在所有交易所上按时间加权的移动平均计算的。
let response = client.spot_twap_assets_latest(GetMarketSpotTwapAssetsAssetLatestRequest {
asset: "string".to_string(),
lookback_period: None,
time_format: None,
});
spot_twap_pairs_information
检索所有可用支持的对及其时间范围可用性列表。
let response = client.spot_twap_pairs_information(GetMarketSpotTwapPairsInformationRequest {
pair: None,
time_format: None,
});
spot_twap_pairs_historical
检索指定对货币的历史TWAP - 这是支持该对的全球TWAP,包括所有交叉汇率对。
价格是在所有交易所上按时间加权的移动平均计算的。
如果指定了参数exchange
,返回的数据是那个交易所该对货币的TWAP。
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
检索指定对货币的最新TWAP - 这是支持该对的全球TWAP,基于分钟数据。
价格是在所有交易所上按时间加权的移动平均计算的。
如果指定了参数exchange
,返回的数据是那个交易所该对货币的TWAP。
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
检索所有可用支持的资产及其时间范围可用性列表。
let response = client.spot_vwap_assets_information(GetMarketSpotVwapAssetsInformationRequest {
asset: None,
time_format: None,
});
spot_vwap_assets_historical
检索指定资产的历史VWAP - 这是支持该资产的全球VWAP,包括所有交叉汇率对。
价格是在所有交易所上按成交量加权的移动平均计算的。
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
检索指定资产的最新VWAP - 这是支持该资产的全球VWAP,包括所有交叉汇率对,基于分钟数据。
VWAP是在所有交易所上按成交量加权的移动平均计算的。
let response = client.spot_vwap_assets_latest(GetMarketSpotVwapAssetsAssetLatestRequest {
asset: "string".to_string(),
lookback_period: None,
time_format: None,
});
spot_vwap_pairs_information
检索所有可用支持的对及其时间范围可用性列表。
let response = client.spot_vwap_pairs_information(GetMarketSpotVwapPairsInformationRequest {
pair: None,
time_format: None,
});
spot_vwap_pairs_historical
检索指定对货币的历史VWAP - 这是支持该对的全球VWAP,包括所有交叉汇率对。
价格是在所有交易所上按成交量加权的移动平均计算的。
如果指定了参数exchange
,返回的数据是那个交易所该对货币的VWAP。
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
检索指定对货币的最新VWAP - 这是支持该对的全球VWAP,基于分钟数据。
价格是在所有交易所上按成交量加权的移动平均计算的。
如果指定了参数exchange
,返回的数据是那个交易所该对货币的VWAP。
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
检索关于这些类型数据的支持交易所与对的详细信息:• 资金利率 • 强制平仓 • ohlcv(开盘价-最高价-最低价-收盘价-成交量)• 开仓兴趣 • 订单簿快照 • 订单簿事件 • 指标 • 交易
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
检索每个对的参考信息。
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
获取指定交易所和工具的历史时间序列资金利率。
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
获取指定交易所的最新资金利率。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ent_1(GetMarketSwapsFundingRatesExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
});
swaps_funding_rates_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_funding_rates_information(GetMarketSwapsFundingRatesInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_funding_rates_historical
获取指定工具和交易所的历史时间序列资金利率。
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
获取指定工具的最新资金利率。
let response = client.swaps_funding_rates_latest(GetMarketSwapsFundingRatesInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
swaps_insurance_fund_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_insurance_fund_information(GetMarketSwapsInsuranceFundInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_insurance_fund_historical
获取指定工具和交易所的历史保险基金。
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
获取指定工具和交易所的最新保险基金。
let response = client.swaps_insurance_fund_latest(GetMarketSwapsInsuranceFundInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
swaps_liquidations_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_liquidations_information(GetMarketSwapsLiquidationsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_liquidations_historical
获取指定工具和交易所的历史时间序列强平。
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
获取指定工具和交易所的最新强平。
let response = client.swaps_liquidations_latest(GetMarketSwapsLiquidationsInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
batch_historical_ond_2
获取指定交易所和工具的历史时间序列OHLCV数据。
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
获取指定交易所的最新开盘价-最高价-最低价-收盘价-成交量数据。过去24小时内无活动的工具将被忽略。
let response = client.latest_ond(GetMarketSwapsOhlcvExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
time_interval: None,
});
swaps_ohlcv_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_ohlcv_information(GetMarketSwapsOhlcvInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_ohlcv_historical
获取指定工具和交易所的历史时间序列OHLCV数据。
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
获取指定工具的最新开盘价-最高价-最低价-收盘价-成交量数据。
let response = client.swaps_ohlcv_latest(GetMarketSwapsOhlcvInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
time_interval: None,
});
batch_historical_ent_4
获取指定交易所和工具的历史时间序列开仓兴趣。
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
获取指定交易所的最新开仓兴趣。过去24小时内无活动的工具将被忽略。
let response = client.latest_by_exchange_ent_4(GetMarketSwapsOpenInterestExchangeExchangeLatestRequest {
exchange: "string".to_string(),
instrument: None,
time_format: None,
});
swaps_open_interest_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_open_interest_information(GetMarketSwapsOpenInterestInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_open_interest_historical
获取指定工具和交易所的历史时间序列开仓兴趣。
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
获取指定工具的最新开仓兴趣。
let response = client.swaps_open_interest_latest(GetMarketSwapsOpenInterestInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
swaps_order_book_events_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_order_book_events_information(GetMarketSwapsOrderBookEventsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_order_book_events_historical
检索指定工具和交易所的历史时间序列订单簿事件(买入和卖出)。
注意:此端点每次请求最多返回1小时的历史数据。可以使用startDate和endDate参数指定任何任意的时间范围。
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
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_order_book_snapshots_information(GetMarketSwapsOrderBookSnapshotsInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_order_book_snapshots_historical
检索指定工具和交易所的历史时间序列订单簿快照(买入和卖出)。
注意:此端点每次请求最多返回10分钟的历史数据。可以使用startDate和endDate参数指定任何任意的时间范围。
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
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_tickers_information(GetMarketSwapsTickersInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_tickers_historical
检索指定工具和交易所的历史时间序列指标。
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
获取指定工具和交易所的最新强平。
let response = client.swaps_tickers_latest(GetMarketSwapsTickersInstrumentLatestRequest {
instrument: "string".to_string(),
exchange: None,
time_format: None,
});
swaps_trades_information
获取所有交易所、支持的工具和时间范围可用性的列表。
let response = client.swaps_trades_information(GetMarketSwapsTradesInformationRequest {
exchange: None,
include_inactive: None,
time_format: None,
});
swaps_trades_historical
获取所有交易所、支持的工具和时间范围可用性的列表。
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
从2019年10月起,检索指定代币的历史价格(及其他市场信息)。
注意:此端点返回最多6个月的历史数据。要获取超过6个月的数据,必须使用startDate
和endDate
参数来调整时间范围窗口,以获取下一个n天/月的数据。
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
检索指定代币的最新价格(及其他市场信息)。过去24小时内没有活动的代币将被忽略。
let response = client.get_current_token_price(GetMarketTokensPricesSymbolLatestRequest {
symbol: "string".to_string(),
time_format: None,
});
get_4_byte_signature
检索指定签名哈希的详细信息。
let response = client.get_4_byte_signature(GetSignaturesHashRequest {
hash: "string".to_string(),
});
token_metrics_historical
检索指定ERC代币符号的历史指标。
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
检索指定ERC代币符号的最新指标。
let response = client.token_metrics_latest(GetTokensMetricsSymbolLatestRequest {
symbol: "string".to_string(),
time_frame: None,
});
get_token_rankings
检索根据特定指标排名的前列以太坊代币。
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
检索具有回望窗口的特定指标排名的前列以太坊代币。这对于查看代币趋势很有用。
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
检索指定代币地址的历史(时间序列)代币持有者。
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
检索指定地址的代币持有者。
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
检索指定地址的历史代币供应量(及其衍生品)。
注意:此端点返回最多6个月的历史数据。要获取超过6个月的数据,必须使用startDate
和endDate
参数来调整时间范围窗口,以获取下一个n天/月的数据。
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
检索指定地址的最新代币供应量(及其衍生品)。
let response = client.get_token_supply_latest(GetTokensHashSuppliesLatestRequest {
hash: "string".to_string(),
});
get_token_transfers
检索涉及指定代币地址的所有代币转账。
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
检索指定地址的历史速度。
let response = client.get_token_velocity(GetTokensHashVelocityRequest {
hash: "string".to_string(),
time_format: None,
time_frame: None,
});
get_token_volume
检索指定地址的历史转账数量。
let response = client.get_token_volume(GetTokensHashVolumeRequest {
hash: "string".to_string(),
time_format: None,
time_frame: None,
});
get_all_transactions
检索与指定过滤器匹配的所有交易。
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
检索与指定过滤器匹配的特定区块链的内存池。默认结果为以太坊,但请确保您的“x-amberdata-blockchain-id”标题与您想要检索数据的区块链相匹配。
注意:内存池数据适用于以太坊、比特币或莱特币。
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
获取给定区块链历史确认交易的数据。默认指标是以太坊的1天跳动/365天回望期。更改标题区块链ID将返回该区块链的指标。
let response = client.transactions_metrics_historical(GetTransactionsMetricsHistoricalRequest {
end_date: None,
start_date: None,
time_format: None,
time_frame: None,
});
transactions_metrics
获取给定区块链最近确认交易的数据。默认指标是以太坊的24小时周期。更改标题区块链ID将返回该区块链的指标。
let response = client.transactions_metrics(GetTransactionsMetricsLatestRequest {
include_price: None,
time_format: None,
});
get_historical_transaction_volume
检索交易的(时间序列)体积。
let response = client.get_historical_transaction_volume(GetTransactionsVolumeRequest {
time_format: None,
time_frame: None,
});
get_transaction
检索指定哈希的交易信息。
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
检索指定交易中发生的代币转账。
let response = client.transaction_token_transfers(GetTransactionsHashTokenTransfersRequest {
hash: "string".to_string(),
});
uncle_all
检索指定范围内的所有叔父节点。
let response = client.uncle_all(GetUnclesRequest {
page: None,
size: None,
});
uncle_single
检索通过其哈希指定的叔父节点。
let response = client.uncle_single(GetUnclesHashRequest {
hash: "string".to_string(),
});
依赖关系
~4–19MB
~253K SLoC