pub struct ExternalMatchClient { /* private fields */ }Expand description
A client for requesting external matches from the relayer
Implementations§
Source§impl ExternalMatchClient
impl ExternalMatchClient
Sourcepub fn new(
api_key: &str,
api_secret: &str,
auth_base_url: &str,
relayer_base_url: &str,
) -> Result<Self, ExternalMatchClientError>
pub fn new( api_key: &str, api_secret: &str, auth_base_url: &str, relayer_base_url: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client
Sourcepub fn new_with_client(
api_key: &str,
api_secret: &str,
auth_base_url: &str,
relayer_base_url: &str,
client: Client,
) -> Result<Self, ExternalMatchClientError>
pub fn new_with_client( api_key: &str, api_secret: &str, auth_base_url: &str, relayer_base_url: &str, client: Client, ) -> Result<Self, ExternalMatchClientError>
Create a new client with a custom HTTP client
Sourcepub fn new_arbitrum_sepolia_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
pub fn new_arbitrum_sepolia_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Arbitrum Sepolia network
Sourcepub fn new_base_sepolia_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
pub fn new_base_sepolia_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Base Sepolia network
Sourcepub fn new_sepolia_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
👎Deprecated since 0.1.6: Use new_arbitrum_sepolia_client instead
pub fn new_sepolia_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Arbitrum Sepolia network
Sourcepub fn new_arbitrum_one_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
pub fn new_arbitrum_one_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Arbitrum One network
Sourcepub fn new_arbitrum_one_with_client(
api_key: &str,
api_secret: &str,
client: Client,
) -> Result<Self, ExternalMatchClientError>
pub fn new_arbitrum_one_with_client( api_key: &str, api_secret: &str, client: Client, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Arbitrum One network with custom HTTP client
Sourcepub fn new_base_mainnet_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
pub fn new_base_mainnet_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Base mainnet network
Sourcepub fn new_base_mainnet_with_client(
api_key: &str,
api_secret: &str,
client: Client,
) -> Result<Self, ExternalMatchClientError>
pub fn new_base_mainnet_with_client( api_key: &str, api_secret: &str, client: Client, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Base mainnet network with custom HTTP client
Sourcepub fn new_mainnet_client(
api_key: &str,
api_secret: &str,
) -> Result<Self, ExternalMatchClientError>
👎Deprecated since 0.1.6: Use new_arbitrum_one_client instead
pub fn new_mainnet_client( api_key: &str, api_secret: &str, ) -> Result<Self, ExternalMatchClientError>
Create a new client for the Arbitrum One network
Sourcepub async fn get_supported_tokens(
&self,
) -> Result<GetSupportedTokensResponse, ExternalMatchClientError>
pub async fn get_supported_tokens( &self, ) -> Result<GetSupportedTokensResponse, ExternalMatchClientError>
Get a list of supported tokens for external matches
Sourcepub async fn get_token_prices(
&self,
) -> Result<GetTokenPricesResponse, ExternalMatchClientError>
pub async fn get_token_prices( &self, ) -> Result<GetTokenPricesResponse, ExternalMatchClientError>
Get token prices for all supported tokens
Sourcepub async fn get_order_book_depth(
&self,
address: &str,
) -> Result<GetDepthByMintResponse, ExternalMatchClientError>
pub async fn get_order_book_depth( &self, address: &str, ) -> Result<GetDepthByMintResponse, ExternalMatchClientError>
Get the order book depth for a token
The address is the address of the token
Sourcepub async fn get_order_book_depth_all_pairs(
&self,
) -> Result<GetDepthForAllPairsResponse, ExternalMatchClientError>
pub async fn get_order_book_depth_all_pairs( &self, ) -> Result<GetDepthForAllPairsResponse, ExternalMatchClientError>
Get the order book depth for all supported tokens
Sourcepub async fn request_quote(
&self,
order: ExternalOrder,
) -> Result<Option<SignedExternalQuote>, ExternalMatchClientError>
pub async fn request_quote( &self, order: ExternalOrder, ) -> Result<Option<SignedExternalQuote>, ExternalMatchClientError>
Request a quote for an external match
Sourcepub async fn request_quote_with_options(
&self,
order: ExternalOrder,
options: RequestQuoteOptions,
) -> Result<Option<SignedExternalQuote>, ExternalMatchClientError>
pub async fn request_quote_with_options( &self, order: ExternalOrder, options: RequestQuoteOptions, ) -> Result<Option<SignedExternalQuote>, ExternalMatchClientError>
Request a quote for an external match, with options
Sourcepub async fn assemble_quote(
&self,
quote: SignedExternalQuote,
) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
pub async fn assemble_quote( &self, quote: SignedExternalQuote, ) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
Assemble a quote into a match bundle, ready for settlement
Sourcepub async fn assemble_quote_with_options(
&self,
quote: SignedExternalQuote,
options: AssembleQuoteOptions,
) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
pub async fn assemble_quote_with_options( &self, quote: SignedExternalQuote, options: AssembleQuoteOptions, ) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
Assemble a quote into a match bundle, ready for settlement, with options
Sourcepub async fn assemble_malleable_quote(
&self,
quote: SignedExternalQuote,
) -> Result<Option<MalleableExternalMatchResponse>, ExternalMatchClientError>
pub async fn assemble_malleable_quote( &self, quote: SignedExternalQuote, ) -> Result<Option<MalleableExternalMatchResponse>, ExternalMatchClientError>
Assemble a quote into a malleable match bundle, ready for settlement
Sourcepub async fn assemble_malleable_quote_with_options(
&self,
quote: SignedExternalQuote,
options: AssembleQuoteOptions,
) -> Result<Option<MalleableExternalMatchResponse>, ExternalMatchClientError>
pub async fn assemble_malleable_quote_with_options( &self, quote: SignedExternalQuote, options: AssembleQuoteOptions, ) -> Result<Option<MalleableExternalMatchResponse>, ExternalMatchClientError>
Assemble a quote into a malleable match bundle, ready for settlement, with options
Sourcepub async fn request_external_match(
&self,
order: ExternalOrder,
) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
👎Deprecated since 0.1.0: This endpoint will soon be removed, use request_quote and assemble_quote instead
pub async fn request_external_match( &self, order: ExternalOrder, ) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
request_quote and assemble_quote insteadRequest an external match
Sourcepub async fn request_external_match_with_options(
&self,
order: ExternalOrder,
options: ExternalMatchOptions,
) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
👎Deprecated since 0.1.0: This endpoint will soon be removed, use request_quote and assemble_quote instead
pub async fn request_external_match_with_options( &self, order: ExternalOrder, options: ExternalMatchOptions, ) -> Result<Option<ExternalMatchResponse>, ExternalMatchClientError>
request_quote and assemble_quote insteadRequest an external match and specify any options for the request
Trait Implementations§
Source§impl Clone for ExternalMatchClient
impl Clone for ExternalMatchClient
Source§fn clone(&self) -> ExternalMatchClient
fn clone(&self) -> ExternalMatchClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalMatchClient
impl !RefUnwindSafe for ExternalMatchClient
impl Send for ExternalMatchClient
impl Sync for ExternalMatchClient
impl Unpin for ExternalMatchClient
impl !UnwindSafe for ExternalMatchClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more