bitbank

package
v0.0.0-...-8cc20f1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package bitbank is a API Client of Bitbank.cc

API document https://docs.bitbank.cc/

Error codes https://docs.bitbank.cc/error_code/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL        *url.URL
	PrivateURL *url.URL
	ApiTokenID string
	ApiSecret  string
	HTTPClient *http.Client
	Logger     *log.Logger
	// contains filtered or unexported fields
}

Main client struct of this package

func NewClient

func NewClient(apiTokenID string, apiSecret string, logger *log.Logger) (*Client, error)

Generate Client with token ID and secret. you can find these infomation in bitbank site.

func (*Client) CancelOrder

func (c *Client) CancelOrder(ctx context.Context, params request.CancelOrderParams) (*models.Order, error)

func (*Client) CancelOrders

func (c *Client) CancelOrders(ctx context.Context, params request.CancelOrdersParams) (*models.Orders, error)

func (*Client) CreateOrder

func (c *Client) CreateOrder(ctx context.Context, params request.CreateOrderParams) (*models.Order, error)

func (*Client) GetActiveOrders

func (c *Client) GetActiveOrders(ctx context.Context, params request.GetActiveOrdersParams) (*models.Orders, error)

func (*Client) GetAssets

func (c *Client) GetAssets(ctx context.Context) (*models.Assets, error)

func (*Client) GetCandlesticks

func (c *Client) GetCandlesticks(ctx context.Context, pair, candleType, ymdString string) (*models.Candlesticks, error)

Get Candlesticks https://docs.bitbank.cc/#!/Candlestick/candlestick

func (*Client) GetDepth

func (c *Client) GetDepth(ctx context.Context, pair string) (*models.Depth, error)

Get Depth https://docs.bitbank.cc/#!/Depth/depth

func (*Client) GetOrder

func (c *Client) GetOrder(ctx context.Context, params request.GetOrderParams) (*models.Order, error)

func (*Client) GetOrdersInfo

func (c *Client) GetOrdersInfo(ctx context.Context, params request.GetOrdersInfoParams) (*models.Orders, error)

func (*Client) GetTicker

func (c *Client) GetTicker(ctx context.Context, pair string) (*models.Ticker, error)

Get Ticker https://docs.bitbank.cc/#!/Ticker/ticker

func (*Client) GetTrades

func (c *Client) GetTrades(ctx context.Context, params request.GetTradeParams) (*models.Trades, error)

func (*Client) GetTransactions

func (c *Client) GetTransactions(ctx context.Context, pair string) (*models.Transactions, error)

Get Transactions https://docs.bitbank.cc/#!/Transactions/transactions

func (*Client) GetTransactionsByYMD

func (c *Client) GetTransactionsByYMD(ctx context.Context, pair, ymdString string) (*models.Transactions, error)

Get Transactions by YYYYMMDD https://docs.bitbank.cc/#!/Transactions/transactions_YYYYMMDD

func (*Client) GetWithdrawalAccounts

func (c *Client) GetWithdrawalAccounts(ctx context.Context, params request.GetWithdrawalAccountsParams) (*models.WithdrawalAccounts, error)

func (*Client) RequestWithdrawal

func (c *Client) RequestWithdrawal(ctx context.Context, params request.RequestWithdrawalParams) (*models.RequestWithdrawal, error)

Directories

Path Synopsis
All return values from Bitbank.cc is set in this package models.
All return values from Bitbank.cc is set in this package models.

Jump to

Keyboard shortcuts

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