Add a new oracle to a group
Cancel all perp orders across all markets
Cancel an order on a perp market
Don't throw error if order is invalid
Change the referral fee params
normal units 0.0001 -> 1 basis point
ui units -> 1 -> 1_000_000 MNGO
Called by the Keeper to process events on the Perp order book
Create a new Mango Account (PDA) on a given group
Create a new Mango Account (PDA) and deposit some tokens in a single transaction
The RootBank for the deposit currency
The NodeBank asociated with the RootBank
The token account asociated with the NodeBank
The token account to transfer from
An optional UI name for the account
Deposit tokens in a Mango Account
The RootBank for the deposit currency
The NodeBank asociated with the RootBank
The token account asociated with the NodeBank
The token account to transfer from
Send multiple instructions to cancel all perp orders in this market
Retrieve information about a Mango Account
Get all MangoAccounts where delegate
pubkey has authority
Retrieve information about a Mango Group
Retrieve information about a perp market
DEPRECATED - Create a new Mango Account on a given group
Create a new Mango Account and deposit some tokens in a single transaction
The RootBank for the deposit currency
The NodeBank asociated with the RootBank
The token account asociated with the NodeBank
The token account to transfer from
An optional UI name for the account
Add allowance for orders to be cancelled and replaced in a single transaction
Place an order on a perp market
An optional id that can be used to correlate events related to your order
Account info for asks if side === bid, bids if side === ask. If this is given, crank instruction is added
Place an order on a perp market
Make sure mangoAccount has recent and valid inMarginBasket and spotOpenOrders
Make sure mangoAccount has recent and valid inMarginBasket and spotOpenOrders
Send a transaction using the Solana Web3.js connection on the mango client
Retries sending the transaction and trying to confirm it until the given timeout. Passing null will disable the transaction confirmation check and always return success.
Set the price of a 'stub' type oracle
Assumes spotMarkets contains all Markets in MangoGroup in order
Settle all perp accounts with any pnl
Automatically fetch MangoAccounts for this PerpMarket Pick enough MangoAccounts that have opposite sign and send them in to get settled
Settle all perp accounts with positive pnl
Called by the Keeper to update interest rates on the RootBanks
Upgrade a Mango Account from V0 (not deletable) to V1 (deletable)
Withdraw tokens from a Mango Account
The RootBank for the withdrawn currency
The NodeBank asociated with the RootBank
The token account asociated with the NodeBank
Whether to borrow tokens if there are not enough deposits for the withdrawal
Withdraw tokens from a Mango Account, only passing open orders accounts in the margin basket
The RootBank for the withdrawn currency
The NodeBank asociated with the RootBank
The token account asociated with the NodeBank
Whether to borrow tokens if there are not enough deposits for the withdrawal
Generated using TypeDoc
A class for interacting with the Mango V3 Program
A solana web.js Connection object
The PublicKey of the Mango V3 Program
An object used to configure the MangoClient. Accepts a postSendTxCallback, and prioritizationFee. The prioritizationFee is a number measured in micro lamports that is charged per compute unit.