pub struct HttpClient { /* private fields */ }Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn new(base_url: impl Into<String>) -> Result<Self, HttpError>
pub fn new(base_url: impl Into<String>) -> Result<Self, HttpError>
base_url is the API origin, e.g. https://beta-api.acta.markets.
pub fn with_client(client: Client, base_url: impl Into<String>) -> Self
pub fn base_url(&self) -> &str
pub async fn vaults(&self) -> Result<Vec<Vault>, HttpError>
Sourcepub async fn delegated_vaults(
&self,
delegate: Address32,
) -> Result<Vec<Vault>, HttpError>
pub async fn delegated_vaults( &self, delegate: Address32, ) -> Result<Vec<Vault>, HttpError>
Vaults whose primary delegate is delegate with an unexpired grant, the
same rule /vault authentication applies.
pub async fn vault(&self, pda: Address32) -> Result<Vault, HttpError>
Sourcepub async fn vault_positions(
&self,
pda: Address32,
) -> Result<Vec<VaultPosition>, HttpError>
pub async fn vault_positions( &self, pda: Address32, ) -> Result<Vec<VaultPosition>, HttpError>
Every unsettled position of the vault, following the server cursor.
Sourcepub async fn vault_cycles(
&self,
pda: Address32,
) -> Result<Vec<VaultCycle>, HttpError>
pub async fn vault_cycles( &self, pda: Address32, ) -> Result<Vec<VaultCycle>, HttpError>
Every cycle of the vault, newest first.
Sourcepub async fn vault_deposit_requests(
&self,
pda: Address32,
) -> Result<Vec<VaultDepositRequest>, HttpError>
pub async fn vault_deposit_requests( &self, pda: Address32, ) -> Result<Vec<VaultDepositRequest>, HttpError>
Every pending deposit of the vault, read without Solana RPC.
Sourcepub async fn vault_withdraw_requests(
&self,
pda: Address32,
) -> Result<Vec<VaultWithdrawRequest>, HttpError>
pub async fn vault_withdraw_requests( &self, pda: Address32, ) -> Result<Vec<VaultWithdrawRequest>, HttpError>
Every pending withdrawal of the vault, read without Solana RPC.
Sourcepub async fn vault_exposure(
&self,
pda: Address32,
) -> Result<VaultExposure, HttpError>
pub async fn vault_exposure( &self, pda: Address32, ) -> Result<VaultExposure, HttpError>
Open and funded positions with indicative spot, moneyness and intrinsic value.
Sourcepub async fn vault_exposure_page(
&self,
pda: Address32,
limit: u16,
cursor: Option<&str>,
) -> Result<VaultExposure, HttpError>
pub async fn vault_exposure_page( &self, pda: Address32, limit: u16, cursor: Option<&str>, ) -> Result<VaultExposure, HttpError>
One exposure page. The totals describe the full cached snapshot.
pub async fn markets( &self, filter: &MarketFilter, ) -> Result<Vec<MarketInfo>, HttpError>
pub async fn tokens(&self) -> Result<BTreeMap<Address32, TokenInfo>, HttpError>
pub async fn venue(&self) -> Result<Venue, HttpError>
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl !UnwindSafe for HttpClient
impl Forget for HttpClient
impl Freeze for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin for HttpClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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 more