trades

package
v0.0.0-...-3bddcd1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASEURL = "https://api.bitbank.cc/"
	VERSION = "v1"
	PATH    = "user/spot/trade_history"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Token  string
	Secret string

	Body string
}

func (*Request) Get

func (p *Request) Get() (Trades, error)

func (*Request) Set

func (p *Request) Set(s *Setter)

type Response

type Response struct {
	Success int `json:"success"`
	Data    struct {
		Code   int    `json:"code"`
		Trades Trades `json:"trades"`
	} `json:"data"`
}

type Setter

type Setter struct {
	Pair        string  `json:"pair" url:"pair,omitempty"`
	OrderID     float64 `json:"order_id" url:"order_id,omitempty"`
	Count       float64 `json:"count" url:"count,omitempty"`
	Since       int64   `json:"since" url:"since,omitempty"`
	End         int64   `json:"end" url:"end,omitempty"`
	IsSortUpper string  `json:"order" url:"order,omitempty"`
}

type Trade

type Trade struct {
	TradeID        int        `json:"trade_id"`
	Pair           string     `json:"pair"`
	OrderID        int        `json:"order_id"`
	Side           string     `json:"side"`
	Type           string     `json:"type"`
	Amount         float64    `json:"amount,string"`
	Price          float64    `json:"price,string"`
	MakerTaker     float64    `json:"maker_taker,string"`
	FeeAmountBase  float64    `json:"fee_amount_base,string"`
	FeeAmountQuote float64    `json:"fee_amount_quote,string"`
	ExecutedAt     types.Time `json:"executed_at"`
}

type Trades

type Trades []Trade

Jump to

Keyboard shortcuts

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