Documentation ¶
Index ¶
- Constants
- Variables
- func FormatTimestamp(t time.Time) int64
- type APIResponse
- type ApiReferralIfNewUserResponse
- type DepositAddress
- type DepositHistory
- type GetApiReferralIfNewUserRequest
- func (g *GetApiReferralIfNewUserRequest) Do(ctx context.Context) (*ApiReferralIfNewUserResponse, error)
- func (g *GetApiReferralIfNewUserRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetApiReferralIfNewUserRequest) GetParametersJSON() ([]byte, error)
- func (g *GetApiReferralIfNewUserRequest) GetParametersQuery() (url.Values, error)
- func (g *GetApiReferralIfNewUserRequest) GetQueryParameters() (url.Values, error)
- func (g *GetApiReferralIfNewUserRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetApiReferralIfNewUserRequest) GetSlugsMap() (map[string]string, error)
- type GetDepositAddressRequest
- func (g *GetDepositAddressRequest) Coin(coin string) *GetDepositAddressRequest
- func (g *GetDepositAddressRequest) Do(ctx context.Context) (*DepositAddress, error)
- func (g *GetDepositAddressRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetDepositAddressRequest) GetParametersJSON() ([]byte, error)
- func (g *GetDepositAddressRequest) GetParametersQuery() (url.Values, error)
- func (g *GetDepositAddressRequest) GetQueryParameters() (url.Values, error)
- func (g *GetDepositAddressRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetDepositAddressRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetDepositAddressRequest) Network(network string) *GetDepositAddressRequest
- type GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) Coin(coin string) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) Do(ctx context.Context) ([]DepositHistory, error)
- func (g *GetDepositHistoryRequest) EndTime(endTime time.Time) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetDepositHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetDepositHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetDepositHistoryRequest) StartTime(startTime time.Time) *GetDepositHistoryRequest
- type GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) Archived(archived bool) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) Asset(asset string) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) Current(current int) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) Do(ctx context.Context) ([]MarginInterest, error)
- func (g *GetMarginInterestHistoryRequest) EndTime(endTime time.Time) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMarginInterestHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMarginInterestHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMarginInterestHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMarginInterestHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMarginInterestHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMarginInterestHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) Size(size int) *GetMarginInterestHistoryRequest
- func (g *GetMarginInterestHistoryRequest) StartTime(startTime time.Time) *GetMarginInterestHistoryRequest
- type GetMarginInterestRateHistoryRequest
- func (g *GetMarginInterestRateHistoryRequest) Asset(asset string) *GetMarginInterestRateHistoryRequest
- func (g *GetMarginInterestRateHistoryRequest) Do(ctx context.Context) ([]MarginInterestRate, error)
- func (g *GetMarginInterestRateHistoryRequest) EndTime(endTime time.Time) *GetMarginInterestRateHistoryRequest
- func (g *GetMarginInterestRateHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMarginInterestRateHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMarginInterestRateHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMarginInterestRateHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMarginInterestRateHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMarginInterestRateHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMarginInterestRateHistoryRequest) StartTime(startTime time.Time) *GetMarginInterestRateHistoryRequest
- type GetMarginLiquidationHistoryRequest
- func (g *GetMarginLiquidationHistoryRequest) Current(current int) *GetMarginLiquidationHistoryRequest
- func (g *GetMarginLiquidationHistoryRequest) Do(ctx context.Context) ([]MarginLiquidationRecord, error)
- func (g *GetMarginLiquidationHistoryRequest) EndTime(endTime time.Time) *GetMarginLiquidationHistoryRequest
- func (g *GetMarginLiquidationHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMarginLiquidationHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMarginLiquidationHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMarginLiquidationHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMarginLiquidationHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMarginLiquidationHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMarginLiquidationHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginLiquidationHistoryRequest
- func (g *GetMarginLiquidationHistoryRequest) Size(size int) *GetMarginLiquidationHistoryRequest
- func (g *GetMarginLiquidationHistoryRequest) StartTime(startTime time.Time) *GetMarginLiquidationHistoryRequest
- type GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) Archived(archived bool) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) Asset(asset string) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) Current(current int) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) Do(ctx context.Context) ([]MarginLoanRecord, error)
- func (g *GetMarginLoanHistoryRequest) EndTime(endTime time.Time) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMarginLoanHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMarginLoanHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMarginLoanHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMarginLoanHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMarginLoanHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMarginLoanHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) Size(size int) *GetMarginLoanHistoryRequest
- func (g *GetMarginLoanHistoryRequest) StartTime(startTime time.Time) *GetMarginLoanHistoryRequest
- type GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) Archived(archived bool) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) Asset(asset string) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) Current(current int) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) Do(ctx context.Context) ([]MarginRepayRecord, error)
- func (g *GetMarginRepayHistoryRequest) EndTime(endTime time.Time) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMarginRepayHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMarginRepayHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMarginRepayHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMarginRepayHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMarginRepayHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMarginRepayHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) Size(size int) *GetMarginRepayHistoryRequest
- func (g *GetMarginRepayHistoryRequest) StartTime(startTime time.Time) *GetMarginRepayHistoryRequest
- type GetSpotRebateHistoryRequest
- func (g *GetSpotRebateHistoryRequest) Do(ctx context.Context) ([]SpotRebate, error)
- func (g *GetSpotRebateHistoryRequest) EndTime(endTime time.Time) *GetSpotRebateHistoryRequest
- func (g *GetSpotRebateHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetSpotRebateHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetSpotRebateHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetSpotRebateHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetSpotRebateHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetSpotRebateHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetSpotRebateHistoryRequest) StartTime(startTime time.Time) *GetSpotRebateHistoryRequest
- type GetTradeFeeRequest
- func (g *GetTradeFeeRequest) Do(ctx context.Context) ([]TradeFee, error)
- func (g *GetTradeFeeRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetTradeFeeRequest) GetParametersJSON() ([]byte, error)
- func (g *GetTradeFeeRequest) GetParametersQuery() (url.Values, error)
- func (g *GetTradeFeeRequest) GetQueryParameters() (url.Values, error)
- func (g *GetTradeFeeRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetTradeFeeRequest) GetSlugsMap() (map[string]string, error)
- type GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Coin(coin string) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Do(ctx context.Context) ([]WithdrawRecord, error)
- func (g *GetWithdrawHistoryRequest) EndTime(endTime time.Time) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetWithdrawHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetWithdrawHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetWithdrawHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetWithdrawHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetWithdrawHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetWithdrawHistoryRequest) Limit(limit uint64) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Offset(offset uint64) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) StartTime(startTime time.Time) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Status(status WithdrawStatus) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) WithdrawOrderId(withdrawOrderId string) *GetWithdrawHistoryRequest
- type InterestType
- type LoanStatus
- type MarginInterest
- type MarginInterestRate
- type MarginLiquidationRecord
- type MarginLoanRecord
- type MarginRepayRecord
- type OrderStatusType
- type OrderType
- type PagedDataResponse
- type RebateType
- type RepayStatus
- type RestClient
- func (c *RestClient) Auth(key, secret string)
- func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) NewGetApiReferralIfNewUserRequest() *GetApiReferralIfNewUserRequest
- func (c *RestClient) NewGetDepositAddressRequest() *GetDepositAddressRequest
- func (c *RestClient) NewGetDepositHistoryRequest() *GetDepositHistoryRequest
- func (c *RestClient) NewGetMarginInterestHistoryRequest() *GetMarginInterestHistoryRequest
- func (c *RestClient) NewGetMarginInterestRateHistoryRequest() *GetMarginInterestRateHistoryRequest
- func (c *RestClient) NewGetMarginLiquidationHistoryRequest() *GetMarginLiquidationHistoryRequest
- func (c *RestClient) NewGetMarginLoanHistoryRequest() *GetMarginLoanHistoryRequest
- func (c *RestClient) NewGetMarginRepayHistoryRequest() *GetMarginRepayHistoryRequest
- func (c *RestClient) NewGetSpotRebateHistoryRequest() *GetSpotRebateHistoryRequest
- func (c *RestClient) NewGetTradeFeeRequest() *GetTradeFeeRequest
- func (c *RestClient) NewGetWithdrawHistoryRequest() *GetWithdrawHistoryRequest
- func (c *RestClient) NewRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) NewWithdrawRequest() *WithdrawRequest
- func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
- func (c *RestClient) SetTimeOffsetFromServer(ctx context.Context) error
- type RowsResponse
- type SideType
- type SpotRebate
- type TradeFee
- type TransferType
- type WalletType
- type WithdrawRecord
- type WithdrawRequest
- func (w *WithdrawRequest) Address(address string) *WithdrawRequest
- func (w *WithdrawRequest) AddressTag(addressTag string) *WithdrawRequest
- func (w *WithdrawRequest) Amount(amount string) *WithdrawRequest
- func (w *WithdrawRequest) Coin(coin string) *WithdrawRequest
- func (w *WithdrawRequest) Do(ctx context.Context) (*WithdrawResponse, error)
- func (w *WithdrawRequest) GetParameters() (map[string]interface{}, error)
- func (w *WithdrawRequest) GetParametersJSON() ([]byte, error)
- func (w *WithdrawRequest) GetParametersQuery() (url.Values, error)
- func (w *WithdrawRequest) GetQueryParameters() (url.Values, error)
- func (w *WithdrawRequest) GetSlugParameters() (map[string]interface{}, error)
- func (w *WithdrawRequest) GetSlugsMap() (map[string]string, error)
- func (w *WithdrawRequest) Name(name string) *WithdrawRequest
- func (w *WithdrawRequest) Network(network string) *WithdrawRequest
- func (w *WithdrawRequest) TransactionFeeFlag(transactionFeeFlag bool) *WithdrawRequest
- func (w *WithdrawRequest) WalletType(walletType WalletType) *WithdrawRequest
- func (w *WithdrawRequest) WithdrawOrderId(withdrawOrderId string) *WithdrawRequest
- type WithdrawResponse
- type WithdrawStatus
Constants ¶
const ( RebateTypeCommission = 1 RebateTypeReferralKickback = 2 )
const DebugRequestResponse = false
const RestBaseURL = "https://api.binance.com"
const SandboxRestBaseURL = "https://testnet.binance.vision"
const SideTypeBuy = binance.SideTypeBuy
const SideTypeSell = binance.SideTypeSell
Variables ¶
var DefaultHttpClient = &http.Client{
Timeout: defaultHTTPTimeout,
}
Functions ¶
func FormatTimestamp ¶
FormatTimestamp formats a time into Unix timestamp in milliseconds, as requested by Binance.
Types ¶
type APIResponse ¶
type APIResponse struct { Code string `json:"code"` Message string `json:"msg"` Data json.RawMessage `json:"data"` }
type ApiReferralIfNewUserResponse ¶ added in v1.34.0
type DepositAddress ¶
type DepositHistory ¶
type DepositHistory struct { Amount fixedpoint.Value `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 types.MillisecondTimestamp `json:"insertTime"` TransferType int `json:"transferType"` UnlockConfirm int `json:"unlockConfirm"` ConfirmTimes string `json:"confirmTimes"` }
type GetApiReferralIfNewUserRequest ¶ added in v1.34.0
type GetApiReferralIfNewUserRequest struct {
// contains filtered or unexported fields
}
func (*GetApiReferralIfNewUserRequest) Do ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) Do(ctx context.Context) (*ApiReferralIfNewUserResponse, error)
func (*GetApiReferralIfNewUserRequest) GetParameters ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetApiReferralIfNewUserRequest) GetParametersJSON ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetApiReferralIfNewUserRequest) GetParametersQuery ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetApiReferralIfNewUserRequest) GetQueryParameters ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetApiReferralIfNewUserRequest) GetSlugParameters ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetApiReferralIfNewUserRequest) GetSlugsMap ¶ added in v1.34.0
func (g *GetApiReferralIfNewUserRequest) GetSlugsMap() (map[string]string, error)
type GetDepositAddressRequest ¶
type GetDepositAddressRequest struct {
// contains filtered or unexported fields
}
func (*GetDepositAddressRequest) Coin ¶
func (g *GetDepositAddressRequest) Coin(coin string) *GetDepositAddressRequest
func (*GetDepositAddressRequest) Do ¶
func (g *GetDepositAddressRequest) Do(ctx context.Context) (*DepositAddress, error)
func (*GetDepositAddressRequest) GetParameters ¶
func (g *GetDepositAddressRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetDepositAddressRequest) GetParametersJSON ¶
func (g *GetDepositAddressRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetDepositAddressRequest) GetParametersQuery ¶
func (g *GetDepositAddressRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetDepositAddressRequest) GetQueryParameters ¶
func (g *GetDepositAddressRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetDepositAddressRequest) GetSlugParameters ¶
func (g *GetDepositAddressRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetDepositAddressRequest) GetSlugsMap ¶
func (g *GetDepositAddressRequest) GetSlugsMap() (map[string]string, error)
func (*GetDepositAddressRequest) Network ¶
func (g *GetDepositAddressRequest) Network(network string) *GetDepositAddressRequest
type GetDepositHistoryRequest ¶
type GetDepositHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetDepositHistoryRequest) Coin ¶
func (g *GetDepositHistoryRequest) Coin(coin string) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) Do ¶
func (g *GetDepositHistoryRequest) Do(ctx context.Context) ([]DepositHistory, error)
func (*GetDepositHistoryRequest) EndTime ¶
func (g *GetDepositHistoryRequest) EndTime(endTime time.Time) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) GetParameters ¶
func (g *GetDepositHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetDepositHistoryRequest) GetParametersJSON ¶
func (g *GetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetDepositHistoryRequest) GetParametersQuery ¶
func (g *GetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetDepositHistoryRequest) GetQueryParameters ¶
func (g *GetDepositHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetDepositHistoryRequest) GetSlugParameters ¶
func (g *GetDepositHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetDepositHistoryRequest) GetSlugsMap ¶
func (g *GetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetDepositHistoryRequest) StartTime ¶
func (g *GetDepositHistoryRequest) StartTime(startTime time.Time) *GetDepositHistoryRequest
type GetMarginInterestHistoryRequest ¶
type GetMarginInterestHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetMarginInterestHistoryRequest) Archived ¶
func (g *GetMarginInterestHistoryRequest) Archived(archived bool) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) Asset ¶
func (g *GetMarginInterestHistoryRequest) Asset(asset string) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) Current ¶
func (g *GetMarginInterestHistoryRequest) Current(current int) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) Do ¶
func (g *GetMarginInterestHistoryRequest) Do(ctx context.Context) ([]MarginInterest, error)
func (*GetMarginInterestHistoryRequest) EndTime ¶
func (g *GetMarginInterestHistoryRequest) EndTime(endTime time.Time) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) GetParameters ¶
func (g *GetMarginInterestHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMarginInterestHistoryRequest) GetParametersJSON ¶
func (g *GetMarginInterestHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMarginInterestHistoryRequest) GetParametersQuery ¶
func (g *GetMarginInterestHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMarginInterestHistoryRequest) GetQueryParameters ¶
func (g *GetMarginInterestHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMarginInterestHistoryRequest) GetSlugParameters ¶
func (g *GetMarginInterestHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMarginInterestHistoryRequest) GetSlugsMap ¶
func (g *GetMarginInterestHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetMarginInterestHistoryRequest) IsolatedSymbol ¶
func (g *GetMarginInterestHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) Size ¶
func (g *GetMarginInterestHistoryRequest) Size(size int) *GetMarginInterestHistoryRequest
func (*GetMarginInterestHistoryRequest) StartTime ¶
func (g *GetMarginInterestHistoryRequest) StartTime(startTime time.Time) *GetMarginInterestHistoryRequest
type GetMarginInterestRateHistoryRequest ¶
type GetMarginInterestRateHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetMarginInterestRateHistoryRequest) Asset ¶
func (g *GetMarginInterestRateHistoryRequest) Asset(asset string) *GetMarginInterestRateHistoryRequest
func (*GetMarginInterestRateHistoryRequest) Do ¶
func (g *GetMarginInterestRateHistoryRequest) Do(ctx context.Context) ([]MarginInterestRate, error)
func (*GetMarginInterestRateHistoryRequest) EndTime ¶
func (g *GetMarginInterestRateHistoryRequest) EndTime(endTime time.Time) *GetMarginInterestRateHistoryRequest
func (*GetMarginInterestRateHistoryRequest) GetParameters ¶
func (g *GetMarginInterestRateHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMarginInterestRateHistoryRequest) GetParametersJSON ¶
func (g *GetMarginInterestRateHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMarginInterestRateHistoryRequest) GetParametersQuery ¶
func (g *GetMarginInterestRateHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMarginInterestRateHistoryRequest) GetQueryParameters ¶
func (g *GetMarginInterestRateHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMarginInterestRateHistoryRequest) GetSlugParameters ¶
func (g *GetMarginInterestRateHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMarginInterestRateHistoryRequest) GetSlugsMap ¶
func (g *GetMarginInterestRateHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetMarginInterestRateHistoryRequest) StartTime ¶
func (g *GetMarginInterestRateHistoryRequest) StartTime(startTime time.Time) *GetMarginInterestRateHistoryRequest
type GetMarginLiquidationHistoryRequest ¶
type GetMarginLiquidationHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetMarginLiquidationHistoryRequest) Current ¶
func (g *GetMarginLiquidationHistoryRequest) Current(current int) *GetMarginLiquidationHistoryRequest
func (*GetMarginLiquidationHistoryRequest) Do ¶
func (g *GetMarginLiquidationHistoryRequest) Do(ctx context.Context) ([]MarginLiquidationRecord, error)
func (*GetMarginLiquidationHistoryRequest) EndTime ¶
func (g *GetMarginLiquidationHistoryRequest) EndTime(endTime time.Time) *GetMarginLiquidationHistoryRequest
func (*GetMarginLiquidationHistoryRequest) GetParameters ¶
func (g *GetMarginLiquidationHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMarginLiquidationHistoryRequest) GetParametersJSON ¶
func (g *GetMarginLiquidationHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMarginLiquidationHistoryRequest) GetParametersQuery ¶
func (g *GetMarginLiquidationHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMarginLiquidationHistoryRequest) GetQueryParameters ¶
func (g *GetMarginLiquidationHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMarginLiquidationHistoryRequest) GetSlugParameters ¶
func (g *GetMarginLiquidationHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMarginLiquidationHistoryRequest) GetSlugsMap ¶
func (g *GetMarginLiquidationHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetMarginLiquidationHistoryRequest) IsolatedSymbol ¶
func (g *GetMarginLiquidationHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginLiquidationHistoryRequest
func (*GetMarginLiquidationHistoryRequest) Size ¶
func (g *GetMarginLiquidationHistoryRequest) Size(size int) *GetMarginLiquidationHistoryRequest
func (*GetMarginLiquidationHistoryRequest) StartTime ¶
func (g *GetMarginLiquidationHistoryRequest) StartTime(startTime time.Time) *GetMarginLiquidationHistoryRequest
type GetMarginLoanHistoryRequest ¶
type GetMarginLoanHistoryRequest struct {
// contains filtered or unexported fields
}
GetMarginLoanHistoryRequest
txId or startTime must be sent. txId takes precedence. Response in descending order If isolatedSymbol is not sent, crossed margin data will be returned The max interval between startTime and endTime is 30 days. If startTime and endTime not sent, return records of the last 7 days by default Set archived to true to query data from 6 months ago
func (*GetMarginLoanHistoryRequest) Archived ¶
func (g *GetMarginLoanHistoryRequest) Archived(archived bool) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) Asset ¶
func (g *GetMarginLoanHistoryRequest) Asset(asset string) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) Current ¶
func (g *GetMarginLoanHistoryRequest) Current(current int) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) Do ¶
func (g *GetMarginLoanHistoryRequest) Do(ctx context.Context) ([]MarginLoanRecord, error)
func (*GetMarginLoanHistoryRequest) EndTime ¶
func (g *GetMarginLoanHistoryRequest) EndTime(endTime time.Time) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) GetParameters ¶
func (g *GetMarginLoanHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMarginLoanHistoryRequest) GetParametersJSON ¶
func (g *GetMarginLoanHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMarginLoanHistoryRequest) GetParametersQuery ¶
func (g *GetMarginLoanHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMarginLoanHistoryRequest) GetQueryParameters ¶
func (g *GetMarginLoanHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMarginLoanHistoryRequest) GetSlugParameters ¶
func (g *GetMarginLoanHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMarginLoanHistoryRequest) GetSlugsMap ¶
func (g *GetMarginLoanHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetMarginLoanHistoryRequest) IsolatedSymbol ¶
func (g *GetMarginLoanHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) Size ¶
func (g *GetMarginLoanHistoryRequest) Size(size int) *GetMarginLoanHistoryRequest
func (*GetMarginLoanHistoryRequest) StartTime ¶
func (g *GetMarginLoanHistoryRequest) StartTime(startTime time.Time) *GetMarginLoanHistoryRequest
type GetMarginRepayHistoryRequest ¶
type GetMarginRepayHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetMarginRepayHistoryRequest) Archived ¶
func (g *GetMarginRepayHistoryRequest) Archived(archived bool) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) Asset ¶
func (g *GetMarginRepayHistoryRequest) Asset(asset string) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) Current ¶
func (g *GetMarginRepayHistoryRequest) Current(current int) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) Do ¶
func (g *GetMarginRepayHistoryRequest) Do(ctx context.Context) ([]MarginRepayRecord, error)
func (*GetMarginRepayHistoryRequest) EndTime ¶
func (g *GetMarginRepayHistoryRequest) EndTime(endTime time.Time) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) GetParameters ¶
func (g *GetMarginRepayHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMarginRepayHistoryRequest) GetParametersJSON ¶
func (g *GetMarginRepayHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMarginRepayHistoryRequest) GetParametersQuery ¶
func (g *GetMarginRepayHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMarginRepayHistoryRequest) GetQueryParameters ¶
func (g *GetMarginRepayHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMarginRepayHistoryRequest) GetSlugParameters ¶
func (g *GetMarginRepayHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMarginRepayHistoryRequest) GetSlugsMap ¶
func (g *GetMarginRepayHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetMarginRepayHistoryRequest) IsolatedSymbol ¶
func (g *GetMarginRepayHistoryRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) Size ¶
func (g *GetMarginRepayHistoryRequest) Size(size int) *GetMarginRepayHistoryRequest
func (*GetMarginRepayHistoryRequest) StartTime ¶
func (g *GetMarginRepayHistoryRequest) StartTime(startTime time.Time) *GetMarginRepayHistoryRequest
type GetSpotRebateHistoryRequest ¶
type GetSpotRebateHistoryRequest struct {
// contains filtered or unexported fields
}
GetSpotRebateHistoryRequest The max interval between startTime and endTime is 30 days. If startTime and endTime are not sent, the recent 7 days' data will be returned. The earliest startTime is supported on June 10, 2020
func (*GetSpotRebateHistoryRequest) Do ¶
func (g *GetSpotRebateHistoryRequest) Do(ctx context.Context) ([]SpotRebate, error)
func (*GetSpotRebateHistoryRequest) EndTime ¶
func (g *GetSpotRebateHistoryRequest) EndTime(endTime time.Time) *GetSpotRebateHistoryRequest
func (*GetSpotRebateHistoryRequest) GetParameters ¶
func (g *GetSpotRebateHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetSpotRebateHistoryRequest) GetParametersJSON ¶
func (g *GetSpotRebateHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetSpotRebateHistoryRequest) GetParametersQuery ¶
func (g *GetSpotRebateHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetSpotRebateHistoryRequest) GetQueryParameters ¶
func (g *GetSpotRebateHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetSpotRebateHistoryRequest) GetSlugParameters ¶
func (g *GetSpotRebateHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetSpotRebateHistoryRequest) GetSlugsMap ¶
func (g *GetSpotRebateHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetSpotRebateHistoryRequest) StartTime ¶
func (g *GetSpotRebateHistoryRequest) StartTime(startTime time.Time) *GetSpotRebateHistoryRequest
type GetTradeFeeRequest ¶
type GetTradeFeeRequest struct {
// contains filtered or unexported fields
}
func (*GetTradeFeeRequest) Do ¶
func (g *GetTradeFeeRequest) Do(ctx context.Context) ([]TradeFee, error)
func (*GetTradeFeeRequest) GetParameters ¶
func (g *GetTradeFeeRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetTradeFeeRequest) GetParametersJSON ¶
func (g *GetTradeFeeRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTradeFeeRequest) GetParametersQuery ¶
func (g *GetTradeFeeRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTradeFeeRequest) GetQueryParameters ¶
func (g *GetTradeFeeRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTradeFeeRequest) GetSlugParameters ¶
func (g *GetTradeFeeRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetTradeFeeRequest) GetSlugsMap ¶
func (g *GetTradeFeeRequest) GetSlugsMap() (map[string]string, error)
type GetWithdrawHistoryRequest ¶
type GetWithdrawHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetWithdrawHistoryRequest) Coin ¶
func (g *GetWithdrawHistoryRequest) Coin(coin string) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) Do ¶
func (g *GetWithdrawHistoryRequest) Do(ctx context.Context) ([]WithdrawRecord, error)
func (*GetWithdrawHistoryRequest) EndTime ¶
func (g *GetWithdrawHistoryRequest) EndTime(endTime time.Time) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) GetParameters ¶
func (g *GetWithdrawHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetWithdrawHistoryRequest) GetParametersJSON ¶
func (g *GetWithdrawHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetWithdrawHistoryRequest) GetParametersQuery ¶
func (g *GetWithdrawHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetWithdrawHistoryRequest) GetQueryParameters ¶
func (g *GetWithdrawHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetWithdrawHistoryRequest) GetSlugParameters ¶
func (g *GetWithdrawHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetWithdrawHistoryRequest) GetSlugsMap ¶
func (g *GetWithdrawHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetWithdrawHistoryRequest) Limit ¶
func (g *GetWithdrawHistoryRequest) Limit(limit uint64) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) Offset ¶
func (g *GetWithdrawHistoryRequest) Offset(offset uint64) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) StartTime ¶
func (g *GetWithdrawHistoryRequest) StartTime(startTime time.Time) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) Status ¶
func (g *GetWithdrawHistoryRequest) Status(status WithdrawStatus) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) WithdrawOrderId ¶
func (g *GetWithdrawHistoryRequest) WithdrawOrderId(withdrawOrderId string) *GetWithdrawHistoryRequest
type InterestType ¶
type InterestType string
interest type in response has 4 enums: PERIODIC interest charged per hour ON_BORROW first interest charged on borrow PERIODIC_CONVERTED interest charged per hour converted into BNB ON_BORROW_CONVERTED first interest charged on borrow converted into BNB
const ( InterestTypePeriodic InterestType = "PERIODIC" InterestTypeOnBorrow InterestType = "ON_BORROW" InterestTypePeriodicConverted InterestType = "PERIODIC_CONVERTED" InterestTypeOnBorrowConverted InterestType = "ON_BORROW_CONVERTED" )
type LoanStatus ¶
type LoanStatus string
one of PENDING (pending execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account);
const ( LoanStatusPending LoanStatus = "PENDING" LoanStatusConfirmed LoanStatus = "CONFIRMED" LoanStatusFailed LoanStatus = "FAILED" )
const ( RepayStatusPending LoanStatus = "PENDING" RepayStatusConfirmed LoanStatus = "CONFIRMED" RepayStatusFailed LoanStatus = "FAILED" )
type MarginInterest ¶
type MarginInterest struct { IsolatedSymbol string `json:"isolatedSymbol"` Asset string `json:"asset"` Interest fixedpoint.Value `json:"interest"` InterestAccuredTime types.MillisecondTimestamp `json:"interestAccuredTime"` InterestRate fixedpoint.Value `json:"interestRate"` Principal fixedpoint.Value `json:"principal"` Type InterestType `json:"type"` }
MarginInterest is the user margin interest record
type MarginInterestRate ¶
type MarginInterestRate struct { Asset string `json:"asset"` DailyInterestRate fixedpoint.Value `json:"dailyInterestRate"` Timestamp types.MillisecondTimestamp `json:"timestamp"` VipLevel int `json:"vipLevel"` }
type MarginLiquidationRecord ¶
type MarginLiquidationRecord struct { AveragePrice fixedpoint.Value `json:"avgPrice"` ExecutedQuantity fixedpoint.Value `json:"executedQty"` OrderId uint64 `json:"orderId"` Price fixedpoint.Value `json:"price"` Quantity fixedpoint.Value `json:"qty"` Side SideType `json:"side"` Symbol string `json:"symbol"` TimeInForce string `json:"timeInForce"` IsIsolated bool `json:"isIsolated"` UpdatedTime types.MillisecondTimestamp `json:"updatedTime"` }
type MarginLoanRecord ¶
type MarginLoanRecord struct { IsolatedSymbol string `json:"isolatedSymbol"` TxId int64 `json:"txId"` Asset string `json:"asset"` Principal fixedpoint.Value `json:"principal"` Timestamp types.MillisecondTimestamp `json:"timestamp"` Status LoanStatus `json:"status"` }
type MarginRepayRecord ¶
type MarginRepayRecord struct { IsolatedSymbol string `json:"isolatedSymbol"` Amount fixedpoint.Value `json:"amount"` Asset string `json:"asset"` Interest fixedpoint.Value `json:"interest"` Principal fixedpoint.Value `json:"principal"` Status string `json:"status"` Timestamp types.MillisecondTimestamp `json:"timestamp"` TxId uint64 `json:"txId"` }
type OrderStatusType ¶
type OrderStatusType = binance.OrderStatusType
const ( OrderStatusTypeNew OrderStatusType = binance.OrderStatusTypeNew OrderStatusTypePartiallyFilled OrderStatusType = binance.OrderStatusTypePartiallyFilled OrderStatusTypeFilled OrderStatusType = binance.OrderStatusTypeFilled OrderStatusTypeCanceled OrderStatusType = binance.OrderStatusTypeCanceled OrderStatusTypePendingCancel OrderStatusType = binance.OrderStatusTypePendingCancel OrderStatusTypeRejected OrderStatusType = binance.OrderStatusTypeRejected OrderStatusTypeExpired OrderStatusType = binance.OrderStatusTypeExpired )
type OrderType ¶
type OrderType = binance.OrderType
const ( OrderTypeLimit OrderType = binance.OrderTypeLimit OrderTypeMarket OrderType = binance.OrderTypeMarket OrderTypeLimitMaker OrderType = binance.OrderTypeLimitMaker OrderTypeStopLoss OrderType = binance.OrderTypeStopLoss OrderTypeStopLossLimit OrderType = binance.OrderTypeStopLossLimit OrderTypeTakeProfit OrderType = binance.OrderTypeTakeProfit OrderTypeTakeProfitLimit OrderType = binance.OrderTypeTakeProfitLimit )
type PagedDataResponse ¶
type RepayStatus ¶
type RepayStatus string
RepayStatus one of PENDING (pending execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account);
type RestClient ¶
type RestClient struct { requestgen.BaseAPIClient Key, Secret string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(baseURL string) *RestClient
func (*RestClient) Auth ¶
func (c *RestClient) Auth(key, secret string)
func (*RestClient) NewAuthenticatedRequest ¶
func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, payload interface{}) (*http.Request, error)
newAuthenticatedRequest creates new http request for authenticated routes.
func (*RestClient) NewGetApiReferralIfNewUserRequest ¶ added in v1.34.0
func (c *RestClient) NewGetApiReferralIfNewUserRequest() *GetApiReferralIfNewUserRequest
func (*RestClient) NewGetDepositAddressRequest ¶
func (c *RestClient) NewGetDepositAddressRequest() *GetDepositAddressRequest
func (*RestClient) NewGetDepositHistoryRequest ¶
func (c *RestClient) NewGetDepositHistoryRequest() *GetDepositHistoryRequest
func (*RestClient) NewGetMarginInterestHistoryRequest ¶
func (c *RestClient) NewGetMarginInterestHistoryRequest() *GetMarginInterestHistoryRequest
func (*RestClient) NewGetMarginInterestRateHistoryRequest ¶
func (c *RestClient) NewGetMarginInterestRateHistoryRequest() *GetMarginInterestRateHistoryRequest
func (*RestClient) NewGetMarginLiquidationHistoryRequest ¶
func (c *RestClient) NewGetMarginLiquidationHistoryRequest() *GetMarginLiquidationHistoryRequest
func (*RestClient) NewGetMarginLoanHistoryRequest ¶
func (c *RestClient) NewGetMarginLoanHistoryRequest() *GetMarginLoanHistoryRequest
func (*RestClient) NewGetMarginRepayHistoryRequest ¶
func (c *RestClient) NewGetMarginRepayHistoryRequest() *GetMarginRepayHistoryRequest
func (*RestClient) NewGetSpotRebateHistoryRequest ¶
func (c *RestClient) NewGetSpotRebateHistoryRequest() *GetSpotRebateHistoryRequest
func (*RestClient) NewGetTradeFeeRequest ¶
func (c *RestClient) NewGetTradeFeeRequest() *GetTradeFeeRequest
func (*RestClient) NewGetWithdrawHistoryRequest ¶
func (c *RestClient) NewGetWithdrawHistoryRequest() *GetWithdrawHistoryRequest
func (*RestClient) NewRequest ¶
func (c *RestClient) NewRequest(ctx context.Context, method, refURL string, params url.Values, payload interface{}) (*http.Request, error)
NewRequest create new API request. Relative url can be provided in refURL.
func (*RestClient) NewWithdrawRequest ¶
func (c *RestClient) NewWithdrawRequest() *WithdrawRequest
func (*RestClient) SendRequest ¶
func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
func (*RestClient) SetTimeOffsetFromServer ¶
func (c *RestClient) SetTimeOffsetFromServer(ctx context.Context) error
type RowsResponse ¶
type RowsResponse struct { Rows json.RawMessage `json:"rows"` Total int `json:"total"` }
type SpotRebate ¶
type SpotRebate struct { Asset string `json:"asset"` Type RebateType `json:"type"` Amount fixedpoint.Value `json:"amount"` UpdateTime types.MillisecondTimestamp `json:"updateTime"` }
type TradeFee ¶
type TradeFee struct { Symbol string `json:"symbol"` MakerCommission fixedpoint.Value `json:"makerCommission"` TakerCommission fixedpoint.Value `json:"takerCommission"` }
type TransferType ¶
type TransferType int
1 for internal transfer, 0 for external transfer
const ( TransferTypeInternal TransferType = 0 TransferTypeExternal TransferType = 0 )
func (TransferType) String ¶
func (i TransferType) String() string
type WalletType ¶
type WalletType int
const ( WalletTypeSpot WalletType = 0 WalletTypeFunding WalletType = 1 )
type WithdrawRecord ¶
type WithdrawRecord struct { Id string `json:"id"` Address string `json:"address"` Amount fixedpoint.Value `json:"amount"` ApplyTime string `json:"applyTime"` Coin string `json:"coin"` WithdrawOrderID string `json:"withdrawOrderId"` Network string `json:"network"` TransferType TransferType `json:"transferType"` Status WithdrawStatus `json:"status"` TransactionFee fixedpoint.Value `json:"transactionFee"` ConfirmNo int `json:"confirmNo"` Info string `json:"info"` TxID string `json:"txId"` }
type WithdrawRequest ¶
type WithdrawRequest struct {
// contains filtered or unexported fields
}
func (*WithdrawRequest) Address ¶
func (w *WithdrawRequest) Address(address string) *WithdrawRequest
func (*WithdrawRequest) AddressTag ¶
func (w *WithdrawRequest) AddressTag(addressTag string) *WithdrawRequest
func (*WithdrawRequest) Amount ¶
func (w *WithdrawRequest) Amount(amount string) *WithdrawRequest
func (*WithdrawRequest) Coin ¶
func (w *WithdrawRequest) Coin(coin string) *WithdrawRequest
func (*WithdrawRequest) Do ¶
func (w *WithdrawRequest) Do(ctx context.Context) (*WithdrawResponse, error)
func (*WithdrawRequest) GetParameters ¶
func (w *WithdrawRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*WithdrawRequest) GetParametersJSON ¶
func (w *WithdrawRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*WithdrawRequest) GetParametersQuery ¶
func (w *WithdrawRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*WithdrawRequest) GetQueryParameters ¶
func (w *WithdrawRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*WithdrawRequest) GetSlugParameters ¶
func (w *WithdrawRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*WithdrawRequest) GetSlugsMap ¶
func (w *WithdrawRequest) GetSlugsMap() (map[string]string, error)
func (*WithdrawRequest) Name ¶
func (w *WithdrawRequest) Name(name string) *WithdrawRequest
func (*WithdrawRequest) Network ¶
func (w *WithdrawRequest) Network(network string) *WithdrawRequest
func (*WithdrawRequest) TransactionFeeFlag ¶
func (w *WithdrawRequest) TransactionFeeFlag(transactionFeeFlag bool) *WithdrawRequest
func (*WithdrawRequest) WalletType ¶
func (w *WithdrawRequest) WalletType(walletType WalletType) *WithdrawRequest
func (*WithdrawRequest) WithdrawOrderId ¶
func (w *WithdrawRequest) WithdrawOrderId(withdrawOrderId string) *WithdrawRequest
type WithdrawResponse ¶
type WithdrawResponse struct {
ID string `json:"id"`
}
type WithdrawStatus ¶
type WithdrawStatus int
const ( WithdrawStatusEmailSent WithdrawStatus = iota WithdrawStatusCancelled WithdrawStatusAwaitingApproval WithdrawStatusRejected WithdrawStatusProcessing WithdrawStatusFailure WithdrawStatusCompleted )
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed)
func (WithdrawStatus) String ¶
func (i WithdrawStatus) String() string
Source Files ¶
- alias.go
- client.go
- get_api_referral_if_new_user_request.go
- get_api_referral_if_new_user_request_requestgen.go
- get_deposit_address_request.go
- get_deposit_address_request_requestgen.go
- get_deposit_history_request.go
- get_deposit_history_request_requestgen.go
- get_margin_interest_history_request.go
- get_margin_interest_history_request_requestgen.go
- get_margin_interest_rate_history_request.go
- get_margin_interest_rate_history_request_requestgen.go
- get_margin_liquidation_history_request.go
- get_margin_liquidation_history_request_requestgen.go
- get_margin_loan_history_request.go
- get_margin_loan_history_request_requestgen.go
- get_margin_repay_history_request.go
- get_margin_repay_history_request_requestgen.go
- get_spot_rebate_history_request.go
- get_spot_rebate_history_request_requestgen.go
- get_trade_fee_request.go
- get_trade_fee_request_requestgen.go
- get_withdraw_history_request.go
- get_withdraw_history_request_requestgen.go
- page.go
- rows.go
- transfertype_string.go
- withdraw_request.go
- withdraw_request_requestgen.go
- withdrawstatus_string.go