pub struct SDKClient {
pub client: EllipsisClient,
pub core: SDKClientCore,
}
Fields§
§client: EllipsisClient
§core: SDKClientCore
Implementations§
Source§impl SDKClient
Constuctor functions that create a new SDKClient
impl SDKClient
Constuctor functions that create a new SDKClient
Sourcepub async fn new_from_ellipsis_client(client: EllipsisClient) -> Result<Self>
pub async fn new_from_ellipsis_client(client: EllipsisClient) -> Result<Self>
Create a new SDKClient from an EllipsisClient.
This does not have any markets added to it. You must call add_market
or add_all_markets
to
add markets to the SDKClient.
Sourcepub fn new_from_ellipsis_client_sync(client: EllipsisClient) -> Result<Self>
pub fn new_from_ellipsis_client_sync(client: EllipsisClient) -> Result<Self>
Create a new SDKClient from an EllipsisClient.
This does not have any markets added to it. You must call add_market
or add_all_markets
to
add markets to the SDKClient.
Sourcepub async fn new_from_ellipsis_client_with_all_markets(
client: EllipsisClient,
) -> Result<Self>
pub async fn new_from_ellipsis_client_with_all_markets( client: EllipsisClient, ) -> Result<Self>
Recommended way to create a new SDKClient from an EllipsisClient. This will use a list of markets from a pre-defined config file to add all known markets to the SDKClient.
Sourcepub fn new_from_ellipsis_client_with_all_markets_sync(
client: EllipsisClient,
) -> Result<Self>
pub fn new_from_ellipsis_client_with_all_markets_sync( client: EllipsisClient, ) -> Result<Self>
Recommended way to create a new SDKClient from an EllipsisClient. This will use a list of markets from a pre-defined config file to add all known markets to the SDKClient.
Sourcepub async fn new_from_ellipsis_client_with_market_keys(
market_keys: Vec<&Pubkey>,
client: EllipsisClient,
) -> Result<Self>
pub async fn new_from_ellipsis_client_with_market_keys( market_keys: Vec<&Pubkey>, client: EllipsisClient, ) -> Result<Self>
Create a new SDKClient from an EllipsisClient. Pass in a list of market keys to add to the SDKClient.
Sourcepub fn new_from_ellipsis_client_sync_with_market_keys(
market_keys: Vec<&Pubkey>,
client: EllipsisClient,
) -> Result<Self>
pub fn new_from_ellipsis_client_sync_with_market_keys( market_keys: Vec<&Pubkey>, client: EllipsisClient, ) -> Result<Self>
Create a new SDKClient from an EllipsisClient. Pass in a list of market keys to add to the SDKClient.
Sourcepub async fn new(payer: &Keypair, url: &str) -> Result<Self>
pub async fn new(payer: &Keypair, url: &str) -> Result<Self>
Create a new SDKClient.
This does not have any markets added to it. You must call add_market
or add_all_markets
to
add markets to the SDKClient.
Sourcepub fn new_sync(payer: &Keypair, url: &str) -> Result<Self>
pub fn new_sync(payer: &Keypair, url: &str) -> Result<Self>
Create a new SDKClient.
This does not have any markets added to it. You must call add_market
or add_all_markets
to
add markets to the SDKClient.
Sourcepub async fn new_with_all_markets(payer: &Keypair, url: &str) -> Result<Self>
pub async fn new_with_all_markets(payer: &Keypair, url: &str) -> Result<Self>
Recommended way to create a new SDKClient. This will use a list of markets from a pre-defined config file to add all known markets to the SDKClient.
Sourcepub fn new_with_all_markets_sync(payer: &Keypair, url: &str) -> Result<Self>
pub fn new_with_all_markets_sync(payer: &Keypair, url: &str) -> Result<Self>
Recommended way to create a new SDKClient. This will use a list of markets from a pre-defined config file to add all known markets to the SDKClient.
Source§impl SDKClient
Mutable functions that modify the internal state of the SDKClient
impl SDKClient
Mutable functions that modify the internal state of the SDKClient
Sourcepub async fn add_all_markets(&mut self) -> Result<()>
pub async fn add_all_markets(&mut self) -> Result<()>
Load in all known markets from a pre-defined config file located in the SDK github.
pub fn add_all_markets_sync(&mut self) -> Result<()>
Sourcepub async fn add_market(&mut self, market_key: &Pubkey) -> Result<()>
pub async fn add_market(&mut self, market_key: &Pubkey) -> Result<()>
This function adds the metadata for a market to the SDKClient’s market cache.
pub fn set_payer(&mut self, payer: Keypair)
pub fn set_trader(&mut self, trader: Pubkey)
pub fn get_trader(&self) -> Pubkey
Source§impl SDKClient
Getter functions that make asynchronous calls via a Solana RPC connection to fetch state and events from Phoenix.
impl SDKClient
Getter functions that make asynchronous calls via a Solana RPC connection to fetch state and events from Phoenix.
pub async fn get_market_metadata( &self, market_key: &Pubkey, ) -> Result<MarketMetadata>
Sourcepub fn get_market_metadata_from_cache(
&self,
market_key: &Pubkey,
) -> Result<&MarketMetadata>
pub fn get_market_metadata_from_cache( &self, market_key: &Pubkey, ) -> Result<&MarketMetadata>
Fetches a market’s metadata from the SDKClient’s market cache. This cache must be
explicitly populated by calling add_market
or add_all_markets
.
Because the market metadata is static, it is recommended to call add_market
and
use this function when repeatedly looking up metadata to avoid making
additional RPC calls.
pub async fn get_market_ladder( &self, market_key: &Pubkey, levels: u64, ) -> Result<Ladder>
pub fn get_market_ladder_sync( &self, market_key: &Pubkey, levels: u64, ) -> Result<Ladder>
pub async fn get_market_orderbook( &self, market_key: &Pubkey, ) -> Result<Orderbook<FIFOOrderId, PhoenixOrder>>
pub async fn get_market_orderbook_sync( &self, market_key: &Pubkey, ) -> Result<Orderbook<FIFOOrderId, PhoenixOrder>>
pub async fn get_traders_with_market_key( &self, market_key: &Pubkey, ) -> Result<BTreeMap<Pubkey, TraderState>>
pub fn get_traders_with_market_key_sync( &self, market_key: &Pubkey, ) -> Result<BTreeMap<Pubkey, TraderState>>
pub async fn get_market_state(&self, market_key: &Pubkey) -> Result<MarketState>
Sourcepub async fn simulate_market_transaction(
&self,
market_key: &Pubkey,
input_mint_key: &Pubkey,
atoms_to_sell: u64,
expiration: Option<LadderExpiration>,
) -> Result<SimulationSummaryInAtoms>
pub async fn simulate_market_transaction( &self, market_key: &Pubkey, input_mint_key: &Pubkey, atoms_to_sell: u64, expiration: Option<LadderExpiration>, ) -> Result<SimulationSummaryInAtoms>
Simulates a market transaction based on provided parameters.
This function simulates the market transaction for a given market key, input mint key, number of atoms, and optional expiration details. It calculates the number of base and quote atoms that would be filled based on the current market state and returns them as a summary.
§Arguments
market_key
- The public key of the Phoenix market.input_mint_key
- The public key of the input Mint.atoms_to_sell
- The amount in atoms to sell.expiration
- Expiration details for the simulation (optional but recommended for real-time simulations).
pub async fn parse_raw_phoenix_events( &self, raw_phoenix_events: Vec<RawPhoenixEvent>, ) -> Option<Vec<PhoenixEvent>>
pub async fn parse_events_from_transaction( &self, sig: &Signature, ) -> Option<Vec<PhoenixEvent>>
pub async fn parse_places(&self, signature: &Signature) -> Vec<PhoenixEvent>
pub async fn parse_cancels(&self, signature: &Signature) -> Vec<PhoenixEvent>
pub async fn parse_fills(&self, signature: &Signature) -> Vec<PhoenixEvent>
pub async fn parse_fills_and_places( &self, signature: &Signature, ) -> (Vec<PhoenixEvent>, Vec<PhoenixEvent>)
Source§impl SDKClient
Functions for sending transactions that interact with the Phoenix program
impl SDKClient
Functions for sending transactions that interact with the Phoenix program
pub async fn send_ioc( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_fok_buy( &self, market_key: &Pubkey, price: u64, size_in_quote_lots: u64, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_fok_sell( &self, market_key: &Pubkey, price: u64, size_in_base_lots: u64, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_ioc_with_slippage( &self, market_key: &Pubkey, lots_in: u64, min_lots_out: u64, side: Side, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_post_only( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_limit_order( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Option<(Signature, Vec<PhoenixEvent>, Vec<PhoenixEvent>)>
pub async fn send_cancel_ids( &self, market_key: &Pubkey, ids: Vec<FIFOOrderId>, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_cancel_up_to( &self, market_key: &Pubkey, tick_limit: Option<u64>, side: Side, ) -> Option<(Signature, Vec<PhoenixEvent>)>
pub async fn send_cancel_all( &self, market_key: &Pubkey, ) -> Option<(Signature, Vec<PhoenixEvent>)>
Sourcepub async fn get_maker_setup_instructions_for_market(
&self,
market_key: &Pubkey,
) -> Result<Vec<Instruction>>
pub async fn get_maker_setup_instructions_for_market( &self, market_key: &Pubkey, ) -> Result<Vec<Instruction>>
Returns the instructions needed to set up a maker account for a market. Includes:
- Creation of associated token accounts for base and quote tokens, if needed.
- Claiming of the market’s seat, if needed.
- Evicting a seat on the market if the market trader state is full.
pub async fn get_limit_order_new_maker_ixs( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Result<Vec<Instruction>>
pub async fn get_post_only_new_maker_ixs( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Result<Vec<Instruction>>
pub fn get_limit_order_ix_from_template( &self, market_key: &Pubkey, market_metadata: &MarketMetadata, limit_order_template: &LimitOrderTemplate, ) -> Result<Instruction>
pub fn get_post_only_ix_from_template( &self, market_key: &Pubkey, market_metadata: &MarketMetadata, post_only_order_template: &PostOnlyOrderTemplate, ) -> Result<Instruction>
pub fn get_ioc_ix_from_template( &self, market_key: &Pubkey, market_metadata: &MarketMetadata, ioc_order_template: &ImmediateOrCancelOrderTemplate, ) -> Result<Instruction>
Methods from Deref<Target = SDKClientCore>§
Sourcepub fn raw_base_units_to_base_lots_rounded_down(
&self,
market_key: &Pubkey,
raw_base_units: f64,
) -> Result<u64, Error>
pub fn raw_base_units_to_base_lots_rounded_down( &self, market_key: &Pubkey, raw_base_units: f64, ) -> Result<u64, Error>
Given a market pubkey and a number of raw base units, returns the equivalent number of base lots (rounded down).
Sourcepub fn raw_base_units_to_base_lots_rounded_up(
&self,
market_key: &Pubkey,
raw_base_units: f64,
) -> Result<u64, Error>
pub fn raw_base_units_to_base_lots_rounded_up( &self, market_key: &Pubkey, raw_base_units: f64, ) -> Result<u64, Error>
Given a market pubkey and a number of raw base units, returns the equivalent number of base lots (rounded up).
Sourcepub fn base_atoms_to_base_lots_rounded_down(
&self,
market_key: &Pubkey,
base_atoms: u64,
) -> Result<u64, Error>
pub fn base_atoms_to_base_lots_rounded_down( &self, market_key: &Pubkey, base_atoms: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of base atoms, returns the equivalent number of base lots (rounded down).
Sourcepub fn base_atoms_to_base_lots_rounded_up(
&self,
market_key: &Pubkey,
base_atoms: u64,
) -> Result<u64, Error>
pub fn base_atoms_to_base_lots_rounded_up( &self, market_key: &Pubkey, base_atoms: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of base atoms, returns the equivalent number of base lots (rounded up).
Sourcepub fn base_lots_to_base_atoms(
&self,
market_key: &Pubkey,
base_lots: u64,
) -> Result<u64, Error>
pub fn base_lots_to_base_atoms( &self, market_key: &Pubkey, base_lots: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of base lots, returns the equivalent number of base atoms.
Sourcepub fn quote_units_to_quote_lots(
&self,
market_key: &Pubkey,
quote_units: f64,
) -> Result<u64, Error>
pub fn quote_units_to_quote_lots( &self, market_key: &Pubkey, quote_units: f64, ) -> Result<u64, Error>
Given a market pubkey and a number of quote units, returns the equivalent number of quote lots.
Sourcepub fn quote_atoms_to_quote_lots_rounded_down(
&self,
market_key: &Pubkey,
quote_atoms: u64,
) -> Result<u64, Error>
pub fn quote_atoms_to_quote_lots_rounded_down( &self, market_key: &Pubkey, quote_atoms: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of quote atoms, returns the equivalent number of quote lots (rounded down).
Sourcepub fn quote_atoms_to_quote_lots_rounded_up(
&self,
market_key: &Pubkey,
quote_atoms: u64,
) -> Result<u64, Error>
pub fn quote_atoms_to_quote_lots_rounded_up( &self, market_key: &Pubkey, quote_atoms: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of quote atoms, returns the equivalent number of quote lots (rounded up).
Sourcepub fn quote_lots_to_quote_atoms(
&self,
market_key: &Pubkey,
quote_lots: u64,
) -> Result<u64, Error>
pub fn quote_lots_to_quote_atoms( &self, market_key: &Pubkey, quote_lots: u64, ) -> Result<u64, Error>
Given a market pubkey and a number of quote lots, returns the equivalent number of quote atoms.
Sourcepub fn base_atoms_to_raw_base_units_as_float(
&self,
market_key: &Pubkey,
base_atoms: u64,
) -> Result<f64, Error>
pub fn base_atoms_to_raw_base_units_as_float( &self, market_key: &Pubkey, base_atoms: u64, ) -> Result<f64, Error>
Given a market pubkey and a number of base atoms, returns the equivalent number of raw base units.
Sourcepub fn quote_atoms_to_quote_units_as_float(
&self,
market_key: &Pubkey,
quote_atoms: u64,
) -> Result<f64, Error>
pub fn quote_atoms_to_quote_units_as_float( &self, market_key: &Pubkey, quote_atoms: u64, ) -> Result<f64, Error>
Given a market pubkey and a number of quote atoms, returns the equivalent number of quote units.
Sourcepub fn fill_event_to_quote_atoms(
&self,
market_key: &Pubkey,
fill: &Fill,
) -> Result<u64, Error>
pub fn fill_event_to_quote_atoms( &self, market_key: &Pubkey, fill: &Fill, ) -> Result<u64, Error>
Given a market pubkey and a fill event, returns the number of quote atoms filled.
Sourcepub fn base_lots_and_price_to_quote_atoms(
&self,
market_key: &Pubkey,
base_lots: u64,
price_in_ticks: u64,
) -> Result<u64, Error>
pub fn base_lots_and_price_to_quote_atoms( &self, market_key: &Pubkey, base_lots: u64, price_in_ticks: u64, ) -> Result<u64, Error>
Given a market pubkey, number of base lots, and price in ticks, returns the equivalent number of quote atoms for that price and number of base lots.
Sourcepub fn float_price_to_ticks_rounded_down(
&self,
market_key: &Pubkey,
price: f64,
) -> Result<u64, Error>
pub fn float_price_to_ticks_rounded_down( &self, market_key: &Pubkey, price: f64, ) -> Result<u64, Error>
Given a market pubkey and a price in quote units per raw base unit (represented as a float), returns the corresponding number of ticks (rounded down)
Sourcepub fn float_price_to_ticks_rounded_up(
&self,
market_key: &Pubkey,
price: f64,
) -> Result<u64, Error>
pub fn float_price_to_ticks_rounded_up( &self, market_key: &Pubkey, price: f64, ) -> Result<u64, Error>
Given a market pubkey and a price in quote units per raw base unit (represented as a float), returns the corresponding number of ticks (rounded up)
Sourcepub fn ticks_to_float_price(
&self,
market_key: &Pubkey,
ticks: u64,
) -> Result<f64, Error>
pub fn ticks_to_float_price( &self, market_key: &Pubkey, ticks: u64, ) -> Result<f64, Error>
Given a number of ticks, returns the corresponding price in quote units per raw base unit (as a float)
Sourcepub fn raw_base_units_per_base_lot(
&self,
market_key: &Pubkey,
) -> Result<f64, Error>
pub fn raw_base_units_per_base_lot( &self, market_key: &Pubkey, ) -> Result<f64, Error>
Given a market, returns the base lot size in raw base units (as a float)
Sourcepub fn quote_units_per_raw_base_unit_per_tick(
&self,
market_key: &Pubkey,
) -> Result<f64, Error>
pub fn quote_units_per_raw_base_unit_per_tick( &self, market_key: &Pubkey, ) -> Result<f64, Error>
Given a market, returns the tick size in quote units per raw base unit
Sourcepub fn get_next_client_order_id(&self, rng: &mut StdRng) -> u128
pub fn get_next_client_order_id(&self, rng: &mut StdRng) -> u128
Generate a random client order id
pub fn get_market_metadata(&self, market_key: &Pubkey) -> &MarketMetadata
pub fn parse_raw_phoenix_events( &self, sig: &Signature, events: Vec<Vec<u8>>, ) -> Option<Vec<RawPhoenixEvent>>
pub fn parse_events_from_transaction( &self, tx: &ParsedTransaction, ) -> Option<Vec<RawPhoenixEvent>>
pub fn get_ioc_ix( &self, market_key: &Pubkey, price: u64, side: Side, num_base_lots: u64, ) -> Result<Instruction, Error>
pub fn get_ioc_generic_ix( &self, market_key: &Pubkey, price: u64, side: Side, num_base_lots: u64, self_trade_behavior: Option<SelfTradeBehavior>, match_limit: Option<u64>, client_order_id: Option<u128>, use_only_deposited_funds: Option<bool>, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, ) -> Result<Instruction, Error>
pub fn get_fok_sell_ix( &self, market_key: &Pubkey, price: u64, size_in_base_lots: u64, ) -> Result<Instruction, Error>
pub fn get_fok_buy_ix( &self, market_key: &Pubkey, price: u64, size_in_base_lots: u64, ) -> Result<Instruction, Error>
pub fn get_fok_buy_generic_ix( &self, market_key: &Pubkey, price: u64, size_in_quote_lots: u64, self_trade_behavior: Option<SelfTradeBehavior>, match_limit: Option<u64>, client_order_id: Option<u128>, use_only_deposited_funds: Option<bool>, ) -> Result<Instruction, Error>
pub fn get_fok_sell_generic_ix( &self, market_key: &Pubkey, price: u64, size_in_base_lots: u64, self_trade_behavior: Option<SelfTradeBehavior>, match_limit: Option<u64>, client_order_id: Option<u128>, use_only_deposited_funds: Option<bool>, ) -> Result<Instruction, Error>
pub fn get_fok_generic_ix( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, self_trade_behavior: Option<SelfTradeBehavior>, match_limit: Option<u64>, client_order_id: Option<u128>, use_only_deposited_funds: Option<bool>, ) -> Result<Instruction, Error>
pub fn get_ioc_with_slippage_ix( &self, market_key: &Pubkey, lots_in: u64, min_lots_out: u64, side: Side, ) -> Result<Instruction, Error>
pub fn get_ioc_from_tick_price_ix( &self, market_key: &Pubkey, tick_price: u64, side: Side, size: u64, ) -> Result<Instruction, Error>
pub fn get_post_only_ix( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Result<Instruction, Error>
pub fn get_post_only_generic_ix( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, client_order_id: Option<u128>, reject_post_only: Option<bool>, use_only_deposited_funds: Option<bool>, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, fail_silently_on_insufficient_funds: Option<bool>, ) -> Result<Instruction, Error>
pub fn get_post_only_ix_from_tick_price( &self, market_key: &Pubkey, tick_price: u64, side: Side, size: u64, client_order_id: u128, improve_price_on_cross: bool, ) -> Result<Instruction, Error>
pub fn get_limit_order_ix( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, ) -> Result<Instruction, Error>
pub fn get_limit_order_generic_ix( &self, market_key: &Pubkey, price: u64, side: Side, size: u64, self_trade_behavior: Option<SelfTradeBehavior>, match_limit: Option<u64>, client_order_id: Option<u128>, use_only_deposited_funds: Option<bool>, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, fail_silently_on_insufficient_funds: Option<bool>, ) -> Result<Instruction, Error>
pub fn get_limit_order_ix_from_tick_price( &self, market_key: &Pubkey, tick_price: u64, side: Side, size: u64, client_order_id: u128, ) -> Result<Instruction, Error>
pub fn get_cancel_ids_ix( &self, market_key: &Pubkey, ids: Vec<FIFOOrderId>, ) -> Result<Instruction, Error>
pub fn get_cancel_up_to_ix( &self, market_key: &Pubkey, tick_limit: Option<u64>, side: Side, ) -> Result<Instruction, Error>
pub fn get_cancel_all_ix( &self, market_key: &Pubkey, ) -> Result<Instruction, Error>
pub fn get_withdraw_ix(&self, market_key: &Pubkey) -> Result<Instruction, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SDKClient
impl !RefUnwindSafe for SDKClient
impl Send for SDKClient
impl Sync for SDKClient
impl Unpin for SDKClient
impl !UnwindSafe for SDKClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 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>
T
in a tonic::Request