Bitcoin Forum
May 22, 2024, 09:46:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [WANT] Code FIX compatible linux CLI program  (Read 1293 times)
jago25_98 (OP)
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 15, 2013, 12:14:00 PM
 #1

Please suggest a fair price even if you're not interested in this particular job.

Here's the info:

http://www.rugatu.com/questions/22212/place-trade-on-forex-broker-from-linux-command-line

Quote
I want to get price data from a forex broker on the linux command line. It seems there's no program out there to do this?

Some inspiration: http://javarevisited.blogspot.co.uk/2011/04/fix-protocol-tutorial-for-beginners.html trace FIX messages from stdin: https://code.google.com/p/fixtr/ http://www.quickfixengine.org/download "tradeclient is a little c++ console based trading client" http://www.quickfixengine.org/quickfix/doc/html/ http://fix8.org/howitworks.html https://code.google.com/p/quickfix-messenger/ https://code.google.com/p/quickfix-messenger/wiki/Index#Running_QuickFIX_Messenger

this seems more a more useful API than: http://www.dailyfx.com/forex_forum/forexconnect/ because it can be used a different brokers.

What would the code look like to get the current closing price for USDXAU, for example?

I'd add a reward if I had a safe connection to do it on

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 15, 2013, 01:47:52 PM
 #2

Please suggest a fair price even if you're not interested in this particular job.

Here's the info:

http://www.rugatu.com/questions/22212/place-trade-on-forex-broker-from-linux-command-line

Quote
I want to get price data from a forex broker on the linux command line. It seems there's no program out there to do this?

Some inspiration: http://javarevisited.blogspot.co.uk/2011/04/fix-protocol-tutorial-for-beginners.html trace FIX messages from stdin: https://code.google.com/p/fixtr/ http://www.quickfixengine.org/download "tradeclient is a little c++ console based trading client" http://www.quickfixengine.org/quickfix/doc/html/ http://fix8.org/howitworks.html https://code.google.com/p/quickfix-messenger/ https://code.google.com/p/quickfix-messenger/wiki/Index#Running_QuickFIX_Messenger

this seems more a more useful API than: http://www.dailyfx.com/forex_forum/forexconnect/ because it can be used a different brokers.

What would the code look like to get the current closing price for USDXAU, for example?

I'd add a reward if I had a safe connection to do it on

If you already can get the data in any way or know how to get it, then I will do it starting at 0.25 BTC. If accounts of any sorted are required, you will provide that.

How this will be paid: I will give you the code, and you will test it, if it works you pay the amount agreed, if it doesn't work we can discuss whether you want it fixed or not. If there is a dispute about who is right, we both release the code sent and received to others that may want to check it.
jago25_98 (OP)
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 15, 2013, 06:09:04 PM
 #3

 I can't get the data in because I don't know a way of doing it without programming unfortunately.

