binanceapi

package
v0.0.0-...-cb4139d Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RebateTypeCommission       = 1
	RebateTypeReferralKickback = 2
)
View Source
const DebugRequestResponse = false
View Source
const FuturesRestBaseURL = "https://fapi.binance.com"
View Source
const RestBaseURL = "https://api.binance.com"
View Source
const SandboxRestBaseURL = "https://testnet.binance.vision"
View Source
const SideTypeBuy = binance.SideTypeBuy
View Source
const SideTypeSell = binance.SideTypeSell

Variables

View Source
var DefaultHttpClient = &http.Client{
	Timeout:   defaultHTTPTimeout,
	Transport: defaultTransport,
}

Functions

func FormatTimestamp

func FormatTimestamp(t time.Time) int64

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

type ApiReferralIfNewUserResponse struct {
	ApiAgentCode  string `json:"apiAgentCode"`
	RebateWorking bool   `json:"rebateWorking"`
	IfNewUser     bool   `json:"ifNewUser"`
	ReferrerId    int    `json:"referrerId"`
}

type CancelReplaceModeType

type CancelReplaceModeType string
const (
	StopOnFailure CancelReplaceModeType = "STOP_ON_FAILURE"
	AllowFailure  CancelReplaceModeType = "ALLOW_FAILURE"
)

type CancelReplaceSpotOrderData

type CancelReplaceSpotOrderData struct {
	CancelResult     string         `json:"cancelResult"`
	NewOrderResult   string         `json:"newOrderResult"`
	NewOrderResponse *binance.Order `json:"newOrderResponse"`
}

type CancelReplaceSpotOrderRequest

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

func (*CancelReplaceSpotOrderRequest) CancelNewClientOrderId

func (c *CancelReplaceSpotOrderRequest) CancelNewClientOrderId(cancelNewClientOrderId string) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) CancelOrderId

func (c *CancelReplaceSpotOrderRequest) CancelOrderId(cancelOrderId int) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) CancelOrigClientOrderId

func (c *CancelReplaceSpotOrderRequest) CancelOrigClientOrderId(cancelOrigClientOrderId string) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) CancelReplaceMode

func (*CancelReplaceSpotOrderRequest) Do

func (*CancelReplaceSpotOrderRequest) GetParameters

func (c *CancelReplaceSpotOrderRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*CancelReplaceSpotOrderRequest) GetParametersJSON

func (c *CancelReplaceSpotOrderRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*CancelReplaceSpotOrderRequest) GetParametersQuery

func (c *CancelReplaceSpotOrderRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*CancelReplaceSpotOrderRequest) GetQueryParameters

func (c *CancelReplaceSpotOrderRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*CancelReplaceSpotOrderRequest) GetSlugParameters

func (c *CancelReplaceSpotOrderRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*CancelReplaceSpotOrderRequest) GetSlugsMap

func (c *CancelReplaceSpotOrderRequest) GetSlugsMap() (map[string]string, error)

func (*CancelReplaceSpotOrderRequest) IcebergQty

func (*CancelReplaceSpotOrderRequest) NewClientOrderId

func (c *CancelReplaceSpotOrderRequest) NewClientOrderId(newClientOrderId string) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) NewOrderRespType

func (c *CancelReplaceSpotOrderRequest) NewOrderRespType(newOrderRespType OrderRespType) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) Price

func (*CancelReplaceSpotOrderRequest) Quantity

func (*CancelReplaceSpotOrderRequest) QuoteOrderQty

func (c *CancelReplaceSpotOrderRequest) QuoteOrderQty(quoteOrderQty string) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) RecvWindow

func (*CancelReplaceSpotOrderRequest) Side

func (c *CancelReplaceSpotOrderRequest) Side(side binance.SideType) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) StopPrice

func (*CancelReplaceSpotOrderRequest) StrategyId

func (*CancelReplaceSpotOrderRequest) StrategyType

func (c *CancelReplaceSpotOrderRequest) StrategyType(strategyType int) *CancelReplaceSpotOrderRequest

func (*CancelReplaceSpotOrderRequest) Symbol

func (*CancelReplaceSpotOrderRequest) TimeInForce

func (*CancelReplaceSpotOrderRequest) Timestamp

func (*CancelReplaceSpotOrderRequest) TrailingDelta

func (c *CancelReplaceSpotOrderRequest) TrailingDelta(trailingDelta int) *CancelReplaceSpotOrderRequest

type CancelReplaceSpotOrderResponse

type CancelReplaceSpotOrderResponse struct {
	Code int                         `json:"code,omitempty"`
	Msg  string                      `json:"msg,omitempty"`
	Data *CancelReplaceSpotOrderData `json:"data"`
}

