All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.upstox.ApiCallback Maven / Gradle / Ivy

/*
 * Upstox Developer API
 * Build your App on the Upstox platform  ![Banner](https://api-v2.upstox.com/api-docs/images/banner.jpg \"banner\")  # Introduction  Upstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection.  All requests are over HTTPS and the requests are sent with the content-type ‘application/json’. Developers have the option of choosing the response type as JSON or CSV for a few API calls.  To be able to use these APIs you need to create an App in the Developer Console and generate your **apiKey** and **apiSecret**. You can use a redirect URL which will be called after the login flow.  If you are a **trader**, you can directly create apps from Upstox mobile app or the desktop platform itself from **Apps** sections inside the **Account** Tab. Head over to account.upstox.com/developer/apps.
If you are a **business** looking to integrate Upstox APIs, reach out to us and we will get a custom app created for you in no time. It is highly recommended that you do not embed the **apiSecret** in your frontend app. Create a remote backend which does the handshake on behalf of the frontend app. Marking the apiSecret in the frontend app will make your app vulnerable to threats and potential issues. * * OpenAPI spec version: v2 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.upstox; import java.io.IOException; import java.util.Map; import java.util.List; /** * Callback for asynchronous API call. * * @param The return type */ public interface ApiCallback { /** * This is called when the API call fails. * * @param e The exception causing the failure * @param statusCode Status code of the response if available, otherwise it would be 0 * @param responseHeaders Headers of the response if available, otherwise it would be null */ void onFailure(ApiException e, int statusCode, Map> responseHeaders); /** * This is called when the API call succeeded. * * @param result The result deserialized from response * @param statusCode Status code of the response * @param responseHeaders Headers of the response */ void onSuccess(T result, int statusCode, Map> responseHeaders); /** * This is called when the API upload processing. * * @param bytesWritten bytes Written * @param contentLength content length of request body * @param done write end */ void onUploadProgress(long bytesWritten, long contentLength, boolean done); /** * This is called when the API downlond processing. * * @param bytesRead bytes Read * @param contentLength content lenngth of the response * @param done Read end */ void onDownloadProgress(long bytesRead, long contentLength, boolean done); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy