pub struct UpbitRestClient { /* private fields */ }Expand description
Upbit REST API client for comprehensive trading operations
Implementations§
Source§impl UpbitRestClient
impl UpbitRestClient
Sourcepub async fn get_accounts(&self) -> EMSResult<SmallVec<[UpbitAccount; 16]>>
pub async fn get_accounts(&self) -> EMSResult<SmallVec<[UpbitAccount; 16]>>
Get all account balances
Sourcepub async fn get_deposit_addresses(
&self,
) -> EMSResult<SmallVec<[UpbitDepositAddress; 16]>>
pub async fn get_deposit_addresses( &self, ) -> EMSResult<SmallVec<[UpbitDepositAddress; 16]>>
Get all deposit addresses
Sourcepub async fn get_deposit_address(
&self,
currency: &str,
) -> EMSResult<UpbitDepositAddress>
pub async fn get_deposit_address( &self, currency: &str, ) -> EMSResult<UpbitDepositAddress>
Get deposit address for specific currency
Sourcepub async fn request_deposit_address(
&self,
currency: &str,
net_type: Option<&str>,
) -> EMSResult<UpbitDepositAddress>
pub async fn request_deposit_address( &self, currency: &str, net_type: Option<&str>, ) -> EMSResult<UpbitDepositAddress>
Request new deposit address generation
Sourcepub async fn get_open_orders(
&self,
market: Option<&str>,
uuids: Option<&[&str]>,
identifiers: Option<&[&str]>,
page: Option<u32>,
limit: Option<u32>,
order_by: Option<&str>,
) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
pub async fn get_open_orders( &self, market: Option<&str>, uuids: Option<&[&str]>, identifiers: Option<&[&str]>, page: Option<u32>, limit: Option<u32>, order_by: Option<&str>, ) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
Get open orders
Sourcepub async fn get_closed_orders(
&self,
market: Option<&str>,
uuids: Option<&[&str]>,
identifiers: Option<&[&str]>,
states: Option<&[&str]>,
page: Option<u32>,
limit: Option<u32>,
order_by: Option<&str>,
start_time: Option<&str>,
end_time: Option<&str>,
) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
pub async fn get_closed_orders( &self, market: Option<&str>, uuids: Option<&[&str]>, identifiers: Option<&[&str]>, states: Option<&[&str]>, page: Option<u32>, limit: Option<u32>, order_by: Option<&str>, start_time: Option<&str>, end_time: Option<&str>, ) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
Get closed orders (order history)
Sourcepub async fn get_orders_by_uuids(
&self,
uuids: &[&str],
) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
pub async fn get_orders_by_uuids( &self, uuids: &[&str], ) -> EMSResult<SmallVec<[UpbitOrderInfo; 32]>>
Get specific orders by UUIDs
Sourcepub async fn get_order_chance(
&self,
market: &str,
) -> EMSResult<UpbitOrderChance>
pub async fn get_order_chance( &self, market: &str, ) -> EMSResult<UpbitOrderChance>
Get order parameters and constraints for a market
Sourcepub async fn get_deposits(
&self,
currency: Option<&str>,
state: Option<&str>,
uuids: Option<&[&str]>,
txids: Option<&[&str]>,
limit: Option<u32>,
page: Option<u32>,
order_by: Option<&str>,
) -> EMSResult<SmallVec<[UpbitDeposit; 32]>>
pub async fn get_deposits( &self, currency: Option<&str>, state: Option<&str>, uuids: Option<&[&str]>, txids: Option<&[&str]>, limit: Option<u32>, page: Option<u32>, order_by: Option<&str>, ) -> EMSResult<SmallVec<[UpbitDeposit; 32]>>
Get deposit history
Sourcepub async fn get_withdrawals(
&self,
currency: Option<&str>,
state: Option<&str>,
uuids: Option<&[&str]>,
txids: Option<&[&str]>,
limit: Option<u32>,
page: Option<u32>,
order_by: Option<&str>,
) -> EMSResult<SmallVec<[UpbitWithdrawal; 32]>>
pub async fn get_withdrawals( &self, currency: Option<&str>, state: Option<&str>, uuids: Option<&[&str]>, txids: Option<&[&str]>, limit: Option<u32>, page: Option<u32>, order_by: Option<&str>, ) -> EMSResult<SmallVec<[UpbitWithdrawal; 32]>>
Get withdrawal history
Sourcepub async fn get_account_balance(
&self,
currency: &str,
) -> EMSResult<Option<UpbitAccount>>
pub async fn get_account_balance( &self, currency: &str, ) -> EMSResult<Option<UpbitAccount>>
Get account balance for specific currency
Sourcepub async fn get_total_balance_krw(&self) -> EMSResult<Decimal>
pub async fn get_total_balance_krw(&self) -> EMSResult<Decimal>
Get total portfolio value in KRW
Trait Implementations§
Source§impl Clone for UpbitRestClient
impl Clone for UpbitRestClient
Source§fn clone(&self) -> UpbitRestClient
fn clone(&self) -> UpbitRestClient
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UpbitRestClient
impl !RefUnwindSafe for UpbitRestClient
impl Send for UpbitRestClient
impl Sync for UpbitRestClient
impl Unpin for UpbitRestClient
impl !UnwindSafe for UpbitRestClient
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