type DepositAddress

type DepositAddress struct {
	Address string `json:"address"`
	Coin    string `json:"coin"`
	Tag     string `json:"tag"`
	Url     string `json:"url"`
}

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 FuturesBalance

type FuturesBalance struct {
	AccountAlias string `json:"accountAlias"`
	Asset        string `json:"asset"`

	// Balance - wallet balance
	Balance fixedpoint.Value `json:"balance"`

	CrossWalletBalance fixedpoint.Value `json:"crossWalletBalance"`

	// CrossUnPnL unrealized profit of crossed positions
	CrossUnPnl fixedpoint.Value `json:"crossUnPnl"`

	AvailableBalance fixedpoint.Value `json:"availableBalance"`

	// MaxWithdrawAmount - maximum amount for transfer out
	MaxWithdrawAmount fixedpoint.Value `json:"maxWithdrawAmount"`

	// MarginAvailable - whether the asset can be used as margin in Multi-Assets mode
	MarginAvailable bool                       `json:"marginAvailable"`
	UpdateTime      types.MillisecondTimestamp `json:"updateTime"`
}

type FuturesChangeInitialLeverageRequest

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

func (*FuturesChangeInitialLeverageRequest) Do

func (*FuturesChangeInitialLeverageRequest) GetParameters

func (f *FuturesChangeInitialLeverageRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesChangeInitialLeverageRequest) GetParametersJSON

func (f *FuturesChangeInitialLeverageRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesChangeInitialLeverageRequest) GetParametersQuery

func (f *FuturesChangeInitialLeverageRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesChangeInitialLeverageRequest) GetQueryParameters

func (f *FuturesChangeInitialLeverageRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesChangeInitialLeverageRequest) GetSlugParameters

func (f *FuturesChangeInitialLeverageRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesChangeInitialLeverageRequest) GetSlugsMap

func (f *FuturesChangeInitialLeverageRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesChangeInitialLeverageRequest) Leverage

func (*FuturesChangeInitialLeverageRequest) Symbol

type FuturesChangeInitialLeverageResponse

type FuturesChangeInitialLeverageResponse struct {
	Leverage         int              `json:"leverage"`
	MaxNotionalValue fixedpoint.Value `json:"maxNotionalValue"`
	Symbol           string           `json:"symbol"`
}

type FuturesChangeMultiAssetsModeRequest

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

func (*FuturesChangeMultiAssetsModeRequest) Do

func (*FuturesChangeMultiAssetsModeRequest) GetParameters

func (f *FuturesChangeMultiAssetsModeRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesChangeMultiAssetsModeRequest) GetParametersJSON

func (f *FuturesChangeMultiAssetsModeRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesChangeMultiAssetsModeRequest) GetParametersQuery

func (f *FuturesChangeMultiAssetsModeRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesChangeMultiAssetsModeRequest) GetQueryParameters

func (f *FuturesChangeMultiAssetsModeRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesChangeMultiAssetsModeRequest) GetSlugParameters

func (f *FuturesChangeMultiAssetsModeRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesChangeMultiAssetsModeRequest) GetSlugsMap

func (f *FuturesChangeMultiAssetsModeRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesChangeMultiAssetsModeRequest) MultiAssetsMargin

type FuturesChangeMultiAssetsModeResponse

type FuturesChangeMultiAssetsModeResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

Code 200 == success

type FuturesGetAccountBalanceRequest

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

func (*FuturesGetAccountBalanceRequest) Do

func (*FuturesGetAccountBalanceRequest) GetParameters

func (f *FuturesGetAccountBalanceRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetAccountBalanceRequest) GetParametersJSON

func (f *FuturesGetAccountBalanceRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetAccountBalanceRequest) GetParametersQuery

func (f *FuturesGetAccountBalanceRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetAccountBalanceRequest) GetQueryParameters

func (f *FuturesGetAccountBalanceRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetAccountBalanceRequest) GetSlugParameters

func (f *FuturesGetAccountBalanceRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetAccountBalanceRequest) GetSlugsMap

func (f *FuturesGetAccountBalanceRequest) GetSlugsMap() (map[string]string, error)

type FuturesGetIncomeHistoryRequest

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

func (*FuturesGetIncomeHistoryRequest) Do

func (*FuturesGetIncomeHistoryRequest) EndTime

func (*FuturesGetIncomeHistoryRequest) GetParameters

func (f *FuturesGetIncomeHistoryRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetIncomeHistoryRequest) GetParametersJSON

func (f *FuturesGetIncomeHistoryRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetIncomeHistoryRequest) GetParametersQuery

func (f *FuturesGetIncomeHistoryRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetIncomeHistoryRequest) GetQueryParameters

func (f *FuturesGetIncomeHistoryRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetIncomeHistoryRequest) GetSlugParameters

func (f *FuturesGetIncomeHistoryRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetIncomeHistoryRequest) GetSlugsMap

func (f *FuturesGetIncomeHistoryRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesGetIncomeHistoryRequest) IncomeType

func (*FuturesGetIncomeHistoryRequest) Limit

func (*FuturesGetIncomeHistoryRequest) StartTime

func (*FuturesGetIncomeHistoryRequest) Symbol

type FuturesGetMultiAssetsModeRequest

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

func (*FuturesGetMultiAssetsModeRequest) Do

func (*FuturesGetMultiAssetsModeRequest) GetParameters

func (f *FuturesGetMultiAssetsModeRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetMultiAssetsModeRequest) GetParametersJSON

func (f *FuturesGetMultiAssetsModeRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetMultiAssetsModeRequest) GetParametersQuery

func (f *FuturesGetMultiAssetsModeRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetMultiAssetsModeRequest) GetQueryParameters

func (f *FuturesGetMultiAssetsModeRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetMultiAssetsModeRequest) GetSlugParameters

func (f *FuturesGetMultiAssetsModeRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetMultiAssetsModeRequest) GetSlugsMap

func (f *FuturesGetMultiAssetsModeRequest) GetSlugsMap() (map[string]string, error)

type FuturesGetOpenInterestRequest

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

func (*FuturesGetOpenInterestRequest) Do

func (*FuturesGetOpenInterestRequest) GetParameters

func (f *FuturesGetOpenInterestRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetOpenInterestRequest) GetParametersJSON

func (f *FuturesGetOpenInterestRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetOpenInterestRequest) GetParametersQuery

func (f *FuturesGetOpenInterestRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetOpenInterestRequest) GetQueryParameters

func (f *FuturesGetOpenInterestRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetOpenInterestRequest) GetSlugParameters

func (f *FuturesGetOpenInterestRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetOpenInterestRequest) GetSlugsMap

func (f *FuturesGetOpenInterestRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesGetOpenInterestRequest) Symbol

type FuturesGetOpenInterestStatisticsRequest

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

func (*FuturesGetOpenInterestStatisticsRequest) Do

func (*FuturesGetOpenInterestStatisticsRequest) EndTime

func (*FuturesGetOpenInterestStatisticsRequest) GetParameters

func (f *FuturesGetOpenInterestStatisticsRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetOpenInterestStatisticsRequest) GetParametersJSON

func (f *FuturesGetOpenInterestStatisticsRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetOpenInterestStatisticsRequest) GetParametersQuery

func (f *FuturesGetOpenInterestStatisticsRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetOpenInterestStatisticsRequest) GetQueryParameters

func (f *FuturesGetOpenInterestStatisticsRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetOpenInterestStatisticsRequest) GetSlugParameters

func (f *FuturesGetOpenInterestStatisticsRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetOpenInterestStatisticsRequest) GetSlugsMap

func (*FuturesGetOpenInterestStatisticsRequest) Limit

func (*FuturesGetOpenInterestStatisticsRequest) Period

func (*FuturesGetOpenInterestStatisticsRequest) StartTime

func (*FuturesGetOpenInterestStatisticsRequest) Symbol

type FuturesGetPositionRisksRequest

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

func (*FuturesGetPositionRisksRequest) Do

func (*FuturesGetPositionRisksRequest) GetParameters

func (f *FuturesGetPositionRisksRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGetPositionRisksRequest) GetParametersJSON

func (f *FuturesGetPositionRisksRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGetPositionRisksRequest) GetParametersQuery

func (f *FuturesGetPositionRisksRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGetPositionRisksRequest) GetQueryParameters

func (f *FuturesGetPositionRisksRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGetPositionRisksRequest) GetSlugParameters

func (f *FuturesGetPositionRisksRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGetPositionRisksRequest) GetSlugsMap

func (f *FuturesGetPositionRisksRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesGetPositionRisksRequest) Symbol

type FuturesGlobalLongShortAccountRatio

type FuturesGlobalLongShortAccountRatio struct {
	Symbol         string                     `json:"symbol"`
	LongShortRatio fixedpoint.Value           `json:"longShortRatio"`
	LongAccount    fixedpoint.Value           `json:"longAccount"`
	ShortAccount   fixedpoint.Value           `json:"shortAccount"`
	Timestamp      types.MillisecondTimestamp `json:"timestamp"`
}

type FuturesGlobalLongShortAccountRatioRequest

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

func (*FuturesGlobalLongShortAccountRatioRequest) Do

func (*FuturesGlobalLongShortAccountRatioRequest) EndTime

