rishabh9 / riko Goto Github PK
View Code? Open in Web Editor NEWRiko is a third-party Java library for accessing Upstox API.
Home Page: https://github.com/rishabh9/riko/wiki
License: MIT License
Riko is a third-party Java library for accessing Upstox API.
Home Page: https://github.com/rishabh9/riko/wiki
License: MIT License
I had used this library for sometime, but recently when I checked, Upstox is allowing data api access only to closed set of users. Unfortunately I unsubscribed from their data apis few months back and now they are not letting me to subscribe again.
Any alternate solution or workaround for getting NSE data. I don't need realtime data. Closing basis would work.
I checked other vendors like Globaldatafeeds etc. but they are charging hell lot of money.
I get timeout exception, when I try to use historical service for fetching 1min or 5min olhc data for "nifty_50" or "nifty_bank". This works fine for all nse_eq instruments.
If I call api by using postman for "nifty_50" or "nifty_bank", I get data successfully.
Code:-
List<Candle> candles = historicalService.getOhlc("nse_index", "nifty_bank", "5MINUTE", "26-10-2018", "28-11-2018").get().getData();
Stacktrace:-
java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: timeout
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
at com.strategy.tradebot.RenkoBT.generateHistoricalRenko(RenkoBacktest.java:150)
at com.strategy.tradebot.RenkoBT.<init>(RenkoBacktest.java:119)
at com.strategy.tradebot.RenkoBacktest.main(RenkoBacktest.java:52)
Caused by: java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:593)
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:601)
at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:146)
at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:125)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.github.rishabh9.riko.upstox.common.interceptors.HttpErrorLoggingInterceptor.intercept(HttpErrorLoggingInterceptor.java:46)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.github.rishabh9.riko.upstox.common.interceptors.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:56)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
3.0.0-SNAPSHOT is not present in maven central repository. Please upload it.
Getting error when called historical apis
{ "message": "'3861c062b31ce5548248ba062136b19a1499af52' not a valid key=value pair (missing equal-sign) in Authorization header: 'Bearer 3861c062b31ce5548248ba062136b19a1499af52'." }
I found that this is because of library is using incorrect url for getOHLC().
"/ohlc" is not present in new url.
Removing /ohlc should work.
/holdings endpoint returns response having key as "instrument", not "instruments".
Holdings model in library is having incorrect key name.
3.0.0 is not available on maven central repository.
Where can I get it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.