import { n as IndexerEventType } from "./IndexerEventType-CXrGLtVb.js"; import { t as IndexerLeaderboardRankType } from "./IndexerLeaderboardType-BRzI5b0J.js"; import { o as NadoTx } from "./NadoTx-B3fNEL7N.js"; import { EIP712OrderValues } from "@nadohq/shared"; import { EngineServerPerpBalance, EngineServerPerpProduct, EngineServerSpotBalance, EngineServerSpotProduct } from "@nadohq/engine-client"; //#region src/types/serverModelTypes.d.ts interface IndexerServerSnapshotsInterval { count: number; granularity: number; max_time?: string; } type IndexerServerProduct = { spot: EngineServerSpotProduct; } | { perp: EngineServerPerpProduct; }; type IndexerServerBalance = { spot: EngineServerSpotBalance; } | { perp: EngineServerPerpBalance; }; /** * Candlesticks */ interface IndexerServerCandlestick { product_id: number; granularity: string; submission_idx: string; timestamp: string; open_x18: string; high_x18: string; low_x18: string; close_x18: string; volume: string; } /** * Product snapshots */ interface IndexerServerProductSnapshot { product_id: number; submission_idx: string; product: IndexerServerProduct; } /** * Base Events */ interface IndexerServerEvent { subaccount: string; isolated: boolean; isolated_product_id: number | null; product_id: number; submission_idx: string; event_type: IndexerEventType; pre_balance: IndexerServerBalance; post_balance: IndexerServerBalance; product: IndexerServerProduct; net_interest_unrealized: string; net_interest_cumulative: string; net_funding_unrealized: string; net_funding_cumulative: string; net_entry_unrealized: string; net_entry_cumulative: string; /** * Total traded volume in terms of the primary quote (i.e in terms of USDT) for this product */ quote_volume_cumulative: string; /** * Total number of fills for this subaccount + product, as an integer string. * Events indexed before this field existed report `0`. */ cumulative_trade_count: string; } interface IndexerServerTx { submission_idx: string; timestamp: string; tx: NadoTx; } /** * Orders */ interface IndexerServerOrder { digest: string; subaccount: string; product_id: number; submission_idx: string; last_fill_submission_idx: string; amount: string; price_x18: string; expiration: string; appendix: string; nonce: string; isolated: boolean; base_filled: string; quote_filled: string; fee: string; builder_fee: string; realized_pnl: string; closed_amount: string; closed_net_entry: string; closed_margin: string | null; first_fill_timestamp: string; last_fill_timestamp: string; pre_balance: IndexerServerMatchEventBalances; post_balance: IndexerServerMatchEventBalances; } /** * Match events */ interface IndexerServerMatchEvent { digest: string; isolated: boolean; order: EIP712OrderValues; base_filled: string; quote_filled: string; fee: string; sequencer_fee: string; builder_fee: string; cumulative_fee: string; cumulative_base_filled: string; cumulative_quote_filled: string; submission_idx: string; net_entry_unrealized: string; net_entry_cumulative: string; pre_balance: IndexerServerMatchEventBalances; post_balance: IndexerServerMatchEventBalances; is_taker: boolean; realized_pnl: string; closed_amount: string; closed_net_entry: string; margin: string | null; } interface IndexerServerMatchEventBalances { base: IndexerServerBalance; quote?: IndexerServerBalance; } /** * Positions */ /** * A single historical position. All amount fields are absolute values; the side of the * position is given by `direction`. */ interface IndexerServerPosition { subaccount: string; product_id: number; isolated: boolean; direction: boolean; open_id: string; close_id: string; submission_idx: string; amount: string; max_amount: string; total_open_amount: string; total_close_amount: string; average_entry_price: string; average_exit_price: string; liquidated_amount: string; max_isolated_leverage_x18: string; open_fee: string; close_fee: string; realized_pnl: string; open_timestamp: string; update_timestamp: string; open_reason: IndexerEventType; close_reason: IndexerEventType | null; net_funding_payment: string; net_interest_payment: string; open_digest: string | null; close_digest: string | null; net_entry_unrealized: string; } /** * Oracle price */ interface IndexerServerOraclePrice { product_id: number; oracle_price_x18: string; update_time: number; } /** * Market snapshots */ interface IndexerServerMarketSnapshotInterval { count: number; granularity: number; max_time?: string; } interface IndexerServerMarketSnapshot { timestamp: string; cumulative_users: string; daily_active_users: string; tvl: string; cumulative_volumes: Record; cumulative_taker_fees: Record; cumulative_sequencer_fees: Record; cumulative_maker_fees: Record; cumulative_trades: Record; cumulative_liquidation_amounts: Record; open_interests: Record; total_deposits: Record; total_borrows: Record; funding_rates: Record; deposit_rates: Record; borrow_rates: Record; cumulative_trade_sizes: Record; cumulative_inflows: Record; cumulative_outflows: Record; oracle_prices: Record; } /** * Interest / funding */ interface IndexerServerProductPayment { product_id: number; idx: string; timestamp: string; amount: string; balance_amount: string; rate_x18: string; oracle_price_x18: string; isolated: boolean; isolated_product_id: number | null; } /** * Maker stats */ interface IndexerServerMakerData { timestamp: string; maker_fee: string; uptime: string; sum_q_min: string; q_score: string; maker_share: string; expected_maker_reward: string; } interface IndexerServerMaker { address: string; data: IndexerServerMakerData[]; } /** * Leaderboard */ interface IndexerServerSocialAccount { provider: 'twitter'; username: string; display_name: string; profile_image_url: string; } interface IndexerServerLeaderboardTrackPosition { value: string; rank: string; qualification_status: 'qualified' | 'insufficient_account_value' | 'insufficient_volume' | 'insufficient_account_value_and_volume'; } interface IndexerServerLeaderboardContestTrack { track_id: number; rank_type: IndexerLeaderboardRankType; sort_order: 'ASC' | 'DESC'; threshold: string; volume_threshold: string; } interface IndexerServerLeaderboardPosition { subaccount: string; contest_id: number; account_value: string; update_time: string; tracks: Partial>; social_accounts: IndexerServerSocialAccount[]; } interface IndexerServerLeaderboardContest { contest_id: number; start_time: string; end_time: string; count: string; last_updated: string; product_ids: number[]; active: boolean; title: string; description: string; tracks: IndexerServerLeaderboardContestTrack[]; } interface IndexerServerLeaderboardRegistration { subaccount: string; contest_id: number; update_time: string; } /** * NLP */ interface IndexerServerNlpSnapshot { cumulative_burn_quote: string; cumulative_mint_quote: string; cumulative_pnl: string; cumulative_trades: string; cumulative_volume: string; depositors: string; oracle_price_x18: string; submission_idx: string; timestamp: string; tvl: string; } //#endregion export { IndexerServerSocialAccount as C, IndexerServerSnapshotsInterval as S, IndexerServerOrder as _, IndexerServerLeaderboardContestTrack as a, IndexerServerProductPayment as b, IndexerServerLeaderboardTrackPosition as c, IndexerServerMarketSnapshot as d, IndexerServerMarketSnapshotInterval as f, IndexerServerOraclePrice as g, IndexerServerNlpSnapshot as h, IndexerServerLeaderboardContest as i, IndexerServerMaker as l, IndexerServerMatchEventBalances as m, IndexerServerCandlestick as n, IndexerServerLeaderboardPosition as o, IndexerServerMatchEvent as p, IndexerServerEvent as r, IndexerServerLeaderboardRegistration as s, IndexerServerBalance as t, IndexerServerMakerData as u, IndexerServerPosition as v, IndexerServerTx as w, IndexerServerProductSnapshot as x, IndexerServerProduct as y }; //# sourceMappingURL=serverModelTypes-BfOkt5IH.d.ts.map