zetamarkets_py.zeta_client.accounts package#

Submodules#

zetamarkets_py.zeta_client.accounts.cross_margin_account module#

class zetamarkets_py.zeta_client.accounts.cross_margin_account.CrossMarginAccount(authority: solders.pubkey.Pubkey, delegated_pubkey: solders.pubkey.Pubkey, balance: int, subaccount_index: int, nonce: int, force_cancel_flag: bool, account_type: zetamarkets_py.zeta_client.types.margin_account_type.Normal | zetamarkets_py.zeta_client.types.margin_account_type.MarketMaker | zetamarkets_py.zeta_client.types.margin_account_type.MarketMakerT1, open_orders_nonces: list[int], open_orders_nonces_padding: list[int], rebalance_amount: int, last_funding_deltas: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], last_funding_deltas_padding: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], product_ledgers: list[zetamarkets_py.zeta_client.types.product_ledger.ProductLedger], product_ledgers_padding: list[zetamarkets_py.zeta_client.types.product_ledger.ProductLedger], trigger_order_bits: int, padding: list[int])#

Bases: object

account_type: Normal | MarketMaker | MarketMakerT1#
authority: Pubkey#
balance: int#
classmethod decode(data: bytes) CrossMarginAccount#
delegated_pubkey: Pubkey#
discriminator: ClassVar = b'\xf2^\x8e\x83#\xf4\x93\x1c'#
async classmethod fetch(conn: AsyncClient, address: Pubkey, commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) CrossMarginAccount | None#
async classmethod fetch_multiple(conn: AsyncClient, addresses: list[Pubkey], commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) List[CrossMarginAccount | None]#
force_cancel_flag: bool#
classmethod from_json(obj: CrossMarginAccountJSON) CrossMarginAccount#
last_funding_deltas: list[AnchorDecimal]#
last_funding_deltas_padding: list[AnchorDecimal]#
layout: ClassVar = <CStruct>#
nonce: int#
open_orders_nonces: list[int]#
open_orders_nonces_padding: list[int]#
padding: list[int]#
product_ledgers: list[ProductLedger]#
product_ledgers_padding: list[ProductLedger]#
rebalance_amount: int#
subaccount_index: int#
to_json() CrossMarginAccountJSON#
trigger_order_bits: int#
class zetamarkets_py.zeta_client.accounts.cross_margin_account.CrossMarginAccountJSON#

Bases: TypedDict

account_type: NormalJSON | MarketMakerJSON | MarketMakerT1JSON#
authority: str#
balance: int#
delegated_pubkey: str#
force_cancel_flag: bool#
last_funding_deltas: list[AnchorDecimalJSON]#
last_funding_deltas_padding: list[AnchorDecimalJSON]#
nonce: int#
open_orders_nonces: list[int]#
open_orders_nonces_padding: list[int]#
padding: list[int]#
product_ledgers: list[ProductLedgerJSON]#
product_ledgers_padding: list[ProductLedgerJSON]#
rebalance_amount: int#
subaccount_index: int#
trigger_order_bits: int#

zetamarkets_py.zeta_client.accounts.pricing module#

class zetamarkets_py.zeta_client.accounts.pricing.Pricing(nonce: int, mark_prices: list[int], mark_prices_padding: list[int], update_timestamps: list[int], update_timestamps_padding: list[int], funding_deltas: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], funding_deltas_padding: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], latest_funding_rates: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], latest_funding_rates_padding: list[zetamarkets_py.zeta_client.types.anchor_decimal.AnchorDecimal], latest_midpoints: list[int], latest_midpoints_padding: list[int], oracles: list[solders.pubkey.Pubkey], oracles_padding: list[solders.pubkey.Pubkey], oracle_backup_feeds: list[solders.pubkey.Pubkey], oracle_backup_feeds_padding: list[solders.pubkey.Pubkey], markets: list[solders.pubkey.Pubkey], markets_padding: list[solders.pubkey.Pubkey], perp_sync_queues: list[solders.pubkey.Pubkey], perp_sync_queues_padding: list[solders.pubkey.Pubkey], perp_parameters: list[zetamarkets_py.zeta_client.types.perp_parameters.PerpParameters], perp_parameters_padding: list[zetamarkets_py.zeta_client.types.perp_parameters.PerpParameters], margin_parameters: list[zetamarkets_py.zeta_client.types.margin_parameters.MarginParameters], margin_parameters_padding: list[zetamarkets_py.zeta_client.types.margin_parameters.MarginParameters], products: list[zetamarkets_py.zeta_client.types.product.Product], products_padding: list[zetamarkets_py.zeta_client.types.product.Product], zeta_group_keys: list[solders.pubkey.Pubkey], zeta_group_keys_padding: list[solders.pubkey.Pubkey], total_insurance_vault_deposits: int, last_withdraw_timestamp: int, net_outflow_sum: int, halt_force_pricing: list[bool], halt_force_pricing_padding: list[bool], padding: list[int])#

