binance

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 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 Binance

type Binance struct {
	TXsByCategory wallet.TXsByCategory
	Sources       source.Sources
	// contains filtered or unexported fields
}

func New

func New() *Binance

func (*Binance) GetAPIAllTXs added in v1.2.0

func (b *Binance) GetAPIAllTXs(loc *time.Location)

func (*Binance) MergeTXs added in v1.2.0

func (b *Binance) MergeTXs()

func (*Binance) NewAPI added in v1.2.0

func (b *Binance) NewAPI(apiKey, secretKey string, debug bool)

func (*Binance) ParseCSV

func (b *Binance) ParseCSV(reader io.Reader, extended bool, account string) (err error)

func (*Binance) WaitFinish added in v1.2.0

func (b *Binance) WaitFinish(account string) error

type ErrorResp added in v1.2.0

type ErrorResp struct {
	ID       int64  `json:"id"`
	Method   string `json:"method"`
	Code     int    `json:"code"`
	Message  string `json:"message,omitempty"`
	Original string `json:"original,omitempty"`
}

type GetAssetDividendResp added in v1.2.0

type GetAssetDividendResp struct {
	Rows  Rows `json:"rows"`
	Total int  `json:"total"`
}

type GetDepositHistoryResp added in v1.2.0

type GetDepositHistoryResp []struct {
	Amount       string `json:"amount"`
	Coin         string `json:"coin"`
	Network      string `json:"network"`
	Status       int    `json:"status"`
	Address      string `json:"address"`
	Addresstag   string `json:"addressTag"`
	Txid         string `json:"txId"`
	Inserttime   int64  `json:"insertTime"`
	Transfertype int    `json:"transferType"`
	Confirmtimes string `json:"confirmTimes"`
}

type GetExchangeInfoResp added in v1.2.0

type GetExchangeInfoResp struct {
	Timezone        string        `json:"timezone"`
	Servertime      int64         `json:"serverTime"`
	Ratelimits      []Ratelimits  `json:"rateLimits"`
	Exchangefilters []interface{} `json:"exchangeFilters"`
	Symbols         []Symbols     `json:"symbols"`
}

type GetTradesResp added in v1.2.0

type GetTradesResp []struct {
	Symbol          string `json:"symbol"`
	ID              int    `json:"id"`
	OrderID         int    `json:"orderId"`
	OrderListID     int    `json:"orderListId"`
	Price           string `json:"price"`
	Qty             string `json:"qty"`
	QuoteQty        string `json:"quoteQty"`
	Commission      string `json:"commission"`
	CommissionAsset string `json:"commissionAsset"`
	Time            int64  `json:"time"`
	IsBuyer         bool   `json:"isBuyer"`
	IsMaker         bool   `json:"isMaker"`
	IsBestMatch     bool   `json:"isBestMatch"`
}

type GetWithdrawalHistoryResp added in v1.2.0

type GetWithdrawalHistoryResp []struct {
	ApplyTime       string `json:"applyTime"`
	Amount          string `json:"amount"`
	Coin            string `json:"coin"`
	Network         string `json:"network"`
	Status          int    `json:"status"`
	Address         string `json:"address"`
	ID              string `json:"id"`
	TxID            string `json:"txId"`
	Transfertype    int    `json:"transferType"`
	WithdrawOrderId string `json:"withdrawOrderId"`
}

type Ratelimits added in v1.2.0

type Ratelimits struct {
	Ratelimittype string `json:"rateLimitType"`
	Interval      string `json:"interval"`
	Intervalnum   int    `json:"intervalNum"`
	Limit         int    `json:"limit"`
}

type Rows added in v1.2.0

type Rows []struct {
	Amount  string `json:"amount"`
	Asset   string `json:"asset"`
	DivTime int64  `json:"divTime"`
	Info    string `json:"enInfo"`
	TranID  int64  `json:"tranId"`
}

type Symbols added in v1.2.0

type Symbols struct {
	Symbol                     string   `json:"symbol"`
	Status                     string   `json:"status"`
	Baseasset                  string   `json:"baseAsset"`
	Baseassetprecision         int      `json:"baseAssetPrecision"`
	Quoteasset                 string   `json:"quoteAsset"`
	Quoteprecision             int      `json:"quotePrecision"`
	Quoteassetprecision        int      `json:"quoteAssetPrecision"`
	Basecommissionprecision    int      `json:"baseCommissionPrecision"`
	Quotecommissionprecision   int      `json:"quoteCommissionPrecision"`
	Ordertypes                 []string `json:"orderTypes"`
	Icebergallowed             bool     `json:"icebergAllowed"`
	Ocoallowed                 bool     `json:"ocoAllowed"`
	Quoteorderqtymarketallowed bool     `json:"quoteOrderQtyMarketAllowed"`
	Isspottradingallowed       bool     `json:"isSpotTradingAllowed"`
	Ismargintradingallowed     bool     `json:"isMarginTradingAllowed"`
	Filters                    []struct {
		Filtertype       string `json:"filterType"`
		Minprice         string `json:"minPrice,omitempty"`
		Maxprice         string `json:"maxPrice,omitempty"`
		Ticksize         string `json:"tickSize,omitempty"`
		Multiplierup     string `json:"multiplierUp,omitempty"`
		Multiplierdown   string `json:"multiplierDown,omitempty"`
		Avgpricemins     int    `json:"avgPriceMins,omitempty"`
		Minqty           string `json:"minQty,omitempty"`
		Maxqty           string `json:"maxQty,omitempty"`
		Stepsize         string `json:"stepSize,omitempty"`
		Minnotional      string `json:"minNotional,omitempty"`
		Applytomarket    bool   `json:"applyToMarket,omitempty"`
		Limit            int    `json:"limit,omitempty"`
		Maxnumorders     int    `json:"maxNumOrders,omitempty"`
		Maxnumalgoorders int    `json:"maxNumAlgoOrders,omitempty"`
	} `json:"filters"`
	Permissions []string `json:"permissions"`
}

Jump to

Keyboard shortcuts

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