func (*FuturesGlobalLongShortAccountRatioRequest) GetParameters

func (f *FuturesGlobalLongShortAccountRatioRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesGlobalLongShortAccountRatioRequest) GetParametersJSON

func (f *FuturesGlobalLongShortAccountRatioRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesGlobalLongShortAccountRatioRequest) GetParametersQuery

func (f *FuturesGlobalLongShortAccountRatioRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesGlobalLongShortAccountRatioRequest) GetQueryParameters

func (f *FuturesGlobalLongShortAccountRatioRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesGlobalLongShortAccountRatioRequest) GetSlugParameters

func (f *FuturesGlobalLongShortAccountRatioRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesGlobalLongShortAccountRatioRequest) GetSlugsMap

func (*FuturesGlobalLongShortAccountRatioRequest) Limit

func (*FuturesGlobalLongShortAccountRatioRequest) Period

func (*FuturesGlobalLongShortAccountRatioRequest) StartTime

func (*FuturesGlobalLongShortAccountRatioRequest) Symbol

type FuturesIncome

type FuturesIncome struct {
	Symbol     string                     `json:"symbol"`
	IncomeType FuturesIncomeType          `json:"incomeType"`
	Income     fixedpoint.Value           `json:"income"`
	Asset      string                     `json:"asset"`
	Info       string                     `json:"info"`
	Time       types.MillisecondTimestamp `json:"time"`
	TranId     int64                      `json:"tranId"`
	TradeId    string                     `json:"tradeId"`
}

type FuturesIncomeType

type FuturesIncomeType string

FuturesIncomeType can be one of the following value: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE

const (
	FuturesIncomeTransfer         FuturesIncomeType = "TRANSFER"
	FuturesIncomeWelcomeBonus     FuturesIncomeType = "WELCOME_BONUS"
	FuturesIncomeFundingFee       FuturesIncomeType = "FUNDING_FEE"
	FuturesIncomeRealizedPnL      FuturesIncomeType = "REALIZED_PNL"
	FuturesIncomeCommission       FuturesIncomeType = "COMMISSION"
	FuturesIncomeReferralKickback FuturesIncomeType = "REFERRAL_KICKBACK"
	FuturesIncomeCommissionRebate FuturesIncomeType = "COMMISSION_REBATE"
	FuturesIncomeApiRebate        FuturesIncomeType = "API_REBATE"
	FuturesIncomeContestReward    FuturesIncomeType = "CONTEST_REWARD"
)

type FuturesMultiAssetsModeResponse

type FuturesMultiAssetsModeResponse struct {
	MultiAssetsMargin bool `json:"multiAssetsMargin"`
}

type FuturesOpenInterest

type FuturesOpenInterest struct {
	OpenInterest fixedpoint.Value           `json:"openInterest"`
	Symbol       string                     `json:"symbol"`
	Time         types.MillisecondTimestamp `json:"time"`
}

type FuturesOpenInterestStatistics

type FuturesOpenInterestStatistics struct {
	Symbol               string                     `json:"symbol"`
	SumOpenInterest      fixedpoint.Value           `json:"sumOpenInterest"`
	SumOpenInterestValue fixedpoint.Value           `json:"sumOpenInterestValue"`
	Timestamp            types.MillisecondTimestamp `json:"timestamp"`
}

type FuturesPositionRisk

type FuturesPositionRisk struct {
	EntryPrice       fixedpoint.Value           `json:"entryPrice"`
	MarginType       string                     `json:"marginType"`
	IsAutoAddMargin  string                     `json:"isAutoAddMargin"`
	IsolatedMargin   string                     `json:"isolatedMargin"`
	Leverage         fixedpoint.Value           `json:"leverage"`
	LiquidationPrice fixedpoint.Value           `json:"liquidationPrice"`
	MarkPrice        fixedpoint.Value           `json:"markPrice"`
	MaxNotionalValue fixedpoint.Value           `json:"maxNotionalValue"`
	PositionAmount   fixedpoint.Value           `json:"positionAmt"`
	Notional         fixedpoint.Value           `json:"notional"`
	IsolatedWallet   string                     `json:"isolatedWallet"`
	Symbol           string                     `json:"symbol"`
	UnRealizedProfit fixedpoint.Value           `json:"unRealizedProfit"`
	PositionSide     string                     `json:"positionSide"`
	UpdateTime       types.MillisecondTimestamp `json:"updateTime"`
}

type FuturesRestClient

type FuturesRestClient struct {
	RestClient
}

func NewFuturesRestClient

func NewFuturesRestClient(baseURL string) *FuturesRestClient

func (*FuturesRestClient) NewFuturesChangeInitialLeverageRequest

