pub struct RestApi { /* private fields */ }Implementations§
Source§impl RestApi
impl RestApi
pub fn new(configuration: ConfigurationRestApi) -> Self
Sourcepub async fn send_request<R: DeserializeOwned + Send + 'static>(
&self,
endpoint: &str,
method: Method,
query_params: BTreeMap<String, Value>,
body_params: BTreeMap<String, Value>,
) -> Result<RestApiResponse<R>>
pub async fn send_request<R: DeserializeOwned + Send + 'static>( &self, endpoint: &str, method: Method, query_params: BTreeMap<String, Value>, body_params: BTreeMap<String, Value>, ) -> Result<RestApiResponse<R>>
Send an unsigned request to the API
§Arguments
endpoint- The API endpoint to send the request tomethod- The HTTP method to use for the requestquery_params- A map of query parameters to send with the requestbody_params- A map of body parameters to send with the request
§Returns
A RestApiResponse containing the deserialized response data on success, or an error if the request fails
§Errors
Returns an anyhow::Error if the HTTP request fails or if parsing the response fails
Sourcepub async fn send_signed_request<R: DeserializeOwned + Send + 'static>(
&self,
endpoint: &str,
method: Method,
query_params: BTreeMap<String, Value>,
body_params: BTreeMap<String, Value>,
) -> Result<RestApiResponse<R>>
pub async fn send_signed_request<R: DeserializeOwned + Send + 'static>( &self, endpoint: &str, method: Method, query_params: BTreeMap<String, Value>, body_params: BTreeMap<String, Value>, ) -> Result<RestApiResponse<R>>
Send a signed request to the API
§Arguments
endpoint- The API endpoint to send the request tomethod- The HTTP method to use for the requestquery_params- A map of query parameters to send with the requestbody_params- A map of body parameters to send with the request
§Returns
A RestApiResponse containing the deserialized response data on success, or an error if the request fails
§Errors
Returns an anyhow::Error if the HTTP request fails or if parsing the response fails
Sourcepub async fn account_api_trading_status(
&self,
params: AccountApiTradingStatusParams,
) -> Result<RestApiResponse<AccountApiTradingStatusResponse>>
pub async fn account_api_trading_status( &self, params: AccountApiTradingStatusParams, ) -> Result<RestApiResponse<AccountApiTradingStatusResponse>>
Account API Trading Status (USER_DATA)
Fetch account api trading status detail.
Weight: 1
§Arguments
params:AccountApiTradingStatusParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AccountApiTradingStatusResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn account_info(
&self,
params: AccountInfoParams,
) -> Result<RestApiResponse<AccountInfoResponse>>
pub async fn account_info( &self, params: AccountInfoParams, ) -> Result<RestApiResponse<AccountInfoResponse>>
Account info (USER_DATA)
Fetch account info detail.
Weight: 1
§Arguments
params:AccountInfoParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AccountInfoResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn account_status(
&self,
params: AccountStatusParams,
) -> Result<RestApiResponse<AccountStatusResponse>>
pub async fn account_status( &self, params: AccountStatusParams, ) -> Result<RestApiResponse<AccountStatusResponse>>
Account Status (USER_DATA)
Fetch account status detail.
Weight: 1
§Arguments
params:AccountStatusParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AccountStatusResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn daily_account_snapshot(
&self,
params: DailyAccountSnapshotParams,
) -> Result<RestApiResponse<DailyAccountSnapshotResponse>>
pub async fn daily_account_snapshot( &self, params: DailyAccountSnapshotParams, ) -> Result<RestApiResponse<DailyAccountSnapshotResponse>>
Daily Account Snapshot (USER_DATA)
Daily account snapshot
- The query time period must be less then 30 days
- Support query within the last one month only
- If startTimeand endTime not sent, return records of the last 7 days by default
Weight: 2400
§Arguments
params:DailyAccountSnapshotParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DailyAccountSnapshotResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn disable_fast_withdraw_switch(
&self,
params: DisableFastWithdrawSwitchParams,
) -> Result<RestApiResponse<Value>>
pub async fn disable_fast_withdraw_switch( &self, params: DisableFastWithdrawSwitchParams, ) -> Result<RestApiResponse<Value>>
Disable Fast Withdraw Switch (USER_DATA)
Weight: 1
§Arguments
params:DisableFastWithdrawSwitchParamsThe parameters for this operation.
§Returns
RestApiResponse<Value> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn enable_fast_withdraw_switch(
&self,
params: EnableFastWithdrawSwitchParams,
) -> Result<RestApiResponse<Value>>
pub async fn enable_fast_withdraw_switch( &self, params: EnableFastWithdrawSwitchParams, ) -> Result<RestApiResponse<Value>>
Enable Fast Withdraw Switch (USER_DATA)
Enable Fast Withdraw Switch (USER_DATA)
- This request will enable fastwithdraw switch under your account.
- When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
Weight: 1
§Arguments
params:EnableFastWithdrawSwitchParamsThe parameters for this operation.
§Returns
RestApiResponse<Value> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_api_key_permission(
&self,
params: GetApiKeyPermissionParams,
) -> Result<RestApiResponse<GetApiKeyPermissionResponse>>
pub async fn get_api_key_permission( &self, params: GetApiKeyPermissionParams, ) -> Result<RestApiResponse<GetApiKeyPermissionResponse>>
Get API Key Permission (USER_DATA)
Get API Key Permission
Weight: 1
§Arguments
params:GetApiKeyPermissionParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetApiKeyPermissionResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn asset_detail(
&self,
params: AssetDetailParams,
) -> Result<RestApiResponse<AssetDetailResponse>>
pub async fn asset_detail( &self, params: AssetDetailParams, ) -> Result<RestApiResponse<AssetDetailResponse>>
Asset Detail (USER_DATA)
Fetch details of assets supported on Binance.
- Please get network and other deposit or withdraw details from
GET /sapi/v1/capital/config/getall.
Weight: 1
§Arguments
params:AssetDetailParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AssetDetailResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn asset_dividend_record(
&self,
params: AssetDividendRecordParams,
) -> Result<RestApiResponse<AssetDividendRecordResponse>>
pub async fn asset_dividend_record( &self, params: AssetDividendRecordParams, ) -> Result<RestApiResponse<AssetDividendRecordResponse>>
Asset Dividend Record (USER_DATA)
Query asset dividend record.
- There cannot be more than 180 days between parameter
startTimeandendTime.
Weight: 10
§Arguments
params:AssetDividendRecordParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AssetDividendRecordResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn dust_convert(
&self,
params: DustConvertParams,
) -> Result<RestApiResponse<DustConvertResponse>>
pub async fn dust_convert( &self, params: DustConvertParams, ) -> Result<RestApiResponse<DustConvertResponse>>
Dust Convert (USER_DATA)
Convert dust assets
Weight: 10
§Arguments
params:DustConvertParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DustConvertResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn dust_convertible_assets(
&self,
params: DustConvertibleAssetsParams,
) -> Result<RestApiResponse<DustConvertibleAssetsResponse>>
pub async fn dust_convertible_assets( &self, params: DustConvertibleAssetsParams, ) -> Result<RestApiResponse<DustConvertibleAssetsResponse>>
Dust Convertible Assets (USER_DATA)
Query dust convertible assets
Weight: 1
§Arguments
params:DustConvertibleAssetsParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DustConvertibleAssetsResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn dust_transfer(
&self,
params: DustTransferParams,
) -> Result<RestApiResponse<DustTransferResponse>>
pub async fn dust_transfer( &self, params: DustTransferParams, ) -> Result<RestApiResponse<DustTransferResponse>>
Dust Transfer (USER_DATA)
Convert dust assets to BNB.
- You need to open
Enable Spot & Margin Tradingpermission for the API Key which requests this endpoint.
Weight: 10
§Arguments
params:DustTransferParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DustTransferResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn dustlog(
&self,
params: DustlogParams,
) -> Result<RestApiResponse<DustlogResponse>>
pub async fn dustlog( &self, params: DustlogParams, ) -> Result<RestApiResponse<DustlogResponse>>
DustLog(USER_DATA)
Dustlog
- Only return last 100 records
- Only return records after 2020/12/01
Weight: 1
§Arguments
params:DustlogParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DustlogResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn funding_wallet(
&self,
params: FundingWalletParams,
) -> Result<RestApiResponse<Vec<FundingWalletResponseInner>>>
pub async fn funding_wallet( &self, params: FundingWalletParams, ) -> Result<RestApiResponse<Vec<FundingWalletResponseInner>>>
Funding Wallet (USER_DATA)
Query Funding Wallet
- Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
Weight: 1
§Arguments
params:FundingWalletParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::FundingWalletResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_assets_that_can_be_converted_into_bnb(
&self,
params: GetAssetsThatCanBeConvertedIntoBnbParams,
) -> Result<RestApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse>>
pub async fn get_assets_that_can_be_converted_into_bnb( &self, params: GetAssetsThatCanBeConvertedIntoBnbParams, ) -> Result<RestApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse>>
Get Assets That Can Be Converted Into BNB (USER_DATA)
Get Assets That Can Be Converted Into BNB
Weight: 1
§Arguments
params:GetAssetsThatCanBeConvertedIntoBnbParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetAssetsThatCanBeConvertedIntoBnbResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_cloud_mining_payment_and_refund_history(
&self,
params: GetCloudMiningPaymentAndRefundHistoryParams,
) -> Result<RestApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse>>
pub async fn get_cloud_mining_payment_and_refund_history( &self, params: GetCloudMiningPaymentAndRefundHistoryParams, ) -> Result<RestApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse>>
Get Cloud-Mining payment and refund history (USER_DATA)
The query of Cloud-Mining payment and refund history
- Just return the SUCCESS records of payment and refund.
- For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.
Weight: 600
§Arguments
params:GetCloudMiningPaymentAndRefundHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetCloudMiningPaymentAndRefundHistoryResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_open_symbol_list(
&self,
) -> Result<RestApiResponse<Vec<GetOpenSymbolListResponseInner>>>
pub async fn get_open_symbol_list( &self, ) -> Result<RestApiResponse<Vec<GetOpenSymbolListResponseInner>>>
Get Open Symbol List (MARKET_DATA)
Get the list of symbols that are scheduled to be opened for trading in the market.
Weight: 100
§Arguments
params: [GetOpenSymbolListParams] The parameters for this operation.
§Returns
RestApiResponse<Vec<models::GetOpenSymbolListResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn query_user_delegation_history(
&self,
params: QueryUserDelegationHistoryParams,
) -> Result<RestApiResponse<QueryUserDelegationHistoryResponse>>
pub async fn query_user_delegation_history( &self, params: QueryUserDelegationHistoryParams, ) -> Result<RestApiResponse<QueryUserDelegationHistoryResponse>>
Query User Delegation History(For Master Account)(USER_DATA)
Query User Delegation History
Weight: 60
§Arguments
params:QueryUserDelegationHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::QueryUserDelegationHistoryResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn query_user_universal_transfer_history(
&self,
params: QueryUserUniversalTransferHistoryParams,
) -> Result<RestApiResponse<QueryUserUniversalTransferHistoryResponse>>
pub async fn query_user_universal_transfer_history( &self, params: QueryUserUniversalTransferHistoryParams, ) -> Result<RestApiResponse<QueryUserUniversalTransferHistoryResponse>>
Query User Universal Transfer History(USER_DATA)
Query User Universal Transfer History
fromSymbolmust be sent when type areISOLATEDMARGIN_MARGINandISOLATEDMARGIN_ISOLATEDMARGINtoSymbolmust be sent when type areMARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGIN- Support query within the last 6 months only
- If
startTimeandendTimenot sent, return records of the last 7 days by default
Weight: 1
§Arguments
params:QueryUserUniversalTransferHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::QueryUserUniversalTransferHistoryResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn query_user_wallet_balance(
&self,
params: QueryUserWalletBalanceParams,
) -> Result<RestApiResponse<Vec<QueryUserWalletBalanceResponseInner>>>
pub async fn query_user_wallet_balance( &self, params: QueryUserWalletBalanceParams, ) -> Result<RestApiResponse<Vec<QueryUserWalletBalanceResponseInner>>>
Query User Wallet Balance (USER_DATA)
Query User Wallet Balance
Weight: 60
§Arguments
params:QueryUserWalletBalanceParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::QueryUserWalletBalanceResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn toggle_bnb_burn_on_spot_trade_and_margin_interest(
&self,
params: ToggleBnbBurnOnSpotTradeAndMarginInterestParams,
) -> Result<RestApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>>
pub async fn toggle_bnb_burn_on_spot_trade_and_margin_interest( &self, params: ToggleBnbBurnOnSpotTradeAndMarginInterestParams, ) -> Result<RestApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>>
Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
Toggle BNB Burn On Spot Trade And Margin Interest
- “spotBNBBurn” and “interestBNBBurn” should be sent at least one.
Weight: 1(IP)
§Arguments
params:ToggleBnbBurnOnSpotTradeAndMarginInterestParamsThe parameters for this operation.
§Returns
RestApiResponse<models::ToggleBnbBurnOnSpotTradeAndMarginInterestResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn trade_fee(
&self,
params: TradeFeeParams,
) -> Result<RestApiResponse<Vec<TradeFeeResponseInner>>>
pub async fn trade_fee( &self, params: TradeFeeParams, ) -> Result<RestApiResponse<Vec<TradeFeeResponseInner>>>
Trade Fee (USER_DATA)
Fetch trade fee
Weight: 1
§Arguments
params:TradeFeeParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::TradeFeeResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn user_asset(
&self,
params: UserAssetParams,
) -> Result<RestApiResponse<Vec<UserAssetResponseInner>>>
pub async fn user_asset( &self, params: UserAssetParams, ) -> Result<RestApiResponse<Vec<UserAssetResponseInner>>>
User Asset (USER_DATA)
Get user assets, just for positive data.
- If asset is set, then return this asset, otherwise return all assets positive.
- If needBtcValuation is set, then return btcValudation.
Weight: 5
§Arguments
params:UserAssetParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::UserAssetResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn user_universal_transfer(
&self,
params: UserUniversalTransferParams,
) -> Result<RestApiResponse<UserUniversalTransferResponse>>
pub async fn user_universal_transfer( &self, params: UserUniversalTransferParams, ) -> Result<RestApiResponse<UserUniversalTransferResponse>>
User Universal Transfer (USER_DATA)
user universal transfer
fromSymbolmust be sent when type areISOLATEDMARGIN_MARGINandISOLATEDMARGIN_ISOLATEDMARGINtoSymbolmust be sent when type areMARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGIN- ENUM of transfer types:
MAIN_UMFUTURESpot account transfer to USDⓈ-M Futures accountMAIN_CMFUTURESpot account transfer to COIN-M Futures accountMAIN_MARGINSpot account transfer to Margin(cross)accountUMFUTURE_MAINUSDⓈ-M Futures account transfer to Spot accountUMFUTURE_MARGINUSDⓈ-M Futures account transfer to Margin(cross)accountCMFUTURE_MAINCOIN-M Futures account transfer to Spot accountCMFUTURE_MARGINCOIN-M Futures account transfer to Margin(cross) accountMARGIN_MAINMargin(cross)account transfer to Spot accountMARGIN_UMFUTUREMargin(cross)account transfer to USDⓈ-M FuturesMARGIN_CMFUTUREMargin(cross)account transfer to COIN-M FuturesISOLATEDMARGIN_MARGINIsolated margin account transfer to Margin(cross) accountMARGIN_ISOLATEDMARGINMargin(cross) account transfer to Isolated margin accountISOLATEDMARGIN_ISOLATEDMARGINIsolated margin account transfer to Isolated margin accountMAIN_FUNDINGSpot account transfer to Funding accountFUNDING_MAINFunding account transfer to Spot accountFUNDING_UMFUTUREFunding account transfer to UMFUTURE accountUMFUTURE_FUNDINGUMFUTURE account transfer to Funding accountMARGIN_FUNDINGMARGIN account transfer to Funding accountFUNDING_MARGINFunding account transfer to Margin accountFUNDING_CMFUTUREFunding account transfer to CMFUTURE accountCMFUTURE_FUNDINGCMFUTURE account transfer to Funding accountMAIN_OPTIONSpot account transfer to Options accountOPTION_MAINOptions account transfer to Spot accountUMFUTURE_OPTIONUSDⓈ-M Futures account transfer to Options accountOPTION_UMFUTUREOptions account transfer to USDⓈ-M Futures accountMARGIN_OPTIONMargin(cross)account transfer to Options accountOPTION_MARGINOptions account transfer to Margin(cross)accountFUNDING_OPTIONFunding account transfer to Options accountOPTION_FUNDINGOptions account transfer to Funding accountMAIN_PORTFOLIO_MARGINSpot account transfer to Portfolio Margin accountPORTFOLIO_MARGIN_MAINPortfolio Margin account transfer to Spot account
Weight: 900
§Arguments
params:UserUniversalTransferParamsThe parameters for this operation.
§Returns
RestApiResponse<models::UserUniversalTransferResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn all_coins_information(
&self,
params: AllCoinsInformationParams,
) -> Result<RestApiResponse<Vec<AllCoinsInformationResponseInner>>>
pub async fn all_coins_information( &self, params: AllCoinsInformationParams, ) -> Result<RestApiResponse<Vec<AllCoinsInformationResponseInner>>>
All Coins’ Information (USER_DATA)
Get information of coins (available for deposit and withdraw) for user.
Weight: 10
§Arguments
params:AllCoinsInformationParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::AllCoinsInformationResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn deposit_address(
&self,
params: DepositAddressParams,
) -> Result<RestApiResponse<DepositAddressResponse>>
pub async fn deposit_address( &self, params: DepositAddressParams, ) -> Result<RestApiResponse<DepositAddressResponse>>
Deposit Address(supporting network) (USER_DATA)
Fetch deposit address with network.
- If
networkis not send, return with default network of the coin. - You can get
networkandisDefaultinnetworkListin the response ofGet /sapi/v1/capital/config/getall (HMAC SHA256). amountneeds to be sent if using LIGHTNING network
Weight: 10
§Arguments
params:DepositAddressParamsThe parameters for this operation.
§Returns
RestApiResponse<models::DepositAddressResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn deposit_history(
&self,
params: DepositHistoryParams,
) -> Result<RestApiResponse<Vec<DepositHistoryResponseInner>>>
pub async fn deposit_history( &self, params: DepositHistoryParams, ) -> Result<RestApiResponse<Vec<DepositHistoryResponseInner>>>
Deposit History (supporting network) (USER_DATA)
Fetch deposit history.
- Please notice the default
startTimeandendTimeto make sure that time interval is within 0-90 days. - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust be less than 90 days.
Weight: 1
§Arguments
params:DepositHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::DepositHistoryResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn fetch_deposit_address_list_with_network(
&self,
params: FetchDepositAddressListWithNetworkParams,
) -> Result<RestApiResponse<Vec<FetchDepositAddressListWithNetworkResponseInner>>>
pub async fn fetch_deposit_address_list_with_network( &self, params: FetchDepositAddressListWithNetworkParams, ) -> Result<RestApiResponse<Vec<FetchDepositAddressListWithNetworkResponseInner>>>
Fetch deposit address list with network(USER_DATA)
Fetch deposit address list with network.
- If network is not send, return with default network of the coin.
- You can get network and isDefault in networkList in the response of
Get /sapi/v1/capital/config/getall.
Weight: 10
§Arguments
params:FetchDepositAddressListWithNetworkParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::FetchDepositAddressListWithNetworkResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn fetch_withdraw_address_list(
&self,
) -> Result<RestApiResponse<Vec<FetchWithdrawAddressListResponseInner>>>
pub async fn fetch_withdraw_address_list( &self, ) -> Result<RestApiResponse<Vec<FetchWithdrawAddressListResponseInner>>>
Fetch withdraw address list (USER_DATA)
Fetch withdraw address list
Weight: 10
§Arguments
params: [FetchWithdrawAddressListParams] The parameters for this operation.
§Returns
RestApiResponse<Vec<models::FetchWithdrawAddressListResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn fetch_withdraw_quota(
&self,
) -> Result<RestApiResponse<FetchWithdrawQuotaResponse>>
pub async fn fetch_withdraw_quota( &self, ) -> Result<RestApiResponse<FetchWithdrawQuotaResponse>>
Fetch withdraw quota (USER_DATA)
Fetch withdraw quota
Weight: 10
§Arguments
params: [FetchWithdrawQuotaParams] The parameters for this operation.
§Returns
RestApiResponse<models::FetchWithdrawQuotaResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn one_click_arrival_deposit_apply(
&self,
params: OneClickArrivalDepositApplyParams,
) -> Result<RestApiResponse<OneClickArrivalDepositApplyResponse>>
pub async fn one_click_arrival_deposit_apply( &self, params: OneClickArrivalDepositApplyParams, ) -> Result<RestApiResponse<OneClickArrivalDepositApplyResponse>>
One click arrival deposit apply (for expired address deposit) (USER_DATA)
Apply deposit credit for expired address (One click arrival)
- Params need to be in the POST body
Weight: 1
§Arguments
params:OneClickArrivalDepositApplyParamsThe parameters for this operation.
§Returns
RestApiResponse<models::OneClickArrivalDepositApplyResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn withdraw(
&self,
params: WithdrawParams,
) -> Result<RestApiResponse<WithdrawResponse>>
pub async fn withdraw( &self, params: WithdrawParams, ) -> Result<RestApiResponse<WithdrawResponse>>
Withdraw(USER_DATA)
Submit a withdraw request.
- If
networknot send, return with default network of the coin. - You can get
networkandisDefaultinnetworkListof a coin in the response ofGet /sapi/v1/capital/config/getall (HMAC SHA256). - To check if travel rule is required, by using
GET /sapi/v1/localentity/questionnaire-requirementsand if it returns anything other thanNILyou will need update SAPI toPOST /sapi/v1/localentity/withdraw/applyelse you can continuePOST /sapi/v1/capital/withdraw/apply. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI. - For networks that do not support memo/tag, submitting a withdrawal request with a non-empty
addressTagwill return error-4106 TAG_NOT_SUPPORTED_FOR_NETWORK. Please omit theaddressTagfield for such networks. You can check whether a network requires a tag viaGET /sapi/v1/capital/config/getall: - If
withdrawTag=true→ memo/tag is required. - If
withdrawTag=false→ memo/tag is not supported; omitaddressTag.
Weight: 900
§Arguments
params:WithdrawParamsThe parameters for this operation.
§Returns
RestApiResponse<models::WithdrawResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn withdraw_history(
&self,
params: WithdrawHistoryParams,
) -> Result<RestApiResponse<Vec<WithdrawHistoryResponseInner>>>
pub async fn withdraw_history( &self, params: WithdrawHistoryParams, ) -> Result<RestApiResponse<Vec<WithdrawHistoryResponseInner>>>
Withdraw History (supporting network) (USER_DATA)
Fetch withdraw history.
networkmay not be in the response for old withdraw.- Please notice the default
startTimeandendTimeto make sure that time interval is within 0-90 days. - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust be less than 90 days. - If
withdrawOrderIdis sent, time betweenstartTimeandendTimemust be less than 7 days. - If
withdrawOrderIdis sent,startTimeandendTimeare not sent, will return last 7 days records by default. - Maximum support
idListnumber is 45.
Weight: 18000 Request limit: 10 requests per second
§Arguments
params:WithdrawHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::WithdrawHistoryResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_symbols_delist_schedule_for_spot(
&self,
params: GetSymbolsDelistScheduleForSpotParams,
) -> Result<RestApiResponse<Vec<GetSymbolsDelistScheduleForSpotResponseInner>>>
pub async fn get_symbols_delist_schedule_for_spot( &self, params: GetSymbolsDelistScheduleForSpotParams, ) -> Result<RestApiResponse<Vec<GetSymbolsDelistScheduleForSpotResponseInner>>>
Get symbols delist schedule for spot (MARKET_DATA)
Get symbols delist schedule for spot
Weight: 100
§Arguments
params:GetSymbolsDelistScheduleForSpotParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::GetSymbolsDelistScheduleForSpotResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn system_status(
&self,
) -> Result<RestApiResponse<SystemStatusResponse>>
pub async fn system_status( &self, ) -> Result<RestApiResponse<SystemStatusResponse>>
System Status (System)
Fetch system status.
Weight: 1
§Arguments
params: [SystemStatusParams] The parameters for this operation.
§Returns
RestApiResponse<models::SystemStatusResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn broker_withdraw(
&self,
params: BrokerWithdrawParams,
) -> Result<RestApiResponse<BrokerWithdrawResponse>>
pub async fn broker_withdraw( &self, params: BrokerWithdrawParams, ) -> Result<RestApiResponse<BrokerWithdrawResponse>>
Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
Submit a withdrawal request for brokers of local entities that required travel rule.
- If
networknot send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. - You can get
networkinnetworkListof a coin in the response - Questionnaire is different for each local entity, please refer to
- If getting error like
Questionnaire format not valid.orQuestionnaire must not be blank,
Weight: 600
§Arguments
params:BrokerWithdrawParamsThe parameters for this operation.
§Returns
RestApiResponse<models::BrokerWithdrawResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn check_questionnaire_requirements(
&self,
params: CheckQuestionnaireRequirementsParams,
) -> Result<RestApiResponse<CheckQuestionnaireRequirementsResponse>>
pub async fn check_questionnaire_requirements( &self, params: CheckQuestionnaireRequirementsParams, ) -> Result<RestApiResponse<CheckQuestionnaireRequirementsResponse>>
Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
Weight: 1
§Arguments
params:CheckQuestionnaireRequirementsParamsThe parameters for this operation.
§Returns
RestApiResponse<models::CheckQuestionnaireRequirementsResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn deposit_history_travel_rule(
&self,
params: DepositHistoryTravelRuleParams,
) -> Result<RestApiResponse<Vec<DepositHistoryTravelRuleResponseInner>>>
pub async fn deposit_history_travel_rule( &self, params: DepositHistoryTravelRuleParams, ) -> Result<RestApiResponse<Vec<DepositHistoryTravelRuleResponseInner>>>
Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA)
Fetch deposit history for local entities that required travel rule.
- Please notice the default
startTimeandendTimeto make sure that time interval is within - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust - Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned.
Weight: 1
§Arguments
params:DepositHistoryTravelRuleParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::DepositHistoryTravelRuleResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn deposit_history_v2(
&self,
params: DepositHistoryV2Params,
) -> Result<RestApiResponse<Vec<DepositHistoryV2ResponseInner>>>
pub async fn deposit_history_v2( &self, params: DepositHistoryV2Params, ) -> Result<RestApiResponse<Vec<DepositHistoryV2ResponseInner>>>
Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
Fetch deposit history for local entities that with required travel rule information.
- Please notice the default
startTimeandendTimeto make sure that time interval is within - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust - Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned.
Weight: 1
§Arguments
params:DepositHistoryV2ParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::DepositHistoryV2ResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn fetch_address_verification_list(
&self,
params: FetchAddressVerificationListParams,
) -> Result<RestApiResponse<Vec<FetchAddressVerificationListResponseInner>>>
pub async fn fetch_address_verification_list( &self, params: FetchAddressVerificationListParams, ) -> Result<RestApiResponse<Vec<FetchAddressVerificationListResponseInner>>>
Fetch address verification list (USER_DATA)
Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
Weight: 1
§Arguments
params:FetchAddressVerificationListParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::FetchAddressVerificationListResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_country_list(
&self,
) -> Result<RestApiResponse<GetCountryListResponse>>
pub async fn get_country_list( &self, ) -> Result<RestApiResponse<GetCountryListResponse>>
Get Country List (USER_DATA)
Query the active country list for travel rule questionnaires.
Weight: 1
§Arguments
params: [GetCountryListParams] The parameters for this operation.
§Returns
RestApiResponse<models::GetCountryListResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn get_region_list(
&self,
params: GetRegionListParams,
) -> Result<RestApiResponse<GetRegionListResponse>>
pub async fn get_region_list( &self, params: GetRegionListParams, ) -> Result<RestApiResponse<GetRegionListResponse>>
Get Region List (USER_DATA)
Query the active region/city list for a given country.
Weight: 1
§Arguments
params:GetRegionListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetRegionListResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn submit_deposit_questionnaire(
&self,
params: SubmitDepositQuestionnaireParams,
) -> Result<RestApiResponse<SubmitDepositQuestionnaireResponse>>
pub async fn submit_deposit_questionnaire( &self, params: SubmitDepositQuestionnaireParams, ) -> Result<RestApiResponse<SubmitDepositQuestionnaireResponse>>
Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
Submit questionnaire for brokers of local entities that require travel rule. The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not yet onboarded with GTR.
- Questionnaire is different for each local entity, please refer
- If getting error like
Questionnaire format not valid.orQuestionnaire must not be blank,
Weight: 600
§Arguments
params:SubmitDepositQuestionnaireParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubmitDepositQuestionnaireResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn submit_deposit_questionnaire_travel_rule(
&self,
params: SubmitDepositQuestionnaireTravelRuleParams,
) -> Result<RestApiResponse<SubmitDepositQuestionnaireTravelRuleResponse>>
pub async fn submit_deposit_questionnaire_travel_rule( &self, params: SubmitDepositQuestionnaireTravelRuleParams, ) -> Result<RestApiResponse<SubmitDepositQuestionnaireTravelRuleResponse>>
Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR.
- Questionnaire is different for each local entity, please refer
- If getting error like
Questionnaire format not valid.orQuestionnaire must not be blank,
Weight: 600
§Arguments
params:SubmitDepositQuestionnaireTravelRuleParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubmitDepositQuestionnaireTravelRuleResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn submit_deposit_questionnaire_v2(
&self,
params: SubmitDepositQuestionnaireV2Params,
) -> Result<RestApiResponse<SubmitDepositQuestionnaireV2Response>>
pub async fn submit_deposit_questionnaire_v2( &self, params: SubmitDepositQuestionnaireV2Params, ) -> Result<RestApiResponse<SubmitDepositQuestionnaireV2Response>>
Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA)
Submit questionnaire for local entities that require travel rule. The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not yet onboarded with GTR.
- Questionnaire is different for each local entity, please refer
- If getting error like
Questionnaire format not valid.orQuestionnaire must not be blank,
Weight: 600
§Arguments
params:SubmitDepositQuestionnaireV2ParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubmitDepositQuestionnaireV2Response> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn vasp_list(
&self,
params: VaspListParams,
) -> Result<RestApiResponse<Vec<VaspListResponseInner>>>
pub async fn vasp_list( &self, params: VaspListParams, ) -> Result<RestApiResponse<Vec<VaspListResponseInner>>>
VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
Fetch the VASP list for local entities.
Weight: 1
§Arguments
params:VaspListParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::VaspListResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn withdraw_history_v1(
&self,
params: WithdrawHistoryV1Params,
) -> Result<RestApiResponse<Vec<WithdrawHistoryV2ResponseInner>>>
pub async fn withdraw_history_v1( &self, params: WithdrawHistoryV1Params, ) -> Result<RestApiResponse<Vec<WithdrawHistoryV2ResponseInner>>>
Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
Fetch withdraw history for local entities that required travel rule.
networkmay not be in the response for old withdraw.- Please notice the default
startTimeandendTimeto make sure that time interval is within - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust be less
Weight: 1
§Arguments
params:WithdrawHistoryV1ParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn withdraw_history_v2(
&self,
params: WithdrawHistoryV2Params,
) -> Result<RestApiResponse<Vec<WithdrawHistoryV2ResponseInner>>>
pub async fn withdraw_history_v2( &self, params: WithdrawHistoryV2Params, ) -> Result<RestApiResponse<Vec<WithdrawHistoryV2ResponseInner>>>
Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
Fetch withdraw history for local entities that required travel rule.
networkmay not be in the response for old withdraw.- Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
- Please notice the default
startTimeandendTimeto make sure that time interval is within - If both
startTimeandendTimeare sent, time betweenstartTimeandendTimemust be less - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
- If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
- Maximum support trId,txId number is 45.
WithdrawOrderIdonly support 1.- If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
Weight: 1
§Arguments
params:WithdrawHistoryV2ParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.
Sourcepub async fn withdraw_travel_rule(
&self,
params: WithdrawTravelRuleParams,
) -> Result<RestApiResponse<WithdrawTravelRuleResponse>>
pub async fn withdraw_travel_rule( &self, params: WithdrawTravelRuleParams, ) -> Result<RestApiResponse<WithdrawTravelRuleResponse>>
Withdraw (for local entities that require travel rule) (USER_DATA)
Submit a withdrawal request for local entities that required travel rule.
- If
networknot send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected. - You can get
networkandisDefaultinnetworkListof a coin in the response - Questionnaire is different for each local entity, please refer to
- If getting error like
Questionnaire format not valid.orQuestionnaire must not be blank,
Weight: 600
§Arguments
params:WithdrawTravelRuleParamsThe parameters for this operation.
§Returns
RestApiResponse<models::WithdrawTravelRuleResponse> on success.
§Errors
This function will return an anyhow::Error if:
- the HTTP request fails
- any parameter is invalid
- the response cannot be parsed
- or one of the following occurs:
RequiredErrorConnectorClientErrorUnauthorizedErrorForbiddenErrorTooManyRequestsErrorRateLimitBanErrorServerErrorNotFoundErrorNetworkErrorBadRequestError
For full API details, see the Binance API Documentation.