Page 1 of 2

ForexConnect API 1.4.1 beta

PostPosted: Wed Mar 02, 2016 8:39 am
by Julia CJ
ForexConnect API 1.4.1 beta version has been released.

Release notes

Changes

1. Ability to retrieve information about commissions has been added.
To retrieve information about commissions, use new interface IO2GCommissionsProvider.
New method getCommissionsProvider has been added to the IO2GSession interface.
Using the IO2GCommissionsProvider interface you can:
1. Retrieve lists of commissions for the specified offer and account. For this purpose, use method IO2GCommissionsProvider.getCommissionDescriptions.
2. Calculate estimated commissions for trading operations. For this purpose, use the following methods: IO2GCommissionsProvider.calcOpenCommission, IO2GCommissionsProvider.calcCloseCommission, IO2GCommissionsProvider.calcTotalCommission.

2. The Search function has been updated. It is now possible to search not only for specified values, but also for values that are greater, less or between the specified ones.
New enumeration O2GRelationalOperators has been added. A new parameter with the O2GRelationalOperators type has been added to the following methods:
getNextGenericRowByColumnValue, getNextGenericRowByMultiColumnValues, getNextGenericRowByColumnValues, getNextGenericRowByCondition

3. It is now possible to receive only trading events omitting events caused by data recalculation. New method setTableEventsFilter has been added to the IO2GTable interface.

4. Ability to set request timeouts has been added. If a timeout expires and there is no request response, ForexConnect will send the request failed notification.
New methods setRequestsTimeout, getRequestsTimeout have been added to IO2GSession.

5. It is now possible to retrieve notifications about beginning\ending of the table events batch. The events batch is a set of events generated for a table by a single server message. The IO2GUpdatesProcessStatusListener interface has been added.

6. You can choose the mode of the open price for the candle calculation using the Close price of the previous candle or first tick of the current candle. The new parameter has been added to fillMarketDataSnapshotRequestTime.


Breaking changes:

1. New parameter in methods getNextGenericRowByColumnValue, getNextGenericRowByMultiColumnValues, getNextGenericRowByColumnValues.
To simulate the old behavior, the "EqualTo" value of the new parameter should be used.

2. New parameter in the fillMarketDataSnapshotRequestTime.
To simulate the old behaviour, the "PreviousClose" value of the new parameter should be used.
You can download the release here:
Download

Re: ForexConnect API 1.4.1 beta

PostPosted: Tue Jul 12, 2016 9:14 pm
by triplepointdev
trying out 1.4.1 im able to get 1.3.0 to work in eclipse for java but when i try to use 1.4.1 it gives

Exception in thread "main" java.lang.UnsatisfiedLinkError: {path to use}/ForexConnectAPI4/lib/java/libfxcore2.so.1.4.1: libForexConnect.so: cannot open shared object file: No such file or directory

on linux using eclipse and the java side of the api

Re: ForexConnect API 1.4.1 beta

PostPosted: Tue Jul 12, 2016 9:27 pm
by triplepointdev
getting
Exception in thread "main" java.lang.UnsatisfiedLinkError: {$PATH}/ForexConnectAPI4/lib/java/libfxcore2.so.1.4.1: libForexConnect.so: cannot open shared object file: No such file or directory
I'm using eclipse java side of the API

I'm able to get 1.3.0 to work and run sample in eclipse.

Re: ForexConnect API 1.4.1 beta

PostPosted: Fri Jul 15, 2016 2:25 am
by Julia CJ
Hi Triplepointdev,

1) We have prepared the example of successfully working project eclipse. You can find this file in your e-mail.
2) Please write the name of using eclipse version, Java version, using build. If you use the build of script (ant,maven) you need to apply such script.
3) If you have Java 1.6 version or more earlier version, please update it to 1.7 minimum.

The Java 1.6 version is not recommended to use:
http://www.oracle.com/technetwork/java/ ... 19409.html

There is written: "These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production."

Re: ForexConnect API 1.4.1 beta

