Skip to main content

RestApi

Struct RestApi 

Source
pub struct RestApi { /* private fields */ }

Implementations§

Source§

impl RestApi

Source

pub fn new(configuration: ConfigurationRestApi) -> Self

Source

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 to
  • method - The HTTP method to use for the request
  • query_params - A map of query parameters to send with the request
  • body_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

Source

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 to
  • method - The HTTP method to use for the request
  • query_params - A map of query parameters to send with the request
  • body_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

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn account_info( &self, params: AccountInfoParams, ) -> Result<RestApiResponse<AccountInfoResponse>>

Account info (USER_DATA)

Fetch account info detail.

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn account_status( &self, params: AccountStatusParams, ) -> Result<RestApiResponse<AccountStatusResponse>>

Account Status (USER_DATA)

Fetch account status detail.

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn disable_fast_withdraw_switch( &self, params: DisableFastWithdrawSwitchParams, ) -> Result<RestApiResponse<Value>>

Disable Fast Withdraw Switch (USER_DATA)

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 startTime and endTime.

Weight: 10

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn dust_convert( &self, params: DustConvertParams, ) -> Result<RestApiResponse<DustConvertResponse>>

Dust Convert (USER_DATA)

Convert dust assets

Weight: 10

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn dust_convertible_assets( &self, params: DustConvertibleAssetsParams, ) -> Result<RestApiResponse<DustConvertibleAssetsResponse>>

Dust Convertible Assets (USER_DATA)

Query dust convertible assets

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn dust_transfer( &self, params: DustTransferParams, ) -> Result<RestApiResponse<DustTransferResponse>>

Dust Transfer (USER_DATA)

Convert dust assets to BNB.

  • You need to openEnable Spot & Margin Trading permission for the API Key which requests this endpoint.

Weight: 10

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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

  • fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • Support query within the last 6 months only
  • If startTimeand endTime not sent, return records of the last 7 days by default

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn trade_fee( &self, params: TradeFeeParams, ) -> Result<RestApiResponse<Vec<TradeFeeResponseInner>>>

Trade Fee (USER_DATA)

Fetch trade fee

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn user_universal_transfer( &self, params: UserUniversalTransferParams, ) -> Result<RestApiResponse<UserUniversalTransferResponse>>

User Universal Transfer (USER_DATA)

user universal transfer

  • fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • ENUM of transfer types:
  • MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account
  • MAIN_CMFUTURE Spot account transfer to COIN-M Futures account
  • MAIN_MARGIN Spot account transfer to Margin(cross)account
  • UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account
  • UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account
  • CMFUTURE_MAIN COIN-M Futures account transfer to Spot account
  • CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account
  • MARGIN_MAIN Margin(cross)account transfer to Spot account
  • MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures
  • MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures
  • ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account
  • MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account
  • ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account
  • MAIN_FUNDING Spot account transfer to Funding account
  • FUNDING_MAIN Funding account transfer to Spot account
  • FUNDING_UMFUTURE Funding account transfer to UMFUTURE account
  • UMFUTURE_FUNDING UMFUTURE account transfer to Funding account
  • MARGIN_FUNDING MARGIN account transfer to Funding account
  • FUNDING_MARGIN Funding account transfer to Margin account
  • FUNDING_CMFUTURE Funding account transfer to CMFUTURE account
  • CMFUTURE_FUNDING CMFUTURE account transfer to Funding account
  • MAIN_OPTION Spot account transfer to Options account
  • OPTION_MAIN Options account transfer to Spot account
  • UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account
  • OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account
  • MARGIN_OPTION Margin(cross)account transfer to Options account
  • OPTION_MARGIN Options account transfer to Margin(cross)account
  • FUNDING_OPTION Funding account transfer to Options account
  • OPTION_FUNDING Options account transfer to Funding account
  • MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account
  • PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account

Weight: 900

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn deposit_address( &self, params: DepositAddressParams, ) -> Result<RestApiResponse<DepositAddressResponse>>

Deposit Address(supporting network) (USER_DATA)

Fetch deposit address 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 (HMAC SHA256).
  • amount needs to be sent if using LIGHTNING network

Weight: 10

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 startTime and endTime to make sure that time interval is within 0-90 days.
  • If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn withdraw( &self, params: WithdrawParams, ) -> Result<RestApiResponse<WithdrawResponse>>

Withdraw(USER_DATA)

Submit a withdraw request.

  • If network not send, return with default network of the coin.
  • You can get network and isDefault in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
  • To check if travel rule is required, by using GET /sapi/v1/localentity/questionnaire-requirements and if it returns anything other than NIL you will need update SAPI to POST /sapi/v1/localentity/withdraw/apply else you can continue POST /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 addressTag will return error -4106 TAG_NOT_SUPPORTED_FOR_NETWORK. Please omit the addressTag field for such networks. You can check whether a network requires a tag via GET /sapi/v1/capital/config/getall:
  • If withdrawTag = true → memo/tag is required.
  • If withdrawTag = false → memo/tag is not supported; omit addressTag.

Weight: 900

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

pub async fn withdraw_history( &self, params: WithdrawHistoryParams, ) -> Result<RestApiResponse<Vec<WithdrawHistoryResponseInner>>>

Withdraw History (supporting network) (USER_DATA)

Fetch withdraw history.

  • network may not be in the response for old withdraw.
  • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
  • If both startTime and endTimeare sent, time between startTimeand endTimemust be less than 90 days.
  • 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 idList number is 45.

Weight: 18000 Request limit: 10 requests per second

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 network not 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 network in networkList of a coin in the response
  • Questionnaire is different for each local entity, please refer to
  • If getting error like Questionnaire format not valid. or Questionnaire must not be blank,

Weight: 600

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 startTime and endTime to make sure that time interval is within
  • If both startTime and endTime are sent, time between startTime and endTime must
  • 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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 startTime and endTime to make sure that time interval is within
  • If both startTime and endTime are sent, time between startTime and endTime must
  • 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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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. or Questionnaire must not be blank,

Weight: 600

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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. or Questionnaire must not be blank,

Weight: 600

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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. or Questionnaire must not be blank,

Weight: 600

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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.

  • network may not be in the response for old withdraw.
  • Please notice the default startTime and endTime to make sure that time interval is within
  • If both startTime and endTimeare sent, time between startTimeand endTimemust be less

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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.

  • network may 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 startTime and endTime to make sure that time interval is within
  • If both startTime and endTimeare sent, time between startTimeand endTimemust 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.
  • WithdrawOrderId only support 1.
  • If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.

Weight: 1

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Source

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 network not 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 network and isDefault in networkList of a coin in the response
  • Questionnaire is different for each local entity, please refer to
  • If getting error like Questionnaire format not valid. or Questionnaire must not be blank,

Weight: 600

§Arguments
§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:
    • RequiredError
    • ConnectorClientError
    • UnauthorizedError
    • ForbiddenError
    • TooManyRequestsError
    • RateLimitBanError
    • ServerError
    • NotFoundError
    • NetworkError
    • BadRequestError

For full API details, see the Binance API Documentation.

Trait Implementations§

Source§

impl Clone for RestApi

Source§

fn clone(&self) -> RestApi

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RestApi

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more