SimpleInteractiveBroker 0.1.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SimpleInteractiveBroker --version 0.1.2
NuGet\Install-Package SimpleInteractiveBroker -Version 0.1.2
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="SimpleInteractiveBroker" Version="0.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleInteractiveBroker --version 0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SimpleInteractiveBroker, 0.1.2"
#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 SimpleInteractiveBroker as a Cake Addin #addin nuget:?package=SimpleInteractiveBroker&version=0.1.2 // Install SimpleInteractiveBroker as a Cake Tool #tool nuget:?package=SimpleInteractiveBroker&version=0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SimpleBroker
SimpleBroker's API is exposed via the Broker
class. Since this is somewhat of a hobby project, all documentation is in the source code in the form of XML tags. Those will (should) show up in your IDE's intellisense or equivalent as well. The data modeling, particularly the "Trade" object, will look familiar to anyone who has used the ib-insync package in python.
Quickstart example use:
using SimpleBroker;
namespace YourProgram
{
internal class Program
{
static async Task Main()
{
Broker broker = new();
// Connect to IBKR
broker.Connect("127.0.0.1", 4001, 0)
// Create a Contract object
Contract contract = new("MSFT", "STK", "USD", "SMART");
// Get historical bars for MSFT
List<Bar> bars = await broker.GetHistoricalBars(contract, "1 Y", "1 day", "TRADES");
// Make and place a market order for 100 shares of MSFT
MarketOrder order = new("BUY", "DAY", "U123456", 100);
Trade trade = await broker.PlaceOrder(contract, order);
await Task.Delay(1000);
if (trade.IsDone())
{
Console.WriteLine($"Trade Completed - Filled at {Trade.OrderStatus.AvgFillPrice.ToString("C")}");
}
// Disconnect from IBKR
broker.Disconnect();
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- IBKRWrapper (>= 0.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release