go_gdax_fix

package module
v0.0.0-...-f0c9701 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2018 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go_gdax_fix

Go (golang) FIX Client for the Coinbase GDAX API https://www.gdax.com.

Why:

https://docs.gdax.com/#rate-limits

FINANCIAL INFORMATION EXCHANGE API The FIX API throttles the number of incoming messages to 50 commands per second.

vs

PRIVATE ENDPOINTS We throttle private endpoints by user ID: 5 requests per second, up to 10 requests per second in bursts.

Run

  • Replace <GDAX_KEY> in client.template.cfg with your GDAX key, then rename client.template.cfg to client.cfg.
  • Set GDAX_SECRET, GDAX_KEY and GDAX_PASSPHRASE in .env.template, then rename .env.template to .env.
  • make run.
  • An attempt to login is made. A logon message will be received, if and only if you successfully login, otherwise a logout occurs.
  • After logon is received a single sell order is placed, see the function sendNewOrder. You should see a new message in the log with 35=8, where 35 is type and 8 is the value, in this case it is the Execution Report (https://docs.gdax.com/#execution-report-8).
INFO[0000] TradeClient:OnCreate                          sessionID="..."
INFO[0000] TradeClient:ToAdmin                           msg="..." sessionID="..."
INFO[0000] TradeClient:FromAdmin                         msg="..." sessionID="..."
INFO[0000] TradeClient:OnLogon                           sessionID="..."
^Csignal: interrupt

Thanks to: https://github.com/quickfixgo/quickfix.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TradeClient

type TradeClient struct {
}

TradeClient implements the quickfix.Application interface

func (*TradeClient) FromAdmin

func (e *TradeClient) FromAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) (reject quickfix.MessageRejectError)

FromAdmin implemented as part of Application interface

func (*TradeClient) FromApp

func (e *TradeClient) FromApp(msg *quickfix.Message, sessionID quickfix.SessionID) (reject quickfix.MessageRejectError)

FromApp implemented as part of Application interface. This is the callback for all Application level messages from the counter party.

func (*TradeClient) OnCreate

func (e *TradeClient) OnCreate(sessionID quickfix.SessionID)

OnCreate implemented as part of Application interface

func (*TradeClient) OnLogon

func (e *TradeClient) OnLogon(sessionID quickfix.SessionID)

OnLogon implemented as part of Application interface

func (*TradeClient) OnLogout

func (e *TradeClient) OnLogout(sessionID quickfix.SessionID)

OnLogout implemented as part of Application interface

func (*TradeClient) ToAdmin

func (e *TradeClient) ToAdmin(msg *quickfix.Message, sessionID quickfix.SessionID)

ToAdmin implemented as part of Application interface

func (*TradeClient) ToApp

func (e *TradeClient) ToApp(msg *quickfix.Message, sessionID quickfix.SessionID) (err error)

ToApp implemented as part of Application interface

Directories

Path Synopsis
cmd
go_gdax_fix command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址