UNPKG

@gfxlabs/oku

Version:

Package for interacting with the oku.trade api

1,420 lines (1,415 loc) 37.5 kB
// Code generated via 'tsx api/openapi_to_ts' DO NOT EDIT export type Float64 = number; export type Int = number; export type Int32 = number; export type Int64 = number; export type uint256_Int = string; export type common_Address = string; export type common_Hash = string; export type AmountDeltas = { amount0_delta: string; amount1_delta: string; }; export type AnalyticsActivityHistory = { data: number[][]; max_value: number; total_trades: number; }; export type TransactionCount = { count: number; ts: string; }; export type AnalyticsDailyActivityHistory = { data: TransactionCount[]; max_value: number; total_trades: number; }; export type PositionInfo = { percent_change: number; positions_created_24h: number; total_positions: number; }; export type PoolRecentTransactions = { amount0: number; amount1: number; current_value: number; event_type: string; side: string; time: number; token0_symbol: string; token1_symbol: string; transaction: string; usd_value: number; user: string; }; export type PositionPriceRange = { inverse_lower_price: string; inverse_upper_price: string; lower_price: string; upper_price: string; }; export type Positions = { apr?: string; collected_fees_usd: number; create_time: string; fee: number; last_event_time: string; pnl: number; pool: string; position_price_range?: PositionPriceRange; position_type?: string; source?: string; status: string; t0: string; t0_amount?: string; t0_decimals: number; t0_symbol: string; t1: string; t1_amount?: string; t1_decimals: number; t1_symbol: string; tick_lower: number; tick_upper: number; token_id: number; total_value_current_usd: string; user?: string; uuid: string; }; export type AnalyticsPool = { address: string; apr: number; apr_change: number; fee: number; last_updated: number; position_stats: PositionInfo; recent_transactions: PoolRecentTransactions[]; t0: string; t0_change: number; t0_change_usd: number; t0_decimals: number; t0_fees_usd: number; t0_name: string; t0_price_usd: number; t0_symbol: string; t0_tvl: number; t0_tvl_usd: number; t0_volume: number; t0_volume_7d: number; t0_volume_change: number; t0_volume_change_7d: number; t0_volume_usd: number; t1: string; t1_change: number; t1_change_usd: number; t1_decimals: number; t1_fees_usd: number; t1_name: string; t1_price_usd: number; t1_symbol: string; t1_tvl: number; t1_tvl_usd: number; t1_volume: number; t1_volume_7d: number; t1_volume_change: number; t1_volume_change_7d: number; t1_volume_usd: number; top_positions: Positions[]; total_fees_usd: number; tvl_usd: number; tvl_usd_change: number; tx_count: number; volume_and_fees_change: number; }; export type PositionFees = { token0BurnedLiquidityCollected: string; token0BurnedLiquidityUncollected: string; token0FeesCollected: string; token0FeesUncollected: string; token1BurnedLiquidityCollected: string; token1BurnedLiquidityUncollected: string; token1FeesCollected: string; token1FeesUncollected: string; }; export type CurrentValues = { amount0_current: string; amount0_current_usd: string; amount1_current: string; amount1_current_usd: string; liquidity_current: string; total_value_current_usd: string; }; export type EstimatedPositionApr = { estimated_apr: number; estimated_fees: number; }; export type HistoricPositionFees = { accumulated_fees0_usd: number; accumulated_fees1_usd: number; accumulated_total_usd: number; fees0: number; fees0_usd: number; fees1: number; fees1_usd: number; time: number; total_fees_usd: number; }; export type HistoricPositionFeesInfo = { historic_fees: HistoricPositionFees[]; total_fees_usd: number; total_fees0: number; total_fees0_usd: number; total_fees1: number; total_fees1_usd: number; }; export type LastTransactionEvent = { last_log_index: number; last_txn_block: number; last_txn_processed: string; }; export type CurrentTxnValues = { token0_value_current: number; token1_value_current: number; total_value_current: number; }; export type PastTxnValues = { token0_value_past: number; token1_value_past: number; total_value_past: number; }; export type PositionTransactions = { amount: string; amount0: string; amount1: string; block: number; current_values?: CurrentTxnValues; eventType: string; liquidity: string; logIndex: number; owner: string; past_values?: PastTxnValues; pool: string; recipient: string; sender: string; tick_lower: number; tick_upper: number; token_id: number; ts: string; txn: string; txnIndex: number; user: string; }; export type PositionPoolData = { current_pool_price: number; current_pool_tick: number; fee: number; pool: string; token0: string; token0_decimals: number; token0_name: string; token0_price: number; token0_price_usd: number; token0_symbol: string; token1: string; token1_decimals: number; token1_name: string; token1_price: number; token1_price_usd: number; token1_symbol: string; }; export type PositionPnl = { amount0_delta: number; amount0_loss: number; amount0_profit: number; amount1_delta: number; amount1_loss: number; amount1_profit: number; collected_usd_fees: number; pnl_usd_after_fees: number; pnl_usd_before_fees: number; uncollected_usd_fees: number; }; export type PositionStartingAmounts = { amount0: string; amount1: string; block: number; liquidity: string; log_index: number; mint_tx: string; owner: string; timestamp: string; }; export type TotalCollectAmounts = { total_collect_amount0: string; total_collect_amount1: string; total_net_collect_amount0: string; total_net_collect_amount1: string; }; export type TotalDepositAmounts = { total_deposit_amount0: string; total_deposit_amount1: string; }; export type TotalWithdrawnAmounts = { total_withdrawn_amount0: string; total_withdrawn_amount1: string; }; export type PositionsTransfer = { block: number; eventAddress: string; logIndex: number; recipient: string; sender: string; token_id: number; ts: string; txn: string; txnIndex: number; }; export type HistoricUserPositions = { amount_deltas: AmountDeltas; create_block: number; created_date: number; current_fee_info: PositionFees; current_liquidity: string; current_pool_price: number; current_pool_tick: number; current_position_values: CurrentValues; estimated_apr: EstimatedPositionApr; fee_history: HistoricPositionFeesInfo; last_event_time: number; last_owner: string; last_transaction_event: LastTransactionEvent; last_updated: number; pool: string; position_age: number; position_events: PositionTransactions[]; position_pool_data: PositionPoolData; position_price_range: PositionPriceRange; position_profit: PositionPnl; position_type: string; starting_amounts: PositionStartingAmounts; status: string; tickLower: number; tickUpper: number; token0_decimals: number; token1_decimals: number; tokenId: string; total_collect_amounts: TotalCollectAmounts; total_deposit_amounts: TotalDepositAmounts; total_withdrawn_amounts: TotalWithdrawnAmounts; transfers: PositionsTransfer[]; user: string; uuid: string; }; export type PriceRange = { current_pool_prices: number; current_pool_tick: number; inverseLowerPrice: number; inverseUpperPrice: number; lowerPrice: number; upperPrice: number; }; export type RelatedUserPositions = { _key: string; amount0_collected: string; amount0_current: string; amount0_current_usd: string; amount0_deposited: string; amount0_loss: number; amount0_net_collected: string; amount0_profit: number; amount0_uncollected: string; amount0_withdrawn: string; amount1_collected: string; amount1_current: string; amount1_current_usd: string; amount1_deposited: string; amount1_loss: number; amount1_net_collected: string; amount1_profit: number; amount1_uncollected: string; amount1_withdrawn: string; collected_fees_usd: number; create_block: number; create_time: string; current_pool_price: number; current_pool_tick: number; last_event_time: string; last_log_index: number; last_owner: string; last_txn_block: number; last_txn_processed: string; last_updated: number; pnl_usd_after_fees: number; pnl_usd_before_fees: number; pool: string; pool_fee: number; position_type: string; price_range: PriceRange; status: string; t0: string; t0_decimals: number; t0_symbol: string; t1: string; t1_decimals: number; t1_symbol: string; tickLower: number; tickUpper: number; token_id: number; token0_burned_liquidity_collected: string; token0_burned_liquidity_uncollected: string; token1_burned_liquidity_collected: string; token1_burned_liquidity_uncollected: string; total_gas_costs: string; total_liquidity: string; total_value_current_usd: string; uncollected_fees_usd: number; user: string; }; export type AnalyticsPosition = { position: HistoricUserPositions; related_positions: RelatedUserPositions[]; }; export type AnalyticsPositionFilter = { limit?: number; pool?: string; tick_lower?: number; tick_upper?: number; token_id?: number; user?: string; uuid?: string; }; export type PositionsOverview = { percent_change: number; positions_created_24h: number; }; export type ProtocolSwaps = { percent_change: number; swap_count_24h: number; }; export type AnalyticsProtocolOverview = { active_users: number; fees_change_usd: number; positions: PositionsOverview; protocol_swaps: ProtocolSwaps; total_fees_usd: number; total_volume_usd: number; tvl_change_usd: number; tvl_usd: number; volume_change_usd: number; }; export type AnalyticsToken = { address: string; decimals: number; fees_change: number; fees_usd: number; name: string; pool_count: number; pools_change: number; price_usd: number; price_usd_change_24h: number; symbol: string; tvl: number; tvl_change: number; tvl_usd: number; tx_count: number; tx_count_change: number; volume: number; volume_change: number; volume_usd: number; }; export type AnalyticsUser = { first_seen: number; position_pnl: number; swap_count: number; swap_volume: number; total_value: number; }; export type BatchOrderViewData = { batch_id: string; direction: boolean; head: string; id: string; tail: string; tick_lower: number; tick_upper: number; token0_amount: string; token1_amount: string; user_count: number; }; export type CGToken = { address: string; ath: number; ath_change_percentage: number; ath_date: string; atl: number; atl_change_percentage: number; atl_date: string; circulating_supply: number; current_price: number; fully_diluted_valuation: number; high_24h: number; id: string; image: string; last_updated: string; low_24h: number; market_cap: number; market_cap_change_24h: number; market_cap_change_percentage_24h: number; market_cap_rank: number; max_supply: number; name: string; price_change_24h: number; price_change_percentage_24h: number; symbol: string; total_supply: number; total_volume: number; }; export type Candle = { close: number; high: number; low: number; open: number; time: number; volume_base: number; volume_quote: number; }; export type CandleResponse = { base_currency: string; candles: Candle[]; quote_currency: string; }; export type FactoryEventPoolCreated = { block: number; eventAddress: string; fee: number; logIndex: number; pool: string; tickSpacing: number; token0: string; token1: string; ts: string; txn: string; txnIndex: number; }; export type HistoricAnalytics = { fees: number; price?: number; time: number; token0_tvl: number; token1_tvl: number; tvl: number; volume: number; }; export type HistoricProtocolStatistics = { fees: number; new_accounts: number; time: number; transaction_count: number; tvl: number; volume: number; }; export type HistoricStats = { fees_total0: number; fees_total1: number; impermanent_loss_quoted0: number; impermanent_loss_quoted1: number; net_profit_quoted0: number; net_profit_quoted1: number; position_amount0: number; position_amount1: number; price0: number; price1: number; time: string; }; export type LastTradeResponse = { amount: number; price: number; side: string; }; export type LimitOrderMarket = { block_initialized: number; fee: number; pool: string; token0: string; token1: string; }; export type LiquidityTick = { amount: string; price0: string; price1: string; tick: number; }; export type LiquidityChart = { above: LiquidityTick[]; base_symbol: string; below: LiquidityTick[]; current_pool_tick: number; quote_symbol: string; tick_spacing: number; }; export type LiquidityTickV2 = { amount: number; price0: number; price1: number; tick: number; }; export type LiquidityChartV2 = { above: LiquidityTickV2[]; base_symbol: string; below: LiquidityTickV2[]; current_pool_tick: number; quote_symbol: string; tick_spacing: number; }; export type NewOrder = { order_type: string; time: string; last_modified: string; block: number; txn_hashes: string[]; order_id: string; take_profit: string; stop_price: string; amount_in: string; amount_out: string; token_in: string; token_out: string; recipient: string; fee_bips?: number; take_profit_slippage?: number; stop_slippage?: number; stop_limit_price?: string; swap_slippage?: number; direction?: boolean; swap_on_fill?: boolean; processed: boolean; cancelled: boolean; }; export type Order = { amount_filled?: string; amount_total?: string; avg_price?: number; base_currency?: string; base_currency_address?: string; block?: number; fee?: number; limit_order_full?: BatchOrderViewData; pool?: string; price?: string; quote_currency?: string; quote_currency_address?: string; should_flip?: boolean; side?: string; status?: string; time?: number; transaction?: string; type?: string; usd_value: number; user?: string; token_0_price_usd?: number; token_1_price_usd?: number; }; export type OrderBookOptions = { determine_best_tick_granularity?: boolean; granularity_index: number; max_depth?: number; max_orders_per_side?: number; show_actual?: boolean; tick_granularity_pow10?: number; }; export type OrderBookTick = { price: string; size: string; }; export type OrderBookResponse = { amount_decimals: number; asks: OrderBookTick[]; base_symbol: string; bids: OrderBookTick[]; block: number; granularity: number; last_trade: LastTradeResponse; pool: string; price_decimals: number; quote_symbol: string; suggested_granularities: number[]; }; export type OrderBookSet = { default: any; flipped: any; }; export type OverviewDeltas = { day_change_usd: number; hour_change_usd: number; month_change_usd: number; price_usd: number; two_week_change_usd: number; week_change_usd: number; year_change_usd: number; }; export type PoolEventSwap = { amount0: string; amount1: string; block: number; eventAddress: string; liquidity: string; logIndex: number; recipient: string; sender: string; sqrt_price_x96: string; tick: number; ts: string; txn: string; txnIndex: number; }; export type PoolSummary = { address: string; block: number; cleaned: boolean; default_flipped_granularities: number[]; default_granularities: number[]; fee: number; is_preferred_token_order: boolean; last_amount: number; last_price: number; last_side: string; last_updated: number; liquidity: string; t0: string; t0_change: number; t0_change_usd: number; t0_decimals: number; t0_fees_usd: number; t0_high: number; t0_high_usd: number; t0_low: number; t0_low_usd: number; t0_name: string; t0_price: number; t0_price_usd: number; t0_symbol: string; t0_tvl: number; t0_tvl_usd: number; t0_volume: number; t0_volume_7d: number; t0_volume_change: number; t0_volume_change_7d: number; t0_volume_usd: number; t1: string; t1_change: number; t1_change_usd: number; t1_decimals: number; t1_fees_usd: number; t1_high: number; t1_high_usd: number; t1_low: number; t1_low_usd: number; t1_name: string; t1_price: number; t1_price_usd: number; t1_symbol: string; t1_tvl: number; t1_tvl_usd: number; t1_volume: number; t1_volume_7d: number; t1_volume_change: number; t1_volume_change_7d: number; t1_volume_usd: number; total_fees_usd: number; total_volume_7d_usd: number; tvl_usd: number; tvl_usd_change: number; tx_count: number; }; export type PoolFees = { fees_24h_usd: number; pool_summary_level_1: PoolSummary; volume_24h_usd: number; }; export type PoolInfo = { base: string; close: number; high: number; is_preferred_token_order: boolean; last_trade: LastTradeResponse; low: number; open: number; quote: string; transaction_count: number; volume_base: number; volume_quote: number; }; export type PoolPrices = { token0PerToken1: number; token1PerToken0: number; }; export type TokenLevel1 = { address: string; decimals: number; name: string; symbol: string; total_supply?: string; }; export type PoolTokens = { pool: string; t0: TokenLevel1; t1: TokenLevel1; }; export type PoolPricesUSD = { Timestamp: string; pool: string; t0_price_usd: number; t1_price_usd: number; token_info: PoolTokens; }; export type PoolTickState = { sqrt_price_x96: string; tick: number; }; export type Position = { a0?: string; a1?: string; blk?: number; ei?: number; fi0?: string; fi1?: string; lq?: string; owner?: string; pool?: string; tl?: number; to0?: string; to1?: string; tu?: number; }; export type PositionStatistics = { amount0_final: number; amount0_initial: number; amount1_final: number; amount1_initial: number; backtest_end_time: string; backtest_start_time: string; fees_quoted0: number; fees_quoted1: number; fees_token0: number; fees_token1: number; historic_fees: HistoricStats[]; impermanent_loss_quoted0: number; impermanent_loss_quoted1: number; net_potential_profit_quoted0: number; net_potential_profit_quoted1: number; net_profit_quoted0: number; net_profit_quoted1: number; position_fee_apr0: number; position_fee_apr1: number; position_price_lower: number; position_price_upper: number; position_proportion_of_volume_in_range0: number; position_proportion_of_volume_in_range1: number; position_time_in_range: number; position_volume_in_range0: number; position_volume_in_range1: number; price_final_quoted0: number; price_final_quoted1: number; price_initial_quoted0: number; price_initial_quoted1: number; raw_fee_apr0: number; raw_fee_apr1: number; consolidated_apr: number; return_proportion_quoted0: number; return_proportion_quoted1: number; total_volume0: number; total_volume1: number; transaction_count: number; value_if_held_quoted0: number; value_if_held_quoted1: number; value_initial_quoted0: number; value_initial_quoted1: number; value_now_quoted0: number; value_now_quoted1: number; }; export type QueuedBlock = { Block: number; IsNew: boolean; }; export type SearchFilterOpts = { fee_tiers: number[]; result_offset: number; result_size: number; sort_by: string; sort_order: boolean; }; export type SearchOrdersOpts = { end_date?: number; fee_tiers?: number[]; pool?: string; result_offset?: number; result_size?: number; sort_by?: string; sort_order?: boolean; start_date?: number; tokens?: string[]; user?: string; }; export type SearchResponse = { pools: PoolSummary[]; result_size: number; }; export type SearchTokenOrdersOpts = { end_date?: number; fee_tiers?: number[]; pool?: string; result_offset?: number; result_size?: number; sort_by?: string; sort_order?: boolean; start_date?: number; tokens?: string[]; order_direction?: string; user?: string; }; export type SearchUserPosition = { _key: string; amount0_collected: string; amount0_current: string; amount0_current_usd: string; amount0_deposited: string; amount0_loss: number; amount0_net_collected: string; amount0_profit: number; amount0_uncollected: string; amount0_withdrawn: string; amount1_collected: string; amount1_current: string; amount1_current_usd: string; amount1_deposited: string; amount1_loss: number; amount1_net_collected: string; amount1_profit: number; amount1_uncollected: string; amount1_withdrawn: string; collected_fees_usd: number; create_block: number; create_time: string; last_event_time: string; last_log_index: number; last_owner: string; last_txn_block: number; last_txn_processed: string; last_updated: number; pnl_usd_after_fees: number; pnl_usd_before_fees: number; pool: string; pool_fee: number; position_type: string; price_range: PriceRange; status: string; t0: string; t0_decimals: number; t0_symbol: string; t1: string; t1_decimals: number; t1_symbol: string; tickLower: number; tickUpper: number; token_id: number; token0_burned_liquidity_collected: string; token0_burned_liquidity_uncollected: string; token1_burned_liquidity_collected: string; token1_burned_liquidity_uncollected: string; total_gas_costs: string; total_liquidity: string; total_value_current_usd: string; uncollected_fees_usd: number; user: string; }; export type SearchUserPositionFilterOpts = { fee_tiers?: number[]; include_non_nft_positions?: boolean; pool?: string; result_offset?: number; result_size?: number; sort_by?: string; sort_order?: boolean; status?: string; exclude_closed_positions?: boolean; user?: string; }; export type SearchUserPositionResponse = { positions: SearchUserPosition[]; result_size: number; }; export type Swap = { amount0: number; amount1: number; avg_price: number; event: PoolEventSwap; fees_usd: number; price_end: number; price_start: number; recipient: string; side: string; slippage: number; time: number; transaction: string; usd_value: number; }; export type SwapCandle = { close: number; high: number; low: number; open: number; time: number; tvl: number; volume: number; }; export type SwapCandles = { token_candles: any; }; export type SwapHistoryResponse = { swaps: Swap[]; token0: string; token1: string; }; export type Tick = { fee_growth_outside_0x128?: string; fee_growth_outside_1x128?: string; index?: number; initialized?: boolean; liquidity_gross?: string; liquidity_net?: string; }; export type TickLiquidity = { liquidity_net: string; sqrt_price: string; tick_index: number; }; export type TokenBalance = { balance: number; decimals: number; price_usd: number; token_address: string; token_name: string; token_symbol: string; value_usd: number; }; export type TokenInfoCarousel = { address: string; change: number; name: string; price: number; symbol: string; }; export type TokenMetric = { time_period: string; current_price_usd: number; price_usd: number; low_price_usd: number; high_price_usd: number; price_changed_percentage: number; volume_usd: number; txn_count: number; buy_count: number; sell_count: number; active_pool_count: number; }; export type TokenOrder = { amount?: string; avg_price?: number; target_token?: string; target_token_address?: string; block?: number; fee?: number; pool?: string; price?: string; secondary_token?: string; secondary_token_address?: string; side?: string; status?: string; time?: number; transaction?: string; type?: string; usd_value: number; user?: string; target_token_price_usd?: number; secondary_token_price_usd?: number; }; export type TokenOverview = { address: string; cg_token_info?: CGToken; circulating_market_cap_usd: number; fully_diluted_market_cap_usd: number; name: string; price_deltas: OverviewDeltas; first_seen: string; symbol: string; }; export type TokenPrice = { timestamp?: string; token_info: TokenLevel1; usd_price: number; }; export type TokenSummmary = { active_pools: number; change_4h: number; change_7d: number; change_24h: number; change_30d: number; contract: string; fees_4h: number; fees_7d: number; fees_24h: number; fees_30d: number; last_updated: string; name: string; price: number; price_4h: number; price_7d: number; price_24h: number; price_30d: number; symbol: string; tvl: number; tvl_4h: number; tvl_7d: number; tvl_24h: number; tvl_30d: number; tx_4h: number; tx_7d: number; tx_24h: number; tx_30d: number; volume_4h: number; volume_7d: number; volume_24h: number; volume_30d: number; }; export type TokenSearchResponse = { result_size: number; results: TokenSummmary[]; }; export type UserActivityPecentage = { user: string; percentage: number; }; export type UserBalances = { block: number; native_balance: number; native_value_usd: number; token_balances: TokenBalance[]; total_value: number; }; export type UserPositions = { amount_deltas: AmountDeltas; create_block: number; created_date: number; current_fee_info: PositionFees; current_liquidity: string; current_position_values: CurrentValues; last_event_time: number; last_owner: string; last_transaction_event: LastTransactionEvent; last_updated: number; pool: string; position_age: number; position_events: PositionTransactions[]; position_pool_data: PositionPoolData; position_price_range: PositionPriceRange; position_profit: PositionPnl; position_type: string; starting_amounts: PositionStartingAmounts; status: string; tickLower: number; tickUpper: number; tokenId: string; total_collect_amounts: TotalCollectAmounts; total_deposit_amounts: TotalDepositAmounts; total_withdrawn_amounts: TotalWithdrawnAmounts; user: string; uuid: string; }; export type UserPositionsFilterOrderBy = { create_time: boolean; current_value: boolean; last_event_block: boolean; last_event_time: boolean; pnl_after_fees: boolean; position_value: boolean; }; export type UserPositionsFilter = { closed_only: boolean; include_events: boolean; limit: number; order_by: UserPositionsFilterOrderBy; order_direction: string; pool: string; position_status: string; position_type: string; tick_lower: number; tick_upper: number; time_end: number; time_start: number; token_id: number; user: string; uuid: string; }; export type UserSearchOptions = { limit: number; offset: number; sort_by: string; sort_order: boolean; }; export type UserSwapVolumeAnalytics = { time: number; volume: number; }; export type UserTokenBalance = { balance: number; token_address: string; }; export type UserTradeStats = { account: string; positions: number; swaps: number; volume: number; }; export type big_Int = number; export type dtype_PoolSummary = { address: string; block: number; cleaned: boolean; default_flipped_granularities: number[]; default_granularities: number[]; fee: number; is_preferred_token_order: boolean; last_amount: number; last_price: number; last_side: string; last_updated: number; liquidity: string; t0: string; t0_change: number; t0_change_usd: number; t0_decimals: number; t0_fees_usd: number; t0_high: number; t0_high_usd: number; t0_low: number; t0_low_usd: number; t0_name: string; t0_price: number; t0_price_usd: number; t0_symbol: string; t0_tvl: number; t0_tvl_usd: number; t0_volume: number; t0_volume_7d: number; t0_volume_change: number; t0_volume_change_7d: number; t0_volume_usd: number; t1: string; t1_change: number; t1_change_usd: number; t1_decimals: number; t1_fees_usd: number; t1_high: number; t1_high_usd: number; t1_low: number; t1_low_usd: number; t1_name: string; t1_price: number; t1_price_usd: number; t1_symbol: string; t1_tvl: number; t1_tvl_usd: number; t1_volume: number; t1_volume_7d: number; t1_volume_change: number; t1_volume_change_7d: number; t1_volume_usd: number; total_fees_usd: number; total_volume_7d_usd: number; tvl_usd: number; tvl_usd_change: number; tx_count: number; }; export type dtype_TokenSummary = { contract: string; name: string; symbol: string; active_pools: number; last_updated: string; price: number; price_4h: number; price_24h: number; price_7d: number; price_30d: number; tvl: number; tvl_4h: number; tvl_24h: number; tvl_7d: number; tvl_30d: number; volume: number; volume_4h: number; volume_24h: number; volume_7d: number; volume_30d: number; change_4h: number; change_24h: number; change_7d: number; change_30d: number; fees_4h: number; fees_24h: number; fees_7d: number; fees_30d: number; tx_4h: number; tx_24h: number; tx_7d: number; tx_30d: number; }; export type evts_PoolEventSwap = { amount0: string; amount1: string; block: number; eventAddress: string; liquidity: string; logIndex: number; recipient: string; sender: string; sqrt_price_x96: string; tick: number; ts: string; txn: string; txnIndex: number; }; export type univ3_LiquiditySnapshot = { block: number; current_pool_tick: number; pool: string; sqrt_price_x96: string; tick_spacing: number; ticks: TickLiquidity[]; token0_decimals: number; token1_decimals: number; }; export type univ3_Pool = { address: string; block: number; create_event: FactoryEventPoolCreated; event_count: number; fee: number; fee_growth_global0_x128: string; fee_growth_global1_x128: string; liquidity: string; log_index: number; max_liquidity_per_tick: string; positions: Position; protocol_token0_fees: string; protocol_token1_fees: string; sqrt_ratio_x96: string; tick_current: number; tick_spacing: number; ticks: Tick; timestamp: number; token0: string; token0_amount: string; token0_price: string; token1: string; token1_amount: string; token1_price: string; txn_index: number; uncollected_fees_token0: string; uncollected_fees_token1: string; }; export type JsonRpcId = string | number; export type Chains = string; export type PoolAndBlock = { address: string; block: number; }; export type TokenMetricResponse = { time_period: string; current_price_usd: number; price_usd: number; low_price_usd: number; high_price_usd: number; price_changed_percentage: number; volume_usd: number; txn_count: number; buy_count: number; sell_count: number; active_pool_count: number; }[]; export type UserActivityByVolume = { user: string; percentage: number; }[]; export interface CushApi { cush_liveBlock: (arg: []) => number; cush_queuePendingBlock: (arg: [current_block_height?: number, timeout_ms?: number]) => QueuedBlock; cush_getAllPoolsInOrder: (arg: []) => PoolAndBlock[]; cush_getNewPoolsInOrder: (arg: []) => PoolAndBlock[]; cush_search: (arg: [search_term?: string, search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_topPools: (arg: [search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_trendingPools: (arg: [limit?: number]) => dtype_PoolSummary[]; cush_searchPoolsByTokenAddresses: (arg: [token0_address?: string, token1_address?: string, search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_searchPoolsByAddress: (arg: [search_address?: string, search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_searchPoolsByTokenNamesOrSymbol: (arg: [token0_search_term?: string, token1_search_term?: string, search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_searchPoolsByTokenNameOrSymbol: (arg: [token_search_term?: string, search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_searchPoolsByList: (arg: [search_address_list?: string[], search_filter_options?: SearchFilterOpts]) => SearchResponse; cush_batchSearchAddresses: (arg: [token_search_address_list?: string[], search_filter_options?: SearchFilterOpts]) => any; cush_searchTopTokens: (arg: [search_filter_options?: SearchFilterOpts]) => TokenSearchResponse; cush_searchTokenByAddress: (arg: [token_address?: string, search_filter_options?: SearchFilterOpts]) => TokenSearchResponse; cush_lastPrice: (arg: [pool_address?: string, block_number?: number]) => PoolPrices; cush_lastTrade: (arg: [pool_address?: string, block_number?: number, reverse_token_order?: boolean]) => LastTradeResponse; cush_poolSwaps: (arg: [pool_address?: string, limit?: number, offset?: number, show_actual?: boolean]) => SwapHistoryResponse; cush_swapHistory: (arg: [pool_address?: string, start_timestamp?: number, end_timestamp?: number, order_limit?: number, reverse_token_order?: boolean]) => SwapHistoryResponse; cush_recentSwaps: (arg: [pool_address?: string, order_limit?: number, reverse_token_order?: boolean]) => SwapHistoryResponse; cush_summary: (arg: [pool_address?: string, end_timestamp?: number, time_interval?: number, reverse_token_order?: boolean]) => PoolInfo; cush_limitOrdersByUser: (arg: [user_address?: string]) => Order[]; cush_allLimitOrders: (arg: []) => Order[]; cush_getInitializedLimitOrderMarkets: (arg: []) => LimitOrderMarket[]; cush_ordersForUser: (arg: [user_address?: string]) => Order[]; cush_marketOrdersForUser: (arg: [user_address?: string, start_timestamp?: number, end_timestamp?: number]) => Order[]; cush_marketOrdersForUserInPool: (arg: [pool_address?: string, user_address?: string, start_timestamp?: number, end_timestamp?: number, flip?: boolean]) => Order[]; cush_swapsForUserInPool: (arg: [pool_address?: string, user_address?: string, start_timestamp?: number, end_timestamp?: number]) => evts_PoolEventSwap[]; cush_allSwapsForUser: (arg: [user_address?: string, start_timestamp?: number, end_timestamp?: number]) => evts_PoolEventSwap[]; cush_poolTickStateAtTimestamp: (arg: [pool_address?: string, timestamp?: number]) => PoolTickState; cush_tokenUsdPrice: (arg: [token_address?: string, block_number?: number]) => TokenPrice; cush_tokenUsdPriceAtTime: (arg: [token_address?: string, timestamp?: number]) => TokenPrice; cush_currentPoolPrices: (arg: [pool_address?: string]) => PoolPricesUSD; cush_poolUsdPrice: (arg: [pool_address?: string, block_number?: number]) => PoolPricesUSD; cush_lastPoolTick: (arg: [pool_address?: string]) => number; cush_ohlcv: (arg: [pool_address?: string, interval_length?: number, start_timestamp?: number, end_timestamp?: number]) => CandleResponse; cush_ohlcvTradingView: (arg: [pool_address?: string, interval_length?: number, start_timestamp?: number, end_timestamp?: number]) => CandleResponse; cush_swapChart: (arg: [token_addresses?: string[], interval_length?: number, start_timestamp?: number, end_timestamp?: number]) => SwapCandles; cush_orderBookSet: (arg: [pool_address?: string, default_granularity_indicies?: number[], flipped_granularity_indicies?: number[], block_number?: number]) => OrderBookSet; cush_simulateV3Pool: (arg: [pool_address?: string, block_number?: big_Int]) => univ3_Pool; cush_simulatePoolLiquidity: (arg: [pool_address?: string, block_number?: big_Int]) => univ3_LiquiditySnapshot; cush_getFeeTiersPositionCount: (arg: [token0_address?: string, token1_address?: string]) => any; cush_backtestPositionInTimeRange: (arg: [pool_address?: string, tick_lower?: number, tick_upper?: number, token0_amount?: string, token1_amount?: string, time_start?: number, time_end?: number]) => PositionStatistics; cush_backtestPosition: (arg: [pool_address?: string, tick_lower?: number, tick_upper?: number, token0_amount?: string, token1_amount?: string, block_start?: number, block_end?: number]) => PositionStatistics; cush_getTokenOverview: (arg: [token_address?: string]) => TokenOverview; cush_getTokenOverviews: (arg: [token_addresses?: string[]]) => any; cush_userTokenBalances: (arg: [user_address?: string, block_number?: number]) => UserBalances; cush_valueUserBalances: (arg: [user_balances?: UserTokenBalance[], native_balance?: number, block_number?: number]) => UserBalances; cush_timestampAtBlock: (arg: [block_number?: number]) => number; cush_blockAtTimestamp: (arg: [timestamp?: number]) => number; cush_getPositions: (arg: [opts?: UserPositionsFilter]) => UserPositions[]; cush_topPositions: (arg: [opts?: SearchUserPositionFilterOpts]) => SearchUserPositionResponse; cush_searchPositions: (arg: [searchText?: string, opts?: SearchUserPositionFilterOpts]) => SearchUserPositionResponse; cush_searchAllNewOrders: (arg: [opts?: SearchOrdersOpts]) => NewOrder[]; cush_searchOrders: (arg: [opts?: SearchOrdersOpts]) => Order[]; cush_searchTokenOrders: (arg: [token_address?: string, opts?: SearchTokenOrdersOpts]) => TokenOrder[]; cush_analyticsProtocolOverview: (arg: []) => AnalyticsProtocolOverview; cush_analyticsProtocolHistoric: (arg: [timestamp_start_ms?: number, timestamp_end_ms?: number, interval_length?: number]) => HistoricProtocolStatistics[]; cush_analyticsTokenHistoric: (arg: [token_address?: string, timestamp_start_ms?: number, timestamp_end_ms?: number, interval_length?: number]) => HistoricAnalytics[]; cush_analyticsPoolHistoric: (arg: [pool_address?: string, timestamp_start_ms?: number, timestamp_end_ms?: number, interval_length?: number]) => HistoricAnalytics[]; cush_analyticsPool: (arg: [poolAddress?: string]) => AnalyticsPool; cush_analyticsPosition: (arg: [filter?: AnalyticsPositionFilter]) => AnalyticsPosition; cush_analyticsToken: (arg: [tokenAddress?: string]) => AnalyticsToken; cush_topUsers: (arg: [search_options?: UserSearchOptions]) => UserTradeStats[]; cush_analyticsUser: (arg: [userAddress?: string]) => AnalyticsUser; cush_analyticsUserActivityHistory: (arg: [userAddress?: string]) => AnalyticsActivityHistory; cush_analyticsUserDailyActivityHistory: (arg: [userAddress?: string]) => AnalyticsDailyActivityHistory; cush_analyticsUserVolumeHistoric: (arg: [userAddress?: string, start_timestamp?: number, end_timestamp?: number, interval_length?: number]) => UserSwapVolumeAnalytics[]; cush_HighestKnownNftPosition: (arg: []) => string; cush_getTokenMetrics: (arg: [tokenAddress?: string]) => TokenMetricResponse; cush_getUserActivityByVolume: (arg: [timestamp_start?: number, timestamp_end?: number]) => UserActivityByVolume; }