func (c *FuturesRestClient) NewFuturesChangeInitialLeverageRequest() *FuturesChangeInitialLeverageRequest

func (*FuturesRestClient) NewFuturesChangeMultiAssetsModeRequest

func (c *FuturesRestClient) NewFuturesChangeMultiAssetsModeRequest() *FuturesChangeMultiAssetsModeRequest

func (*FuturesRestClient) NewFuturesGetAccountBalanceRequest

func (c *FuturesRestClient) NewFuturesGetAccountBalanceRequest() *FuturesGetAccountBalanceRequest

func (*FuturesRestClient) NewFuturesGetIncomeHistoryRequest

func (c *FuturesRestClient) NewFuturesGetIncomeHistoryRequest() *FuturesGetIncomeHistoryRequest

func (*FuturesRestClient) NewFuturesGetMultiAssetsModeRequest

func (c *FuturesRestClient) NewFuturesGetMultiAssetsModeRequest() *FuturesGetMultiAssetsModeRequest

func (*FuturesRestClient) NewFuturesGetOpenInterestRequest

func (c *FuturesRestClient) NewFuturesGetOpenInterestRequest() *FuturesGetOpenInterestRequest

func (*FuturesRestClient) NewFuturesGetOpenInterestStatisticsRequest

func (c *FuturesRestClient) NewFuturesGetOpenInterestStatisticsRequest() *FuturesGetOpenInterestStatisticsRequest

func (*FuturesRestClient) NewFuturesGetPositionRisksRequest

func (c *FuturesRestClient) NewFuturesGetPositionRisksRequest() *FuturesGetPositionRisksRequest

func (*FuturesRestClient) NewFuturesGlobalLongShortAccountRatioRequest

func (c *FuturesRestClient) NewFuturesGlobalLongShortAccountRatioRequest() *FuturesGlobalLongShortAccountRatioRequest

func (*FuturesRestClient) NewFuturesTakerBuySellVolumeRequest

func (c *FuturesRestClient) NewFuturesTakerBuySellVolumeRequest() *FuturesTakerBuySellVolumeRequest

func (*FuturesRestClient) NewFuturesTopTraderLongShortAccountRatioRequest

func (c *FuturesRestClient) NewFuturesTopTraderLongShortAccountRatioRequest() *FuturesTopTraderLongShortAccountRatioRequest

func (*FuturesRestClient) NewFuturesTopTraderLongShortPositionRatioRequest

func (c *FuturesRestClient) NewFuturesTopTraderLongShortPositionRatioRequest() *FuturesTopTraderLongShortPositionRatioRequest

type FuturesTakerBuySellVolume

type FuturesTakerBuySellVolume struct {
	BuySellRatio fixedpoint.Value           `json:"buySellRatio"`
	BuyVol       fixedpoint.Value           `json:"buyVol"`
	SellVol      fixedpoint.Value           `json:"sellVol"`
	Timestamp    types.MillisecondTimestamp `json:"timestamp"`
}

type FuturesTakerBuySellVolumeRequest

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

func (*FuturesTakerBuySellVolumeRequest) Do

func (*FuturesTakerBuySellVolumeRequest) EndTime

func (*FuturesTakerBuySellVolumeRequest) GetParameters

func (f *FuturesTakerBuySellVolumeRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesTakerBuySellVolumeRequest) GetParametersJSON

func (f *FuturesTakerBuySellVolumeRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesTakerBuySellVolumeRequest) GetParametersQuery

func (f *FuturesTakerBuySellVolumeRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesTakerBuySellVolumeRequest) GetQueryParameters

func (f *FuturesTakerBuySellVolumeRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesTakerBuySellVolumeRequest) GetSlugParameters

func (f *FuturesTakerBuySellVolumeRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesTakerBuySellVolumeRequest) GetSlugsMap

func (f *FuturesTakerBuySellVolumeRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesTakerBuySellVolumeRequest) Limit

func (*FuturesTakerBuySellVolumeRequest) Period

func (*FuturesTakerBuySellVolumeRequest) StartTime

func (*FuturesTakerBuySellVolumeRequest) Symbol

type FuturesTopTraderLongShortAccountRatio

type FuturesTopTraderLongShortAccountRatio struct {
	Symbol         string                     `json:"symbol"`
	LongShortRatio fixedpoint.Value           `json:"longShortRatio"`
	LongAccount    fixedpoint.Value           `json:"longAccount"`
	ShortAccount   fixedpoint.Value           `json:"shortAccount"`
	Timestamp      types.MillisecondTimestamp `json:"timestamp"`
}

type FuturesTopTraderLongShortAccountRatioRequest

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

func (*FuturesTopTraderLongShortAccountRatioRequest) Do

