This is a simple example application that demonstrates how to connect to Coinbase Pro using the FIX API and Philadelphia, an open source FIX engine for the JVM.
Building and running this application requires Java Development Kit (JDK) 11 or newer and Maven.
To build and run the application, follow these steps:
-
Install stunnel, for example, using Homebrew:
brew install stunnel
-
Download the TLS certificate:
openssl s_client -showcerts -connect fix.pro.coinbase.com:4198 < /dev/null | \ openssl x509 -outform PEM > fix.pro.coinbase.com.pem
-
Build the application:
mvn package
-
Create a configuration file,
etc/example.conf
:cp etc/example.conf.template etc/example.conf
-
Fill in the API passphrase, key, and secret in the configuration file,
etc/example.conf
. -
Start stunnel:
stunnel etc/stunnel.conf
-
Run the application:
java -jar coinbase-fix-example.jar etc/example.conf
The application logs onto Coinbase Pro and immediately logs out.
Copyright 2017 Jussi Virtanen.
Released under the Apache License, Version 2.0. See LICENSE.txt
for details.