Riko - A Java library for Upstox API



  • Hello everyone! I have built a Java library for Upstox API. It is available at https://rishabh9.github.io/riko. Do try it out and let me know your feedback (preferably by opening an issue on Github) so that I can improve it upon it. Thanks!

    UPDATE: A sample application demonstrating the usage of Riko is available here - https://github.com/rishabh9/riko-starter - It can be used as a starter template too. Also, a wiki is setup to help you guys out.

    UPDATE 2018-12-31: Riko v3.0.0-SNAPSHOT is now available to support Upstox v2.0 changes. Please see.



  • A sample Java code to showcase Login and calls would help, as the test cases are not clear enough. Possible you can help us with this?

    Thanks.



  • @gyani I would surely help you. Please let me know the following:

    1. What are you not able to understand from the test cases? This will help me improve upon them.
    2. Please specify a couple of use-cases you would like to see in the sample application.


  • @rishabh9

    Thanks for your reply.

    Because of the creation of Mock classes etc, an average developer like me will struggle a bit :)

    A simple sample code that reflects historical data download and also live quote of any script would be great.

    You can assume a key and secret hard-coded in your sample code.

    Also, it will help if you have a headless way to get access tokens, so that anyone who is building server side applications does not get into the need to enter the PIN / SECRET etc



  • Cool, I'll share one in a few days. It may not have the code related to headless login as that is not related to Riko per se.



  • @Gyani here you go - https://github.com/rishabh9/riko-starter - You can use this as a starter template too. Good luck!



  • Riko v3.0.0-SNAPSHOT is now available for the everyone.
    This release predominantly has changes that supports the upcoming v2.0 of Upstox API, which are currently available on staging only. See Upstox's staging documentation here.

    Big changes in this release are as follows:

    1. Add support for rate limits introduced in v2.0.
    2. Add support for retries on failed API requests.
    3. Add support for new API endpoint - Fetch Subscribed Symbols.
    4. Add support for the new Historical endpoint.
    <dependency>
        <groupId>com.github.rishabh9</groupId>
        <artifactId>riko</artifactId>
        <version>3.0.0-SNAPSHOT</version>
    </dependency>
    

    Do try it out and let me know your feedback (preferably by opening an issue on Github) so that I can improve it upon it. Thanks!



  • I am trying to create android app using this library. Does your library supports that ?



  • @chumtech This SDK is not tested for Android for I am not an Android developer. So, to answer your question will Riko work on Android - I do not know. It is a plain Java SDK with libraries already used in Android Application developments, so I do not see a reason why it won't work. The only restriction is on the minimum requirement of JDK 9. For I have used Java APIs that are present from JDK 9 onwards.



  • can you please explain security features in it?



  • @jadutrader What security features are you looking for? Riko is just a Java client for the Upstox API.



  • @rishabh9 I saw some where that upstox is moving to api 2.0 from jan 21. Does your code supports new release api



  • @chumtech Yes, the version 3.0.0-SNAPSHOT supports the v2.0 of Upstox API. You can work with it on the staging for the moment and then later use it on production once Upstox promotes v2.0 to production.

    Version 3.0.0-SNAPSHOT is pretty stable at the moment, and ready to move out of -SNAPSHOT anytime. Once v2.0 of Upstox API moves to production, version 3.0.0-SNAPSHOT will be promoted to version 3.0.0 and you may update your dependencies accordingly.



  • @rishabh9 I am asking general security related questions, for example security related order routing and orders not getting leaked, api secret/code leak / breach, etc. Also can you please explain more how optimum it is compared to other lang apis , brenchmark with speed?



  • @jadutrader I haven't added any security considerations to Riko. It is the application developer's responsibility to ensure the security you are asking for.

    Riko is open source and the libraries it uses are open source too. You can check the code in case you have concerns over in how it is being used.

    Riko let's you talk to Upstox using Java over SSL/HTTPS, if you configure it to do so. It doesn't store any of your credentials/order data/etc. on disk or anywhere else.



  • @jadutrader and regarding benchmarking, I haven't done them either, for it isn't the priority for me at the moment. But you can always help me out in that aspect. But I am pretty sure it is as fast, if not faster than other clients of Upstox. Also Riko is an aynchronous client and the latest version (3.0.0-SNAPSHOT) has retry capabilities and support for Upstox's rate limits.


Log in to reply
 

Looks like your connection to Upstox Forum was lost, please wait while we try to reconnect.