func (*FuturesTopTraderLongShortAccountRatioRequest) EndTime

func (*FuturesTopTraderLongShortAccountRatioRequest) GetParameters

func (f *FuturesTopTraderLongShortAccountRatioRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesTopTraderLongShortAccountRatioRequest) GetParametersJSON

func (f *FuturesTopTraderLongShortAccountRatioRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesTopTraderLongShortAccountRatioRequest) GetParametersQuery

func (f *FuturesTopTraderLongShortAccountRatioRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesTopTraderLongShortAccountRatioRequest) GetQueryParameters

func (f *FuturesTopTraderLongShortAccountRatioRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesTopTraderLongShortAccountRatioRequest) GetSlugParameters

func (f *FuturesTopTraderLongShortAccountRatioRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesTopTraderLongShortAccountRatioRequest) GetSlugsMap

func (*FuturesTopTraderLongShortAccountRatioRequest) Limit

func (*FuturesTopTraderLongShortAccountRatioRequest) Period

func (*FuturesTopTraderLongShortAccountRatioRequest) StartTime

func (*FuturesTopTraderLongShortAccountRatioRequest) Symbol

type FuturesTopTraderLongShortPositionRatio

type FuturesTopTraderLongShortPositionRatio struct {
	Symbol         string                     `json:"symbol"`
	LongShortRatio fixedpoint.Value           `json:"longShortRatio"`
	LongAccount    fixedpoint.Value           `json:"longAccount"`
	ShortAccount   fixedpoint.Value           `json:"shortAccount"`
	Timestamp      types.MillisecondTimestamp `json:"timestamp"`
}

type FuturesTopTraderLongShortPositionRatioRequest

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

func (*FuturesTopTraderLongShortPositionRatioRequest) Do

func (*FuturesTopTraderLongShortPositionRatioRequest) EndTime

func (*FuturesTopTraderLongShortPositionRatioRequest) GetParameters

func (f *FuturesTopTraderLongShortPositionRatioRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesTopTraderLongShortPositionRatioRequest) GetParametersJSON

func (f *FuturesTopTraderLongShortPositionRatioRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesTopTraderLongShortPositionRatioRequest) GetParametersQuery

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesTopTraderLongShortPositionRatioRequest) GetQueryParameters

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesTopTraderLongShortPositionRatioRequest) GetSlugParameters

func (f *FuturesTopTraderLongShortPositionRatioRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesTopTraderLongShortPositionRatioRequest) GetSlugsMap

func (*FuturesTopTraderLongShortPositionRatioRequest) Limit

func (*FuturesTopTraderLongShortPositionRatioRequest) Period

func (*FuturesTopTraderLongShortPositionRatioRequest) StartTime

func (*FuturesTopTraderLongShortPositionRatioRequest) Symbol

type FuturesTransferRequest

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

func (*FuturesTransferRequest) Amount

func (*FuturesTransferRequest) Asset

func (*FuturesTransferRequest) Do

func (*FuturesTransferRequest) GetParameters

func (f *FuturesTransferRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*FuturesTransferRequest) GetParametersJSON

func (f *FuturesTransferRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*FuturesTransferRequest) GetParametersQuery

func (f *FuturesTransferRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*FuturesTransferRequest) GetQueryParameters

func (f *FuturesTransferRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*FuturesTransferRequest) GetSlugParameters

func (f *FuturesTransferRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*FuturesTransferRequest) GetSlugsMap

func (f *FuturesTransferRequest) GetSlugsMap() (map[string]string, error)

func (*FuturesTransferRequest) TransferType

func (f *FuturesTransferRequest) TransferType(transferType FuturesTransferType) *FuturesTransferRequest

type FuturesTransferResponse

type FuturesTransferResponse struct {
	TranId int64 `json:"tranId"`
}

type FuturesTransferType

type FuturesTransferType int
const (
	FuturesTransferSpotToUsdtFutures FuturesTransferType = 1
	FuturesTransferUsdtFuturesToSpot FuturesTransferType = 2

	FuturesTransferSpotToCoinFutures FuturesTransferType = 3
	FuturesTransferCoinFuturesToSpot FuturesTransferType = 4
)

type GetApiReferralIfNewUserRequest

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

func (*GetApiReferralIfNewUserRequest) Do

func (*GetApiReferralIfNewUserRequest) GetParameters

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

func (g *GetApiReferralIfNewUserRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetApiReferralIfNewUserRequest) GetParametersQuery

func (g *GetApiReferralIfNewUserRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*GetApiReferralIfNewUserRequest) GetQueryParameters

func (g *GetApiReferralIfNewUserRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*GetApiReferralIfNewUserRequest) GetSlugParameters

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

