Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joris22o committed Sep 20, 2019
2 parents 65553b9 + 6b21067 commit bcf57c4
Show file tree
Hide file tree
Showing 20 changed files with 72 additions and 71 deletions.
10 changes: 5 additions & 5 deletions Excel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

#### Windows Operating System

Since the TWS RTD Server API technology directly refers to the C# API client source functions, it is supported on [Windows Environment](https://lynxbroker.github.io/#/SystemRequirements) only.
Since the TWS RTD Server API technology directly refers to the C# API client source functions, it is supported on [Windows Environment](https://api.lynx.academy/SystemRequirements) only.

#### API version 9.73.03+

You need to [download API](https://lynxbroker.github.io/#/API_versions) Windows version 9.73.03 or higher and install on your computer. Once you have installed the API, you can verify the API Version by checking *C:\TWS API\API_VersionNum.txt* by default.
You need to [download API](https://api.lynx.academy/API_versions) Windows version 9.73.03 or higher and install on your computer. Once you have installed the API, you can verify the API Version by checking *C:\TWS API\API_VersionNum.txt* by default.

#### TWS (or LYNX Gateway) Build 963+

By default, market data requests sent via TWS RTD Server will automatically request for all possible [Generic Tick Types](https://lynxbroker.github.io/#/RTD_Simple_Syntax?id=generic-tick-types). There are several generic tick types being requested that are only supported in TWS 963 or higher. Sending any RTD market data request with default generic tick list to an old build of TWS will trigger a "TwsRtdServer error" indicating incorrect generic tick list is sent. Make sure a [TWS builds 963+](https://www.lynx.nl/service/handelsplatform/installeren/) is downloaded from LYNX website and kept running at the background for TWS RTD Server API to function properly.
By default, market data requests sent via TWS RTD Server will automatically request for all possible [Generic Tick Types](https://api.lynx.academy/RTD_Simple_Syntax?id=generic-tick-types). There are several generic tick types being requested that are only supported in TWS 963 or higher. Sending any RTD market data request with default generic tick list to an old build of TWS will trigger a "TwsRtdServer error" indicating incorrect generic tick list is sent. Make sure a [TWS builds 963+](https://www.lynx.nl/service/handelsplatform/installeren/) is downloaded from LYNX website and kept running at the background for TWS RTD Server API to function properly.

#### Enable Socket Client in TWS (or IB Gateway)

Since the TWS RTD Server API directly refers to the C# API source, RTD market data requests will be sent via the socket layer. Please make sure to [Enable ActiveX and Socket Client](https://lynxbroker.github.io/#/initial_setup?id=enable-api-connections-) settings in your TWS.
Since the TWS RTD Server API directly refers to the C# API source, RTD market data requests will be sent via the socket layer. Please make sure to [Enable ActiveX and Socket Client](https://api.lynx.academy/Initial_Setup?id=enable-api-connections-) settings in your TWS.

Please also be mindful of the socket port that you configure in your TWS API settings. The default socket port TWS will listen on is **7496** for a live session, and **7497** for a paper session. It is further discussed in section [Connection Parameters](https://lynxbroker.github.io/#/RTD_Simple_Syntax?id=rtd_simple_syntax_conn) that TWS RTD Server connects to port **7496** by default, and you are able to customize the port number to connect by specifying pre-defined [Connection Parameters](https://lynxbroker.github.io/#/RTD_Simple_Syntax?id=rtd_simple_syntax_conn) or using string "port=". You can use any valid port for connection as you wish, and you just need to make sure that the port you are trying to connect to via the API is the same port your TWS is listening on.
Please also be mindful of the socket port that you configure in your TWS API settings. The default socket port TWS will listen on is **7496** for a live session, and **7497** for a paper session. It is further discussed in section [Connection Parameters](https://api.lynx.academy/RTD_Simple_Syntax?id=rtd_simple_syntax_conn) that TWS RTD Server connects to port **7496** by default, and you are able to customize the port number to connect by specifying pre-defined [Connection Parameters](https://api.lynx.academy/RTD_Simple_Syntax?id=rtd_simple_syntax_conn) or using string "port=". You can use any valid port for connection as you wish, and you just need to make sure that the port you are trying to connect to via the API is the same port your TWS is listening on.

#### Microsoft Excel

Expand Down
8 changes: 4 additions & 4 deletions Excel/streaming_marketdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ These quotes will update in real-time and can be used to make calculations withi

### More information:

- [Troubleshooting](https://lynxbroker.github.io/#/RTD_Troubleshooting)
- [Simple Syntax](https://lynxbroker.github.io/#/RTD_Simple_Syntax)
- [Mixed Syntax](https://lynxbroker.github.io/#/RTD_Mixed_Syntax)
- [Complex Syntax](https://lynxbroker.github.io/#/RTD_Complex_Syntax)
- [Troubleshooting](https://api.lynx.academy/RTD_Troubleshooting)
- [Simple Syntax](https://api.lynx.academy/RTD_Simple_Syntax)
- [Mixed Syntax](https://api.lynx.academy/RTD_Mixed_Syntax)
- [Complex Syntax](https://api.lynx.academy/RTD_Complex_Syntax)
8 changes: 4 additions & 4 deletions Excel/streaming_marketdata/README_NL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Na het klikken op 'Start' ziet u binnen enkele seconden het volgende verschijnen

### Meer informatie (Engelstalig):

- [Troubleshooting](https://lynxbroker.github.io/#/RTD_Troubleshooting)
- [Simple Syntax](https://lynxbroker.github.io/#/RTD_Simple_Syntax)
- [Mixed Syntax](https://lynxbroker.github.io/#/RTD_Mixed_Syntax)
- [Complex Syntax](https://lynxbroker.github.io/#/RTD_Complex_Syntax)
- [Troubleshooting](https://api.lynx.academy/RTD_Troubleshooting)
- [Simple Syntax](https://api.lynx.academy/RTD_Simple_Syntax)
- [Mixed Syntax](https://api.lynx.academy/RTD_Mixed_Syntax)
- [Complex Syntax](https://api.lynx.academy/RTD_Complex_Syntax)
4 changes: 2 additions & 2 deletions Java/place_order/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Requirements:

- Java TWS API library (included in the repository or [check available versions](https://lynxbroker.github.io/#/API_versions))
- Java TWS API library (included in the repository or [check available versions](https://api.lynx.academy/API_versions))
- TWS running
- Socket Connection enabled and configured: *Configure->API->Settings* *(Port 7496 & Enable ActiveX and Socket Clients)*
- [Java JDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down Expand Up @@ -56,7 +56,7 @@ public void tickPrice(int tickerId, int field, double price, TickAttrib tickAttr

#### Placing an order:

>Placing an order for a specific contract can be done by invoking the [*placeOrder()*](https://lynxbroker.github.io/#/EClient?id=placeorder) function. Note that in the example below, *id 1* is used as the order id. However, in order to place an order you will need to know the *next valid id* that is provided by the function present in the TWSConnection class - [nextValidId()](https://lynxbroker.github.io/#/EWrapper?id=nextvalidid).
>Placing an order for a specific contract can be done by invoking the [*placeOrder()*](https://api.lynx.academy/EClient?id=placeorder) function. Note that in the example below, *id 1* is used as the order id. However, in order to place an order you will need to know the *next valid id* that is provided by the function present in the TWSConnection class - [nextValidId()](https://api.lynx.academy/EWrapper?id=nextvalidid).


Expand Down
2 changes: 1 addition & 1 deletion Java/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Requirements:

- Java TWS API library (included in the repository or [check the available versions](https://lynxbroker.github.io/#/API_versions))
- Java TWS API library (included in the repository or [check the available versions](https://api.lynx.academy/API_versions))
- TWS running
- Socket Connection enabled and configured in TWS: *Configure->API->Settings* *(Port 7496 & Enable ActiveX and Socket Clients)*
- [Java JDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down
4 changes: 2 additions & 2 deletions Java/request_contract_details/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Requirements:

- Java TWS API library (included in the repository or [check available versions](https://lynxbroker.github.io/#/API_versions))
- Java TWS API library (included in the repository or [check available versions](https://api.lynx.academy/API_versions))
- TWS running
- Socket Connection enabled and configured: *Configure->API->Settings* *(Port 7496 & Enable ActiveX and Socket Clients)*
- [Java JDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down Expand Up @@ -86,7 +86,7 @@ public class Main {



> After invoking the [reqContractDetails](https://lynxbroker.github.io/#/EClient?id=reqcontractdetails) method, the result will be sent to the [contractDetails](https://lynxbroker.github.io/#/EWrapper?id=contractdetails) function (in TWSConnection.java class). Finally, the output looks like this:
> After invoking the [reqContractDetails](https://api.lynx.academy/EClient?id=reqcontractdetails) method, the result will be sent to the [contractDetails](https://api.lynx.academy/EWrapper?id=contractdetails) function (in TWSConnection.java class). Finally, the output looks like this:


Expand Down
4 changes: 2 additions & 2 deletions Java/request_historical_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Requirements:

- Java TWS API library (included in the repository or [check available versions](https://lynxbroker.github.io/#/API_versions))
- Java TWS API library (included in the repository or [check available versions](https://api.lynx.academy/API_versions))
- TWS running
- Socket Connection enabled and configured: *Configure->API->Settings* *(Port 7496 & Enable ActiveX and Socket Clients)*
- [Java JDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down Expand Up @@ -84,7 +84,7 @@ public class Main {



> After invoking the [reqHistoricalData](https://lynxbroker.github.io/#/EClient?id=reqhistoricaldata) method, the result containing *midpoint* data as *15 mins bars* for *one day* will be sent to the [historicalData](https://lynxbroker.github.io/#/EWrapper?id=historicaldata) function (in TWSConnection.java class). Finally, the output looks like this:
> After invoking the [reqHistoricalData](https://api.lynx.academy/EClient?id=reqhistoricaldata) method, the result containing *midpoint* data as *15 mins bars* for *one day* will be sent to the [historicalData](https://api.lynx.academy/EWrapper?id=historicaldata) function (in TWSConnection.java class). Finally, the output looks like this:
<p align="center">
<img src="images/request_historical_data.png">
Expand Down
4 changes: 2 additions & 2 deletions Java/request_market_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Requirements:

- Java TWS API library (included in the repository or [check available versions](https://lynxbroker.github.io/#/API_versions))
- Java TWS API library (included in the repository or [check available versions](https://api.lynx.academy/API_versions))
- TWS running
- Socket Connection enabled and configured: *Configure->API->Settings* *(Port 7496 & Enable ActiveX and Socket Clients)*
- [Java JDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
Expand Down Expand Up @@ -82,7 +82,7 @@ public class Main {
}
```

> It initiates a **TWSConnection** object that is used to create the connection with the LYNX API. Moreover, a *Contract* is defined (in our example the USD/CAD FOREX pair) and sent together as a market data request to the API. Thus, the incoming data will be transmitted to the corresponding function in the **TWSConnection class** - [*tickPrice()*](https://lynxbroker.github.io/#/EWrapper?id=tickprice).
> It initiates a **TWSConnection** object that is used to create the connection with the LYNX API. Moreover, a *Contract* is defined (in our example the USD/CAD FOREX pair) and sent together as a market data request to the API. Thus, the incoming data will be transmitted to the corresponding function in the **TWSConnection class** - [*tickPrice()*](https://api.lynx.academy/EWrapper?id=tickprice).


Expand Down
2 changes: 2 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ MIT License

Copyright (c) 2019 LYNX B.V.

This License pertains exclusively to the LYNX API Examples as laid out on our Github Page. The "Software" as described in this license are the LYNX API Examples published under our Github page https://github.com/lynxbroker

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
4 changes: 2 additions & 2 deletions Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Code samples that show some of the LYNX API possible implementations.

*First you need to setup your environment to work with the LYNX API and Python following [these](/SETUP.md) instructions.*
*First you need to setup your environment to work with the LYNX API and Python following [these](/https://github.com/lynxbroker/API-examples/blob/master/Python/SETUP.md) instructions.*

### Table of contents
- [**place_order**](https://github.com/lynxbroker/API-examples/tree/master/Python/place_order) - code example of placing an order though the API
Expand All @@ -11,7 +11,7 @@ Code samples that show some of the LYNX API possible implementations.
- [**request_market_data**](https://github.com/lynxbroker/API-examples/tree/master/Python/request_market_data) - code example of requesting realtime ticks for a product through the API

---
##### Also, for more information visit our [API Documentation](https://lynxbroker.github.io/).
##### Also, for more information visit our [API Documentation](https://api.lynx.academy/).
---

<p align="center">
Expand Down
2 changes: 1 addition & 1 deletion Python/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Requirements**:

- [API Software](https://lynxbroker.github.io/documentation/#/API_versions) Installed
- [API Software](https://api.lynx.academy/#/API_versions) Installed
- TWS Running
- Socket Connection enabled and configured: *Configure->API->Settings* *(Port - 7496 & Enable ActiveX and Socket Clients)*
- Python 3.6 or higher
Expand Down
16 changes: 8 additions & 8 deletions Python/place_order/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
>- TWS Running
> - Socket Connection enabled and configured: *Configure->API->Settings* *(Port - 7496 & Enable ActiveX and Socket Clients)*
> - Python 3.6 or higher
> - Set-up your environment to work with the API as described [here](/articles/Python/README.md)
> - Set-up your environment to work with the API as described [here](/Python/README.md)
>

At the bottom you will find the full example to place an order using the LYNX API, or download the .py file directly [here](/request_contract_details.py).
At the bottom you will find the full example to place an order using the LYNX API, or download the .py file directly [here](https://raw.githubusercontent.com/lynxbroker/API-examples/master/Python/place_order/place_order.py).

## Initial Setup

Expand Down Expand Up @@ -124,9 +124,9 @@ app.place_order(contract, order)

### The entire code:
```python
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down Expand Up @@ -239,9 +239,9 @@ python3 place_order.py

Take a further look at our online API Documentation to discover all of the possibilities using LYNX' API.

- [LYNX Basic Contract Definitions](https://lynxbroker.github.io/#/BasicContracts.md)
- [LYNX Basic Order Definitions](https://lynxbroker.github.io/#/BasicOrders.md)
- [LYNX Order Management](https://lynxbroker.github.io/#/OrderManagement.md)
- [LYNX Basic Contract Definitions](https://api.lynx.academy/#/BasicContracts.md)
- [LYNX Basic Order Definitions](https://api.lynx.academy/#/BasicOrders.md)
- [LYNX Order Management](https://api.lynx.academy/#/OrderManagement.md)

<br/>

Expand Down
6 changes: 3 additions & 3 deletions Python/place_order/place_order.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down
16 changes: 8 additions & 8 deletions Python/request_contract_details/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## Requirements:

> - [API Software](https://lynxbroker.github.io/#/API_versions) Installed
> - [API Software](https://api.lynx.academy#/API_versions) Installed
>- TWS Running
> - Socket Connection enabled and configured: *Configure->API->Settings* *(Port - 7496 & Enable ActiveX and Socket Clients)*
> - Python 3.6 or higher
> - Set-up your environment to work with the API as described [here](/articles/Python/README.md)
> - Set-up your environment to work with the API as described [here](/Python/README.md)
>

At the bottom you will find the full example to request Contract Details using the LYNX API, or download the .py file directly [here](/request_contract_details.py).
At the bottom you will find the full example to request Contract Details using the LYNX API, or download the .py file directly [here](https://raw.githubusercontent.com/lynxbroker/API-examples/master/Python/request_contract_details/request_contract_details.py).

## Initial Setup

Expand Down Expand Up @@ -110,9 +110,9 @@ app.get_contractDetails(contract)

### The entire code:
```python
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down Expand Up @@ -215,8 +215,8 @@ python3 request_contract_details.py

Take a further look at our online API Documentation to discover all of the possibilities using LYNX' API.

- [LYNX Basic Contract Definitions](https://lynxbroker.github.io/#/BasicContracts.md)
- [LYNX Requesting Contract Details](https://lynxbroker.github.io/#/RequestingContractDetails.md)
- [LYNX Basic Contract Definitions](https://api.lynx.academy/#/BasicContracts.md)
- [LYNX Requesting Contract Details](https://api.lynx.academy/#/RequestingContractDetails.md)

<br/>

Expand Down
6 changes: 3 additions & 3 deletions Python/request_contract_details/request_contract_details.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down
16 changes: 8 additions & 8 deletions Python/request_historical_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## Requirements:

> - [API Software](https://lynxbroker.github.io/#/API_versions) Installed
> - [API Software](https://api.lynx.academy/#/API_versions) Installed
>- TWS Running
> - Socket Connection enabled and configured: *Configure->API->Settings* *(Port - 7496 & Enable ActiveX and Socket Clients)*
> - Python 3.6 or higher
> - Set-up your environment to work with the API as described [here](/articles/Python/README.md)
> - Set-up your environment to work with the API as described [here](/Python/README.md)
>

At the bottom you will find the full example to request Historical Data using the LYNX API, or download the .py file directly [here](/request_historical_data.py).
At the bottom you will find the full example to request Historical Data using the LYNX API, or download the .py file directly [here](https://raw.githubusercontent.com/lynxbroker/API-examples/master/Python/request_historical_data/request_historical_data.py).

## Initial Setup

Expand Down Expand Up @@ -127,9 +127,9 @@ print("BarData csv file created")

### The entire code:
```python
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down Expand Up @@ -268,8 +268,8 @@ python3 request_historical_data.py

Take a further look at our online API Documentation to discover all of the possibilities using LYNX' API.

- [LYNX Basic Contract Definitions](https://lynxbroker.github.io/#/BasicContracts.md)
- [LYNX Requesting Historical Data](https://lynxbroker.github.io/#/HistoricalBarData.md)
- [LYNX Basic Contract Definitions](https://api.lynx.academy/#/BasicContracts.md)
- [LYNX Requesting Historical Data](https://api.lynx.academy/#/HistoricalBarData.md)

<br/>

Expand Down
6 changes: 3 additions & 3 deletions Python/request_historical_data/request_historical_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (C) 2019 LYNX B.V. All rights reserved.
"""

# Copyright (C) 2019 LYNX B.V. All rights reserved.


# Import ibapi deps
from ibapi import wrapper
Expand Down
Loading

0 comments on commit bcf57c4

Please sign in to comment.