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 eth_staking_account(
&self,
params: EthStakingAccountParams,
) -> Result<RestApiResponse<EthStakingAccountResponse>>
pub async fn eth_staking_account( &self, params: EthStakingAccountParams, ) -> Result<RestApiResponse<EthStakingAccountResponse>>
ETH Staking account(USER_DATA)
ETH Staking account
Weight: 150
§Arguments
params:EthStakingAccountParamsThe parameters for this operation.
§Returns
RestApiResponse<models::EthStakingAccountResponse> 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_current_eth_staking_quota(
&self,
params: GetCurrentEthStakingQuotaParams,
) -> Result<RestApiResponse<GetCurrentEthStakingQuotaResponse>>
pub async fn get_current_eth_staking_quota( &self, params: GetCurrentEthStakingQuotaParams, ) -> Result<RestApiResponse<GetCurrentEthStakingQuotaResponse>>
Get current ETH staking quota(USER_DATA)
Get current ETH staking quota
Weight: 150
§Arguments
params:GetCurrentEthStakingQuotaParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetCurrentEthStakingQuotaResponse> 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_eth_redemption_history(
&self,
params: GetEthRedemptionHistoryParams,
) -> Result<RestApiResponse<GetEthRedemptionHistoryResponse>>
pub async fn get_eth_redemption_history( &self, params: GetEthRedemptionHistoryParams, ) -> Result<RestApiResponse<GetEthRedemptionHistoryResponse>>
Get ETH redemption history(USER_DATA)
Get ETH redemption history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetEthRedemptionHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetEthRedemptionHistoryResponse> 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_eth_staking_history(
&self,
params: GetEthStakingHistoryParams,
) -> Result<RestApiResponse<GetEthStakingHistoryResponse>>
pub async fn get_eth_staking_history( &self, params: GetEthStakingHistoryParams, ) -> Result<RestApiResponse<GetEthStakingHistoryResponse>>
Get ETH staking history(USER_DATA)
Get ETH staking history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetEthStakingHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetEthStakingHistoryResponse> 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_wbeth_rate_history(
&self,
params: GetWbethRateHistoryParams,
) -> Result<RestApiResponse<GetWbethRateHistoryResponse>>
pub async fn get_wbeth_rate_history( &self, params: GetWbethRateHistoryParams, ) -> Result<RestApiResponse<GetWbethRateHistoryResponse>>
Get WBETH Rate History(USER_DATA)
Get WBETH Rate History
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetWbethRateHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetWbethRateHistoryResponse> 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_wbeth_rewards_history(
&self,
params: GetWbethRewardsHistoryParams,
) -> Result<RestApiResponse<GetWbethRewardsHistoryResponse>>
pub async fn get_wbeth_rewards_history( &self, params: GetWbethRewardsHistoryParams, ) -> Result<RestApiResponse<GetWbethRewardsHistoryResponse>>
Get WBETH rewards history(USER_DATA)
Get WBETH rewards history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetWbethRewardsHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetWbethRewardsHistoryResponse> 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_wbeth_unwrap_history(
&self,
params: GetWbethUnwrapHistoryParams,
) -> Result<RestApiResponse<GetWbethUnwrapHistoryResponse>>
pub async fn get_wbeth_unwrap_history( &self, params: GetWbethUnwrapHistoryParams, ) -> Result<RestApiResponse<GetWbethUnwrapHistoryResponse>>
Get WBETH unwrap history(USER_DATA)
Get WBETH unwrap history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetWbethUnwrapHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetWbethUnwrapHistoryResponse> 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_wbeth_wrap_history(
&self,
params: GetWbethWrapHistoryParams,
) -> Result<RestApiResponse<GetWbethWrapHistoryResponse>>
pub async fn get_wbeth_wrap_history( &self, params: GetWbethWrapHistoryParams, ) -> Result<RestApiResponse<GetWbethWrapHistoryResponse>>
Get WBETH wrap history(USER_DATA)
Get WBETH wrap history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetWbethWrapHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetWbethWrapHistoryResponse> 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 redeem_eth(
&self,
params: RedeemEthParams,
) -> Result<RestApiResponse<RedeemEthResponse>>
pub async fn redeem_eth( &self, params: RedeemEthParams, ) -> Result<RestApiResponse<RedeemEthResponse>>
Redeem ETH(TRADE)
Redeem WBETH or BETH and get ETH
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:RedeemEthParamsThe parameters for this operation.
§Returns
RestApiResponse<models::RedeemEthResponse> 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 subscribe_eth_staking(
&self,
params: SubscribeEthStakingParams,
) -> Result<RestApiResponse<SubscribeEthStakingResponse>>
pub async fn subscribe_eth_staking( &self, params: SubscribeEthStakingParams, ) -> Result<RestApiResponse<SubscribeEthStakingResponse>>
Subscribe ETH Staking(TRADE)
Subscribe ETH Staking
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:SubscribeEthStakingParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubscribeEthStakingResponse> 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 wrap_beth(
&self,
params: WrapBethParams,
) -> Result<RestApiResponse<WrapBethResponse>>
pub async fn wrap_beth( &self, params: WrapBethParams, ) -> Result<RestApiResponse<WrapBethResponse>>
Wrap BETH(TRADE)
Wrap BETH
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:WrapBethParamsThe parameters for this operation.
§Returns
RestApiResponse<models::WrapBethResponse> 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_on_chain_yields_locked_personal_left_quota(
&self,
params: GetOnChainYieldsLockedPersonalLeftQuotaParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedPersonalLeftQuotaResponse>>
pub async fn get_on_chain_yields_locked_personal_left_quota( &self, params: GetOnChainYieldsLockedPersonalLeftQuotaParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedPersonalLeftQuotaResponse>>
Get On-chain Yields Locked Personal Left Quota (USER_DATA)
Get On-chain Yields Locked Personal Left Quota
Weight: 50
§Arguments
params:GetOnChainYieldsLockedPersonalLeftQuotaParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedPersonalLeftQuotaResponse> 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_on_chain_yields_locked_product_list(
&self,
params: GetOnChainYieldsLockedProductListParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedProductListResponse>>
pub async fn get_on_chain_yields_locked_product_list( &self, params: GetOnChainYieldsLockedProductListParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedProductListResponse>>
Get On-chain Yields Locked Product List (USER_DATA)
Get available On-chain Yields Locked product list
- Get available On-chain Yields Locked product list
Weight: 50
§Arguments
params:GetOnChainYieldsLockedProductListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedProductListResponse> 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_on_chain_yields_locked_product_position(
&self,
params: GetOnChainYieldsLockedProductPositionParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedProductPositionResponse>>
pub async fn get_on_chain_yields_locked_product_position( &self, params: GetOnChainYieldsLockedProductPositionParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedProductPositionResponse>>
Get On-chain Yields Locked Product Position (USER_DATA)
Get On-chain Yields Locked Product Position
Weight: 50
§Arguments
params:GetOnChainYieldsLockedProductPositionParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedProductPositionResponse> 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_on_chain_yields_locked_redemption_record(
&self,
params: GetOnChainYieldsLockedRedemptionRecordParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedRedemptionRecordResponse>>
pub async fn get_on_chain_yields_locked_redemption_record( &self, params: GetOnChainYieldsLockedRedemptionRecordParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedRedemptionRecordResponse>>
Get On-chain Yields Locked Redemption Record (USER_DATA)
Get On-chain Yields Locked Redemption Record
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 50
§Arguments
params:GetOnChainYieldsLockedRedemptionRecordParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedRedemptionRecordResponse> 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_on_chain_yields_locked_rewards_history(
&self,
params: GetOnChainYieldsLockedRewardsHistoryParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedRewardsHistoryResponse>>
pub async fn get_on_chain_yields_locked_rewards_history( &self, params: GetOnChainYieldsLockedRewardsHistoryParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedRewardsHistoryResponse>>
Get On-chain Yields Locked Rewards History (USER_DATA)
Get On-chain Yields Locked Rewards History
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 50
§Arguments
params:GetOnChainYieldsLockedRewardsHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedRewardsHistoryResponse> 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_on_chain_yields_locked_subscription_preview(
&self,
params: GetOnChainYieldsLockedSubscriptionPreviewParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedSubscriptionPreviewResponse>>
pub async fn get_on_chain_yields_locked_subscription_preview( &self, params: GetOnChainYieldsLockedSubscriptionPreviewParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedSubscriptionPreviewResponse>>
Get On-chain Yields Locked Subscription Preview (USER_DATA)
Get On-chain Yields Locked Subscription Preview
Weight: 50
§Arguments
params:GetOnChainYieldsLockedSubscriptionPreviewParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedSubscriptionPreviewResponse> 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_on_chain_yields_locked_subscription_record(
&self,
params: GetOnChainYieldsLockedSubscriptionRecordParams,
) -> Result<RestApiResponse<GetOnChainYieldsLockedSubscriptionRecordResponse>>
pub async fn get_on_chain_yields_locked_subscription_record( &self, params: GetOnChainYieldsLockedSubscriptionRecordParams, ) -> Result<RestApiResponse<GetOnChainYieldsLockedSubscriptionRecordResponse>>
Get On-chain Yields Locked Subscription Record (USER_DATA)
Get On-chain Yields Locked Subscription Record
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 50
§Arguments
params:GetOnChainYieldsLockedSubscriptionRecordParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetOnChainYieldsLockedSubscriptionRecordResponse> 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 on_chain_yields_account(
&self,
params: OnChainYieldsAccountParams,
) -> Result<RestApiResponse<OnChainYieldsAccountResponse>>
pub async fn on_chain_yields_account( &self, params: OnChainYieldsAccountParams, ) -> Result<RestApiResponse<OnChainYieldsAccountResponse>>
On-chain Yields Account (USER_DATA)
On-chain Yields Account query
Weight: 50
§Arguments
params:OnChainYieldsAccountParamsThe parameters for this operation.
§Returns
RestApiResponse<models::OnChainYieldsAccountResponse> 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 redeem_on_chain_yields_locked_product(
&self,
params: RedeemOnChainYieldsLockedProductParams,
) -> Result<RestApiResponse<RedeemOnChainYieldsLockedProductResponse>>
pub async fn redeem_on_chain_yields_locked_product( &self, params: RedeemOnChainYieldsLockedProductParams, ) -> Result<RestApiResponse<RedeemOnChainYieldsLockedProductResponse>>
Redeem On-chain Yields Locked Product (TRADE)
Redeem On-chain Yields Locked Product
- You need to open
Enable Spot & Margin Tradingpermission for the API Key which requests this endpoint.
Weight: 1/3s per account
§Arguments
params:RedeemOnChainYieldsLockedProductParamsThe parameters for this operation.
§Returns
RestApiResponse<models::RedeemOnChainYieldsLockedProductResponse> 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 set_on_chain_yields_locked_auto_subscribe(
&self,
params: SetOnChainYieldsLockedAutoSubscribeParams,
) -> Result<RestApiResponse<SetOnChainYieldsLockedAutoSubscribeResponse>>
pub async fn set_on_chain_yields_locked_auto_subscribe( &self, params: SetOnChainYieldsLockedAutoSubscribeParams, ) -> Result<RestApiResponse<SetOnChainYieldsLockedAutoSubscribeResponse>>
Set On-chain Yields Locked Auto Subscribe(USER_DATA)
Set On-chain Yield locked auto subscribe
Weight: 50
§Arguments
params:SetOnChainYieldsLockedAutoSubscribeParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SetOnChainYieldsLockedAutoSubscribeResponse> 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 set_on_chain_yields_locked_product_redeem_option(
&self,
params: SetOnChainYieldsLockedProductRedeemOptionParams,
) -> Result<RestApiResponse<SetOnChainYieldsLockedProductRedeemOptionResponse>>
pub async fn set_on_chain_yields_locked_product_redeem_option( &self, params: SetOnChainYieldsLockedProductRedeemOptionParams, ) -> Result<RestApiResponse<SetOnChainYieldsLockedProductRedeemOptionResponse>>
Set On-chain Yields Locked Product Redeem Option(USER_DATA)
Set On-chain Yields redeem option for Locked product
Weight: 50
§Arguments
params:SetOnChainYieldsLockedProductRedeemOptionParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SetOnChainYieldsLockedProductRedeemOptionResponse> 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 subscribe_on_chain_yields_locked_product(
&self,
params: SubscribeOnChainYieldsLockedProductParams,
) -> Result<RestApiResponse<SubscribeOnChainYieldsLockedProductResponse>>
pub async fn subscribe_on_chain_yields_locked_product( &self, params: SubscribeOnChainYieldsLockedProductParams, ) -> Result<RestApiResponse<SubscribeOnChainYieldsLockedProductResponse>>
Subscribe On-chain Yields Locked Product(TRADE)
Subscribe On-chain Yields Locked Product
- You need to open
Enable Spot & Margin Tradingpermission for the API Key which requests this endpoint.
Weight: 200
§Arguments
params:SubscribeOnChainYieldsLockedProductParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubscribeOnChainYieldsLockedProductResponse> 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_soft_staking_product_list(
&self,
params: GetSoftStakingProductListParams,
) -> Result<RestApiResponse<GetSoftStakingProductListResponse>>
pub async fn get_soft_staking_product_list( &self, params: GetSoftStakingProductListParams, ) -> Result<RestApiResponse<GetSoftStakingProductListResponse>>
Get Soft Staking Product List (USER_DATA)
Get the available Soft Staking product list.
Weight: 50
§Arguments
params:GetSoftStakingProductListParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetSoftStakingProductListResponse> 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_soft_staking_rewards_history(
&self,
params: GetSoftStakingRewardsHistoryParams,
) -> Result<RestApiResponse<GetSoftStakingRewardsHistoryResponse>>
pub async fn get_soft_staking_rewards_history( &self, params: GetSoftStakingRewardsHistoryParams, ) -> Result<RestApiResponse<GetSoftStakingRewardsHistoryResponse>>
Get Soft Staking Rewards History(USER_DATA)
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 50
§Arguments
params:GetSoftStakingRewardsHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetSoftStakingRewardsHistoryResponse> 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 set_soft_staking(
&self,
params: SetSoftStakingParams,
) -> Result<RestApiResponse<SetSoftStakingResponse>>
pub async fn set_soft_staking( &self, params: SetSoftStakingParams, ) -> Result<RestApiResponse<SetSoftStakingResponse>>
Set Soft Staking (USER_DATA)
Enable or disable Soft Staking.
Weight: 50
§Arguments
params:SetSoftStakingParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SetSoftStakingResponse> 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 claim_boost_rewards(
&self,
params: ClaimBoostRewardsParams,
) -> Result<RestApiResponse<ClaimBoostRewardsResponse>>
pub async fn claim_boost_rewards( &self, params: ClaimBoostRewardsParams, ) -> Result<RestApiResponse<ClaimBoostRewardsResponse>>
Claim Boost Rewards(TRADE)
Claim Boost APR Airdrop Rewards
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:ClaimBoostRewardsParamsThe parameters for this operation.
§Returns
RestApiResponse<models::ClaimBoostRewardsResponse> 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_bnsol_rate_history(
&self,
params: GetBnsolRateHistoryParams,
) -> Result<RestApiResponse<GetBnsolRateHistoryResponse>>
pub async fn get_bnsol_rate_history( &self, params: GetBnsolRateHistoryParams, ) -> Result<RestApiResponse<GetBnsolRateHistoryResponse>>
Get BNSOL Rate History(USER_DATA)
Get BNSOL Rate History
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetBnsolRateHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetBnsolRateHistoryResponse> 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_bnsol_rewards_history(
&self,
params: GetBnsolRewardsHistoryParams,
) -> Result<RestApiResponse<GetBnsolRewardsHistoryResponse>>
pub async fn get_bnsol_rewards_history( &self, params: GetBnsolRewardsHistoryParams, ) -> Result<RestApiResponse<GetBnsolRewardsHistoryResponse>>
Get BNSOL rewards history(USER_DATA)
Get BNSOL rewards history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetBnsolRewardsHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetBnsolRewardsHistoryResponse> 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_boost_rewards_history(
&self,
params: GetBoostRewardsHistoryParams,
) -> Result<RestApiResponse<GetBoostRewardsHistoryResponse>>
pub async fn get_boost_rewards_history( &self, params: GetBoostRewardsHistoryParams, ) -> Result<RestApiResponse<GetBoostRewardsHistoryResponse>>
Get Boost Rewards History(USER_DATA)
Get Boost rewards history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetBoostRewardsHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetBoostRewardsHistoryResponse> 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_sol_redemption_history(
&self,
params: GetSolRedemptionHistoryParams,
) -> Result<RestApiResponse<GetSolRedemptionHistoryResponse>>
pub async fn get_sol_redemption_history( &self, params: GetSolRedemptionHistoryParams, ) -> Result<RestApiResponse<GetSolRedemptionHistoryResponse>>
Get SOL redemption history(USER_DATA)
Get SOL redemption history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetSolRedemptionHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetSolRedemptionHistoryResponse> 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_sol_staking_history(
&self,
params: GetSolStakingHistoryParams,
) -> Result<RestApiResponse<GetSolStakingHistoryResponse>>
pub async fn get_sol_staking_history( &self, params: GetSolStakingHistoryParams, ) -> Result<RestApiResponse<GetSolStakingHistoryResponse>>
Get SOL staking history(USER_DATA)
Get SOL staking history
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetSolStakingHistoryParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetSolStakingHistoryResponse> 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_sol_staking_quota_details(
&self,
params: GetSolStakingQuotaDetailsParams,
) -> Result<RestApiResponse<GetSolStakingQuotaDetailsResponse>>
pub async fn get_sol_staking_quota_details( &self, params: GetSolStakingQuotaDetailsParams, ) -> Result<RestApiResponse<GetSolStakingQuotaDetailsResponse>>
Get SOL staking quota details(USER_DATA)
Get SOL staking quota
Weight: 150
§Arguments
params:GetSolStakingQuotaDetailsParamsThe parameters for this operation.
§Returns
RestApiResponse<models::GetSolStakingQuotaDetailsResponse> 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_unclaimed_rewards(
&self,
params: GetUnclaimedRewardsParams,
) -> Result<RestApiResponse<Vec<GetUnclaimedRewardsResponseInner>>>
pub async fn get_unclaimed_rewards( &self, params: GetUnclaimedRewardsParams, ) -> Result<RestApiResponse<Vec<GetUnclaimedRewardsResponseInner>>>
Get Unclaimed Rewards(USER_DATA)
Get Unclaimed rewards
- The time between
startTimeandendTimecannot be longer than 3 months. - If
startTimeandendTimeare both not sent, then the last 30 days’ data will be returned. - If
startTimeis sent butendTimeis not sent, the next 30 days’ data beginning fromstartTimewill be returned. - If
endTimeis sent butstartTimeis not sent, the 30 days’ data beforeendTimewill be returned.
Weight: 150
§Arguments
params:GetUnclaimedRewardsParamsThe parameters for this operation.
§Returns
RestApiResponse<Vec<models::GetUnclaimedRewardsResponseInner>> 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 redeem_sol(
&self,
params: RedeemSolParams,
) -> Result<RestApiResponse<RedeemSolResponse>>
pub async fn redeem_sol( &self, params: RedeemSolParams, ) -> Result<RestApiResponse<RedeemSolResponse>>
Redeem SOL(TRADE)
Redeem BNSOL get SOL
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:RedeemSolParamsThe parameters for this operation.
§Returns
RestApiResponse<models::RedeemSolResponse> 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 sol_staking_account(
&self,
params: SolStakingAccountParams,
) -> Result<RestApiResponse<SolStakingAccountResponse>>
pub async fn sol_staking_account( &self, params: SolStakingAccountParams, ) -> Result<RestApiResponse<SolStakingAccountResponse>>
SOL Staking account(USER_DATA)
SOL Staking account
Weight: 150
§Arguments
params:SolStakingAccountParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SolStakingAccountResponse> 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 subscribe_sol_staking(
&self,
params: SubscribeSolStakingParams,
) -> Result<RestApiResponse<SubscribeSolStakingResponse>>
pub async fn subscribe_sol_staking( &self, params: SubscribeSolStakingParams, ) -> Result<RestApiResponse<SubscribeSolStakingResponse>>
Subscribe SOL Staking(TRADE)
Subscribe SOL Staking
- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Weight: 150
§Arguments
params:SubscribeSolStakingParamsThe parameters for this operation.
§Returns
RestApiResponse<models::SubscribeSolStakingResponse> 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.