Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Group

Index

Constructors

Properties

Methods

Constructors

  • new Group(publicKey: PublicKey, creator: PublicKey, groupNum: number, admin: PublicKey, fastListingAdmin: PublicKey, mngoTokenIndex: TokenIndex, insuranceMint: PublicKey, insuranceVault: PublicKey, testing: number, version: number, buybackFees: boolean, buybackFeesMngoBonusFactor: number, addressLookupTables: PublicKey[], securityAdmin: PublicKey, depositLimitQuote: any, ixGate: BN, buybackFeesSwapMangoAccount: PublicKey, buybackFeesExpiryInterval: BN, fastListingIntervalStart: BN, fastListingsInInterval: number, allowedFastListingsPerInterval: number, collateralFeeInterval: BN, addressLookupTablesList: AddressLookupTableAccount[], banksMapByName: Map<string, Bank[]>, banksMapByMint: Map<string, Bank[]>, banksMapByTokenIndex: Map<TokenIndex, Bank[]>, serum3MarketsMapByExternal: Map<string, Serum3Market>, serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>, serum3ExternalMarketsMap: Map<string, Market>, openbookV2MarketsMapByExternal: Map<string, OpenbookV2Market>, openbookV2MarketsMapByMarketIndex: Map<MarketIndex, OpenbookV2Market>, openbookV2ExternalMarketsMap: Map<string, DecodeStruct<{ fields: [{ docs: ["PDA bump"]; name: "bump"; type: "u8" }, { docs: ["Number of decimals used for the base token.", "", "Used to convert the oracle's price into a native/native price."]; name: "baseDecimals"; type: "u8" }, { name: "quoteDecimals"; type: "u8" }, { name: "padding1"; type: { array: ["u8", 5] } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>, perpMarketsMapByOracle: Map<string, PerpMarket>, perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>, perpMarketsMapByName: Map<string, PerpMarket>, mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>, mintInfosMapByMint: Map<string, MintInfo>, vaultAmountsMap: Map<string, BN>, pis: PriceImpact[]): Group
  • Parameters

    • publicKey: PublicKey
    • creator: PublicKey
    • groupNum: number
    • admin: PublicKey
    • fastListingAdmin: PublicKey
    • mngoTokenIndex: TokenIndex
    • insuranceMint: PublicKey
    • insuranceVault: PublicKey
    • testing: number
    • version: number
    • buybackFees: boolean
    • buybackFeesMngoBonusFactor: number
    • addressLookupTables: PublicKey[]
    • securityAdmin: PublicKey
    • depositLimitQuote: any
    • ixGate: BN
    • buybackFeesSwapMangoAccount: PublicKey
    • buybackFeesExpiryInterval: BN
    • fastListingIntervalStart: BN
    • fastListingsInInterval: number
    • allowedFastListingsPerInterval: number
    • collateralFeeInterval: BN
    • addressLookupTablesList: AddressLookupTableAccount[]
    • banksMapByName: Map<string, Bank[]>
    • banksMapByMint: Map<string, Bank[]>
    • banksMapByTokenIndex: Map<TokenIndex, Bank[]>
    • serum3MarketsMapByExternal: Map<string, Serum3Market>
    • serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
    • serum3ExternalMarketsMap: Map<string, Market>
    • openbookV2MarketsMapByExternal: Map<string, OpenbookV2Market>
    • openbookV2MarketsMapByMarketIndex: Map<MarketIndex, OpenbookV2Market>
    • openbookV2ExternalMarketsMap: Map<string, DecodeStruct<{ fields: [{ docs: ["PDA bump"]; name: "bump"; type: "u8" }, { docs: ["Number of decimals used for the base token.", "", "Used to convert the oracle's price into a native/native price."]; name: "baseDecimals"; type: "u8" }, { name: "quoteDecimals"; type: "u8" }, { name: "padding1"; type: { array: ["u8", 5] } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>
    • perpMarketsMapByOracle: Map<string, PerpMarket>
    • perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
    • perpMarketsMapByName: Map<string, PerpMarket>
    • mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
    • mintInfosMapByMint: Map<string, MintInfo>
    • vaultAmountsMap: Map<string, BN>
    • pis: PriceImpact[]

    Returns Group

Properties

addressLookupTables: PublicKey[]
addressLookupTablesList: AddressLookupTableAccount[]
admin: PublicKey
allowedFastListingsPerInterval: number
banksMapByMint: Map<string, Bank[]>
banksMapByName: Map<string, Bank[]>
banksMapByTokenIndex: Map<TokenIndex, Bank[]>
buybackFees: boolean
buybackFeesExpiryInterval: BN
buybackFeesMngoBonusFactor: number
buybackFeesSwapMangoAccount: PublicKey
collateralFeeInterval: BN
creator: PublicKey
depositLimitQuote: any
fastListingAdmin: PublicKey
fastListingIntervalStart: BN
fastListingsInInterval: number
groupNum: number
insuranceMint: PublicKey
insuranceVault: PublicKey
ixGate: BN
mintInfosMapByMint: Map<string, MintInfo>
mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
mngoTokenIndex: TokenIndex
openbookV2ExternalMarketsMap: Map<string, DecodeStruct<{ fields: [{ docs: ["PDA bump"]; name: "bump"; type: "u8" }, { docs: ["Number of decimals used for the base token.", "", "Used to convert the oracle's price into a native/native price."]; name: "baseDecimals"; type: "u8" }, { name: "quoteDecimals"; type: "u8" }, { name: "padding1"; type: { array: ["u8", 5] } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>
openbookV2MarketsMapByExternal: Map<string, OpenbookV2Market>
openbookV2MarketsMapByMarketIndex: Map<MarketIndex, OpenbookV2Market>
perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
perpMarketsMapByName: Map<string, PerpMarket>
perpMarketsMapByOracle: Map<string, PerpMarket>
publicKey: PublicKey
securityAdmin: PublicKey
serum3ExternalMarketsMap: Map<string, Market>
serum3MarketsMapByExternal: Map<string, Serum3Market>
serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
testing: number
vaultAmountsMap: Map<string, BN>
version: number

Methods

  • consoleLogBanks(): void
  • decodePriceFromOracleAi(coder: BorshAccountsCoder<string>, oracle: PublicKey, ai: AccountInfo<Buffer>, baseDecimals: number, client: MangoClient): Promise<{ deviation: I80F48; lastUpdatedSlot: number; price: I80F48; provider: OracleProvider; uiPrice: number }>
  • getFirstBankByMint(mintPk: PublicKey): Bank
  • getFirstBankForMngo(): Bank
  • getFirstBankForPerpSettlement(): Bank
  • getInsuranceMintDecimals(): number
  • getMintDecimals(mintPk: PublicKey): number
  • getMintDecimalsByTokenIndex(tokenIndex: TokenIndex): number
  • getOpenbookV2ExternalMarket(externalMarketPk: PublicKey): DecodeStruct<{ fields: [{ docs: ["PDA bump"]; name: "bump"; type: "u8" }, { docs: ["Number of decimals used for the base token.", "", "Used to convert the oracle's price into a native/native price."]; name: "baseDecimals"; type: "u8" }, { name: "quoteDecimals"; type: "u8" }, { name: "padding1"; type: { array: ["u8", 5] } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>
  • Parameters

    • externalMarketPk: PublicKey

    Returns DecodeStruct<{ fields: [{ docs: ["PDA bump"]; name: "bump"; type: "u8" }, { docs: ["Number of decimals used for the base token.", "", "Used to convert the oracle's price into a native/native price."]; name: "baseDecimals"; type: "u8" }, { name: "quoteDecimals"; type: "u8" }, { name: "padding1"; type: { array: ["u8", 5] } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>

  • getOpenbookV2MarketByExternalMarket(externalMarketPk: PublicKey): OpenbookV2Market
  • getPerpMarketByName(perpMarketName: string): PerpMarket
  • getPerpMarketByOracle(oracle: PublicKey): PerpMarket
  • getPriceImpactByTokenIndex(tokenIndex: TokenIndex, usdcAmountUi: number): number
  • getSerum3ExternalMarket(externalMarketPk: PublicKey): Market
  • getSerum3MarketByExternalMarket(externalMarketPk: PublicKey): Serum3Market
  • getSerum3MarketByMarketIndex(marketIndex: MarketIndex): Serum3Market
  • getTokenVaultBalanceByMint(mintPk: PublicKey): BN
  • getTokenVaultBalanceByMintUi(mintPk: PublicKey): number
  • loadOpenbookV2AsksForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<DecodeStruct<{ fields: [{ name: "roots"; type: { array: [{ defined: "OrderTreeRoot" }, 2] } }, { name: "reservedRoots"; type: { array: [{ defined: "OrderTreeRoot" }, 4] } }, { name: "reserved"; type: { array: ["u8", 256] } }, { name: "nodes"; type: { defined: "OrderTreeNodes" } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>
  • Parameters

    Returns Promise<DecodeStruct<{ fields: [{ name: "roots"; type: { array: [{ defined: "OrderTreeRoot" }, 2] } }, { name: "reservedRoots"; type: { array: [{ defined: "OrderTreeRoot" }, 4] } }, { name: "reserved"; type: { array: ["u8", 256] } }, { name: "nodes"; type: { defined: "OrderTreeNodes" } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>

  • loadOpenbookV2BidsForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<DecodeStruct<{ fields: [{ name: "roots"; type: { array: [{ defined: "OrderTreeRoot" }, 2] } }, { name: "reservedRoots"; type: { array: [{ defined: "OrderTreeRoot" }, 4] } }, { name: "reserved"; type: { array: ["u8", 256] } }, { name: "nodes"; type: { defined: "OrderTreeNodes" } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>
  • Parameters

    Returns Promise<DecodeStruct<{ fields: [{ name: "roots"; type: { array: [{ defined: "OrderTreeRoot" }, 2] } }, { name: "reservedRoots"; type: { array: [{ defined: "OrderTreeRoot" }, 4] } }, { name: "reserved"; type: { array: ["u8", 256] } }, { name: "nodes"; type: { defined: "OrderTreeNodes" } }]; kind: "struct" }, DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], DecodedHelper<[{ docs: ["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"]; name: "NonZeroPubkeyOption"; type: { fields: [{ name: "key"; type: "publicKey" }]; kind: "struct" } }, { name: "Position"; type: { fields: [{ docs: ["Base lots in open bids"]; name: "bidsBaseLots"; type: "i64" }, { docs: ["Base lots in open asks"]; name: "asksBaseLots"; type: "i64" }, { name: "baseFreeNative"; type: "u64" }, { name: "quoteFreeNative"; type: "u64" }, { name: "lockedMakerFees"; type: "u64" }]; kind: "struct" } }, { name: "OpenOrder"; type: { fields: [{ name: "id"; type: "u128" }, { name: "clientId"; type: "u64" }, { docs: ["Price at which user's assets were locked"]; name: "lockedPrice"; type: "i64" }, { name: "isFree"; type: "u8" }, { name: "sideAndTree"; type: "u8" }, { name: "padding"; type: { array: ["u8", 6] } }]; kind: "struct" } }], EmptyDefined>>>>

  • loadSerum3AsksForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
  • loadSerum3BidsForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
  • reloadBankOraclePrices(client: MangoClient): Promise<void>
  • reloadBanks(client: MangoClient, ids?: Id): Promise<void>
  • reloadMintInfos(client: MangoClient, ids?: Id): Promise<void>
  • reloadOpenbookV2ExternalMarkets(client: MangoClient, ids?: Id): Promise<void>
  • reloadOpenbookV2Markets(client: MangoClient, ids?: Id): Promise<void>
  • reloadPerpMarketOraclePrices(client: MangoClient): Promise<void>
  • reloadPerpMarkets(client: MangoClient, ids?: Id): Promise<void>
  • reloadPriceImpactData(): Promise<void>
  • reloadSerum3ExternalMarkets(client: MangoClient, ids?: Id): Promise<void>
  • reloadSerum3Markets(client: MangoClient, ids?: Id): Promise<void>
  • toNativeDecimals(uiAmount: number, mintPk: PublicKey): BN
  • toNativePrice(uiPrice: number, baseDecimals: number): I80F48
  • toString(): string
  • toUiPrice(price: number | I80F48, baseDecimals: number): number
  • from(publicKey: PublicKey, obj: { addressLookupTables: PublicKey[]; admin: PublicKey; allowedFastListingsPerInterval: number; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; collateralFeeInterval: BN; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; fastListingIntervalStart: BN; fastListingsInInterval: number; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }): Group
  • Parameters

    • publicKey: PublicKey
    • obj: { addressLookupTables: PublicKey[]; admin: PublicKey; allowedFastListingsPerInterval: number; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; collateralFeeInterval: BN; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; fastListingIntervalStart: BN; fastListingsInInterval: number; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }
      • addressLookupTables: PublicKey[]
      • admin: PublicKey
      • allowedFastListingsPerInterval: number
      • buybackFees: number
      • buybackFeesExpiryInterval: BN
      • buybackFeesMngoBonusFactor: number
      • buybackFeesSwapMangoAccount: PublicKey
      • collateralFeeInterval: BN
      • creator: PublicKey
      • depositLimitQuote: BN
      • fastListingAdmin: PublicKey
      • fastListingIntervalStart: BN
      • fastListingsInInterval: number
      • groupNum: number
      • insuranceMint: PublicKey
      • insuranceVault: PublicKey
      • ixGate: BN
      • mngoTokenIndex: number
      • securityAdmin: PublicKey
      • testing: number
      • version: number

    Returns Group

Generated using TypeDoc