pub struct BithumbRestClient { /* private fields */ }Expand description
Bithumb REST API client for comprehensive trading operations
Implementations§
Source§impl BithumbRestClient
impl BithumbRestClient
Sourcepub fn new(auth: Arc<BithumbAuth>) -> Self
pub fn new(auth: Arc<BithumbAuth>) -> Self
Create a new Bithumb REST client
Sourcepub async fn get_accounts(&self) -> EMSResult<SmallVec<[BithumbAccount; 16]>>
pub async fn get_accounts(&self) -> EMSResult<SmallVec<[BithumbAccount; 16]>>
Get all account balances
Sourcepub async fn get_account_balance(
&self,
currency: &str,
) -> EMSResult<Option<BithumbAccount>>
pub async fn get_account_balance( &self, currency: &str, ) -> EMSResult<Option<BithumbAccount>>
Get account balance for specific currency
Sourcepub async fn place_order(
&self,
order_request: BithumbOrderRequest,
) -> EMSResult<BithumbOrderResponse>
pub async fn place_order( &self, order_request: BithumbOrderRequest, ) -> EMSResult<BithumbOrderResponse>
Place a new order
Sourcepub async fn get_order(&self, uuid: &str) -> EMSResult<BithumbOrderInfo>
pub async fn get_order(&self, uuid: &str) -> EMSResult<BithumbOrderInfo>
Get order details by UUID
Sourcepub async fn get_orders(
&self,
market: Option<&str>,
state: Option<&str>,
states: Option<&[&str]>,
uuids: Option<&[&str]>,
page: Option<u32>,
limit: Option<u32>,
order_by: Option<&str>,
) -> EMSResult<SmallVec<[BithumbOrderInfo; 32]>>
pub async fn get_orders( &self, market: Option<&str>, state: Option<&str>, states: Option<&[&str]>, uuids: Option<&[&str]>, page: Option<u32>, limit: Option<u32>, order_by: Option<&str>, ) -> EMSResult<SmallVec<[BithumbOrderInfo; 32]>>
Get list of orders
Sourcepub async fn cancel_order(&self, uuid: &str) -> EMSResult<BithumbOrderInfo>
pub async fn cancel_order(&self, uuid: &str) -> EMSResult<BithumbOrderInfo>
Cancel an order by UUID
Sourcepub async fn get_order_trades(
&self,
uuid: &str,
) -> EMSResult<SmallVec<[BithumbTrade; 32]>>
pub async fn get_order_trades( &self, uuid: &str, ) -> EMSResult<SmallVec<[BithumbTrade; 32]>>
Get order trades/executions
Sourcepub async fn get_trades(
&self,
market: Option<&str>,
uuids: Option<&[&str]>,
limit: Option<u32>,
page: Option<u32>,
order_by: Option<&str>,
) -> EMSResult<SmallVec<[BithumbTrade; 32]>>
pub async fn get_trades( &self, market: Option<&str>, uuids: Option<&[&str]>, limit: Option<u32>, page: Option<u32>, order_by: Option<&str>, ) -> EMSResult<SmallVec<[BithumbTrade; 32]>>
Get trade history
Sourcepub async fn get_deposit_addresses(
&self,
) -> EMSResult<SmallVec<[BithumbDepositAddress; 16]>>
pub async fn get_deposit_addresses( &self, ) -> EMSResult<SmallVec<[BithumbDepositAddress; 16]>>
Get deposit addresses for all currencies
Sourcepub async fn get_deposit_address(
&self,
currency: &str,
) -> EMSResult<BithumbDepositAddress>
pub async fn get_deposit_address( &self, currency: &str, ) -> EMSResult<BithumbDepositAddress>
Get deposit address for specific currency
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<[BithumbDeposit; 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<[BithumbDeposit; 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<[BithumbWithdrawal; 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<[BithumbWithdrawal; 32]>>
Get withdrawal history
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 BithumbRestClient
impl Clone for BithumbRestClient
Source§fn clone(&self) -> BithumbRestClient
fn clone(&self) -> BithumbRestClient
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 BithumbRestClient
impl !RefUnwindSafe for BithumbRestClient
impl Send for BithumbRestClient
impl Sync for BithumbRestClient
impl Unpin for BithumbRestClient
impl !UnwindSafe for BithumbRestClient
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