Bases: object

classmethod decode(data: bytes) Pricing#
discriminator: ClassVar = b'\xbe{\xd2\xb6\x8f\x0b\x98\x88'#
async classmethod fetch(conn: AsyncClient, address: Pubkey, commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) Pricing | None#
async classmethod fetch_multiple(conn: AsyncClient, addresses: list[Pubkey], commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) List[Pricing | None]#
classmethod from_json(obj: PricingJSON) Pricing#
funding_deltas: list[AnchorDecimal]#
funding_deltas_padding: list[AnchorDecimal]#
halt_force_pricing: list[bool]#
halt_force_pricing_padding: list[bool]#
last_withdraw_timestamp: int#
latest_funding_rates: list[AnchorDecimal]#
latest_funding_rates_padding: list[AnchorDecimal]#
latest_midpoints: list[int]#
latest_midpoints_padding: list[int]#
layout: ClassVar = <CStruct>#
margin_parameters: list[MarginParameters]#
margin_parameters_padding: list[MarginParameters]#
mark_prices: list[int]#
mark_prices_padding: list[int]#
markets: list[Pubkey]#
markets_padding: list[Pubkey]#
net_outflow_sum: int#
nonce: int#
oracle_backup_feeds: list[Pubkey]#
oracle_backup_feeds_padding: list[Pubkey]#
oracles: list[Pubkey]#
oracles_padding: list[Pubkey]#
padding: list[int]#
perp_parameters: list[PerpParameters]#
perp_parameters_padding: list[PerpParameters]#
perp_sync_queues: list[Pubkey]#
perp_sync_queues_padding: list[Pubkey]#
products: list[Product]#
products_padding: list[Product]#
to_json() PricingJSON#
total_insurance_vault_deposits: int#
update_timestamps: list[int]#
update_timestamps_padding: list[int]#
zeta_group_keys: list[Pubkey]#
zeta_group_keys_padding: list[Pubkey]#
class zetamarkets_py.zeta_client.accounts.pricing.PricingJSON#

Bases: TypedDict

funding_deltas: list[AnchorDecimalJSON]#
funding_deltas_padding: list[AnchorDecimalJSON]#
halt_force_pricing: list[bool]#
halt_force_pricing_padding: list[bool]#
last_withdraw_timestamp: int#
latest_funding_rates: list[AnchorDecimalJSON]#
latest_funding_rates_padding: list[AnchorDecimalJSON]#
latest_midpoints: list[int]#
latest_midpoints_padding: list[int]#
margin_parameters: list[MarginParametersJSON]#
margin_parameters_padding: list[MarginParametersJSON]#
mark_prices: list[int]#
mark_prices_padding: list[int]#
markets: list[str]#
markets_padding: list[str]#
net_outflow_sum: int#
nonce: int#
oracle_backup_feeds: list[str]#
oracle_backup_feeds_padding: list[str]#
oracles: list[str]#
oracles_padding: list[str]#
padding: list[int]#
perp_parameters: list[PerpParametersJSON]#
perp_parameters_padding: list[PerpParametersJSON]#
perp_sync_queues: list[str]#
perp_sync_queues_padding: list[str]#
products: list[ProductJSON]#
products_padding: list[ProductJSON]#
total_insurance_vault_deposits: int#
update_timestamps: list[int]#
update_timestamps_padding: list[int]#
zeta_group_keys: list[str]#
zeta_group_keys_padding: list[str]#

zetamarkets_py.zeta_client.accounts.state module#

