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_list(
&self,
params: AccountListParams,
) -> Result<RestApiResponse<AccountListResponse>>
pub async fn account_list( &self, params: AccountListParams, ) -> Result<RestApiResponse<AccountListResponse>>
Account List(USER_DATA)
Query Account List
Weight: 5
§Arguments
params:AccountListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::AccountListResponse> 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 acquiring_algorithm(
&self,
) -> Result<RestApiResponse<AcquiringAlgorithmResponse>>
pub async fn acquiring_algorithm( &self, ) -> Result<RestApiResponse<AcquiringAlgorithmResponse>>
Acquiring Algorithm(MARKET_DATA)
Acquiring Algorithm
Weight: 1
§Arguments
params: [AcquiringAlgorithmParams] The parameters for this operation.
§Returns
RestApiResponse<models::AcquiringAlgorithmResponse> 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 acquiring_coinname(
&self,
) -> Result<RestApiResponse<AcquiringCoinnameResponse>>
pub async fn acquiring_coinname( &self, ) -> Result<RestApiResponse<AcquiringCoinnameResponse>>
Acquiring CoinName(MARKET_DATA)
Acquiring CoinName
Weight: 1
§Arguments
params: [AcquiringCoinnameParams] The parameters for this operation.
§Returns
RestApiResponse<models::AcquiringCoinnameResponse> 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 cancel_hashrate_resale_configuration(
&self,
params: CancelHashrateResaleConfigurationParams,
) -> Result<RestApiResponse<CancelHashrateResaleConfigurationResponse>>
pub async fn cancel_hashrate_resale_configuration( &self, params: CancelHashrateResaleConfigurationParams, ) -> Result<RestApiResponse<CancelHashrateResaleConfigurationResponse>>
Cancel hashrate resale configuration(USER_DATA)
Weight: 5
§Arguments
params:CancelHashrateResaleConfigurationParamsThe parameters for this operation.
§Returns
RestApiResponse<models::CancelHashrateResaleConfigurationResponse> 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 earnings_list(
&self,
params: EarningsListParams,
) -> Result<RestApiResponse<EarningsListResponse>>
pub async fn earnings_list( &self, params: EarningsListParams, ) -> Result<RestApiResponse<EarningsListResponse>>
Earnings List(USER_DATA)
Query Earnings List
Weight: 5
§Arguments
params:EarningsListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::EarningsListResponse> 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 extra_bonus_list(
&self,
params: ExtraBonusListParams,
) -> Result<RestApiResponse<ExtraBonusListResponse>>
pub async fn extra_bonus_list( &self, params: ExtraBonusListParams, ) -> Result<RestApiResponse<ExtraBonusListResponse>>
Extra Bonus List(USER_DATA)
Extra Bonus List
Weight: 5
§Arguments
params:ExtraBonusListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::ExtraBonusListResponse> 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 hashrate_resale_detail(
&self,
params: HashrateResaleDetailParams,
) -> Result<RestApiResponse<HashrateResaleDetailResponse>>
pub async fn hashrate_resale_detail( &self, params: HashrateResaleDetailParams, ) -> Result<RestApiResponse<HashrateResaleDetailResponse>>
Hashrate Resale Detail(USER_DATA)
Hashrate Resale Detail(USER_DATA)
Weight: 5
§Arguments
params:HashrateResaleDetailParamsThe parameters for this operation.
§Returns
RestApiResponse<models::HashrateResaleDetailResponse> 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 hashrate_resale_list(
&self,
params: HashrateResaleListParams,
) -> Result<RestApiResponse<HashrateResaleListResponse>>
pub async fn hashrate_resale_list( &self, params: HashrateResaleListParams, ) -> Result<RestApiResponse<HashrateResaleListResponse>>
Hashrate Resale List
Hashrate Resale List
Weight: 5
§Arguments
params:HashrateResaleListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::HashrateResaleListResponse> 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 hashrate_resale_request(
&self,
params: HashrateResaleRequestParams,
) -> Result<RestApiResponse<HashrateResaleRequestResponse>>
pub async fn hashrate_resale_request( &self, params: HashrateResaleRequestParams, ) -> Result<RestApiResponse<HashrateResaleRequestResponse>>
Hashrate Resale Request(USER_DATA)
Hashrate Resale Request
Weight: 5
§Arguments
params:HashrateResaleRequestParamsThe parameters for this operation.
§Returns
RestApiResponse<models::HashrateResaleRequestResponse> 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 mining_account_earning(
&self,
params: MiningAccountEarningParams,
) -> Result<RestApiResponse<MiningAccountEarningResponse>>
pub async fn mining_account_earning( &self, params: MiningAccountEarningParams, ) -> Result<RestApiResponse<MiningAccountEarningResponse>>
Mining Account Earning(USER_DATA)
Mining Account Earning
Weight: 5
§Arguments
params:MiningAccountEarningParamsThe parameters for this operation.
§Returns
RestApiResponse<models::MiningAccountEarningResponse> 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 request_for_detail_miner_list(
&self,
params: RequestForDetailMinerListParams,
) -> Result<RestApiResponse<RequestForDetailMinerListResponse>>
pub async fn request_for_detail_miner_list( &self, params: RequestForDetailMinerListParams, ) -> Result<RestApiResponse<RequestForDetailMinerListResponse>>
Request for Detail Miner List(USER_DATA)
Request for Detail Miner List
Weight: 5
§Arguments
params:RequestForDetailMinerListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::RequestForDetailMinerListResponse> 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 request_for_miner_list(
&self,
params: RequestForMinerListParams,
) -> Result<RestApiResponse<RequestForMinerListResponse>>
pub async fn request_for_miner_list( &self, params: RequestForMinerListParams, ) -> Result<RestApiResponse<RequestForMinerListResponse>>
Request for Miner List(USER_DATA)
Request for Miner List
Weight: 5
§Arguments
params:RequestForMinerListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::RequestForMinerListResponse> 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 statistic_list(
&self,
params: StatisticListParams,
) -> Result<RestApiResponse<StatisticListResponse>>
pub async fn statistic_list( &self, params: StatisticListParams, ) -> Result<RestApiResponse<StatisticListResponse>>
Statistic List(USER_DATA)
Statistic List
Weight: 5
§Arguments
params:StatisticListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::StatisticListResponse> 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.