API Support Forum
OEC API > API Support > What is OEC Account Name?
Author Topic: What is OEC Account Name?
(10 messages, Page 1 of 1)
Moderators: VPfau
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 03, 2020 @ 01:45 PM             Msg. 1 of 10
I'm using FIX protocol to create my script. Here's part of my config file:
Account=CRamasamy4419
Username=[UUID]
SenderCompID=CRamasamy4419
Password=[user password]

For Account, I'm not sure what to use. Using just the username is not working. This config works okay for 9300, given that it doesn't take in any login info. But it's not working with 9400. Can anyone help?
CMicciche902
Posts: 367
Joined:


Posted: Jun 03, 2020 @ 01:50 PM             Msg. 2 of 10
I'll email you the developer account number, or you can locate in Sample app when logged in.
Chris M
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 03, 2020 @ 02:11 PM             Msg. 3 of 10
After I log into my account, and go to real time simulation, I see account number when I try to reset account balance. Is that what Account= is?
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 03, 2020 @ 07:46 PM             Msg. 4 of 10
Thanks, I got the account number and I used it. However, it seems to still not work. My script is going through 9300 correctly, but 9400 is not seem to be working. I'm using FIX protoocl. Below is my configuration settings:

[DEFAULT]
ConnectionType=initiator
LogonTimeout=10
ReconnectInterval=5
FileLogPath=./Logs/
FileStorePath=./Sessions
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=N
DataDictionary=fix/FIX44.xml
ValidateFieldsOutOfOrder=N
ValidateUserDefinedFields=N
CheckLatency=N
PossResend=Y
ResetOnLogout=Y
ResetOnLogon=Y
ResetOnDisconnect=Y
ResetOnError=Y
MaxLatency=5
Account=[account number]
Username=[UUID]
SenderCompID=CRamasamy4419
Password=[account password]

[SESSION]
BeginString=FIX.4.4
TargetCompID=OEC_TEST
HeartBtInt=30
EncryptMethod=0
SocketConnectHost=api.gainfutures.com
SocketConnectPort=9400


And here's the log message I'm receiving:
06/03/2020 06:32:11 PM Waiting to logon ...
06/03/2020 06:32:13 PM Waiting to logon ...
06/03/2020 06:32:13 PM Sending Admin message to server. Session: FIX.4.4:CRamasamy4419->OEC_TEST. Message: 8=FIX.4.49=13835=A34=149=CRamasamy441952=20200604-00:32:13.76656=OEC_TEST554=[apipassword]12003=[UUID]98=0108=30141=Y10=128
06/03/2020 06:32:13 PM onLogout received from server. Session: FIX.4.4:CRamasamy4419->OEC_TEST

Edited by CRamasamy4419 on Jun 03, 2020 09:21 PM
Edited by CRamasamy4419 on Jun 03, 2020 11:54 PM
Edited by CRamasamy4419 on Jun 04, 2020 08:28 AM
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 04, 2020 @ 09:22 AM             Msg. 5 of 10
I also see the following event message:
20200604-14:14:31.000000000 : Connecting to api.gainfutures.com on port 9400 (Source :0)
20200604-14:14:31.000000000 : Initiated logon request
20200604-14:14:31.000000000 : Socket Error: Connection reset by peer.
20200604-14:14:31.000000000 : Disconnecting


Here's my message log:
20200604-14:14:31.000000000 : 8=FIX.4.49=13835=A34=149=CRamasamy441952=20200604-14:14:31.00056=OEC_TEST554=12003=98=0108=30141=Y10=114
CMicciche902
Posts: 367
Joined:


Posted: Jun 04, 2020 @ 10:38 AM             Msg. 6 of 10
Port 9400 is the SSL port. Are you using stunnel or other similar solution?
Chris M
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 04, 2020 @ 11:36 AM             Msg. 7 of 10
No, I'm not. What is the recommended one for Gain Futures FIX api?
CMicciche902
Posts: 367
Joined:


Posted: Jun 04, 2020 @ 12:12 PM             Msg. 8 of 10
It's up to you what you want to use for SSL connection. Stunnel is a popular choice.
Chris M
CMicciche902
Posts: 367
Joined:


Posted: Jun 04, 2020 @ 06:05 PM             Msg. 9 of 10
One of my developers advised:
QuickFIX supports SSL out of box
See public available code https://bitbucket.org/GainFuturesDev/oecfixsample/src/master/Fix/Connection.cs#lines-50


Are you using QuickFIX framework http://www.quickfixengine.org/?
Chris M
CRamasamy4419
Posts: 19
Joined: Jun 01, 2020


Posted: Jun 05, 2020 @ 07:21 AM             Msg. 10 of 10
That's good to know. Yes, I'm using the QuickFIX framework. I should be able to figure the SSL thing out.

One more thing - for MarketDataRequest, where can I find the MDReqID? To check the price for a particular symbol, is this the right template to use, or SecurityListRequest?