pub struct JQuantsStandardPlanClient { /* private fields */ }
Expand description
Standard plan client for J-Quants API.
§Example
use jquants_api_client::{
DailyStockPricesApi, EarningsCalendarApi, FinancialStatementsApi, JQuantsBuilder, JQuantsPlanClient,
JQuantsStandardPlanClient, IndexOptionPricesApi, IndicesApi, ListedIssueInfoApi, ShortSaleBySectorApi,
TopixPricesApi, TradingByInvestorTypeApi, TradingCalendarApi, Paginatable, WeeklyMarginTradingOutstandingsApi
};
async {
// Authenticate with a refresh token.
let client = JQuantsStandardPlanClient::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 margin trading outstandings.
let response = client.get_weekly_margin_trading_outstandings().send().await.unwrap();
// Paginate margin trading outstandings.
let response = client.get_weekly_margin_trading_outstandings().fetch_all().await.unwrap();
let response = client.get_weekly_margin_trading_outstandings().fetch_all_and_merge().await.unwrap();
let stream = client.get_weekly_margin_trading_outstandings().fetch_pages_stream();
// Get short sale value and ratio by sector.
let response = client.get_weekly_margin_trading_outstandings().send().await.unwrap();
// Paginate short sale value and ratio by sector.
let response = client.get_weekly_margin_trading_outstandings().fetch_all().await.unwrap();
let response = client.get_weekly_margin_trading_outstandings().fetch_all_and_merge().await.unwrap();
let stream = client.get_weekly_margin_trading_outstandings().fetch_pages_stream();
// Get trading calendar.
let response = client.get_trading_calendar().send().await.unwrap();
// Get indices.
let response = client.get_indices().send().await.unwrap();
// Paginate indices.
let response = client.get_indices().fetch_all().await.unwrap();
let response = client.get_indices().fetch_all_and_merge().await.unwrap();
let stream = client.get_indices().fetch_pages_stream();
// 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();
// Get idnex option prices.
let response = client.get_index_option_prices("2024-08-01").send().await.unwrap();
// Paginate idnex option prices.
let response = client.get_index_option_prices("2024-08-01").fetch_all().await.unwrap();
let response = client.get_index_option_prices("2024-08-01").fetch_all_and_merge().await.unwrap();
let stream = client.get_index_option_prices("2024-08-01").fetch_pages_stream();
};
Trait Implementations§
Source§impl Clone for JQuantsStandardPlanClient
impl Clone for JQuantsStandardPlanClient
Source§fn clone(&self) -> JQuantsStandardPlanClient
fn clone(&self) -> JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl DailyStockPricesApi for JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl EarningsCalendarApi for JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl FinancialStatementsApi for JQuantsStandardPlanClient
Source§fn get_financial_statements(&self) -> FinancialStatementsBuilder
fn get_financial_statements(&self) -> FinancialStatementsBuilder
Get API builder for Financial Statements Data. Read more
Source§impl IndexOptionPricesApi for JQuantsStandardPlanClient
impl IndexOptionPricesApi for JQuantsStandardPlanClient
Source§fn get_index_option_prices(
&self,
date: impl Into<String>,
) -> IndexOptionPricesBuilder
fn get_index_option_prices( &self, date: impl Into<String>, ) -> IndexOptionPricesBuilder
Get API builder for Index Option Prices (OHLC) Data. Read more
Source§impl IndicesApi for JQuantsStandardPlanClient
impl IndicesApi for JQuantsStandardPlanClient
Source§fn get_indices(&self) -> IndicesBuilder
fn get_indices(&self) -> IndicesBuilder
Get API builder for Indices (OHLC). Read more
Source§impl JQuantsPlanClient for JQuantsStandardPlanClient
impl JQuantsPlanClient for JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl ListedIssueInfoApi for JQuantsStandardPlanClient
Source§type Response = ListedIssueInfoPremiumPlanResponse
type Response = ListedIssueInfoPremiumPlanResponse
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 ShortSaleBySectorApi for JQuantsStandardPlanClient
impl ShortSaleBySectorApi for JQuantsStandardPlanClient
Source§fn get_short_sale_by_sector(&self) -> ShortSaleBySectorBuilder
fn get_short_sale_by_sector(&self) -> ShortSaleBySectorBuilder
Get API builder for Short Sale Value and Ratio by Sector. Read more
Source§impl TopixPricesApi for JQuantsStandardPlanClient
impl TopixPricesApi for JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl TradingByInvestorTypeApi for JQuantsStandardPlanClient
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 JQuantsStandardPlanClient
impl TradingCalendarApi for JQuantsStandardPlanClient
Source§fn get_trading_calendar(&self) -> TradingCalendarBuilder
fn get_trading_calendar(&self) -> TradingCalendarBuilder
Get API builder for Trading Calendar. Read more
Source§impl WeeklyMarginTradingOutstandingsApi for JQuantsStandardPlanClient
impl WeeklyMarginTradingOutstandingsApi for JQuantsStandardPlanClient
Source§fn get_weekly_margin_trading_outstandings(
&self,
) -> WeeklyMarginTradingOutstandingsBuilder
fn get_weekly_margin_trading_outstandings( &self, ) -> WeeklyMarginTradingOutstandingsBuilder
Get API builder for Margin Trading Outstandings. Read more
Auto Trait Implementations§
impl Freeze for JQuantsStandardPlanClient
impl !RefUnwindSafe for JQuantsStandardPlanClient
impl Send for JQuantsStandardPlanClient
impl Sync for JQuantsStandardPlanClient
impl Unpin for JQuantsStandardPlanClient
impl !UnwindSafe for JQuantsStandardPlanClient
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