pub struct JQuantsPremiumPlanClient { /* private fields */ }Expand description
Premium plan client for J-Quants API.
§Example
use jquants_api_client::{
BreakdownTradingDataApi, CashDividendDataApi, DailyStockPricesApi, EarningsCalendarApi, FinancialStatementsApi,
FuturesPricesApi, FinancialStatementDetailsApi, JQuantsBuilder, JQuantsPlanClient, JQuantsPremiumPlanClient,
IndexOptionPricesApi, IndicesApi, ListedIssueInfoApi, MorningSessionStockPricesApi, OptionsPricesApi,
ShortSaleBySectorApi, TopixPricesApi, TradingByInvestorTypeApi, TradingCalendarApi, Paginatable,
WeeklyMarginTradingOutstandingsApi
};
async {
// Authenticate with a refresh token.
let client = JQuantsPremiumPlanClient::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 morning session stock prices.
let response = client.morning_session_stock_prices().send().await.unwrap();
// Paginate morning session stock prices.
let response = client.morning_session_stock_prices().fetch_all().await.unwrap();
let response = client.morning_session_stock_prices().fetch_all_and_merge().await.unwrap();
let stream = client.morning_session_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_short_sale_by_sector().send().await.unwrap();
// Paginate short sale value and ratio by sector.
let response = client.get_short_sale_by_sector().fetch_all().await.unwrap();
let response = client.get_short_sale_by_sector().fetch_all_and_merge().await.unwrap();
let stream = client.get_short_sale_by_sector().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 financial statement detail.
let response = client.get_financial_statement_details().send().await.unwrap();
// Paginate financial statement detail.
let response = client.get_financial_statement_details().fetch_all().await.unwrap();
let response = client.get_financial_statement_details().fetch_all_and_merge().await.unwrap();
let stream = client.get_financial_statement_details().fetch_pages_stream();
// Get cash dividend data.
let response = client.get_cash_dividend_data().send().await.unwrap();
// Paginate cash dividend data.
let response = client.get_cash_dividend_data().fetch_all().await.unwrap();
let response = client.get_cash_dividend_data().fetch_all_and_merge().await.unwrap();
let stream = client.get_cash_dividend_data().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();
// Get futures prices.
let response = client.get_futures_prices("2024-08-01").send().await.unwrap();
// Paginate futures prices.
let response = client.get_futures_prices("2024-08-01").fetch_all().await.unwrap();
let response = client.get_futures_prices("2024-08-01").fetch_all_and_merge().await.unwrap();
let stream = client.get_futures_prices("2024-08-01").fetch_pages_stream();
// Get options prices.
let response = client.get_options_prices("2024-08-01").send().await.unwrap();
// Paginate options prices.
let response = client.get_options_prices("2024-08-01").fetch_all().await.unwrap();
let response = client.get_options_prices("2024-08-01").fetch_all_and_merge().await.unwrap();
let stream = client.get_options_prices("2024-08-01").fetch_pages_stream();
};Trait Implementations§
Source§impl BreakdownTradingDataApi for JQuantsPremiumPlanClient
impl BreakdownTradingDataApi for JQuantsPremiumPlanClient
Source§fn get_breakdown_trading_data(&self) -> BreakdownTradingDataBuilder
fn get_breakdown_trading_data(&self) -> BreakdownTradingDataBuilder
Get API builder for Breakdown Trading Data. Read more
Source§impl CashDividendDataApi for JQuantsPremiumPlanClient
impl CashDividendDataApi for JQuantsPremiumPlanClient
Source§fn get_cash_dividend_data(&self) -> CashDividendDataBuilder
fn get_cash_dividend_data(&self) -> CashDividendDataBuilder
Get API builder for Cash Dividend Data. Read more
Source§impl Clone for JQuantsPremiumPlanClient
impl Clone for JQuantsPremiumPlanClient
Source§fn clone(&self) -> JQuantsPremiumPlanClient
fn clone(&self) -> JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl DailyStockPricesApi for JQuantsPremiumPlanClient
Source§type Response = DailyStockPricesPremiumPlanResponse
type Response = DailyStockPricesPremiumPlanResponse
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 JQuantsPremiumPlanClient
impl EarningsCalendarApi for JQuantsPremiumPlanClient
Source§fn get_earnings_calendar(&self) -> EarningsCalendarBuilder
fn get_earnings_calendar(&self) -> EarningsCalendarBuilder
Get API builder for Earnings Calendar Data. Read more
Source§impl FinancialStatementDetailsApi for JQuantsPremiumPlanClient
impl FinancialStatementDetailsApi for JQuantsPremiumPlanClient
Source§fn get_financial_statement_details(&self) -> FinancialStatementDetailsBuilder
fn get_financial_statement_details(&self) -> FinancialStatementDetailsBuilder
Get API builder for Financial Statement Details Data. Read more
Source§impl FinancialStatementsApi for JQuantsPremiumPlanClient
impl FinancialStatementsApi for JQuantsPremiumPlanClient
Source§fn get_financial_statements(&self) -> FinancialStatementsBuilder
fn get_financial_statements(&self) -> FinancialStatementsBuilder
Get API builder for Financial Statements Data. Read more
Source§impl FuturesPricesApi for JQuantsPremiumPlanClient
impl FuturesPricesApi for JQuantsPremiumPlanClient
Source§fn get_futures_prices(&self, date: impl Into<String>) -> FuturesPricesBuilder
fn get_futures_prices(&self, date: impl Into<String>) -> FuturesPricesBuilder
Get API builder for Futures (OHLC) Data. Read more
Source§impl IndexOptionPricesApi for JQuantsPremiumPlanClient
impl IndexOptionPricesApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl IndicesApi for JQuantsPremiumPlanClient
Source§fn get_indices(&self) -> IndicesBuilder
fn get_indices(&self) -> IndicesBuilder
Get API builder for Indices (OHLC). Read more
Source§impl JQuantsPlanClient for JQuantsPremiumPlanClient
impl JQuantsPlanClient for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl ListedIssueInfoApi for JQuantsPremiumPlanClient
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 MorningSessionStockPricesApi for JQuantsPremiumPlanClient
impl MorningSessionStockPricesApi for JQuantsPremiumPlanClient
Source§fn morning_session_stock_prices(&self) -> MorningSessionStockPricesApiBuilder
fn morning_session_stock_prices(&self) -> MorningSessionStockPricesApiBuilder
Get api builder for morning session stock prices.
Source§impl OptionsPricesApi for JQuantsPremiumPlanClient
impl OptionsPricesApi for JQuantsPremiumPlanClient
Source§fn get_options_prices(&self, date: impl Into<String>) -> OptionsPricesBuilder
fn get_options_prices(&self, date: impl Into<String>) -> OptionsPricesBuilder
Get API builder for Options (OHLC) Data. Read more
Source§impl ShortSaleBySectorApi for JQuantsPremiumPlanClient
impl ShortSaleBySectorApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl TopixPricesApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl TradingByInvestorTypeApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl TradingCalendarApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl WeeklyMarginTradingOutstandingsApi for JQuantsPremiumPlanClient
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 JQuantsPremiumPlanClient
impl !RefUnwindSafe for JQuantsPremiumPlanClient
impl Send for JQuantsPremiumPlanClient
impl Sync for JQuantsPremiumPlanClient
impl Unpin for JQuantsPremiumPlanClient
impl !UnwindSafe for JQuantsPremiumPlanClient
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