class zetamarkets_py.zeta_client.accounts.state.State(admin: solders.pubkey.Pubkey, state_nonce: int, serum_nonce: int, mint_auth_nonce: int, num_underlyings: int, num_flex_underlyings: int, null: list[int], strike_initialization_threshold_seconds: int, pricing_frequency_seconds: int, liquidator_liquidation_percentage: int, insurance_vault_liquidation_percentage: int, native_d1_trade_fee_percentage: int, native_d1_underlying_fee_percentage: int, native_whitelist_underlying_fee_percentage: int, native_deposit_limit: int, expiration_threshold_seconds: int, position_movement_fee_bps: int, margin_concession_percentage: int, treasury_wallet_nonce: int, native_option_trade_fee_percentage: int, native_option_underlying_fee_percentage: int, referrals_admin: solders.pubkey.Pubkey, referrals_rewards_wallet_nonce: int, max_perp_delta_age: int, secondary_admin: solders.pubkey.Pubkey, vault_nonce: int, insurance_vault_nonce: int, deprecated_total_insurance_vault_deposits: int, native_withdraw_limit: int, withdraw_limit_epoch_seconds: int, native_open_interest_limit: int, halt_states: list[zetamarkets_py.zeta_client.types.halt_state_v2.HaltStateV2], halt_states_padding: list[zetamarkets_py.zeta_client.types.halt_state_v2.HaltStateV2], trigger_admin: solders.pubkey.Pubkey, min_lot_sizes: list[int], min_lot_sizes_padding: list[int], tick_sizes: list[int], tick_sizes_padding: list[int], native_maker_trade_fee_percentage: int, padding: list[int])#

Bases: object

admin: Pubkey#
classmethod decode(data: bytes) State#
deprecated_total_insurance_vault_deposits: int#
discriminator: ClassVar = b'\xd8\x92k^hK\xb6\xb1'#
expiration_threshold_seconds: int#
async classmethod fetch(conn: AsyncClient, address: Pubkey, commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) State | None#
async classmethod fetch_multiple(conn: AsyncClient, addresses: list[Pubkey], commitment: Commitment | None = None, program_id: Pubkey = Pubkey(ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD)) List[State | None]#
classmethod from_json(obj: StateJSON) State#
halt_states: list[HaltStateV2]#
halt_states_padding: list[HaltStateV2]#
insurance_vault_liquidation_percentage: int#
insurance_vault_nonce: int#
layout: ClassVar = <CStruct>#
liquidator_liquidation_percentage: int#
margin_concession_percentage: int#
max_perp_delta_age: int#
min_lot_sizes: list[int]#
min_lot_sizes_padding: list[int]#
mint_auth_nonce: int#
native_d1_trade_fee_percentage: int#
native_d1_underlying_fee_percentage: int#
native_deposit_limit: int#
native_maker_trade_fee_percentage: int#
native_open_interest_limit: int#
native_option_trade_fee_percentage: int#
native_option_underlying_fee_percentage: int#
native_whitelist_underlying_fee_percentage: int#
native_withdraw_limit: int#
null: list[int]#
num_flex_underlyings: int#
num_underlyings: int#
padding: list[int]#
position_movement_fee_bps: int#
pricing_frequency_seconds: int#
referrals_admin: Pubkey#
referrals_rewards_wallet_nonce: int#
secondary_admin: Pubkey#
serum_nonce: int#
state_nonce: int#
strike_initialization_threshold_seconds: int#
tick_sizes: list[int]#
tick_sizes_padding: list[int]#
to_json() StateJSON#
treasury_wallet_nonce: int#
trigger_admin: Pubkey#
vault_nonce: int#
withdraw_limit_epoch_seconds: int#
class zetamarkets_py.zeta_client.accounts.state.StateJSON#

Bases: TypedDict

admin: str#
deprecated_total_insurance_vault_deposits: int#
expiration_threshold_seconds: int#
halt_states: list[HaltStateV2JSON]#
halt_states_padding: list[HaltStateV2JSON]#
insurance_vault_liquidation_percentage: int#
insurance_vault_nonce: int#
liquidator_liquidation_percentage: int#
margin_concession_percentage: int#
max_perp_delta_age: int#
min_lot_sizes: list[int]#
min_lot_sizes_padding: list[int]#
mint_auth_nonce: int#
native_d1_trade_fee_percentage: int#
native_d1_underlying_fee_percentage: int#
native_deposit_limit: int#
native_maker_trade_fee_percentage: int#
native_open_interest_limit: int#
native_option_trade_fee_percentage: int#
native_option_underlying_fee_percentage: int#
native_whitelist_underlying_fee_percentage: int#
native_withdraw_limit: int#
null: list[int]#
num_flex_underlyings: int#
num_underlyings: int#
padding: list[int]#
position_movement_fee_bps: int#
pricing_frequency_seconds: int#
referrals_admin: str#
referrals_rewards_wallet_nonce: int#
secondary_admin: str#
serum_nonce: int#
state_nonce: int#
strike_initialization_threshold_seconds: int#
tick_sizes: list[int]#
tick_sizes_padding: list[int]#
treasury_wallet_nonce: int#
trigger_admin: str#
vault_nonce: int#
withdraw_limit_epoch_seconds: int#

Module contents#