As far as I can tell quickfix-messenger ( http://prdownloads.sourceforge.net/quickfix/quickfix-1.13.3.tar.gz ) shows how to do it. To have a command line program like goxsh.py that would just need to be reimplemented on the command line I think?

I'm OK with the suggest price.

Quote

If you already can get the data in any way or know how to get it, then I will do it starting at 0.25 BTC. If accounts of any sorted are required, you will provide that.

How this will be paid: I will give you the code, and you will test it, if it works you pay the amount agreed, if it doesn't work we can discuss whether you want it fixed or not. If there is a dispute about who is right, we both release the code sent and received to others that may want to check it.

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 15, 2013, 06:34:22 PM
 #4

I can't get the data in because I don't know a way of doing it without programming unfortunately.

But, in the QuickFIX language, you need an Initiator (the server) that sends data to your Acceptor (the client). I get that you have access to some place that sends this data, right ? Otherwise I don't understand what's your plan on communicating with this forex broker. Or are you running the server too ? It is no longer clear what you're after, not even if you need to play with FIX now that you mention goxsh.py.
jago25_98 (OP)
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 15, 2013, 07:51:18 PM
 #5

Here's a demo account for testing:
http://www.fxcm.co.uk/forex-trading-demo/

I'll send you my login and the server address in an hour when I get to the other computer so you don't have to sign up.

Something like TradeStation on the linux commandline via python would be ideal.

I can't get the data in because I don't know a way of doing it without programming unfortunately.

But, in the QuickFIX language, you need an Initiator (the server) that sends data to your Acceptor (the client). I get that you have access to some place that sends this data, right ? Otherwise I don't understand what's your plan on communicating with this forex broker. Or are you running the server too ? It is no longer clear what you're after, not even if you need to play with FIX now that you mention goxsh.py.

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 15, 2013, 08:14:17 PM
 #6

Here's a demo account for testing:
http://www.fxcm.co.uk/forex-trading-demo/

I'll send you my login and the server address in an hour when I get to the other computer so you don't have to sign up.

Great, already got an account there, no need to send me anything. I will reply later with more info about this.
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 15, 2013, 11:10:10 PM
Last edit: November 15, 2013, 11:32:17 PM by moderate
 #7

Here's a demo account for testing:
http://www.fxcm.co.uk/forex-trading-demo/

I'll send you my login and the server address in an hour when I get to the other computer so you don't have to sign up.

Great, already got an account there, no need to send me anything. I will reply later with more info about this.

I spoke too soon here, my account cannot ever manage to logon through FIX. If you have an account there that can do that, I will need it to continue, you can PM me the details.

Right now I'm connecting to fixdemo.fxcorporate.com at port 8007, using the credentials from the demo account, TargetSubID=U100D1, SenderCompID=client1, TargetCompID=FXCM. If you have used FIX you know that to logon I will need proper values for these last 3. What I'm getting right now using QuickFix through the Python API:

Code:
$ python app.py quickfix.cfg 
create FIX.4.4:client1->FXCM
<20131115-23:08:12.024, FIX.4.4:client1->FXCM, event>
  (Created session)
<20131115-23:08:12.035, FIX.4.4:client1->FXCM, event>
  (Connecting to fixdemo.fxcorporate.com on port 8007)
toAdmin 8=FIX.4.49=7235=A34=149=client152=20131115-23:08:12.34056=FXCM98=0108=30141=Y10=255 FIX.4.4:client1->FXCM
<20131115-23:08:12.341, FIX.4.4:client1->FXCM, outgoing>
  (8=FIX.4.49=8235=A34=149=client152=20131115-23:08:12.34056=FXCM57=U100D198=0108=30141=Y10=005)
<20131115-23:08:12.341, FIX.4.4:client1->FXCM, event>
  (Initiated logon request)
<20131115-23:08:12.497, FIX.4.4:client1->FXCM, event>
  (Socket Error: Connection reset by peer.)
<20131115-23:08:12.497, FIX.4.4:client1->FXCM, event>
  (Disconnecting)
logout FIX.4.4:client1->FXCM

I also tried detecting a logon message in the toAdmin callback and pass the username/pwd there, but it fails in the same way. So yes, it seems I cannot connect to their FIX server with this demo account and the IDs mentioned earlier.

EDIT: Now they are closed for maintenance, reopen on Sunday. Cool time wasted.
sega01
Sr. Member
****
Offline Offline

Activity: 391
Merit: 333



View Profile
November 16, 2013, 12:47:29 AM
 #8

Hi Jago!

Not certain if this is exactly what you want or not, but here is what I have in Bash:

Code:
0 $ function forex() { curl -s -X POST -H "Content-Type: application/json" http://www.forex.com/UIService.asmx/GetUserRates7 | tr '{' '\n' | grep "$1" | cut -d '"' -f 8; }
0 $ forex XAU/USD
1289.98
0 $ forex EUR/USD
1.34950
0 $ forex USD/CAD
1.04379

I can extend that further if you like. I know it's dead simple, but I like simple solutions when they solve the problem Smiley.

--Teran
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 16, 2013, 01:19:33 AM
 #9

Hi Jago!

Not certain if this is exactly what you want or not


Right from the title: FIX. That is a very well known and used protocol.

Now if he doesn't know what FIX is and just decided to add it to the title, then I'm hopeless.
jago25_98 (OP)
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 16, 2013, 09:19:51 PM
 #10

Thanks sega, that's a handy function but I'm going to need the ability to place orders too. I didn't know about that public feed - good to know :-)

Moderate, all I know is that FIX is a standardised financial protocol so I'm hoping that any implementation would make me less tied to FXCM.

The end goal at a minimum is to be able to get a price and place a trade according to that price. The problem with pending orders is that they get hunted with deliberately erroneous data and spread widening. Similar for stop loss points and take profit points.

Once I have the basic functions I'll be then using it in bash scripts - hopefully I can take it from there.

hmm, digging in it seems one has to subscribe to get API FIX access?
http://www.dailyfx.com/forex_forum/fix-api-support/588820-how-get-access-fxcm-using-fix-protocal.html
I will ask them to enable my demo account and if they can do that I'll forward details

More info:
http://www.dailyfx.com/forex_forum/fix-api-support/453300-fix-documentation-subscribe-updates.html

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 16, 2013, 10:33:59 PM
 #11

How can I send you a .tar.gz ? I've seen these links you mentioned but you will quickly realize that all that matters from them is already in this .tar.gz and the rest does not apply for demo accounts at all. Their forum contains zero information on how to use FIX with demo accounts. If this is not supposed to be closed code, then just tell me so I paste the link here.

EDIT: sent link in a PM.
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 18, 2013, 02:04:45 AM
 #12

As mentioned in the last PM exchanged, I'm no longer interested in providing this for 0.25 BTC for a couple of reasons, one of them mentioned in one of his PMs, and others due to the replies made here that made void my initial conditions.

The link for a page with the .tar.gz sent is at https://hidemyass.com/files/zMSIj/, it contains basic code, basic quickfix configuration file and a specification for accessing FXCM through FIX -- this is provided by FXCM itself if you look for it. If someone wants to continue from there, feel free to do it.
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 19, 2013, 08:50:16 PM
 #13

After some others PMs the OP demonstrated interest in continuing with this and now working code that solves the original request has been sent, waiting for update.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!