no message

This commit is contained in:
rplees
2023-12-13 11:28:49 +08:00
parent a5ec41bb27
commit d02ff4907f

View File

@@ -117,7 +117,7 @@ public class InvestingInvokerApis {
public JSONObject __page(int pageNum, int pageSize) throws IOException {
String tmpl = "https://api.investing.com/api/financialdata/assets/equitiesByCountry/default?fields-list=id,name,symbol,high,low,last,lastPairDecimal,change,changePercent,volume,time,isOpen,url,flag,countryNameTranslated,exchangeId,performanceDay,performanceWeek,performanceMonth,performanceYtd,performanceYear,performance3Year,technicalHour,technicalDay,technicalWeek,technicalMonth,avgVolume,fundamentalMarketCap,fundamentalRevenue,fundamentalRatio,fundamentalBeta,pairType&country-id=14&page={}&page-size={}&include-major-indices=false&include-additional-indices=false&include-primary-sectors=false&include-other-indices=false&limit=0";
String url = StrFormatter.format(tmpl, pageNum, pageSize);
String url = StrFormatter.format(tmpl, pageNum - 1, pageSize);
Stopwatch stopwatch = Stopwatch.createStarted();
log.info("url: {}", url);
Builder builder = builderGet(url);
@@ -137,7 +137,7 @@ public class InvestingInvokerApis {
*/
public JSONObject __page_nifty100(int pageNum, int pageSize) throws IOException {
String tmpl = "https://api.investing.com/api/financialdata/assets/equitiesByCountry/17943?fields-list=id,name,symbol,high,low,last,lastPairDecimal,change,changePercent,volume,time,isOpen,url,flag,countryNameTranslated,exchangeId,performanceDay,performanceWeek,performanceMonth,performanceYtd,performanceYear,performance3Year,technicalHour,technicalDay,technicalWeek,technicalMonth,avgVolume,fundamentalMarketCap,fundamentalRevenue,fundamentalRatio,fundamentalBeta,pairType&country-id=14&page={}&page-size={}&include-major-indices=false&include-additional-indices=false&include-primary-sectors=false&include-other-indices=false&limit=0";
String url = StrFormatter.format(tmpl, pageNum, pageSize);
String url = StrFormatter.format(tmpl, 0, 0);
Stopwatch stopwatch = Stopwatch.createStarted();
log.info("url: {}", url);
Builder builder = builderGet(url);
@@ -204,5 +204,11 @@ public class InvestingInvokerApis {
public static void main(String[] args) throws IOException {
JSONObject __market = of().__market(StockCode.of("17988"));
System.out.println(__market);
JSONObject __page = of().__page(1, 10);
JSONObject __page_nifty100 = of().__page_nifty100(1, 10);
System.out.println(__page);
System.out.println(__page_nifty100);
}
}