Skip to content

Commit

Permalink
Update intro.md
Browse files Browse the repository at this point in the history
  • Loading branch information
topofocus committed May 9, 2015
1 parent 82d3afd commit 4797a9e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions intro.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## ib-ruby – Introduction to the Gateway

Ib-ruby is a pure ruby implementation to access the IB-TWS-API.
It mirrors most of the information provided by the TWS as Active-Model-Objects.
It mirrors most of the information provided by the TWS as ActiveModel-Objects.

### Connect to the TWS

Expand All @@ -10,18 +10,19 @@ and API-Connections are enabled, just instantiate IB::Gateway to connect i.e.

```
gw = IB::Gateway.new connect: true, host: 'localhost:7496' , client_id: 1001
# for possible argumets look into lib/ib/gateway.rb
# for possible argumets look into lib/ib/gateway.rb
# use host: 'localhost.4001' to connect to a running TWS-Gateway
```

The Connection-Object, which provides the status and recieves subscriptions of TWS-Messages, is
always present as

```
tws = IB::Connection.tws
tws = IB::Gateway.tws
or
tws = gw.tws
and also
tws = IB::Connction.current.tws
tws = IB::Gateway.current.tws
```
The Gateway acts as a Proxy to the Connection-Object and provides a simple Security-Layer.
Expand Down Expand Up @@ -53,7 +54,7 @@ in a structured manner:
gw.get_account_data
gw.request_open_orders
```
leads to
leads to this ActiveModel object-tree

* Gateway
* Account
Expand Down

0 comments on commit 4797a9e

Please sign in to comment.