You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ibsync` is a Go package designed to simplify interaction with the [Interactive Brokers](https://www.interactivebrokers.com/en/home.php) API. It is inspired by the great [ib_insync](https://github.com/erdewit/ib_insync) Python library and based on [ibapi](https://github.com/scmhub/ibapi). It provides a synchronous, easy-to-use interface for account management, trade execution, real-time and historical market data within the IB ecosystem.
8
8
@@ -12,18 +12,22 @@
12
12
## Getting Started
13
13
14
14
### Prerequisites
15
-
-**Go** version 1.23 or higher (recommended)
15
+
16
+
-**Go** version 1.26 or higher (recommended)
16
17
- An **Interactive Brokers** account with TWS or IB Gateway installed and running
17
18
18
19
### Installation
20
+
19
21
Install the package via `go get`:
20
22
21
23
```bash
22
24
go get -u github.com/scmhub/ibsync
23
25
```
24
26
25
27
## Quick start
28
+
26
29
Here’s a basic example to connect and get the managed accounts list:
30
+
27
31
```go
28
32
package main
29
33
@@ -52,7 +56,9 @@ func main() {
52
56
## Usage guide
53
57
54
58
### Configuration
59
+
55
60
Connect with a different configuration.
61
+
56
62
```go
57
63
// New IB client & Connect
58
64
ib:= ibsync.NewIB()
@@ -73,7 +79,9 @@ defer ib.Disconnect()
73
79
```
74
80
75
81
### Account
82
+
76
83
Account value, summary, positions, trades...
84
+
77
85
```go
78
86
// Account Values
79
87
accountValues:= ib.AccountValues()
@@ -97,7 +105,9 @@ openTrades := ib.OpenTrades()
97
105
```
98
106
99
107
### Contract details
108
+
100
109
Request contract details from symbol, exchange
110
+
101
111
```go
102
112
// NewStock("AMD", "", "")
103
113
amd:= ibsync.NewStock("AMD", "", "")
@@ -110,7 +120,9 @@ fmt.Println("number of contract found for request NewStock(\"AMD\", \"\", \"\")
For more information on how to use this package, please refer to the [GoDoc](https://pkg.go.dev/github.com/scmhub/ibsync) documentation and check the [examples](https://github.com/scmhub/ibsync/tree/main/examples) directory. You can also have a look at the `ib_test.go` file
229
250
230
251
## Acknowledgments
252
+
231
253
-[ibapi](https://github.com/scmhub/ibapi) for core API functionality.
232
254
-[ib_insync](https://github.com/erdewit/ib_insync) for API inspiration. (ib_insync is now [ib_async](https://github.com/ib-api-reloaded/ib_async))
233
255
234
256
## Notice of Non-Affiliation and Disclaimer
257
+
235
258
> [!CAUTION]
236
259
> This project is in the **beta phase** and is still undergoing testing and development. Users are advised to thoroughly test the software in non-production environments before relying on it for live trading. Features may be incomplete, and bugs may exist. Use at your own risk.
237
260
238
261
> [!IMPORTANT]
239
-
>This project is **not affiliated** with Interactive Brokers Group, Inc. All references to Interactive Brokers, including trademarks, logos, and brand names, belong to their respective owners. The use of these names is purely for informational purposes and does not imply endorsement by Interactive Brokers.
262
+
>This project is **not affiliated** with Interactive Brokers Group, Inc. All references to Interactive Brokers, including trademarks, logos, and brand names, belong to their respective owners. The use of these names is purely for informational purposes and does not imply endorsement by Interactive Brokers.
240
263
241
264
> [!IMPORTANT]
242
-
>The authors of this package make **no guarantees** regarding the software's reliability, accuracy, or suitability for any particular purpose, including trading or financial decisions. **No liability** will be accepted for any financial losses, damages, or misinterpretations arising from the use of this software.
265
+
>The authors of this package make **no guarantees** regarding the software's reliability, accuracy, or suitability for any particular purpose, including trading or financial decisions. **No liability** will be accepted for any financial losses, damages, or misinterpretations arising from the use of this software.
243
266
244
267
## License
268
+
245
269
Distributed under the MIT License. See [LICENSE](./LICENSE) for more information.
0 commit comments