com.breeze.breezeconnect 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package com.breeze.breezeconnect --version 1.0.1
NuGet\Install-Package com.breeze.breezeconnect -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="com.breeze.breezeconnect" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add com.breeze.breezeconnect --version 1.0.1
#r "nuget: com.breeze.breezeconnect, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install com.breeze.breezeconnect as a Cake Addin
#addin nuget:?package=com.breeze.breezeconnect&version=1.0.1

// Install com.breeze.breezeconnect as a Cake Tool
#tool nuget:?package=com.breeze.breezeconnect&version=1.0.1

Breeze Connect SDK

This is a package to integrate streaming stocks for subscribed users & call APIs through which you can fetch live/historical data, automate your trading strategies, and monitor your portfolio in real time.

Websocket Usage

using System;
using System.Text.Json;
using System.Threading.Tasks;
using Breeze;

//.Net Core 3.1
namespace ConsoleAppTestProject
{
    class Program
    {
        static async Task Main(string[] args)
        {
            try
            {
                // Initialize SDK 
                BreezeConnect breeze = new BreezeConnect("AppKey");
                
                // Generate Session
                breeze.generateSession("SecretKey", "API_Session");

                // Connect to WebSocket
                var responseObject = await breeze.wsConnectAsync();
                Console.WriteLine(JsonSerializer.Serialize(responseObject));

                // Callback to receive ticks.
                breeze.ticker((data) =>
                {
                    Console.WriteLine("Ticker Data:" + JsonSerializer.Serialize(data));
                });
                
                // Subscribe stocks feeds
                Console.WriteLine(JsonSerializer.Serialize(await breeze.subscribeFeedsAsync((exchangeCode: "NFO", stockCode: "ICIBAN", productType: "options", expiryDate: "25-Aug-2022", strikePrice: "650", right: "Put", getExchangeQuotes: true, getMarketDepth: false))));

                // Subscribe stocks feeds by stock-token
                Console.WriteLine(JsonSerializer.Serialize(await breeze.subscribeFeedsAsync("4.1!49937")));
                
                // Unsubscribe stocks feeds
                Console.WriteLine(JsonSerializer.Serialize(await breeze.unsubscribeFeedsAsync((exchangeCode: "NFO", stockCode: "ICIBAN", productType: "options", expiryDate: "25-Aug-2022", strikePrice: "650", right: "Put", getExchangeQuotes: true, getMarketDepth: false))));

                // Unsubscribe stocks feeds by stock-token
                Console.WriteLine(JsonSerializer.Serialize(await breeze.unsubscribeFeedsAsync("4.1!49937")));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}

NOTE

Examples for stock_token are "4.1!38071" or "1.1!500780".

exchangeCode must be 'BSE', 'NSE', 'NDX', 'MCX' or 'NFO'.

stockCode should not be an empty string. Examples for stockCode are "NIFTY" or "ICIBAN".

productType can be either 'Futures', 'Options' or an empty string. productType can not be an empty string for exchangeCode 'NDX', 'MCX' and 'NFO'.

strikeDate can be in DD-MMM-YYYY(Ex.: 01-Jan-2022) or an empty string. strikeDate can not be an empty string for exchangeCode 'NDX', 'MCX' and 'NFO'.

strikePrice can be float-value in string or an empty string. strikePrice can not be an empty string for productType 'Options'.

right can be either 'Put', 'Call' or an empty string. right can not be an empty string for productType 'Options'.

Either getExchangeQuotes must be True or getMarketDepth must be True. Both getExchangeQuotes and getMarketDepth can be True, But both must not be False.


API Usage

using System;
using System.Text.Json;
using System.Threading.Tasks;
using Breeze;

//.Net Core 3.1
namespace ConsoleAppTestProject
{
    class Program
    {
        static async Task Main(string[] args)
        {
            try
            {
                // Initialize SDK 
                BreezeConnect breeze = new BreezeConnect("AppKey");

                // Generate Session
                breeze.generateSession("SecretKey", "API_Session");

                // Following are the complete list of API method:

                // Get Customer details by api-session value.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getCustomerDetail(apiSession: "API_Session")));

                // Get Demat Holding details of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getDematHoldings()));

                // Get Funds details of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getFunds()));

                // Set Funds of your account by transaction-type as "Credit" or "Debit" with amount in numeric string as rupees and segment-type as "Equity" or "FNO".
                Console.WriteLine(JsonSerializer.Serialize(breeze.setFunds(transactionType: "debit", amount: "200", segment: "Equity")));

                // Get Historical Data for specific stock-code by mentioned interval either as "minute", "5minute", "30minutes" or as "day".
                Console.WriteLine(JsonSerializer.Serialize(breeze.getHistoricalData(interval: "1minute", fromDate: "2022-08-15T07:00:00.000Z", toDate: "2022-08-17T07:00:00.000Z", stockCode: "ICIBAN", exchangeCode: "NFO", productType: "futures", expiryDate: "2022-08-25T07:00:00.000Z", right: "others", strikePrice: "0")));

                // Add Margin to your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.addMargin(productType: "margin", stockCode: "ICIBAN", exchangeCode: "BSE", settlementId: "2021220", addAmount: "100", marginAmount: "3817.10", openQuantity: "10", coverQuantity: "0", categoryIndexPerStock: "", expiryDate: "", right: "", contractTag: "", strikePrice: "", segmentCode: "")));

                // Get Margin of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getMargin(exchangeCode: "NSE")));

                // Place an order from your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.placeOrder(stockCode: "ICIBAN", exchangeCode: "NFO", productType: "futures", action: "buy", orderType: "limit", stoploss: "0", quantity: "3200", price: "200", validity: "day", validityDate: "2022-08-22T06:00:00.000Z", disclosedQuantity: "0", expiryDate: "2022-08-25T06:00:00.000Z", right: "others", strikePrice: "0", userRemark: "Test")));

                // Get an order details by exchange-code and order-id from your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getOrderDetail(exchangeCode: "NSE", orderId: "20220819N100000001")));

                // Get order list of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getOrderList(exchangeCode: "NSE", fromDate: "2022-08-01T10:00:00.000Z", toDate: "2022-08-19T10:00:00.000Z")));

                // Cancel an order from your account whose status are not Executed. 
                Console.WriteLine(JsonSerializer.Serialize(breeze.cancelOrder(exchangeCode: "NSE", orderId: "20220819N100000001")));

                // Modify an order from your account whose status are not Executed. 
                Console.WriteLine(JsonSerializer.Serialize(breeze.modifyOrder(orderId: "202208191100000001", exchangeCode: "NFO", orderType: "limit", stoploss: "0", quantity: "250", price: "290100", validity: "day", disclosedQuantity: "0", validityDate: "2022-08-22T06:00:00.000Z")));

                // Get Portfolio Holdings of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getPortfolioHoldings(exchangeCode: "NFO", fromDate: "2022-08-01T06:00:00.000Z", toDate: "2022-08-19T06:00:00.000Z", stockCode: "", portfolioType: "")));

                // Get Portfolio Positions from your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getPortfolioPositions()));

                // Get quotes of mentioned stock-code
                Console.WriteLine(JsonSerializer.Serialize(breeze.getQuotes(stockCode: "ICIBAN", exchangeCode: "NFO", expiryDate: "2022-08-25T06:00:00.000Z", productType: "futures", right: "others", strikePrice: "0")));

                // Get option-chain of mentioned stock-code for product-type Futures where input of expiry-date is not  compulsory
                Console.WriteLine(JsonSerializer.Serialize(breeze.getOptionChainQuotes(stockCode:"ICIBAN",
                    exchangeCode:"NFO",
                    productType:"futures",
                    expiryDate:"2022-08-25T06:00:00.000Z")));

                //Get option-chain of mentioned stock-code for product-type Options where atleast 2 input is required out of expiry-date, right and strike-price
                Console.WriteLine(JsonSerializer.Serialize(breeze.getOptionChainQuotes(stockCode:"ICIBAN",
                    exchangeCode:"NFO",
                    productType:"options",
                    expiryDate:"2022-08-25T06:00:00.000Z",
                    right:"call",
                    strikePrice:"16850")));

                // Square off an Equity Margin Order
                Console.WriteLine(JsonSerializer.Serialize(breeze.squareOff(exchangeCode: "NSE", productType: "margin", stockCode: "NIFTY", quantity: "10", price: "0", action: "sell", orderType: "market", validity: "day", stoploss: "0", disclosedQuantity: "0", protectionPercentage: "", settlementId: "", coverQuantity: "", openQuantity: "", marginAmount: "", sourceFlag: "", expiryDate: "", right: "", strikePrice: "", validityDate: "", tradePassword: "", aliasName: "")));
                // Note: Please refer getPortfolioPositions() for settlementId and marginAmount

                // Square off an FNO Futures Order
                Console.WriteLine(JsonSerializer.Serialize(breeze.squareOff(exchangeCode: "NFO", productType: "futures", stockCode: "ICIBAN", expiryDate: "2022-08-25T06:00:00.000Z", action: "sell", orderType: "market", validity: "day", stoploss: "0", quantity: "50", price: "0", validityDate: "2022-08-12T06:00:00.000Z", tradePassword: "", disclosedQuantity: "0", sourceFlag: "", protectionPercentage: "", settlementId: "", marginAmount: "", openQuantity: "", coverQuantity: "", right: "", strikePrice: "", aliasName: "")));

                // Square off an FNO Options Order
                Console.WriteLine(JsonSerializer.Serialize(breeze.squareOff(exchangeCode: "NFO", productType: "options", stockCode: "ICIBAN", expiryDate: "2022-08-25T06:00:00.000Z", right: "Call", strikePrice: "16850", action: "sell", orderType: "market", validity: "day", stoploss: "0", quantity: "50", price: "0", validityDate: "2022-08-12T06:00:00.000Z", tradePassword: "", disclosedQuantity: "0", sourceFlag: "", protectionPercentage: "", settlementId: "", marginAmount: "", openQuantity: "", coverQuantity: "", aliasName: "")));

                // Get trade list of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getTradeList(fromDate: "2022-08-01T06:00:00.000Z", toDate: "2022-08-19T06:00:00.000Z", exchangeCode: "NSE", productType: "", action: "", stockCode: "")));

                // Get trade detail of your account.
                Console.WriteLine(JsonSerializer.Serialize(breeze.getTradeDetail(exchangeCode: "NSE", orderId: "20220819N100000005")));

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 823 2/8/2023
1.0.6 303 1/24/2023
1.0.5 345 12/26/2022
1.0.4 465 12/1/2022
1.0.3 399 11/14/2022
1.0.2 524 9/30/2022
1.0.1 421 8/26/2022
1.0.0 415 8/19/2022

Release