pub struct JQuantsLightPlanClient { /* private fields */ }
Expand description
Light plan client for J-Quants API.
§Example
use jquants_api_client::{
DailyStockPricesApi, EarningsCalendarApi, FinancialStatementsApi, JQuantsBuilder, JQuantsLightPlanClient,
JQuantsPlanClient, ListedIssueInfoApi, TradingByInvestorTypeApi, TopixPricesApi, TradingCalendarApi,
Paginatable
};
async {
// Authenticate with a refresh token.
let client = JQuantsLightPlanClient::new_from_refresh_token("your_refresh_token".to_string());
// Get listed issue information.
let response = client.get_listed_issue_info().send().await.unwrap();
// Get stock prices.
let response = client.get_daily_stock_prices().send().await.unwrap();
// Paginate stock prices.
let response = client.get_daily_stock_prices().fetch_all().await.unwrap();
let response = client.get_daily_stock_prices().fetch_all_and_merge().await.unwrap();
let stream = client.get_daily_stock_prices().fetch_pages_stream();
// Get trading by investor type.
let response = client.get_trading_by_investor_type().send().await.unwrap();
// Paginate trading by investor type.
let response = client.get_trading_by_investor_type().fetch_all().await.unwrap();
let response = client.get_trading_by_investor_type().fetch_all_and_merge().await.unwrap();
let stream = client.get_trading_by_investor_type().fetch_pages_stream();
// Get trading calendar.
let response = client.get_trading_calendar().send().await.unwrap();
// Get TOPIX prices.
let response = client.get_topix_prices().send().await.unwrap();
// Paginate TOPIX prices.
let response = client.get_topix_prices().fetch_all().await.unwrap();
let response = client.get_topix_prices().fetch_all_and_merge().await.unwrap();
let stream = client.get_topix_prices().fetch_pages_stream();
// Get financial statements.
let response = client.get_financial_statements().send().await.unwrap();
// Paginate stock prices.
let response = client.get_financial_statements().fetch_all().await.unwrap();
let response = client.get_financial_statements().fetch_all_and_merge().await.unwrap();
let stream = client.get_financial_statements().fetch_pages_stream();
// Get earnings calendar.
let response = client.get_earnings_calendar().send().await.unwrap();
// Paginate earnings calendar.
let response = client.get_earnings_calendar().fetch_all().await.unwrap();
let response = client.get_earnings_calendar().fetch_all_and_merge().await.unwrap();
let stream = client.get_earnings_calendar().fetch_pages_stream();
};
Trait Implementations§
Source§impl Clone for JQuantsLightPlanClient
impl Clone for JQuantsLightPlanClient
Source§fn clone(&self) -> JQuantsLightPlanClient
fn clone(&self) -> JQuantsLightPlanClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DailyStockPricesApi for JQuantsLightPlanClient
impl DailyStockPricesApi for JQuantsLightPlanClient
Source§type Response = DailyStockPricesStandardPlanResponse
type Response = DailyStockPricesStandardPlanResponse
Response type for listed info API.
Source§fn get_daily_stock_prices(&self) -> DailyStockPricesBuilder<Self::Response>
fn get_daily_stock_prices(&self) -> DailyStockPricesBuilder<Self::Response>
Get api builder for daily stock prices. Read more
Source§impl EarningsCalendarApi for JQuantsLightPlanClient
impl EarningsCalendarApi for JQuantsLightPlanClient
Source§fn get_earnings_calendar(&self) -> EarningsCalendarBuilder
fn get_earnings_calendar(&self) -> EarningsCalendarBuilder
Get API builder for Earnings Calendar Data. Read more
Source§impl FinancialStatementsApi for JQuantsLightPlanClient
impl FinancialStatementsApi for JQuantsLightPlanClient
Source§fn get_financial_statements(&self) -> FinancialStatementsBuilder
fn get_financial_statements(&self) -> FinancialStatementsBuilder
Get API builder for Financial Statements Data. Read more
Source§impl JQuantsPlanClient for JQuantsLightPlanClient
impl JQuantsPlanClient for JQuantsLightPlanClient
Source§fn new(api_client: JQuantsApiClient) -> Self
fn new(api_client: JQuantsApiClient) -> Self
Create a new client from an API client.
Source§fn get_api_client(&self) -> &JQuantsApiClient
fn get_api_client(&self) -> &JQuantsApiClient
Get the API client.
Source§fn new_from_refresh_token(refresh_token: String) -> Self
fn new_from_refresh_token(refresh_token: String) -> Self
Create a new client from a refresh token.
Source§fn new_from_account(
mailaddress: &str,
password: &str,
) -> impl Future<Output = Result<Self, JQuantsError>> + Send
fn new_from_account( mailaddress: &str, password: &str, ) -> impl Future<Output = Result<Self, JQuantsError>> + Send
Create a new client from an account.
Source§fn get_current_refresh_token(&self) -> impl Future<Output = String> + Send
fn get_current_refresh_token(&self) -> impl Future<Output = String> + Send
Get a current refresh token.
Source§fn get_refresh_token_from_api(
&self,
mail_address: &str,
password: &str,
) -> impl Future<Output = Result<String, JQuantsError>> + Send
fn get_refresh_token_from_api( &self, mail_address: &str, password: &str, ) -> impl Future<Output = Result<String, JQuantsError>> + Send
Get a new refresh token from an account.
But don’t update the ID token in the client. Read more
Source§fn get_id_token_from_api(
&self,
refresh_token: &str,
) -> impl Future<Output = Result<String, JQuantsError>> + Send
fn get_id_token_from_api( &self, refresh_token: &str, ) -> impl Future<Output = Result<String, JQuantsError>> + Send
Get a new ID token from a refresh token.
But don’t update the ID token in the client. Read more
Source§fn reset_refresh_token(
&self,
mail_address: &str,
password: &str,
) -> impl Future<Output = Result<(), JQuantsError>> + Send
fn reset_refresh_token( &self, mail_address: &str, password: &str, ) -> impl Future<Output = Result<(), JQuantsError>> + Send
Renew the refresh token in the client.
Source§fn reset_id_token(
&self,
) -> impl Future<Output = Result<(), JQuantsError>> + Send
fn reset_id_token( &self, ) -> impl Future<Output = Result<(), JQuantsError>> + Send
Renew the ID token in the client.
Source§fn reauthenticate(
&self,
mail_address: &str,
password: &str,
) -> impl Future<Output = Result<(), JQuantsError>> + Send
fn reauthenticate( &self, mail_address: &str, password: &str, ) -> impl Future<Output = Result<(), JQuantsError>> + Send
Reauthenticate with a new refresh token and a new id token.
Source§impl ListedIssueInfoApi for JQuantsLightPlanClient
impl ListedIssueInfoApi for JQuantsLightPlanClient
Source§type Response = ListedIssueInfoLightPlanResponse
type Response = ListedIssueInfoLightPlanResponse
Response type for listed info API.
Source§fn get_listed_issue_info(&self) -> ListedIssueInfoApiBuilder<Self::Response>
fn get_listed_issue_info(&self) -> ListedIssueInfoApiBuilder<Self::Response>
Get api builder for listed issue information. Read more
Source§impl TopixPricesApi for JQuantsLightPlanClient
impl TopixPricesApi for JQuantsLightPlanClient
Source§fn get_topix_prices(&self) -> TopixPricesBuilder
fn get_topix_prices(&self) -> TopixPricesBuilder
Get API builder for TOPIX Prices (OHLC). Read more
Source§impl TradingByInvestorTypeApi for JQuantsLightPlanClient
impl TradingByInvestorTypeApi for JQuantsLightPlanClient
Source§fn get_trading_by_investor_type(&self) -> TradingByInvestorTypeBuilder
fn get_trading_by_investor_type(&self) -> TradingByInvestorTypeBuilder
Get API builder for Trading by Type of Investors. Read more
Source§impl TradingCalendarApi for JQuantsLightPlanClient
impl TradingCalendarApi for JQuantsLightPlanClient
Source§fn get_trading_calendar(&self) -> TradingCalendarBuilder
fn get_trading_calendar(&self) -> TradingCalendarBuilder
Get API builder for Trading Calendar. Read more
Auto Trait Implementations§
impl Freeze for JQuantsLightPlanClient
impl !RefUnwindSafe for JQuantsLightPlanClient
impl Send for JQuantsLightPlanClient
impl Sync for JQuantsLightPlanClient
impl Unpin for JQuantsLightPlanClient
impl !UnwindSafe for JQuantsLightPlanClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more