-
Notifications
You must be signed in to change notification settings - Fork 3
Requirements, Configuration & Progaurd
Rishabh Joshi edited this page Oct 15, 2018
·
1 revision
Riko uses the Java 9's Flow API to push all WebSocket messages onto interested subscribers. Hence, the minimum requirement on JDK 9.
You can configure the library through the following system properties:
System property | Description | Default value |
---|---|---|
riko.read.timeout |
Number of seconds for read to timeout | 10 |
riko.write.timeout |
Number of seconds for write to timeout | 10 |
riko.connect.timeout |
Number of seconds for connect to timeout | 10 |
riko.server.url |
The API URL to use | api.upstox.com |
riko.server.port |
The port to use |
80 or 443 based on the scheme specified |
riko.server.scheme |
The scheme to use | https |
riko.ws.server.url |
The URL to use for websocket | ws-api.upstox.com |
riko.ws.server.port |
The port to use for websocket |
80 or 443 based on the scheme specified |
riko.ws.server.scheme |
The scheme to use | https |
riko.ws.reconnect |
Retry websocket connection on failure | true |
Using the system property, you can point the Riko library to connect to the staging environment instead of the default production environment. Please note, the staging environment works on the live market, so all the orders placed by the users will actually be placed on the live market. Also, the staging environment may not be available always. See this link.
java -Driko.server.url=staging-api.upstox.com -Driko.ws.server.url=staging-ws-api.upstox.com -jar myApp.jar
Riko is built using Retrofit, and Retrofit internally uses OkHttp and Okio. Please refer their respective documentation for Progaurd configurations: