rest

package
v0.0.0-...-4022ae6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestBaseEndpoint  = "https://api.binance.com"
	RestBaseEndpoint1 = "https://api1.binance.com"
	RestBaseEndpoint2 = "https://api2.binance.com"
	RestBaseEndpoint3 = "https://api3.binance.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BinanceRest

type BinanceRest struct {
	// contains filtered or unexported fields
}

func New

func New(config *Configuration) *BinanceRest

func (*BinanceRest) GetBalance

func (ex *BinanceRest) GetBalance() interface{}

func (*BinanceRest) GetPair

func (b *BinanceRest) GetPair(args ...string) string

type Configuration

type Configuration struct {
	Addr      string `json:"addr"`
	ApiKey    string `json:"api_key"`
	SecretKey string `json:"secret_key"`
	DebugMode bool   `json:"debug_mode"`
}

type WalletBalance

type WalletBalance struct {
	MakerCommission  int       `json:"makerCommission"`
	TakerCommission  int       `json:"takerCommission"`
	BuyerCommission  int       `json:"buyerCommission"`
	SellerCommission int       `json:"sellerCommission"`
	CanTrade         bool      `json:"canTrade"`
	CanWithdraw      bool      `json:"canWithdraw"`
	CanDeposit       bool      `json:"canDeposit"`
	Brokered         bool      `json:"brokered"`
	UpdateTime       int       `json:"updateTime"`
	AccountType      string    `json:"accountType"`
	Balances         []balance `json:"balances"`
	Permissions      []string  `json:"permissions"`
}

func BinanceToWalletBalance

func BinanceToWalletBalance(data interface{}) (WalletBalance, bool)

Jump to

Keyboard shortcuts

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