Bitcoin Forum
June 29, 2024, 08:27:03 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Services / Re: Paying 0.03 BTC for Python FIX API client GDAX on: February 03, 2018, 11:50:39 PM
I'm also looking to collaborate on this project and I have some funds to throw around.

I am using PyFIX and I have full connectivity up to the login phase.  No matter what I do I'm unable to get a successful login.  Here is the code i'm currently using to generating my login message.  Everything looks good on the wire.

Code:
    def logon():
        timestamp = datetime.utcnow().strftime("%Y%m%d-%H:%M:%S.%f")[:-3]
        # pseudo code for message because the blog won't let me paste the actual char command, replace chr1 with chr function and send it a 1
        message = timestamp + chr1 + 'A' + chr1 + '1' + chr1 + 'api_key' + chr1 + 'Coinbase' + chr1 + 'passphrase'
        hmac_key = base64.b64decode('api_secret_key')
        signature = hmac.new(hmac_key, message, hashlib.sha256)
        signature_b64 = signature.digest().encode('base64').rstrip('\n')
        msg = FIXMessage(msgtype.LOGON)
        msg.setField(fixtags.Password, 'passphrase')
        msg.setField(fixtags.RawData, signature_b64)
        msg.setField(fixtags.EncryptMethod, 0)
        msg.setField(fixtags.HeartBtInt, 30)

The message I'm getting back from the server is saying that there's something wrong with the signature and the specific failure id is MsgType=3, SessionRejectReason=5 which translates to "Value is incorrect (out of range) for this tag".

Thanks for the help!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!