API Support Forum
OEC API > API Support > Connection problem
Author Topic: Connection problem
(2 messages, Page 1 of 1)
Moderators: VPfau
AAmi1662
Posts: 4
Joined: Sep 15, 2021


Posted: Sep 17, 2021 @ 02:37 PM             Msg. 1 of 2
Hi, trying to connect to the servers with the code from the documentaion :https://gainfutures.com/GFAPI/
[
gfClient.Threading.Invoke(() =>
gfClient.Connection.Aggregate.Connect(
new GF.Api.Connection.ConnectionContextBuilder()
.WithUserName("username")
.WithPassword("pass")
.WithUUID("9e61a8bc-0a31-4542-ad85-33ebab0e4e86")
.WithPort(9200)
.WithHost("api.gainfutures.com")
.WithForceLogin(true)
.Build()));

/code]


except from the username and password there's anything else that need to be changed? i tried different ports as well but keep getting connection failed.

Thank you!
VPfau
Moderator
Posts: 135
Joined: Oct 26, 2011


Posted: Oct 12, 2021 @ 07:52 AM             Msg. 2 of 2
Hello,

Examples in documentation cannot works as complete application. They only demonstrate different aspects of discussed topics.

To see examples of API clients you can visit this page https://bitbucket.org/GainFuturesDev/?privacy=public

Thank you
Vitaliy Pfau