transaction

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASEURL = "https://public.bitbank.cc/"
	PATH    = "transactions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	// btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc
	Pair string
	// YYYMMDD string
	AtDate string
}

func (*Request) Get

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

func (*Request) Set

func (p *Request) Set(pair string, op ...interface{})

Set pair string

type Response

type Response struct {
	Success int `json:"success"`
	Data    struct {
		Code         int
		Transactions Transactions `json:"transactions"`
	} `json:"data"`
}

type Transaction

type Transaction struct {
	TransactionID int        `json:"transaction_id"`
	Side          string     `json:"side"`
	Price         float64    `json:"price,string"`
	Amount        float64    `json:"amount,string"`
	ExecutedAt    types.Time `json:"executed_at"`
}

type Transactions

type Transactions []Transaction

Jump to

Keyboard shortcuts

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