marginpy.generated_client.errors.custom module
- exception Unauthorized
Bases:
ProgramError
- code = 6000
- name = 'Unauthorized'
- msg = 'Signer not authorized to perform this action'
- exception EmptyLendingPool
Bases:
ProgramError
- code = 6001
- name = 'EmptyLendingPool'
- msg = 'Lending pool empty'
- exception IllegalUtilizationRatio
Bases:
ProgramError
- code = 6002
- name = 'IllegalUtilizationRatio'
- msg = 'Illegal utilization ratio'
- exception InvalidTimestamp
Bases:
ProgramError
- code = 6004
- name = 'InvalidTimestamp'
- msg = 'Invalid timestamp'
- exception MarginRequirementsNotMet
Bases:
ProgramError
- code = 6005
- name = 'MarginRequirementsNotMet'
- msg = 'Initialization margin requirements not met'
- exception OnlyReduceAllowed
Bases:
ProgramError
- code = 6006
- name = 'OnlyReduceAllowed'
- msg = 'Only reducing trades are allowed when under init margin requirements'
- exception UtpAlreadyActive
Bases:
ProgramError
- code = 6008
- name = 'UtpAlreadyActive'
- msg = 'Utp is already active'
- exception InvalidAccountData
Bases:
ProgramError
- code = 6009
- name = 'InvalidAccountData'
- msg = 'Invalid Account Data'
- exception LiquidatorHasActiveUtps
Bases:
ProgramError
- code = 6010
- name = 'LiquidatorHasActiveUtps'
- msg = 'Liquidator has active utps'
- exception AccountHasActiveUtps
Bases:
ProgramError
- code = 6011
- name = 'AccountHasActiveUtps'
- msg = 'Account has active utps'
- exception AccountNotLiquidatable
Bases:
ProgramError
- code = 6012
- name = 'AccountNotLiquidatable'
- msg = 'Marginfi account not liquidatable'
- exception AccountNotBankrupt
Bases:
ProgramError
- code = 6013
- name = 'AccountNotBankrupt'
- msg = 'Marginfi account not bankrupt'
- exception IllegalUtpDeactivation
Bases:
ProgramError
- code = 6014
- name = 'IllegalUtpDeactivation'
- msg = 'Utp account cannot be deactivated'
- exception IllegalRebalance
Bases:
ProgramError
- code = 6015
- name = 'IllegalRebalance'
- msg = 'Rebalance not legal'
- exception BorrowNotAllowed
Bases:
ProgramError
- code = 6016
- name = 'BorrowNotAllowed'
- msg = 'Borrow not allowed'
- exception IllegalConfig
Bases:
ProgramError
- code = 6017
- name = 'IllegalConfig'
- msg = 'Config value not legal'
- exception OperationsPaused
Bases:
ProgramError
- code = 6018
- name = 'OperationsPaused'
- msg = 'Operations paused'
- exception InsufficientVaultBalance
Bases:
ProgramError
- code = 6019
- name = 'InsufficientVaultBalance'
- msg = 'Insufficient balance'
- exception Forbidden
Bases:
ProgramError
- code = 6020
- name = 'Forbidden'
- msg = 'This operation is forbidden'
- exception InvalidUTPAccount
Bases:
ProgramError
- code = 6021
- name = 'InvalidUTPAccount'
- msg = 'Invalid account key'
- exception AccountDepositLimit
Bases:
ProgramError
- code = 6022
- name = 'AccountDepositLimit'
- msg = 'Deposit exceeds account cap'
- exception GroupDepositLimit
Bases:
ProgramError
- code = 6023
- name = 'GroupDepositLimit'
- msg = 'Deposit exceeds group cap'
- exception InvalidObserveAccounts
Bases:
ProgramError
- code = 6024
- name = 'InvalidObserveAccounts'
- msg = 'Missing accounts for UTP observation'
- from_code(code: int) Optional[Union[Unauthorized, EmptyLendingPool, IllegalUtilizationRatio, MathError, InvalidTimestamp, MarginRequirementsNotMet, OnlyReduceAllowed, UtpInactive, UtpAlreadyActive, InvalidAccountData, LiquidatorHasActiveUtps, AccountHasActiveUtps, AccountNotLiquidatable, AccountNotBankrupt, IllegalUtpDeactivation, IllegalRebalance, BorrowNotAllowed, IllegalConfig, OperationsPaused, InsufficientVaultBalance, Forbidden, InvalidUTPAccount, AccountDepositLimit, GroupDepositLimit, InvalidObserveAccounts, MangoError]]