(WrapperPlaceOrderParamsExternal | WrapperPlaceOrderReverseParamsExternal)[] including all the information for placing an order like amount, price, ordertype, ... This is called external because to avoid conflicts with the autogenerated version which has problems with expressing some of the parameters. The reverse type has a spreadBps field instead of lastValidSlot.
TransactionInstruction
CancelAll instruction. Cancels all orders on a market. This is discouraged outside of circuit breaker usage because it is less efficient and does not cancel global cleanly. Use batchUpdate instead. This also does not cancel any orders not placed through the wrapper, which includes reverse orders that were reversed.
TransactionInstruction
Deposit instruction
PublicKey of the trader
PublicKey for deposit mint. Must be either the base or quote
Number of tokens to deposit.
TransactionInstruction
PlaceOrder instruction
WrapperPlaceOrderParamsExternal | WrapperPlaceOrderReverseParamsExternal including all the information for placing an order like amount, price, ordertype, ... This is called external because to avoid conflicts with the autogenerated version which has problems with expressing some of the parameters. The reverse type has a spreadBps field instead of lastValidSlot.
TransactionInstruction
PlaceOrderWithRequiredDeposit instruction. Only deposits the appropriate base or quote tokens if not in the withdrawable balances.
PublicKey of the trader
WrapperPlaceOrderParamsExternal | WrapperPlaceOrderReverseParamsExternal including all the information for placing an order like amount, price, ordertype, ... This is called external because to avoid conflicts with the autogenerated version which has problems with expressing some of the parameters. The reverse type has a spreadBps field instead of lastValidSlot.
TransactionInstruction[]
Swap instruction
Optimized swap for routers and arb bots. Normal traders should compose depost/withdraw/placeOrder to get limit orders. Does not go through the wrapper.
PublicKey of the trader
SwapParams
TransactionInstruction
Withdraw instruction
PublicKey of the trader
PublicKey for withdraw mint. Must be either the base or quote
Number of tokens to withdraw.
TransactionInstruction
StaticcreateCreateGlobalAddTrader instruction. Adds a new trader to the global account. Static because it does not require a wrapper.
PublicKey of the trader
PublicKey of the globalMint
TransactionInstruction
StaticgetCreate a new client which creates a wrapper and claims seat if needed.
Connection
PublicKey of the market
Keypair of the trader
ManifestClient
StaticgetCreate a new client. throws if setup ixs are needed. Call ManifestClient.getSetupIxs to check if ixs are needed.
This is the way to create a client without directly passing in Keypair types (for example when building a UI).
Connection
PublicKey of the market
PublicKey of the trader
ManifestClient
StaticgetCreate a new client that is read only. Cannot send transactions or generate instructions.
Connection
PublicKey of the market
Optionaltrader: PublicKeyPublicKey for trader whose wrapper to fetch
ManifestClient
StaticgetInitializes a ReadOnlyClient for each Market the trader has a seat on. This has been optimized to be as light on the RPC as possible but it is still using getProgramAccounts. caution: this is a heavy call.
Connection
PublicKey
ManifestClient[]
StaticgetStaticgetgenerate ixs which need to be executed in order to run a manifest client for a given market. { setupNeeded: false } means all good.
this function should be used before getClientForMarketNoPrivateKey for UI cases where Keypairs cannot be directly passed in.
Connection
PublicKey of the market
PublicKey of the trader
Promise
StaticglobalGlobal deposit instruction. Static because it does not require a wrapper.
Connection to pull mint info
PublicKey of the trader
PublicKey for global mint deposit.
Number of tokens to deposit.
Promise
StaticglobalGlobal withdraw instruction. Static because it does not require a wrapper.
Connection to pull mint info
PublicKey of the trader
PublicKey for global mint withdraw.
Number of tokens to withdraw.
Promise
StaticlistStaticlistList all Manifest markets that match base and quote mint. If useApi, then this call uses the manifest stats server instead of the heavy getProgramAccounts RPC call.
Connection
PublicKey
PublicKey
OptionaluseApi: booleanboolean
PublicKey[]
BatchUpdate instruction