Properties
address
address: PublicKey
Methods
baseDecimals
- baseDecimals(): number
Returns number
number
baseMint
- baseMint(): PublicKey
Returns PublicKey
PublicKey
bestAskPrice
- bestAskPrice(): undefined | number
Returns undefined | number
number | undefined
bestBidPrice
- bestBidPrice(): undefined | number
Returns undefined | number
number | undefined
getBalances
- getBalances(trader): {
baseOpenOrdersBalanceTokens: number;
baseWithdrawableBalanceTokens: number;
quoteOpenOrdersBalanceTokens: number;
quoteWithdrawableBalanceTokens: number;
} Returns {
baseOpenOrdersBalanceTokens: number;
baseWithdrawableBalanceTokens: number;
quoteOpenOrdersBalanceTokens: number;
quoteWithdrawableBalanceTokens: number;
}
baseOpenOrdersBalanceTokens: number
baseWithdrawableBalanceTokens: number
quoteOpenOrdersBalanceTokens: number
quoteWithdrawableBalanceTokens: number
getWithdrawableBalanceTokens
- getWithdrawableBalanceTokens(trader, isBase): number
Parameters
- trader: PublicKey
- isBase: boolean
Returns number
number in tokens
hasSeat
- hasSeat(trader): boolean
Returns boolean
boolean
prettyPrint
- prettyPrint(): void
Returns void
quoteDecimals
- quoteDecimals(): number
Returns number
number
quoteMint
- quoteMint(): PublicKey
Returns PublicKey
PublicKey
quoteVolume
- quoteVolume(): bigint
Returns bigint
bigint
reload
- reload(connection): Promise<void>
Returns Promise<void>
Static
deserializeMarketBuffer
- deserializeMarketBuffer(data, currentSlot): MarketData
Parameters
- data: Buffer
- currentSlot: number
Static
findByMints
- findByMints(connection, baseMint, quoteMint): Promise<Market[]>
Parameters
- connection: Connection
- baseMint: PublicKey
- quoteMint: PublicKey
Returns Promise<Market[]>
Static
loadFromAddress
- loadFromAddress(__namedParameters): Promise<Market>
Parameters
- __namedParameters: {
address: PublicKey;
connection: Connection;
}address: PublicKey
connection: Connection
Returns Promise<Market>
Static
loadFromBuffer
- loadFromBuffer(__namedParameters): Market
Parameters
- __namedParameters: {
address: PublicKey;
buffer: Buffer;
slot?: number;
}address: PublicKey
buffer: Buffer
Optional
slot?: number
Static
setupIxs
- setupIxs(connection, baseMint, quoteMint, payer): Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}> Parameters
- connection: Connection
- baseMint: PublicKey
- quoteMint: PublicKey
- payer: PublicKey
Returns Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}>
Market object used for reading data from a manifest market.