Documentation
¶
Index ¶
- Constants
- type AccountResponse
- type AccountType
- type AssetConfig
- type Balance
- type Client
- func (c *Client) GetAccount(args *GetAccountRequest) (*AccountResponse, error)
- func (c *Client) GetAssetConfig(args *GetAssetConfigRequest) ([]AssetConfig, error)
- func (c *Client) GetCryptoWithdrawalHistory(args *GetCryptoWithdrawalHistoryRequest) ([]CryptoWithdrawalRecord, error)
- func (c *Client) GetDepositAddress(args *GetDepositAddressRequest) (*DepositAddressResponse, error)
- func (c *Client) GetFiatWithdrawalHistory(args *FiatWithdrawalHistoryRequest) (*FiatWithdrawalHistoryResponse, error)
- func (c *Client) Request(method, path string, body interface{}, output interface{}, query url.Values) ([]byte, error)
- func (c *Client) SubAccountTransfer(args *SubAccountTransferRequest) (*SubAccountTransferResponse, error)
- func (c *Client) WithdrawCrypto(args *WithdrawRequest) (*WithdrawResponse, error)
- type CommissionRates
- type CryptoWithdrawalRecord
- type DepositAddressResponse
- type FiatWithdrawalHistoryRequest
- type FiatWithdrawalHistoryResponse
- type FiatWithdrawalRecord
- type GetAccountRequest
- type GetAssetConfigRequest
- type GetCryptoWithdrawalHistoryRequest
- type GetDepositAddressRequest
- type NetworkConfig
- type SubAccountTransferRequest
- type SubAccountTransferResponse
- type WithdrawRequest
- type WithdrawResponse
- type WithdrawalStatus
Constants ¶
View Source
const (
BaseURL = "https://api.binance.us"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountResponse ¶
type AccountResponse struct {
MakerCommission int `json:"makerCommission"`
TakerCommission int `json:"takerCommission"`
BuyerCommission int `json:"buyerCommission"`
SellerCommission int `json:"sellerCommission"`
CommissionRates CommissionRates `json:"commissionRates"`
CanTrade bool `json:"canTrade"`
CanWithdraw bool `json:"canWithdraw"`
CanDeposit bool `json:"canDeposit"`
Brokered bool `json:"brokered"`
RequireSelfTradePrevention bool `json:"requireSelfTradePrevention"`
UpdateTime int64 `json:"updateTime"`
AccountType AccountType `json:"accountType"`
Balances []Balance `json:"balances"`
Permissions []string `json:"permissions"`
}
type AssetConfig ¶
type AssetConfig struct {
Coin oc.SymbolId `json:"coin"`
DepositAllEnable bool `json:"depositAllEnable"`
WithdrawAllEnable bool `json:"withdrawAllEnable"`
Name string `json:"name"`
Free oc.Amount `json:"free"`
Locked oc.Amount `json:"locked"`
Freeze oc.Amount `json:"freeze"`
Withdrawing oc.Amount `json:"withdrawing"`
Ipoing oc.Amount `json:"ipoing"`
Ipoable oc.Amount `json:"ipoable"`
Storage oc.Amount `json:"storage"`
IsLegalMoney bool `json:"isLegalMoney"`
Trading bool `json:"trading"`
NetworkList []NetworkConfig `json:"networkList"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetAccount ¶
func (c *Client) GetAccount(args *GetAccountRequest) (*AccountResponse, error)
https://docs.binance.us/#get-current-account-information-user_data
func (*Client) GetAssetConfig ¶
func (c *Client) GetAssetConfig(args *GetAssetConfigRequest) ([]AssetConfig, error)
func (*Client) GetCryptoWithdrawalHistory ¶
func (c *Client) GetCryptoWithdrawalHistory(args *GetCryptoWithdrawalHistoryRequest) ([]CryptoWithdrawalRecord, error)
GetCryptoWithdrawalHistory retrieves crypto withdrawal history
func (*Client) GetDepositAddress ¶
func (c *Client) GetDepositAddress(args *GetDepositAddressRequest) (*DepositAddressResponse, error)
func (*Client) GetFiatWithdrawalHistory ¶
func (c *Client) GetFiatWithdrawalHistory(args *FiatWithdrawalHistoryRequest) (*FiatWithdrawalHistoryResponse, error)
GetFiatWithdrawalHistory retrieves fiat withdrawal history
func (*Client) SubAccountTransfer ¶
func (c *Client) SubAccountTransfer(args *SubAccountTransferRequest) (*SubAccountTransferResponse, error)
SubAccountTransfer executes an asset transfer between the master account and a sub-account https://docs.binance.us/#execute-sub-account-transfer
func (*Client) WithdrawCrypto ¶
func (c *Client) WithdrawCrypto(args *WithdrawRequest) (*WithdrawResponse, error)
type CommissionRates ¶
type CryptoWithdrawalRecord ¶
type CryptoWithdrawalRecord struct {
Id string `json:"id"`
Amount oc.Amount `json:"amount"`
TransactionFee oc.Amount `json:"transactionFee"`
Coin oc.SymbolId `json:"coin"`
Status WithdrawalStatus `json:"status"`
Address oc.Address `json:"address"`
ApplyTime string `json:"applyTime"`
Network oc.NetworkId `json:"network"`
TransferType int `json:"transferType"`
TxId client.TransactionId `json:"txId"`
}
type DepositAddressResponse ¶
type FiatWithdrawalHistoryRequest ¶
type FiatWithdrawalHistoryRequest struct {
FiatCurrency string `json:"fiatCurrency,omitempty"`
OrderId string `json:"orderId,omitempty"`
Offset *int `json:"offset,omitempty"`
PaymentChannel string `json:"paymentChannel,omitempty"`
PaymentMethod string `json:"paymentMethod,omitempty"`
StartTime *int64 `json:"startTime,omitempty"`
EndTime *int64 `json:"endTime,omitempty"`
RecvWindow *int64 `json:"recvWindow,omitempty"`
}
type FiatWithdrawalHistoryResponse ¶
type FiatWithdrawalHistoryResponse struct {
AssetLogRecordList []FiatWithdrawalRecord `json:"assetLogRecordList"`
}
type FiatWithdrawalRecord ¶
type FiatWithdrawalRecord struct {
OrderId string `json:"orderId"`
PaymentAccount string `json:"paymentAccount"`
PaymentChannel string `json:"paymentChannel"`
PaymentMethod string `json:"paymentMethod"`
OrderStatus string `json:"orderStatus"`
Amount string `json:"amount"`
TransactionFee string `json:"transactionFee"`
PlatformFee string `json:"platformFee"`
}
type GetAccountRequest ¶
type GetAssetConfigRequest ¶
type GetCryptoWithdrawalHistoryRequest ¶
type GetCryptoWithdrawalHistoryRequest struct {
Coin *oc.SymbolId `json:"coin,omitempty"`
WithdrawOrderId string `json:"withdrawOrderId,omitempty"`
Status *WithdrawalStatus `json:"status,omitempty"`
StartTime *int64 `json:"startTime,omitempty"`
EndTime *int64 `json:"endTime,omitempty"`
Offset *int `json:"offset,omitempty"`
Limit *int `json:"limit,omitempty"`
RecvWindow *int64 `json:"recvWindow,omitempty"`
TimestampMillis int64 `json:"timestamp,omitempty"`
}
type NetworkConfig ¶
type NetworkConfig struct {
Network oc.NetworkId `json:"network"`
Coin oc.SymbolId `json:"coin"`
WithdrawIntegerMultiple string `json:"withdrawIntegerMultiple"`
IsDefault bool `json:"isDefault"`
DepositEnable bool `json:"depositEnable"`
WithdrawEnable bool `json:"withdrawEnable"`
DepositDesc string `json:"depositDesc"`
WithdrawDesc string `json:"withdrawDesc"`
Name string `json:"name"`
ResetAddressStatus bool `json:"resetAddressStatus"`
AddressRegex string `json:"addressRegex,omitempty"`
MemoRegex string `json:"memoRegex,omitempty"`
WithdrawFee string `json:"withdrawFee"`
WithdrawMin string `json:"withdrawMin"`
WithdrawMax string `json:"withdrawMax"`
MinConfirm int `json:"minConfirm,omitempty"`
UnLockConfirm int `json:"unLockConfirm,omitempty"`
SpecialTips string `json:"specialTips,omitempty"`
}
type WithdrawRequest ¶
type WithdrawRequest struct {
Coin oc.SymbolId `json:"coin"`
Network oc.NetworkId `json:"network"`
WithdrawOrderId string `json:"withdrawOrderId,omitempty"`
Address oc.Address `json:"address"`
AddressTag string `json:"addressTag,omitempty"`
Amount oc.Amount `json:"amount"`
RecvWindow *int64 `json:"recvWindow,omitempty"`
TimestampMillis int64 `json:"timestamp,omitempty"`
}
type WithdrawResponse ¶
type WithdrawResponse struct {
Id string `json:"id"`
}
type WithdrawalStatus ¶
type WithdrawalStatus int
const ( WithdrawalStatusEmailSent WithdrawalStatus = 0 WithdrawalStatusCanceled WithdrawalStatus = 1 WithdrawalStatusAwaitingApproval WithdrawalStatus = 2 WithdrawalStatusRejected WithdrawalStatus = 3 WithdrawalStatusProcessing WithdrawalStatus = 4 WithdrawalStatusFailure WithdrawalStatus = 5 WithdrawalStatusCompleted WithdrawalStatus = 6 )
func (WithdrawalStatus) String ¶
func (s WithdrawalStatus) String() string
Click to show internal directories.
Click to hide internal directories.