func (g *GetApiReferralIfNewUserRequest) GetSlugsMap() (map[string]string, error)

type GetDepositAddressRequest

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

func (*GetDepositAddressRequest) Coin

func (*GetDepositAddressRequest) Do

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

type GetDepositHistoryRequest

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

func (*GetDepositHistoryRequest) Coin

func (*GetDepositHistoryRequest) Do

func (*GetDepositHistoryRequest) EndTime

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

type GetHistoricalTradesRequest

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

func (*GetHistoricalTradesRequest) Do

func (g *GetHistoricalTradesRequest) Do(ctx context.Context) ([]binance.TradeV3, error)

func (*GetHistoricalTradesRequest) FromID

func (*GetHistoricalTradesRequest) GetParameters

func (g *GetHistoricalTradesRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*GetHistoricalTradesRequest) GetParametersJSON

func (g *GetHistoricalTradesRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetHistoricalTradesRequest) GetParametersQuery

func (g *GetHistoricalTradesRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*GetHistoricalTradesRequest) GetQueryParameters

func (g *GetHistoricalTradesRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*GetHistoricalTradesRequest) GetSlugParameters

func (g *GetHistoricalTradesRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*GetHistoricalTradesRequest) GetSlugsMap

func (g *GetHistoricalTradesRequest) GetSlugsMap() (map[string]string, error)

func (*GetHistoricalTradesRequest) Limit

func (*GetHistoricalTradesRequest) Symbol

type GetMarginInterestHistoryRequest

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

func (*GetMarginInterestHistoryRequest) Archived

func (*GetMarginInterestHistoryRequest) Asset

func (*GetMarginInterestHistoryRequest) Current

func (*GetMarginInterestHistoryRequest) Do

func (*GetMarginInterestHistoryRequest) EndTime

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 (*GetMarginInterestHistoryRequest) StartTime

type GetMarginInterestRateHistoryRequest

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

func (*GetMarginInterestRateHistoryRequest) Asset

func (*GetMarginInterestRateHistoryRequest) Do

func (*GetMarginInterestRateHistoryRequest) EndTime

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

type GetMarginLiquidationHistoryRequest

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

func (*GetMarginLiquidationHistoryRequest) Current

func (*GetMarginLiquidationHistoryRequest) Do

func (*GetMarginLiquidationHistoryRequest) EndTime

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 (*GetMarginLiquidationHistoryRequest) Size

func (*GetMarginLiquidationHistoryRequest) StartTime

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 (*GetMarginLoanHistoryRequest) Asset

func (*GetMarginLoanHistoryRequest) Current

func (*GetMarginLoanHistoryRequest) Do

func (*GetMarginLoanHistoryRequest) EndTime

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 (*GetMarginLoanHistoryRequest) StartTime

type GetMarginMaxBorrowableRequest

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

func (*GetMarginMaxBorrowableRequest) Asset

func (*GetMarginMaxBorrowableRequest) Do

func (*GetMarginMaxBorrowableRequest) GetParameters

func (g *GetMarginMaxBorrowableRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*GetMarginMaxBorrowableRequest) GetParametersJSON

func (g *GetMarginMaxBorrowableRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarginMaxBorrowableRequest) GetParametersQuery

func (g *GetMarginMaxBorrowableRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*GetMarginMaxBorrowableRequest) GetQueryParameters

func (g *GetMarginMaxBorrowableRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*GetMarginMaxBorrowableRequest) GetSlugParameters

func (g *GetMarginMaxBorrowableRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*GetMarginMaxBorrowableRequest) GetSlugsMap

func (g *GetMarginMaxBorrowableRequest) GetSlugsMap() (map[string]string, error)

func (*GetMarginMaxBorrowableRequest) IsolatedSymbol

func (g *GetMarginMaxBorrowableRequest) IsolatedSymbol(isolatedSymbol string) *GetMarginMaxBorrowableRequest

type GetMarginRepayHistoryRequest

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

func (*GetMarginRepayHistoryRequest) Archived

func (*GetMarginRepayHistoryRequest) Asset

func (*GetMarginRepayHistoryRequest) Current

func (*GetMarginRepayHistoryRequest) Do

func (*GetMarginRepayHistoryRequest) EndTime

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 (*GetMarginRepayHistoryRequest) StartTime

type GetMyTradesRequest

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

func (*GetMyTradesRequest) Do

func (g *GetMyTradesRequest) Do(ctx context.Context) ([]binance.TradeV3, error)

func (*GetMyTradesRequest) EndTime

func (g *GetMyTradesRequest) EndTime(endTime time.Time) *GetMyTradesRequest

func (*GetMyTradesRequest) FromID

