marginpy.utp.zo.utils.client.types module

class ZoOrderType(value)

Bases: Enum

An enumeration.

LIMIT = 'LIMIT'
IMMEDIATE_OR_CANCEL = 'IMMEDIATE_OR_CANCEL'
POST_ONLY = 'POST_ONLY'
REDUCE_ONLY_IOC = 'REDUCE_ONLY_IOC'
REDUCE_ONLY_LIMIT = 'REDUCE_ONLY_LIMIT'
FILL_OR_KILL = 'FILL_OR_KILL'
to_program_type() Union[Limit, ImmediateOrCancel, PostOnly, ReduceOnlyIoc, ReduceOnlyLimit, FillOrKill]
class CollateralInfo(mint: solana.publickey.PublicKey, oracle_symbol: str, decimals: int, weight: int, liq_fee: int, is_borrowable: bool, optimal_util: int, optimal_rate: int, max_rate: int, og_fee: int, is_swappable: bool, serum_open_orders: solana.publickey.PublicKey, max_deposit: int, dust_threshold: int, vault: solana.publickey.PublicKey)

Bases: object

mint: PublicKey
oracle_symbol: str
decimals: int
weight: int
liq_fee: int
is_borrowable: bool
optimal_util: int
optimal_rate: int
max_rate: int
og_fee: int
is_swappable: bool
serum_open_orders: PublicKey
max_deposit: int
dust_threshold: int
vault: PublicKey
class FundingInfo(hourly: float, daily: float, apr: float)

Bases: object

hourly: float
daily: float
apr: float
class MarketInfo(address: solana.publickey.PublicKey, symbol: str, oracle_symbol: str, perp_type: Literal['future', 'calloption', 'putoption', 'square'], base_decimals: int, base_lot_size: int, quote_decimals: int, quote_lot_size: int, strike: int, base_imf: int, liq_fee: int, index_price: float, mark_price: float, funding_sample_start_time: datetime.datetime, funding_info: marginpy.utp.zo.utils.client.types.FundingInfo)

Bases: object

address: PublicKey
symbol: str
oracle_symbol: str
perp_type: Literal['future', 'calloption', 'putoption', 'square']
base_decimals: int
base_lot_size: int
quote_decimals: int
quote_lot_size: int
strike: int
base_imf: int
liq_fee: int
index_price: float
mark_price: float
funding_sample_start_time: datetime
funding_info: FundingInfo
property funding_rate
class PositionInfo(size: float, value: float, realized_pnl: float, funding_index: float, side: Literal['long', 'short'])

Bases: object

size: float
value: float
realized_pnl: float
funding_index: float
side: Literal['long', 'short']
order_type_from_str(t: Literal['Limit', 'ImmediateOrCancel', 'PostOnly', 'ReduceOnlyIoc', 'ReduceOnlyLimit', 'FillOrKill'], /, *, program: Program)
perp_type_to_str(t: Any, /, *, program: Program) Literal['future', 'calloption', 'putoption', 'square']