rest

package
v0.0.0-...-dc0a48c Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Status  uint32
	Message string
}

APIError return the api error

func (APIError) Error

func (e APIError) Error() string

Error return the error message

type Client

type Client struct {
	Auth *auth.Config

	HTTPC *http.Client
}

func New

func New(auth *auth.Config) *Client

func (*Client) Assets

func (p *Client) Assets(req *assets.Request) (*assets.Response, error)

func (*Client) Cancel

func (*Client) Candle

func (p *Client) Candle(req *candle.Request) (*candle.Response, error)

func (*Client) CreateOrder

func (*Client) Depth

func (p *Client) Depth(req *depth.Request) (*depth.Response, error)

func (*Client) FetchDeposits

func (p *Client) FetchDeposits(req *deposit.Request) (*deposit.Response, error)

func (*Client) FetchOrders

func (*Client) FetchTrades

func (p *Client) FetchTrades(req *trades.Request) (*trades.Response, error)

func (*Client) Order

func (p *Client) Order(req *orders.Request) (*orders.Response, error)

func (*Client) Pairs

func (p *Client) Pairs(req *pairs.Request) (*pairs.Response, error)

func (*Client) Ticker

func (p *Client) Ticker(req *ticker.Request) (*ticker.Response, error)

func (*Client) Tickers

func (*Client) TickersJPY

func (*Client) Transactions

func (p *Client) Transactions(req *transactions.Request) (*transactions.Response, error)

type Requester

type Requester interface {
	Endpoint() string
	IsAuth() bool
	Path() string
	Method() string
	Query() string
	Payload() []byte
}

type Response

type Response struct {
	Success int8 `json:"success"`
	Data    struct {
		Code uint32 `json:"code"`
	} `json:"data"`
}

Directories

Path Synopsis
private
public

Jump to

Keyboard shortcuts

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