FIX Market Data 5.0

I am trying to LOGON to tcp+ssl://fix-md.sandbox.exchange.coinbase.com:6121 but I get a LOGOUT message with 58=INVALID_PERMISSION.

I have successfully used these credentials with the REST API, and I am pretty sure the key/passphrase/secret I have should work. And also that I am signing correctly (with hmac and the secret) etc.

I think that maybe my prehash text is incorrect. The FIX Market Data 5.0 docs refer to the REST docs for how to create the signature, however the REST API says to use things like GET/POST and the request path etc.

So what exactly is the format of the prehash string? From other FIX sources, I thought it might be something like:

(time in seconds from epoch) + “A” + “1” + SenderCompID (api key) + TargetCompID (Coinbase) + passphrase

but this is not working.

Have you been able to resolve this issue? I am not even able to receive an error message after sending the LOGON.

Yeah. In my case the permissions on the key were incorrect.

I think that if you are not getting a response at all, that means that there is something wrong with the message.

Before sending the message, you need a TCP connection and a successful handshake.

then when you send the LOGON message make sure that:

  • prehash is correct: time + A + “1” + “api key” + “Coinbase” + “passphrase”
  • the time format is like this: 20240226-20:56:07.083 (millisecond precision)
  • the strings in the prehash are joined by the SOH character: \x01 or 0x01 or whatever
  • in header you have 8=FIXT1.1
  • in body you have 1137=9
  • time is the same in prehash as in the tag 52
  • don’t repeat fields (ie. 35=A should only appear once in the message, etc)
  • you may want to try having the fields in order, but I don’t know if this matters