coinbase

package
v0.0.0-...-78b482a Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coinbase

type Coinbase struct {
	APIKey    string
	APISecret string
}

Coinbase represents a client that is able to talk to the coinbase advanced trading api.

func NewCoinbase

func NewCoinbase() (*Coinbase, error)

NewCoinbase acts as the default constructor for the Coinbase exchange type. This method will attempt to load authentication credentials from the environment, returning an error if any are missing.

func (*Coinbase) CancelOrders

func (e *Coinbase) CancelOrders(ctx context.Context, orderID ...string) error

func (*Coinbase) CreateLimitOrder

func (e *Coinbase) CreateLimitOrder(ctx context.Context, order ordergo.Limit) (ordergo, error)

func (*Coinbase) GetBalance

func (e *Coinbase) GetBalance(ctx context.Context, asset trading.Asset) (int64, error)

func (*Coinbase) GetLastPrice

func (e *Coinbase) GetLastPrice(ctx context.Context, p trading.Pair) (string, error)

GetLastPrice obtains the last price for the pair on binance.

func (*Coinbase) ListOpenOrders

func (e *Coinbase) ListOpenOrders(ctx context.Context) ([]ordergo, error)

Jump to

Keyboard shortcuts

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