TransactionInstruction
CancelOrder instruction
CancelOrderParams includes the orderSequenceNumber of the order to cancel.
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
PlaceOrderParamsExternal 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.
TransactionInstruction
PlaceOrderWithRequiredDeposit instruction. Only deposits the appropriate base or quote tokens if not in the withdrawable balances.
PublicKey of the trader
WrapperPlaceOrderParamsExternal 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.
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
Static
createCreateGlobalAddTrader 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
Static
getCreate a new client which creates a wrapper and claims seat if needed.
Connection
PublicKey of the market
Keypair of the trader
ManifestClient
Static
getCreate 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
Static
getCreate a new client that is read only. Cannot send transactions or generate instructions.
Connection
PublicKey of the market
Optional
trader: PublicKeyPublicKey for trader whose wrapper to fetch
ManifestClient
Static
getStatic
getgenerate 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 Keypair
s cannot be directly passed in.
Connection
PublicKey of the market
PublicKey of the trader
Promise
Static
globalGlobal 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
Static
globalGlobal 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
Static
list
BatchUpdate instruction