All URIs are relative to https://api-v2.upstox.com
Method | HTTP request | Description |
---|---|---|
GetProfile | GET /user/profile | Get profile |
GetUserFundMargin | GET /user/get-funds-and-margin | Get User Fund And Margin |
GetProfileResponse GetProfile (string apiVersion)
Get profile
This API allows to fetch the complete information of the user who is logged in including the products, order types and exchanges enabled for the user
using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;
namespace Example
{
public class GetProfileExample
{
public void main()
{
// Configure OAuth2 access token for authorization: OAUTH2
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new UserApi();
var apiVersion = apiVersion_example; // string | API Version Header
try
{
// Get profile
GetProfileResponse result = apiInstance.GetProfile(apiVersion);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.GetProfile: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | string | API Version Header |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetUserFundMarginResponse GetUserFundMargin (string apiVersion, string segment = null)
Get User Fund And Margin
Shows the balance of the user in equity and commodity market.
using System;
using System.Diagnostics;
using UpstoxClient.Api;
using UpstoxClient.Client;
using UpstoxClient.Model;
namespace Example
{
public class GetUserFundMarginExample
{
public void main()
{
// Configure OAuth2 access token for authorization: OAUTH2
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new UserApi();
var apiVersion = apiVersion_example; // string | API Version Header
var segment = segment_example; // string | (optional)
try
{
// Get User Fund And Margin
GetUserFundMarginResponse result = apiInstance.GetUserFundMargin(apiVersion, segment);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.GetUserFundMargin: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiVersion | string | API Version Header | |
segment | string | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]