You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test file for AccountFundingRateHistoryData has commented-out test implementation. The test methods are defined but not actually executed, which means there's no validation of the model functionality.
# uncomment below to create an instance of `AccountFundingRateHistoryData`"""model = AccountFundingRateHistoryData()if include_optional: return AccountFundingRateHistoryData( id = '9689322392', payment_amount_e9 = '1000000', symbol = '0x123456789abcdef', executed_at = 1569514978020, computed_at = 1569514978020 )else: return AccountFundingRateHistoryData( id = '9689322392', payment_amount_e9 = '1000000', executed_at = 1569514978020, computed_at = 1569514978020,)"""
The 'symbol' field is documented as "Market address" which may be confusing since it's named 'symbol' but described as an address. Consider clarifying the documentation or renaming the field for consistency.
payment_amount_e9: StrictStr=Field(description="Payment amount in e9 format.")
symbol: StrictStr=Field(description="Market address.")
executed_at: StrictInt=Field(description="Execution timestamp in milliseconds since Unix epoch.")
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.
PR Code Suggestions ✨
Explore these optional code suggestions:
Category
Suggestion
Impact
General
Remove redundant variable assignments
The function is unnecessarily creating new variables with a prefix for the parameters. This is redundant since there are no name collisions in the function scope. You can use the original parameters directly in the query building.
pub async fn get_account_funding_rate_history(configuration: &configuration::Configuration, account_address: Option<&str>, limit: Option<u32>, page: Option<u32>) -> Result<models::AccountFundingRateHistory, Error<GetAccountFundingRateHistoryError>> {
- // add a prefix to parameters to efficiently prevent name collisions- let p_account_address = account_address;- let p_limit = limit;- let p_page = page;+ let uri_str = format!("{}/api/v1/account/fundingRateHistory", configuration.base_path);+ let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);+ if let Some(ref param_value) = account_address {+ req_builder = req_builder.query(&[("accountAddress", ¶m_value.to_string())]);+ }+ if let Some(ref param_value) = limit {+ req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);+ }+ if let Some(ref param_value) = page {+ req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);+ }+
Apply this suggestion
Suggestion importance[1-10]: 3
__
Why: The suggestion correctly identifies unnecessary variable assignments that add no value. The code creates prefixed variables (p_account_address, p_limit, p_page) that are simply aliases to the function parameters, but these variables don't prevent any name collisions since there are no conflicting names in the function scope. Removing them makes the code cleaner but has minimal impact on functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
GET /v1/account/fundingRateHistory?accountAddress=0x1234&page=1&limit=100Response:
PR Type
Enhancement, Documentation, Tests
Description
Introduced a new API endpoint
GET /v1/account/fundingRateHistoryto fetch funding rate history.accountAddress,limit, andpage.AccountFundingRateHistoryandAccountFundingRateHistoryData.Updated SDKs (TypeScript, Rust, Python) to support the new endpoint.
AccountFundingRateHistoryandAccountFundingRateHistoryData.Added comprehensive documentation for the new endpoint and models.
Implemented unit tests for the new models in Python SDK.
Changes walkthrough 📝
9 files
Add funding rate history API support in TypeScript SDKAdd funding rate history API support in Rust SDKAdd `AccountFundingRateHistory` model in Rust SDKAdd `AccountFundingRateHistoryData` model in Rust SDKRegister funding rate history models in Rust SDKRegister funding rate history models in Python SDKAdd funding rate history API support in Python SDKAdd `AccountFundingRateHistory` model in Python SDKAdd `AccountFundingRateHistoryData` model in Python SDK2 files
Add unit tests for `AccountFundingRateHistory` modelAdd unit tests for `AccountFundingRateHistoryData` model9 files
Update OpenAPI generator files for funding rate historyDocument funding rate history API in Python SDKAdd documentation for `AccountFundingRateHistory` modelAdd documentation for `AccountFundingRateHistoryData` modelUpdate Python SDK README for funding rate historyDefine funding rate history API in OpenAPI specReference funding rate history API in main OpenAPI specUpdate OpenAPI generator files for Rust SDKDocument funding rate history API in Rust SDK4 files