pub struct WebSocketClient {
pub public_key: Option<Pubkey>,
/* private fields */
}
Fields§
§public_key: Option<Pubkey>
Implementations§
Source§impl WebSocketClient
impl WebSocketClient
pub async fn get_raydium_quotes( &self, request: &GetRaydiumQuotesRequest, ) -> Result<GetRaydiumQuotesResponse>
pub async fn get_raydium_cpmm_quotes( &self, request: &GetRaydiumCpmmQuotesRequest, ) -> Result<GetRaydiumCpmmQuotesResponse>
pub async fn get_raydium_clmm_quotes( &self, request: &GetRaydiumClmmQuotesRequest, ) -> Result<GetRaydiumClmmQuotesResponse>
pub async fn get_pump_fun_quotes( &self, request: &GetPumpFunQuotesRequest, ) -> Result<GetPumpFunQuotesResponse>
pub async fn get_jupiter_quotes( &self, request: &GetJupiterQuotesRequest, ) -> Result<GetJupiterQuotesResponse>
pub async fn get_quotes( &self, request: &GetQuotesRequest, ) -> Result<GetQuotesResponse>
pub async fn get_raydium_prices( &self, tokens: Vec<String>, ) -> Result<GetRaydiumPricesResponse>
pub async fn get_jupiter_prices( &self, tokens: Vec<String>, ) -> Result<GetJupiterPricesResponse>
Source§impl WebSocketClient
impl WebSocketClient
pub async fn get_prices_stream( &self, projects: Vec<Project>, tokens: Vec<String>, ) -> Result<impl Stream<Item = Result<GetPricesStreamResponse>>>
pub async fn get_block_stream( &self, ) -> Result<impl Stream<Item = Result<GetBlockStreamResponse>>>
pub async fn get_orderbook_stream( &self, markets: Vec<String>, limit: u32, project: Project, ) -> Result<impl Stream<Item = Result<GetOrderbooksStreamResponse>>>
pub async fn get_market_depths_stream( &self, markets: Vec<String>, limit: u32, project: Project, ) -> Result<impl Stream<Item = Result<GetMarketDepthsStreamResponse>>>
pub async fn get_ticker_stream( &self, markets: Vec<String>, project: Project, ) -> Result<impl Stream<Item = Result<GetTickersStreamResponse>>>
pub async fn get_trades_stream( &self, market: String, limit: u32, project: Project, ) -> Result<impl Stream<Item = Result<GetTradesStreamResponse>>>
pub async fn get_swaps_stream( &self, projects: Vec<Project>, pools: Vec<String>, include_failed: bool, ) -> Result<impl Stream<Item = Result<GetSwapsStreamResponse>>>
pub async fn get_new_raydium_pools_stream( &self, include_cpmm: bool, ) -> Result<impl Stream<Item = Result<GetNewRaydiumPoolsResponse>>>
pub async fn get_new_raydium_pools_by_transaction_stream( &self, ) -> Result<impl Stream<Item = Result<GetNewRaydiumPoolsByTransactionResponse>>>
pub async fn get_recent_block_hash_stream( &self, ) -> Result<impl Stream<Item = Result<GetRecentBlockHashResponse>>>
pub async fn get_pool_reserves_stream( &self, projects: Vec<Project>, pools: Vec<String>, ) -> Result<impl Stream<Item = Result<GetPoolReservesStreamResponse>>>
pub async fn get_priority_fee_stream( &self, project: Project, percentile: Option<f64>, ) -> Result<impl Stream<Item = Result<GetPriorityFeeResponse>>>
pub async fn get_priority_fee_by_program_stream( &self, programs: Vec<String>, ) -> Result<impl Stream<Item = Result<GetPriorityFeeByProgramResponse>>>
pub async fn get_bundle_tip_stream( &self, ) -> Result<impl Stream<Item = Result<GetBundleTipResponse>>>
pub async fn get_pump_fun_new_tokens_stream( &self, ) -> Result<impl Stream<Item = Result<GetPumpFunNewTokensStreamResponse>>>
pub async fn get_pump_fun_swaps_stream( &self, tokens: Vec<String>, ) -> Result<impl Stream<Item = Result<GetPumpFunSwapsStreamResponse>>>
Source§impl WebSocketClient
impl WebSocketClient
pub async fn post_raydium_swap( &self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>
pub async fn post_raydium_route_swap( &self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>
pub async fn post_raydium_swap_instructions( &self, request: &PostRaydiumSwapInstructionsRequest, ) -> Result<PostRaydiumSwapInstructionsResponse>
pub async fn submit_raydium_swap_instructions( &self, request: PostRaydiumSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn post_raydium_cpmm_swap( &self, request: &PostRaydiumCpmmSwapRequest, ) -> Result<PostRaydiumCpmmSwapResponse>
pub async fn post_raydium_clmm_swap( &self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>
pub async fn post_raydium_clmm_route_swap( &self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>
pub async fn post_jupiter_swap( &self, request: &PostJupiterSwapRequest, ) -> Result<PostJupiterSwapResponse>
pub async fn post_jupiter_route_swap( &self, request: &PostJupiterRouteSwapRequest, ) -> Result<PostJupiterRouteSwapResponse>
pub async fn post_jupiter_swap_instructions( &self, request: &PostJupiterSwapInstructionsRequest, ) -> Result<PostJupiterSwapInstructionsResponse>
pub async fn submit_jupiter_swap_instructions( &self, request: PostJupiterSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn post_trade_swap( &self, request: &TradeSwapRequest, ) -> Result<TradeSwapResponse>
pub async fn post_route_trade_swap( &self, request: &RouteTradeSwapRequest, ) -> Result<TradeSwapResponse>
Source§impl WebSocketClient
impl WebSocketClient
pub fn get_keypair(&self) -> Result<&Keypair>
pub async fn new(endpoint: Option<String>) -> Result<Self>
pub async fn close(self) -> Result<()>
pub async fn sign_and_submit<T: IntoTransactionMessage + Clone>( &self, txs: Vec<T>, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn sign_and_submit_snipe<T: IntoTransactionMessage + Clone>( &self, txs: Vec<T>, use_staked_rpcs: bool, ) -> Result<Vec<String>>
pub async fn sign_and_submit_paladin<T: IntoTransactionMessage + Clone>( &self, tx: T, ) -> Result<String>
pub async fn get_transaction( &self, request: GetTransactionRequest, ) -> Result<GetTransactionResponse>
pub async fn get_recent_block_hash( &self, request: GetRecentBlockHashRequest, ) -> Result<GetRecentBlockHashResponse>
pub async fn get_recent_block_hash_v2( &self, request: &GetRecentBlockHashRequestV2, ) -> Result<GetRecentBlockHashResponseV2>
pub async fn get_rate_limit( &self, request: GetRateLimitRequest, ) -> Result<GetRateLimitResponse>
pub async fn get_account_balance_v2( &self, request: GetAccountBalanceRequest, ) -> Result<GetAccountBalanceResponse>
pub async fn get_priority_fee( &self, project: Project, percentile: Option<f64>, ) -> Result<GetPriorityFeeResponse>
pub async fn get_priority_fee_by_program( &self, programs: Vec<String>, ) -> Result<GetPriorityFeeByProgramResponse>
pub async fn get_token_accounts( &self, owner_address: String, ) -> Result<GetTokenAccountsResponse>
pub async fn get_account_balance( &self, owner_address: String, ) -> Result<GetAccountBalanceResponse>
pub async fn get_leader_schedule( &self, max_slots: u64, ) -> Result<GetLeaderScheduleResponse>
Auto Trait Implementations§
impl !Freeze for WebSocketClient
impl !RefUnwindSafe for WebSocketClient
impl Send for WebSocketClient
impl Sync for WebSocketClient
impl Unpin for WebSocketClient
impl !UnwindSafe for WebSocketClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request