bigone

package
v0.0.0-...-a58d1de Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 17 Imported by: 4

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, quote string, base 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, quote string, base 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, quote string, base 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, quote string, base 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, quote string, base 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, quote string, base 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, quote string, base 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