PostPosted: Fri Jul 15, 2016 4:08 pm
by triplepointdev
java -Djava.library.path={path}/workspace/API/ForexConnectAPI4/lib/.:{path]/workspace/API/ForexConnectAPI4/lib/java/. forexconnect_check.Trader

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/fxcore2/IO2GSessionStatus

Re: ForexConnect API 1.4.1 beta

PostPosted: Mon Jul 25, 2016 3:45 am
by Julia CJ
Hi Triplepointdev,

1)We recommend you to use build scripts ( you can take as a basis ant-scripts in the samples). Using them will be easier to reference the libraries after build.

2) If you want to use the command line, you need to add classpath instead of Djava.library.path by using appropriate command. For example,

- the compilation: javac *.java -classpath /home/computer/user/build/www-fxcorporate-com/ForexConnectAPI-1.4/ForexConnectAPI-1.4-Linux-x86_64/lib/java/fxcore2.jar

- launch: java -cp /home/computer/user/build/www-fxcorporate-com/ForexConnectAPI-1.4/ForexConnectAPI-1.4-Linux-x86_64/lib/java/fxcore2.jar: forexconnect_check.Trader

3)In any case, if you can launch any sample (for example, login), it means forexconnect is compiled correctly. If you see “java.lang.NoClassDefFoundError” , it indicates the existence of some problem in local environment and the way was written incorrectly somewhere or the connection of libraries was made in a wrong way.

Re: ForexConnect API 1.4.1 beta

PostPosted: Tue Aug 02, 2016 8:59 pm
by Amanda
Where can I download the API for .NET? All the download links are broken. Could you update the links please?

Re: ForexConnect API 1.4.1 beta

PostPosted: Wed Aug 03, 2016 4:10 am
by Julia CJ
Hi Amanda,

Everything should work at this moment, please try to load again.

Re: ForexConnect API 1.4.1 beta

PostPosted: Mon Nov 28, 2016 10:15 pm
by vetocch
hi,

I need help ! trying to test login sample , but always got
Exception in thread "main" java.lang.UnsatisfiedLinkError: E:\projects\java\FXCM\login\fxcore2.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.fxcore2.O2GTransport.<clinit>(Unknown Source)
at login.Main.main(Main.java:46)
my env :
1.windows 10 professional 64 bit
2.JDK 1.8.0_112
3.netbeans IDE 8.2
4. I puy all dll files and java\fxcore2.jar,java\fxcore2.dll which included in C:\Program Files\Candleworks\ForexConnectAPIx64\bin to E:\projects\java\FXCM\login
then set working directory to E:\projects\java\FXCM\login, VM options : -Djava.library.path=.;

what should I do to make it works ?? thank you !!

Re: ForexConnect API 1.4.1 beta

PostPosted: Tue Dec 06, 2016 5:09 am
by Sergey.Konovalov
Hello vetocch,

Please confirm that you have completed the following ForexConnect API Help items:

How to include ForexConnect API in Java

Brief

The article discusses how to include ForexConnect API in Java application.

Details

Let's say ForexConnect API is installed to C:\Program Files\Candleworks\ForexConnectAPI.
To include ForexConnect API in your Java application, you should:

Add fxcore2.jar to the libraries
In NetBeans: Libraries->Add JAR/Folder
In Eclipse: Project->Properties->Java Build Path->Libraries tab->Add External JARs
Add: C:\Program Files\Candleworks\ForexConnectAPI\bin\java\fxcore2.jar

Change working directory
In Netbeans: Run->Working Directory
In Eclipse: Project->Properties->Run/Debug Settings->New->(Select Configuration Type)->Main tab (Pick the main class)->Arguments tab->Working Directory (click "Other")
Add: C:\Program Files\Candleworks\ForexConnectAPI\bin

Send java.library.path to Java VM
In Netbeans: Project->Properties->Run->VM options
In Eclipse: Project->Properties->Run/Debug Settings->(pick up configuration you just created)->Arguments tab->VM arguments
Add: -Djava.library.path=.;./java (path for Windows)

Add namespace com.fxcore2 to your project:
import com.fxcore2.*;