func (g *GetMyTradesRequest) FromID(fromID uint64) *GetMyTradesRequest

func (*GetMyTradesRequest) GetParameters

func (g *GetMyTradesRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*GetMyTradesRequest) GetParametersJSON

func (g *GetMyTradesRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMyTradesRequest) GetParametersQuery

func (g *GetMyTradesRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*GetMyTradesRequest) GetQueryParameters

func (g *GetMyTradesRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*GetMyTradesRequest) GetSlugParameters

func (g *GetMyTradesRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*GetMyTradesRequest) GetSlugsMap

func (g *GetMyTradesRequest) GetSlugsMap() (map[string]string, error)

func (*GetMyTradesRequest) Limit

func (g *GetMyTradesRequest) Limit(limit uint64) *GetMyTradesRequest

func (*GetMyTradesRequest) OrderID

func (g *GetMyTradesRequest) OrderID(orderID uint64) *GetMyTradesRequest

func (*GetMyTradesRequest) StartTime

func (g *GetMyTradesRequest) StartTime(startTime time.Time) *GetMyTradesRequest

func (*GetMyTradesRequest) Symbol

func (g *GetMyTradesRequest) Symbol(symbol string) *GetMyTradesRequest

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 (*GetSpotRebateHistoryRequest) EndTime

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

type GetTradeFeeRequest

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

func (*GetTradeFeeRequest) Do

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 (*GetWithdrawHistoryRequest) Do

func (*GetWithdrawHistoryRequest) EndTime

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 (*GetWithdrawHistoryRequest) Offset

func (*GetWithdrawHistoryRequest) StartTime

func (*GetWithdrawHistoryRequest) Status

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 MarginMaxBorrowable

type MarginMaxBorrowable struct {
	Amount      fixedpoint.Value `json:"amount"`
	BorrowLimit fixedpoint.Value `json:"borrowLimit"`
}

MarginMaxBorrowable is the user margin interest record

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 MultiAssetsMarginMode

type MultiAssetsMarginMode string
const (
	MultiAssetsMarginModeOn  MultiAssetsMarginMode = "true"
	MultiAssetsMarginModeOff MultiAssetsMarginMode = "false"
)

type OrderRespType

type OrderRespType string
const (
	Ack    OrderRespType = "ACK"
	Result OrderRespType = "RESULT"
	Full   OrderRespType = "FULL"
)

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 PagedDataResponse struct {
	Status string `json:"status"`
	Type   string `json:"type"`
	Code   string `json:"code"`
	Data   struct {
		Page         int             `json:"page"`
		TotalRecords int             `json:"totalRecords"`
		TotalPageNum int             `json:"totalPageNum"`
		Data         json.RawMessage `json:"data"`
	} `json:"data"`
}

type RebateType

type RebateType int

rebate type:1 is commission rebate,2 is referral kickback

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) NewCancelReplaceSpotOrderRequest

func (c *RestClient) NewCancelReplaceSpotOrderRequest() *CancelReplaceSpotOrderRequest

func (*RestClient) NewFuturesTransferRequest

func (c *RestClient) NewFuturesTransferRequest() *FuturesTransferRequest

func (*RestClient) NewGetApiReferralIfNewUserRequest

func (c *RestClient) NewGetApiReferralIfNewUserRequest() *GetApiReferralIfNewUserRequest

func (*RestClient) NewGetDepositAddressRequest

func (c *RestClient) NewGetDepositAddressRequest() *GetDepositAddressRequest

func (*RestClient) NewGetDepositHistoryRequest

func (c *RestClient) NewGetDepositHistoryRequest() *GetDepositHistoryRequest

func (*RestClient) NewGetHistoricalTradesRequest

func (c *RestClient) NewGetHistoricalTradesRequest() *GetHistoricalTradesRequest

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) NewGetMarginMaxBorrowableRequest

func (c *RestClient) NewGetMarginMaxBorrowableRequest() *GetMarginMaxBorrowableRequest

func (*RestClient) NewGetMarginRepayHistoryRequest

func (c *RestClient) NewGetMarginRepayHistoryRequest() *GetMarginRepayHistoryRequest

func (*RestClient) NewGetMyTradesRequest

func (c *RestClient) NewGetMyTradesRequest() *GetMyTradesRequest

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 SideType

type SideType = binance.SideType

type SpotRebate

type SpotRebate struct {
	Asset      string                     `json:"asset"`
	Type       RebateType                 `json:"type"`
	Amount     fixedpoint.Value           `json:"amount"`
	UpdateTime types.MillisecondTimestamp `json:"updateTime"`
}

type Trade

type Trade = binance.TradeV3

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 (*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

Jump to

Keyboard shortcuts

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