InterBroker 0.0.10

There is a newer version of this package available.
See the version list below for details.
dotnet add package InterBroker --version 0.0.10
                    
NuGet\Install-Package InterBroker -Version 0.0.10
                    
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="InterBroker" Version="0.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InterBroker" Version="0.0.10" />
                    
Directory.Packages.props
<PackageReference Include="InterBroker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InterBroker --version 0.0.10
                    
#r "nuget: InterBroker, 0.0.10"
                    
#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.
#:package InterBroker@0.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InterBroker&version=0.0.10
                    
Install as a Cake Addin
#tool nuget:?package=InterBroker&version=0.0.10
                    
Install as a Cake Tool

IBKR TWS API wrapper

Minimalistic async wrapper around IBKR TWS API for Interactive Brokers.

Status

GitHub Workflow Status (with event) GitHub GitHub

Nuget

dotnet add package InterBroker --version 0.0.1

Usage


var broker = new InterBroker
{
  Port = 7497
};

var contract = new Contract
{
  Symbol = "ES",
  LocalSymbol = "ESZ5",
  SecType = "FUT",
  Exchange = "CME",
  Currency = "USD",
  LastTradeDateOrContractMonth = "202512"
};

var optionContract = new Contract
{
  Symbol = "AAPL",
  SecType = "OPT",
  Exchange = "SMART",
  Currency = "USD",
  LastTradeDateOrContractMonth = "20251017"
};

broker.Connect();

// Requests

var account = "<AccountNumber>";
var cleaner = CancellationToken.None;
var contracts = await broker.GetContracts(cleaner, contract);
var bars = await broker.GetBars(cleaner, contract, DateTime.Now, "1 D", "1 min", "MIDPOINT");
var prices = await broker.GetTicks(cleaner, contract, DateTime.Now.AddDays(-5), DateTime.Now, "BID_ASK", 100);
var options = await broker.GetContracts(cleaner, optionContract);
var summary = await broker.GetAccountSummary(cleaner);
var orders = await broker.GetOrders(cleaner);
var positions = await broker.GetPositions(cleaner, account);

// Subscriptions

var dataMessage = new DataStreamMessage
{
  DataTypes = [SubscriptionEnum.Price],
  Contract = contract
};

var priceSub = broker.SubscribeToTicks(dataMessage, o => Console.WriteLine("Price: " + JsonSerializer.Serialize(o)));

broker.SubscribeToAccounts(account, o => Console.WriteLine("Account: " + JsonSerializer.Serialize(o)));
broker.SubscribeToPositions(account, o => Console.WriteLine("Position: " + JsonSerializer.Serialize(o)));
broker.SubscribeToOrders(o => Console.WriteLine("Order: " + JsonSerializer.Serialize(o)));

// Orders

var order = new Order
{
  Action = "BUY",
  OrderType = "LMT",
  TotalQuantity = 1,
  LmtPrice = prices.Last().Last.Value,
};

var orderResponse = await broker.SendOrder(
  cleaner,
  contracts.Last().Contract,
  order,
  order.LmtPrice - 50,
  order.LmtPrice + 50);

var orderStatus = await broker.ClearOrder(cleaner, orderResponse.Last().OrderId);

Console.ReadKey();

broker.Unsubscribe(priceSub);
broker.UnsubscribeFromUpdates(account);
broker.Disconnect();

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
0.0.28 205 11/22/2025
0.0.27 191 11/22/2025
0.0.26 340 11/21/2025
0.0.25 337 11/21/2025
0.0.24 341 11/21/2025
0.0.23 391 11/19/2025
0.0.22 382 11/19/2025
0.0.21 383 11/19/2025
0.0.20 387 11/18/2025
0.0.19 258 11/14/2025
0.0.18 261 11/14/2025
0.0.17 265 11/12/2025
0.0.16 266 11/11/2025
0.0.15 261 11/11/2025
0.0.14 254 11/10/2025
0.0.13 259 11/10/2025
0.0.12 258 11/10/2025
0.0.11 184 11/6/2025
0.0.10 176 10/21/2025
0.0.9 164 10/21/2025
0.0.8 161 10/21/2025
0.0.6 167 10/21/2025
0.0.5 164 10/20/2025
0.0.4 160 10/20/2025
0.0.3 163 10/19/2025
0.0.2 111 10/19/2025
0.0.1 87 10/18/2025