bigone

package
v0.0.0-...-1eb6656 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: MIT Imports: 17 Imported by: ? modules, 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.

Documentation

Overview

Package bigone bigone rest api package

Index

Constants

View Source
const (
	RestHost = "api.big.one"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL        url.URL
	HTTPClient *http.Client
	ApiKey     string
}

Client BigONE client

func New

func New(apiKey string) *Client

New creates a new BigONE Client

func (*Client) CancelOrder

func (c *Client) CancelOrder(ctx context.Context, base string, quote string, orderID string) error

CancelOrder Cancel an Order for DELETE https://api.big.one/orders/{id}

func (*Client) GetAccount

func (c *Client) GetAccount(ctx context.Context) ([]model.Balance, error)

GetAccount List Accounts of Current User, for GET https://api.big.one/accounts

func (*Client) GetDepth

func (c *Client) GetDepth(ctx context.Context, base string, quote string) (*model.OrderBook, error)

GetDepth Order book, for GET https://api.big.one/markets/{symbol}/book

func (*Client) GetOrder

func (c *Client) GetOrder(ctx context.Context, base string, quote string, orderID string) (*model.BigONEOrder, error)

GetOrder Check an order's status, for GET /api/v3/order

func (*Client) GetOrders

func (c *Client) GetOrders(ctx context.Context, base string, quote string, limit int64) ([]model.BigONEOrder, error)

GetOrders Get all open orders on a symbol, for GET /orders{?market,limit}

func (*Client) GetTicker

func (c *Client) GetTicker(ctx context.Context, base string, quote string) (*model.BigONETicker, error)

GetTicker Get a Market, for GET https://api.big.one/markets/{symbol}

func (*Client) GetTrades

func (c *Client) GetTrades(ctx context.Context, base string, quote string) ([]model.BigONETrade, error)

GetTrades List Trades in the Market, for GET https://api.big.one/markets/{symbol}/trades

func (*Client) Trade

func (c *Client) Trade(ctx context.Context, base string, quote string, side string, quantity float64, price float64) (string, error)

Trade Create an Order, side: BID or ASK, for POST https://api.big.one/orders

Jump to

Keyboard shortcuts

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