pub trait KrakenClient: Send + Sync {
Show 57 methods
// Required methods
fn new(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
) -> Self;
fn new_with_url(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
url: String,
) -> Self;
fn new_with_tracing(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
trace_inbound: bool,
) -> Self;
fn set_user_agent(&mut self, user_agent: String) -> impl Future<Output = ()>;
fn get_server_time(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<SystemTime>, ClientError>> + Send;
fn get_system_status(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<SystemStatusInfo>, ClientError>>;
fn get_asset_info(
&mut self,
request: &AssetInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, AssetInfo>>, ClientError>>;
fn get_tradable_asset_pairs(
&mut self,
request: &TradableAssetPairsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, TradableAssetPair>>, ClientError>>;
fn get_ticker_information(
&mut self,
request: &TickerRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, RestTickerInfo>>, ClientError>>;
fn get_ohlc(
&mut self,
request: &OHLCRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OhlcResponse>, ClientError>>;
fn get_orderbook(
&mut self,
request: &OrderbookRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Orderbook>>, ClientError>>;
fn get_recent_trades(
&mut self,
request: &RecentTradesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<RecentTrades>, ClientError>>;
fn get_recent_spreads(
&mut self,
request: &RecentSpreadsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<RecentSpreads>, ClientError>>;
fn get_account_balance(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<AccountBalances>, ClientError>>;
fn get_extended_balances(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<ExtendedBalances>, ClientError>>;
fn get_trade_balances(
&mut self,
request: &TradeBalanceRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradeBalances>, ClientError>>;
fn get_open_orders(
&mut self,
request: &OpenOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OpenOrders>, ClientError>>;
fn get_closed_orders(
&mut self,
request: &ClosedOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ClosedOrders>, ClientError>>;
fn query_orders_info(
&mut self,
request: &OrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Order>>, ClientError>>;
fn get_order_amends(
&mut self,
request: &OrderAmendsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OrderAmends>, ClientError>>;
fn get_trades_history(
&mut self,
request: &TradesHistoryRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradesHistory>, ClientError>>;
fn query_trades_info(
&mut self,
request: &TradeInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradesInfo>, ClientError>>;
fn get_open_positions(
&mut self,
request: &OpenPositionsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OpenPositions>, ClientError>>;
fn get_ledgers_info(
&mut self,
request: &LedgersInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<LedgerInfo>, ClientError>>;
fn query_ledgers(
&mut self,
request: &QueryLedgerRequest,
) -> impl Future<Output = Result<ResultErrorResponse<QueryLedgerInfo>, ClientError>>;
fn get_trade_volume(
&mut self,
request: &TradeVolumeRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradeVolume>, ClientError>>;
fn request_export_report(
&mut self,
request: &ExportReportRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ExportReport>, ClientError>>;
fn get_export_report_status(
&mut self,
request: &ExportReportStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<ExportReportStatus>>, ClientError>>;
fn retrieve_export_report(
&mut self,
request: &RetrieveExportReportRequest,
) -> impl Future<Output = Result<Vec<u8>, ClientError>>;
fn delete_export_report(
&mut self,
request: &DeleteExportRequest,
) -> impl Future<Output = Result<ResultErrorResponse<DeleteExportReport>, ClientError>>;
fn add_order(
&mut self,
request: &AddOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AddOrder>, ClientError>>;
fn add_order_batch(
&mut self,
request: &AddBatchedOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AddOrderBatch>, ClientError>>;
fn amend_order(
&mut self,
request: &AmendOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AmendOrder>, ClientError>>;
fn edit_order(
&mut self,
request: &EditOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OrderEdit>, ClientError>>;
fn cancel_order(
&mut self,
request: &CancelOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>;
fn cancel_all_orders(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>;
fn cancel_all_orders_after(
&mut self,
request: &CancelAllOrdersAfterRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelAllOrdersAfter>, ClientError>>;
fn cancel_order_batch(
&mut self,
request: &CancelBatchOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>;
fn get_deposit_methods(
&mut self,
request: &DepositMethodsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositMethod>>, ClientError>>;
fn get_deposit_addresses(
&mut self,
request: &DepositAddressesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositAddress>>, ClientError>>;
fn get_status_of_recent_deposits(
&mut self,
request: &StatusOfDepositWithdrawRequest,
) -> impl Future<Output = Result<ResultErrorResponse<DepositWithdrawResponse>, ClientError>>;
fn get_withdrawal_methods(
&mut self,
request: &WithdrawalMethodsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawMethod>>, ClientError>>;
fn get_withdrawal_addresses(
&mut self,
request: &WithdrawalAddressesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawalAddress>>, ClientError>>;
fn get_withdrawal_info(
&mut self,
request: &WithdrawalInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Withdrawal>, ClientError>>;
fn withdraw_funds(
&mut self,
request: &WithdrawFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>;
fn get_status_of_recent_withdrawals(
&mut self,
request: &StatusOfDepositWithdrawRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositWithdrawal>>, ClientError>>;
fn request_withdrawal_cancellation(
&mut self,
request: &WithdrawCancelRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>;
fn request_wallet_transfer(
&mut self,
request: &WalletTransferRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>;
fn create_sub_account(
&mut self,
request: &CreateSubAccountRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>;
fn account_transfer(
&mut self,
request: &AccountTransferRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AccountTransfer>, ClientError>>;
fn allocate_earn_funds(
&mut self,
request: &AllocateEarnFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>;
fn deallocate_earn_funds(
&mut self,
request: &AllocateEarnFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>;
fn get_earn_allocation_status(
&mut self,
request: &EarnAllocationStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>;
fn get_earn_deallocation_status(
&mut self,
request: &EarnAllocationStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>;
fn list_earn_strategies(
&mut self,
request: &ListEarnStrategiesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<EarnStrategies>, ClientError>>;
fn list_earn_allocations(
&mut self,
request: &ListEarnAllocationsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<EarnAllocations>, ClientError>>;
fn get_websockets_token(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<WebsocketToken>, ClientError>>;
}
Expand description
The common trait shared by implementations like CoreKrakenClient and RateLimitedKrakenClient
Required Methods§
Sourcefn new(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
) -> Self
fn new( secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>, nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>, ) -> Self
Creates a new instance with the given SecretsProvider and NonceProvider.
Sourcefn new_with_url(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
url: String,
) -> Self
fn new_with_url( secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>, nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>, url: String, ) -> Self
Creates a new instance, allowing a specific URL to be set.
Useful if using a proxy, testing with a mock-server, or if the URL changes from the default used in this library.
Sourcefn new_with_tracing(
secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>,
nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>,
trace_inbound: bool,
) -> Self
fn new_with_tracing( secrets_provider: Box<Arc<Mutex<dyn SecretsProvider>>>, nonce_provider: Box<Arc<Mutex<dyn NonceProvider>>>, trace_inbound: bool, ) -> Self
Creates a new instance with the given SecretsProvider and NonceProvider, optionally enabling tracing for inbound messages.
Sourcefn set_user_agent(&mut self, user_agent: String) -> impl Future<Output = ()>
fn set_user_agent(&mut self, user_agent: String) -> impl Future<Output = ()>
Set the user-agent that will be sent in HTTP headers to Kraken. This is not required to be set.
Sourcefn get_server_time(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<SystemTime>, ClientError>> + Send
fn get_server_time( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<SystemTime>, ClientError>> + Send
Get the server time in two useful formats.
Sourcefn get_system_status(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<SystemStatusInfo>, ClientError>>
fn get_system_status( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<SystemStatusInfo>, ClientError>>
Get the status of the system, including the current server time.
Sourcefn get_asset_info(
&mut self,
request: &AssetInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, AssetInfo>>, ClientError>>
fn get_asset_info( &mut self, request: &AssetInfoRequest, ) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, AssetInfo>>, ClientError>>
Get info about a particular asset, e.g. “XBT” or “ETH”.
Sourcefn get_tradable_asset_pairs(
&mut self,
request: &TradableAssetPairsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, TradableAssetPair>>, ClientError>>
fn get_tradable_asset_pairs( &mut self, request: &TradableAssetPairsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, TradableAssetPair>>, ClientError>>
Get info about tradable asset pairs, such as USDCUSD, BTCUSD, or XETHZUSD.
Returns all the information needed to place correctly formatted order volumes, prices, and pairs.
Sourcefn get_ticker_information(
&mut self,
request: &TickerRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, RestTickerInfo>>, ClientError>>
fn get_ticker_information( &mut self, request: &TickerRequest, ) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, RestTickerInfo>>, ClientError>>
Return some or all ticker data, including the most recent bid, ask, price, and last-24h stats for each requested pair.
Sourcefn get_ohlc(
&mut self,
request: &OHLCRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OhlcResponse>, ClientError>>
fn get_ohlc( &mut self, request: &OHLCRequest, ) -> impl Future<Output = Result<ResultErrorResponse<OhlcResponse>, ClientError>>
Retrieve up to the last 720 OHLC candlesticks for a given pair and interval.
The since
request parameter allows for getting only data since some timestamp
(the last
response), but does not allow pagination.
Sourcefn get_orderbook(
&mut self,
request: &OrderbookRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Orderbook>>, ClientError>>
fn get_orderbook( &mut self, request: &OrderbookRequest, ) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Orderbook>>, ClientError>>
Get a snapshot of the orderbook for the requested pair and depth-of-book.
Sourcefn get_recent_trades(
&mut self,
request: &RecentTradesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<RecentTrades>, ClientError>>
fn get_recent_trades( &mut self, request: &RecentTradesRequest, ) -> impl Future<Output = Result<ResultErrorResponse<RecentTrades>, ClientError>>
Retrieve up to 1000 trades at a time from the FULL history of Kraken’s exchange for the requested pair.
The since
and count
parameters allow complete pagination starting from the exchange’s
first-ever trade in each pair.
See /examples/live_retrieving_recent_trades.rs for a full example of pagination with rate limiting.
Sourcefn get_recent_spreads(
&mut self,
request: &RecentSpreadsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<RecentSpreads>, ClientError>>
fn get_recent_spreads( &mut self, request: &RecentSpreadsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<RecentSpreads>, ClientError>>
Get the last ~200 spread values for the requested pair.
The since
parameter allows getting incremental updates, but does not paginate the request
historically.
Sourcefn get_account_balance(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<AccountBalances>, ClientError>>
fn get_account_balance( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<AccountBalances>, ClientError>>
Get the raw balances for your account, minus any pending withdrawals.
Sourcefn get_extended_balances(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<ExtendedBalances>, ClientError>>
fn get_extended_balances( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<ExtendedBalances>, ClientError>>
Get the extended balances for your account, which denotes the balance, any balance on hold, and lines of credit (if available on your account).
Sourcefn get_trade_balances(
&mut self,
request: &TradeBalanceRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradeBalances>, ClientError>>
fn get_trade_balances( &mut self, request: &TradeBalanceRequest, ) -> impl Future<Output = Result<ResultErrorResponse<TradeBalances>, ClientError>>
Get balances relevant for futures and margin trading, including equity and margin levels.
Sourcefn get_open_orders(
&mut self,
request: &OpenOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OpenOrders>, ClientError>>
fn get_open_orders( &mut self, request: &OpenOrdersRequest, ) -> impl Future<Output = Result<ResultErrorResponse<OpenOrders>, ClientError>>
Get all open orders for your account.
Sourcefn get_closed_orders(
&mut self,
request: &ClosedOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ClosedOrders>, ClientError>>
fn get_closed_orders( &mut self, request: &ClosedOrdersRequest, ) -> impl Future<Output = Result<ResultErrorResponse<ClosedOrders>, ClientError>>
Get closed orders from the full history of your account, up to 50 at a time.
Pagination is done using the start
, end
, ofs
(offset) parameters.
Sourcefn query_orders_info(
&mut self,
request: &OrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Order>>, ClientError>>
fn query_orders_info( &mut self, request: &OrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<HashMap<String, Order>>, ClientError>>
Get the information for up to 50 orders at a time.
fn get_order_amends( &mut self, request: &OrderAmendsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<OrderAmends>, ClientError>>
Sourcefn get_trades_history(
&mut self,
request: &TradesHistoryRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradesHistory>, ClientError>>
fn get_trades_history( &mut self, request: &TradesHistoryRequest, ) -> impl Future<Output = Result<ResultErrorResponse<TradesHistory>, ClientError>>
Get trades from the full history your account, up to 50 at a time.
Pagination is done using the start
, end
and ofs
(offset) parameters.
Sourcefn query_trades_info(
&mut self,
request: &TradeInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradesInfo>, ClientError>>
fn query_trades_info( &mut self, request: &TradeInfoRequest, ) -> impl Future<Output = Result<ResultErrorResponse<TradesInfo>, ClientError>>
Get trade details for up to 20 specific trades by id at a time.
Sourcefn get_open_positions(
&mut self,
request: &OpenPositionsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OpenPositions>, ClientError>>
fn get_open_positions( &mut self, request: &OpenPositionsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<OpenPositions>, ClientError>>
Get information about open margin positions.
Sourcefn get_ledgers_info(
&mut self,
request: &LedgersInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<LedgerInfo>, ClientError>>
fn get_ledgers_info( &mut self, request: &LedgersInfoRequest, ) -> impl Future<Output = Result<ResultErrorResponse<LedgerInfo>, ClientError>>
Get ledger entries for the full history of your account, up to 50 at a time.
Pagination is done using the start
, end
, ofs
(offset) parameters.
Sourcefn query_ledgers(
&mut self,
request: &QueryLedgerRequest,
) -> impl Future<Output = Result<ResultErrorResponse<QueryLedgerInfo>, ClientError>>
fn query_ledgers( &mut self, request: &QueryLedgerRequest, ) -> impl Future<Output = Result<ResultErrorResponse<QueryLedgerInfo>, ClientError>>
Get ledger information for up to 20 ids at a time.
Sourcefn get_trade_volume(
&mut self,
request: &TradeVolumeRequest,
) -> impl Future<Output = Result<ResultErrorResponse<TradeVolume>, ClientError>>
fn get_trade_volume( &mut self, request: &TradeVolumeRequest, ) -> impl Future<Output = Result<ResultErrorResponse<TradeVolume>, ClientError>>
Get the 30-day trading volume for your account, and fee information for any pairs (if requested).
Sourcefn request_export_report(
&mut self,
request: &ExportReportRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ExportReport>, ClientError>>
fn request_export_report( &mut self, request: &ExportReportRequest, ) -> impl Future<Output = Result<ResultErrorResponse<ExportReport>, ClientError>>
Request a report for ledgers or trades to be generated asynchronously.
Sourcefn get_export_report_status(
&mut self,
request: &ExportReportStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<ExportReportStatus>>, ClientError>>
fn get_export_report_status( &mut self, request: &ExportReportStatusRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<ExportReportStatus>>, ClientError>>
Get the status of a report that was requested.
Sourcefn retrieve_export_report(
&mut self,
request: &RetrieveExportReportRequest,
) -> impl Future<Output = Result<Vec<u8>, ClientError>>
fn retrieve_export_report( &mut self, request: &RetrieveExportReportRequest, ) -> impl Future<Output = Result<Vec<u8>, ClientError>>
Retrieve an export report once generated.
Sourcefn delete_export_report(
&mut self,
request: &DeleteExportRequest,
) -> impl Future<Output = Result<ResultErrorResponse<DeleteExportReport>, ClientError>>
fn delete_export_report( &mut self, request: &DeleteExportRequest, ) -> impl Future<Output = Result<ResultErrorResponse<DeleteExportReport>, ClientError>>
Request for an export report to be deleted.
Sourcefn add_order(
&mut self,
request: &AddOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AddOrder>, ClientError>>
fn add_order( &mut self, request: &AddOrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AddOrder>, ClientError>>
Add an order of any type (market, limit, trailing stop, etc).
Sourcefn add_order_batch(
&mut self,
request: &AddBatchedOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AddOrderBatch>, ClientError>>
fn add_order_batch( &mut self, request: &AddBatchedOrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AddOrderBatch>, ClientError>>
Add up to 15 orders for a single pair at once. Orders that fail to place are dropped from
processing and will be returned with errors in the response’s Vec
.
fn amend_order( &mut self, request: &AmendOrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AmendOrder>, ClientError>>
Sourcefn edit_order(
&mut self,
request: &EditOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<OrderEdit>, ClientError>>
fn edit_order( &mut self, request: &EditOrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<OrderEdit>, ClientError>>
Edit the volume or price of an existing order, excluding contingent orders like stop/profit orders.
Sourcefn cancel_order(
&mut self,
request: &CancelOrderRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
fn cancel_order( &mut self, request: &CancelOrderRequest, ) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
Cancel an existing order by ref-id or user-ref.
Sourcefn cancel_all_orders(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
fn cancel_all_orders( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
Cancel all active orders.
Sourcefn cancel_all_orders_after(
&mut self,
request: &CancelAllOrdersAfterRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelAllOrdersAfter>, ClientError>>
fn cancel_all_orders_after( &mut self, request: &CancelAllOrdersAfterRequest, ) -> impl Future<Output = Result<ResultErrorResponse<CancelAllOrdersAfter>, ClientError>>
Submit a “Dead Man’s Switch” that will cancel all orders if not repeatedly updated over time.
Sourcefn cancel_order_batch(
&mut self,
request: &CancelBatchOrdersRequest,
) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
fn cancel_order_batch( &mut self, request: &CancelBatchOrdersRequest, ) -> impl Future<Output = Result<ResultErrorResponse<CancelOrder>, ClientError>>
Cancel up to 50 orders in a batch by id or user-ref.
Sourcefn get_deposit_methods(
&mut self,
request: &DepositMethodsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositMethod>>, ClientError>>
fn get_deposit_methods( &mut self, request: &DepositMethodsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositMethod>>, ClientError>>
Get all methods of depositing a specific asset.
Sourcefn get_deposit_addresses(
&mut self,
request: &DepositAddressesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositAddress>>, ClientError>>
fn get_deposit_addresses( &mut self, request: &DepositAddressesRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositAddress>>, ClientError>>
Get all available addresses for a given asset and method.
Sourcefn get_status_of_recent_deposits(
&mut self,
request: &StatusOfDepositWithdrawRequest,
) -> impl Future<Output = Result<ResultErrorResponse<DepositWithdrawResponse>, ClientError>>
fn get_status_of_recent_deposits( &mut self, request: &StatusOfDepositWithdrawRequest, ) -> impl Future<Output = Result<ResultErrorResponse<DepositWithdrawResponse>, ClientError>>
Get the status of recent deposits.
Pagination is done using the start
, end
, cursor
and limit
parameters.
Sourcefn get_withdrawal_methods(
&mut self,
request: &WithdrawalMethodsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawMethod>>, ClientError>>
fn get_withdrawal_methods( &mut self, request: &WithdrawalMethodsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawMethod>>, ClientError>>
Get all withdrawal methods, optionally for a given asset.
Sourcefn get_withdrawal_addresses(
&mut self,
request: &WithdrawalAddressesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawalAddress>>, ClientError>>
fn get_withdrawal_addresses( &mut self, request: &WithdrawalAddressesRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<WithdrawalAddress>>, ClientError>>
Get all withdrawal addresses, optionally for a specific asset or method.
Sourcefn get_withdrawal_info(
&mut self,
request: &WithdrawalInfoRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Withdrawal>, ClientError>>
fn get_withdrawal_info( &mut self, request: &WithdrawalInfoRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Withdrawal>, ClientError>>
Get details about a particular withdrawal.
Sourcefn withdraw_funds(
&mut self,
request: &WithdrawFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>
fn withdraw_funds( &mut self, request: &WithdrawFundsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>
Request a withdrawal for the provided asset and key.
Sourcefn get_status_of_recent_withdrawals(
&mut self,
request: &StatusOfDepositWithdrawRequest,
) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositWithdrawal>>, ClientError>>
fn get_status_of_recent_withdrawals( &mut self, request: &StatusOfDepositWithdrawRequest, ) -> impl Future<Output = Result<ResultErrorResponse<Vec<DepositWithdrawal>>, ClientError>>
Get the status of recent withdrawals.
Pagination is done using the start
, end
, cursor
and limit
parameters.
Sourcefn request_withdrawal_cancellation(
&mut self,
request: &WithdrawCancelRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
fn request_withdrawal_cancellation( &mut self, request: &WithdrawCancelRequest, ) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
Request to cancel a particular withdrawal if it has not been fully processed.
Sourcefn request_wallet_transfer(
&mut self,
request: &WalletTransferRequest,
) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>
fn request_wallet_transfer( &mut self, request: &WalletTransferRequest, ) -> impl Future<Output = Result<ResultErrorResponse<ConfirmationRefId>, ClientError>>
Request to transfer from the default Spot wallet to a Futures wallet if available.
Sourcefn create_sub_account(
&mut self,
request: &CreateSubAccountRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
fn create_sub_account( &mut self, request: &CreateSubAccountRequest, ) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
Create a linked sub-account for the given username and email (Institutional Clients only).
Sourcefn account_transfer(
&mut self,
request: &AccountTransferRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AccountTransfer>, ClientError>>
fn account_transfer( &mut self, request: &AccountTransferRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AccountTransfer>, ClientError>>
Request to transfer a given asset between sub-accounts (Institutional Clients only).
Sourcefn allocate_earn_funds(
&mut self,
request: &AllocateEarnFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
fn allocate_earn_funds( &mut self, request: &AllocateEarnFundsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
Allocate available funds to a given earn strategy.
Sourcefn deallocate_earn_funds(
&mut self,
request: &AllocateEarnFundsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
fn deallocate_earn_funds( &mut self, request: &AllocateEarnFundsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<bool>, ClientError>>
De-allocate funds from a given earn strategy.
Sourcefn get_earn_allocation_status(
&mut self,
request: &EarnAllocationStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>
fn get_earn_allocation_status( &mut self, request: &EarnAllocationStatusRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>
Get the status for the only pending earn allocation request if there is one.
Sourcefn get_earn_deallocation_status(
&mut self,
request: &EarnAllocationStatusRequest,
) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>
fn get_earn_deallocation_status( &mut self, request: &EarnAllocationStatusRequest, ) -> impl Future<Output = Result<ResultErrorResponse<AllocationStatus>, ClientError>>
Get the status for the only pending earn de-allocation if there is one.
Sourcefn list_earn_strategies(
&mut self,
request: &ListEarnStrategiesRequest,
) -> impl Future<Output = Result<ResultErrorResponse<EarnStrategies>, ClientError>>
fn list_earn_strategies( &mut self, request: &ListEarnStrategiesRequest, ) -> impl Future<Output = Result<ResultErrorResponse<EarnStrategies>, ClientError>>
List all earn strategies.
Pagination is supported through the cursor and limit parameters.
Sourcefn list_earn_allocations(
&mut self,
request: &ListEarnAllocationsRequest,
) -> impl Future<Output = Result<ResultErrorResponse<EarnAllocations>, ClientError>>
fn list_earn_allocations( &mut self, request: &ListEarnAllocationsRequest, ) -> impl Future<Output = Result<ResultErrorResponse<EarnAllocations>, ClientError>>
List all current earn allocations.
Sourcefn get_websockets_token(
&mut self,
) -> impl Future<Output = Result<ResultErrorResponse<WebsocketToken>, ClientError>>
fn get_websockets_token( &mut self, ) -> impl Future<Output = Result<ResultErrorResponse<WebsocketToken>, ClientError>>
Get a token for connecting to private websockets.
Tokens are valid for 15 minutes for their first use, but do not require being refreshed once a connection is established.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.