subaccount

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BaseURL       = "https://api.binance.com"
	ServerTimeURL = "https://api.binance.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetBalance

type AssetBalance struct {
	Asset       string `json:"asset"`
	Free        string `json:"free"`
	Locked      string `json:"locked"`
	Freeze      string `json:"freeze"`
	Withdrawing string `json:"withdrawing"`
}

type AssetsResponse

type AssetsResponse struct {
	Balances []AssetBalance `json:"balances"`
}

type Client

type Client struct {
	BaseURL           string
	ServerTimeBaseURL string
	APIKey            string
	SecretKey         string
	HTTPClient        *http.Client
}

func NewClient

func NewClient() *Client

func (*Client) FuturesTransfer

func (c *Client) FuturesTransfer(ctx context.Context, email, asset, amount string, transferType int) (*FuturesTransferResponse, error)

func (*Client) GetAssetsV4

func (c *Client) GetAssetsV4(ctx context.Context, email string) (*AssetsResponse, error)

func (*Client) GetSpotAssetsSummary

func (c *Client) GetSpotAssetsSummary(ctx context.Context, email string, page, size int) (*SpotAssetsSummary, error)

func (*Client) UniversalTransfer

func (*Client) WithBaseURL

func (c *Client) WithBaseURL(baseURL string) *Client

func (*Client) WithCredentials

func (c *Client) WithCredentials(apiKey, secretKey string) *Client

func (*Client) WithServerTimeBaseURL

func (c *Client) WithServerTimeBaseURL(baseURL string) *Client

type FuturesTransferResponse

type FuturesTransferResponse struct {
	TxnID string `json:"txnId"`
}

type SpotAssetsSummary

type SpotAssetsSummary struct {
	TotalCount                  int                    `json:"totalCount"`
	MasterAccountTotalAsset     string                 `json:"masterAccountTotalAsset"`
	SpotSubUserAssetBTCVOList   []SpotSubAccountAsset  `json:"spotSubUserAssetBtcVoList"`
	SpotSubUserAssetBtcVOList   []SpotSubAccountAsset  `json:"spotSubUserAssetBTCVoList"`
	SpotSubUserAssetBTCVoListV2 []SpotSubAccountAsset  `json:"spotSubUserAssetBtcVoListV2"`
	Extra                       map[string]interface{} `json:"-"`
}

type SpotSubAccountAsset

type SpotSubAccountAsset struct {
	Email      string `json:"email"`
	TotalAsset string `json:"totalAsset"`
}

type UniversalTransferRequest

type UniversalTransferRequest struct {
	FromEmail       string
	ToEmail         string
	FromAccountType string
	ToAccountType   string
	ClientTranID    string
	Symbol          string
	Asset           string
	Amount          string
}

type UniversalTransferResponse

type UniversalTransferResponse struct {
	TranID       int64  `json:"tranId"`
	ClientTranID string `json:"clientTranId"`
}

Jump to

Keyboard shortcuts

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