v3

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProductionAPIURL is the official MAX API v2 Endpoint
	ProductionAPIURL = "https://max-api.maicoin.com/api/v3"

	UserAgent = "bbgo/" + version.Version

	// 2018-09-01 08:00:00 +0800 CST
	TimestampSince = 1535760000
)
View Source
const (
	RewardAirdrop    = RewardType("airdrop_reward")
	RewardCommission = RewardType("commission")
	RewardHolding    = RewardType("holding_reward")
	RewardMining     = RewardType("mining_reward")
	RewardTrading    = RewardType("trading_reward")
	RewardStaking    = RewardType("staking_reward")
	RewardRedemption = RewardType("redemption_reward")
	RewardVipRebate  = RewardType("vip_rebate")
	RewardYield      = RewardType("yield")
)
View Source
const (
	LiquidityMaker = "maker"
	LiquidityTaker = "taker"
)

Variables

View Source
var CancelOrderRequestSlugReCache sync.Map
View Source
var CancelWalletOrderAllRequestSlugReCache sync.Map
View Source
var CreateSubAccountRequestSlugReCache sync.Map
View Source
var CreateWalletOrderRequestSlugReCache sync.Map
View Source
var DeleteSubAccountRequestSlugReCache sync.Map
View Source
var GetDepositHistoryRequestSlugReCache sync.Map
View Source
var GetDepthRequestSlugReCache sync.Map
View Source
var GetKLinesRequestSlugReCache sync.Map
View Source
var GetMarginADRatioRequestSlugReCache sync.Map
View Source
var GetMarginBorrowingLimitsRequestSlugReCache sync.Map
View Source
var GetMarginInterestHistoryRequestSlugReCache sync.Map
View Source
var GetMarginInterestRatesRequestSlugReCache sync.Map
View Source
var GetMarginLiquidationHistoryRequestSlugReCache sync.Map
View Source
var GetMarginLoanHistoryRequestSlugReCache sync.Map
View Source
var GetMarginRepaymentHistoryRequestSlugReCache sync.Map
View Source
var GetMarketsRequestSlugReCache sync.Map
View Source
var GetOrderRequestSlugReCache sync.Map
View Source
var GetOrderTradesRequestSlugReCache sync.Map
View Source
var GetRewardsRequestSlugReCache sync.Map
View Source
var GetSubAccountsRequestSlugReCache sync.Map
View Source
var GetTickerRequestSlugReCache sync.Map
View Source
var GetTickersRequestSlugReCache sync.Map
View Source
var GetTimestampRequestSlugReCache sync.Map
View Source
var GetUserInfoRequestSlugReCache sync.Map
View Source
var GetWalletAccountsRequestSlugReCache sync.Map
View Source
var GetWalletClosedOrdersRequestSlugReCache sync.Map
View Source
var GetWalletOpenOrdersRequestSlugReCache sync.Map
View Source
var GetWalletOrderHistoryRequestSlugReCache sync.Map
View Source
var GetWalletTradesRequestSlugReCache sync.Map
View Source
var GetWithdrawalAddressesRequestSlugReCache sync.Map
View Source
var GetWithdrawalHistoryRequestSlugReCache sync.Map
View Source
var MarginLoanRequestSlugReCache sync.Map
View Source
var MarginRepayRequestSlugReCache sync.Map
View Source
var MarginTransferRequestSlugReCache sync.Map
View Source
var ServerTimeOffset int64 = 0

ServerTimeOffset is used for nonce

View Source
var ServerTimestamp = time.Now().Unix()

ServerTimestamp is used for storing the server timestamp, default to Now

View Source
var SubmitSubAccountTransferRequestSlugReCache sync.Map
View Source
var WithdrawalRequestSlugReCache sync.Map

Functions

func UpdateServerTimeAndOffset added in v1.64.0

func UpdateServerTimeAndOffset(baseCtx context.Context)

UpdateServerTimeAndOffset updates the global server time and offset variables by querying the MAX server timestamp API endpoint. This function will keep retrying until it succeeds or the context is done.

Types

type ADRatio

type ADRatio struct {
	AdRatio     fixedpoint.Value `json:"ad_ratio"`
	AssetInUsdt fixedpoint.Value `json:"asset_in_usdt"`
	DebtInUsdt  fixedpoint.Value `json:"debt_in_usdt"`
}

type Account

type Account = maxapi.Account

type CancelOrderRequest

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

func (*CancelOrderRequest) ClientOrderID

func (c *CancelOrderRequest) ClientOrderID(clientOrderID string) *CancelOrderRequest

* ClientOrderID sets

func (*CancelOrderRequest) Do

func (c *CancelOrderRequest) Do(ctx context.Context) (*Order, error)

Do generates the request object and send the request object to the API endpoint

func (*CancelOrderRequest) GetParameters

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

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

func (*CancelOrderRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*CancelOrderRequest) GetParametersQuery

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

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

func (*CancelOrderRequest) GetPath added in v1.60.2

func (c *CancelOrderRequest) GetPath() string

GetPath returns the request path of the API

func (*CancelOrderRequest) GetQueryParameters

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

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

func (*CancelOrderRequest) GetSlugParameters

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

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

func (*CancelOrderRequest) GetSlugsMap

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

func (*CancelOrderRequest) Id

* Id sets

type CancelWalletOrderAllRequest

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

func (*CancelWalletOrderAllRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*CancelWalletOrderAllRequest) GetParameters

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

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

func (*CancelWalletOrderAllRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*CancelWalletOrderAllRequest) GetParametersQuery

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

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

func (*CancelWalletOrderAllRequest) GetPath added in v1.60.2

func (c *CancelWalletOrderAllRequest) GetPath() string

GetPath returns the request path of the API

func (*CancelWalletOrderAllRequest) GetQueryParameters

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

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

func (*CancelWalletOrderAllRequest) GetSlugParameters

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

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

func (*CancelWalletOrderAllRequest) GetSlugsMap

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

func (*CancelWalletOrderAllRequest) GroupID

* GroupID sets

func (*CancelWalletOrderAllRequest) Market

* Market sets

func (*CancelWalletOrderAllRequest) Side

* Side sets

func (*CancelWalletOrderAllRequest) WalletType

* WalletType sets

type Client added in v1.48.0

type Client struct {
	requestgen.BaseAPIClient

	APIKey, APISecret string

	SubAccount string

	ApiKeyRotator *apikey.RoundTripBalancer

	MarginService     *MarginService
	SubAccountService *SubAccountService
	// contains filtered or unexported fields
}

func NewClient added in v1.64.0

func NewClient() *Client

func (*Client) Auth added in v1.64.0

func (c *Client) Auth(key string, secret string) *Client

Auth sets api key and secret for usage is requests that requires authentication.

func (*Client) GetNonce added in v1.64.0

func (c *Client) GetNonce(apiKey string) int64

func (*Client) NewAuthenticatedRequest added in v1.64.0

func (c *Client) NewAuthenticatedRequest(
	ctx context.Context, m string, refURL string, params url.Values, data interface{},
) (*http.Request, error)

NewAuthenticatedRequest creates new http request for authenticated routes.

func (*Client) NewCancelOrderRequest added in v1.48.0

func (c *Client) NewCancelOrderRequest() *CancelOrderRequest

func (*Client) NewCancelWalletOrderAllRequest added in v1.48.0

func (c *Client) NewCancelWalletOrderAllRequest(walletType WalletType) *CancelWalletOrderAllRequest

func (*Client) NewCreateWalletOrderRequest added in v1.48.0

func (c *Client) NewCreateWalletOrderRequest(walletType WalletType) *CreateWalletOrderRequest

func (*Client) NewGetDepositHistoryRequest added in v1.64.0

func (c *Client) NewGetDepositHistoryRequest() *GetDepositHistoryRequest

func (*Client) NewGetDepthRequest added in v1.61.0

func (c *Client) NewGetDepthRequest() *GetDepthRequest

func (*Client) NewGetKLinesRequest added in v1.64.0

func (c *Client) NewGetKLinesRequest() *GetKLinesRequest

func (*Client) NewGetMarginADRatioRequest added in v1.48.0

func (c *Client) NewGetMarginADRatioRequest() *GetMarginADRatioRequest

func (*Client) NewGetMarginBorrowingLimitsRequest added in v1.48.0

func (c *Client) NewGetMarginBorrowingLimitsRequest() *GetMarginBorrowingLimitsRequest

func (*Client) NewGetMarginInterestHistoryRequest added in v1.48.0

func (c *Client) NewGetMarginInterestHistoryRequest(currency string) *GetMarginInterestHistoryRequest

func (*Client) NewGetMarginInterestRatesRequest added in v1.48.0

func (c *Client) NewGetMarginInterestRatesRequest() *GetMarginInterestRatesRequest

func (*Client) NewGetMarginLiquidationHistoryRequest added in v1.48.0

func (c *Client) NewGetMarginLiquidationHistoryRequest() *GetMarginLiquidationHistoryRequest

func (*Client) NewGetMarginLoanHistoryRequest added in v1.48.0

func (c *Client) NewGetMarginLoanHistoryRequest() *GetMarginLoanHistoryRequest

func (*Client) NewGetMarketsRequest added in v1.64.0

func (c *Client) NewGetMarketsRequest() *GetMarketsRequest

func (*Client) NewGetOrderRequest added in v1.48.0

func (c *Client) NewGetOrderRequest() *GetOrderRequest

func (*Client) NewGetOrderTradesRequest added in v1.48.0

func (c *Client) NewGetOrderTradesRequest() *GetOrderTradesRequest

func (*Client) NewGetRewardsRequest added in v1.64.0

func (c *Client) NewGetRewardsRequest() *GetRewardsRequest

func (*Client) NewGetTickerRequest added in v1.64.0

func (c *Client) NewGetTickerRequest() *GetTickerRequest

func (*Client) NewGetTickersRequest added in v1.64.0

func (c *Client) NewGetTickersRequest() *GetTickersRequest

func (*Client) NewGetTimestampRequest added in v1.64.0

func (c *Client) NewGetTimestampRequest() *GetTimestampRequest

func (*Client) NewGetUserInfoRequest added in v1.64.0

func (c *Client) NewGetUserInfoRequest() *GetUserInfoRequest

func (*Client) NewGetWalletAccountsRequest added in v1.48.0

func (c *Client) NewGetWalletAccountsRequest(walletType WalletType) *GetWalletAccountsRequest

func (*Client) NewGetWalletClosedOrdersRequest added in v1.55.0

func (c *Client) NewGetWalletClosedOrdersRequest(walletType WalletType) *GetWalletClosedOrdersRequest

func (*Client) NewGetWalletOpenOrdersRequest added in v1.48.0

func (c *Client) NewGetWalletOpenOrdersRequest(walletType WalletType) *GetWalletOpenOrdersRequest

func (*Client) NewGetWalletOrderHistoryRequest added in v1.48.0

func (c *Client) NewGetWalletOrderHistoryRequest(walletType WalletType) *GetWalletOrderHistoryRequest

func (*Client) NewGetWalletTradesRequest added in v1.48.0

func (c *Client) NewGetWalletTradesRequest(walletType WalletType) *GetWalletTradesRequest

func (*Client) NewGetWithdrawalAddressesRequest added in v1.64.0

func (c *Client) NewGetWithdrawalAddressesRequest() *GetWithdrawalAddressesRequest

func (*Client) NewGetWithdrawalHistoryRequest added in v1.64.0

func (c *Client) NewGetWithdrawalHistoryRequest() *GetWithdrawalHistoryRequest

func (*Client) NewMarginLoanRequest added in v1.48.0

func (c *Client) NewMarginLoanRequest() *MarginLoanRequest

func (*Client) NewMarginRepayRequest added in v1.48.0

func (c *Client) NewMarginRepayRequest() *MarginRepayRequest

func (*Client) NewWithdrawalRequest added in v1.64.0

func (c *Client) NewWithdrawalRequest() *WithdrawalRequest

func (*Client) SelectApiKey added in v1.64.0

func (c *Client) SelectApiKey() (string, string)

func (*Client) SendRequest added in v1.64.0

func (c *Client) SendRequest(req *http.Request) (*requestgen.Response, error)

func (*Client) SetSubAccount added in v1.64.0

func (c *Client) SetSubAccount(subAccount string) *Client

type CreateSubAccountRequest added in v1.64.0

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

func (*CreateSubAccountRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*CreateSubAccountRequest) GetParameters added in v1.64.0

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

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

func (*CreateSubAccountRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*CreateSubAccountRequest) GetParametersQuery added in v1.64.0

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

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

func (*CreateSubAccountRequest) GetPath added in v1.64.0

func (c *CreateSubAccountRequest) GetPath() string

GetPath returns the request path of the API

func (*CreateSubAccountRequest) GetQueryParameters added in v1.64.0

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

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

func (*CreateSubAccountRequest) GetSlugParameters added in v1.64.0

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

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

func (*CreateSubAccountRequest) GetSlugsMap added in v1.64.0

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

func (*CreateSubAccountRequest) Name added in v1.64.0

* Name sets

type CreateWalletOrderRequest

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

func (*CreateWalletOrderRequest) ClientOrderID

func (c *CreateWalletOrderRequest) ClientOrderID(clientOrderID string) *CreateWalletOrderRequest

* ClientOrderID sets

func (*CreateWalletOrderRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*CreateWalletOrderRequest) GetParameters

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

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

func (*CreateWalletOrderRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*CreateWalletOrderRequest) GetParametersQuery

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

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

func (*CreateWalletOrderRequest) GetPath added in v1.60.2

func (c *CreateWalletOrderRequest) GetPath() string

GetPath returns the request path of the API

func (*CreateWalletOrderRequest) GetQueryParameters

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

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

func (*CreateWalletOrderRequest) GetSlugParameters

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

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

func (*CreateWalletOrderRequest) GetSlugsMap

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

func (*CreateWalletOrderRequest) GroupID

* GroupID sets

func (*CreateWalletOrderRequest) Market

* Market sets

func (*CreateWalletOrderRequest) OrderType

* OrderType sets

func (*CreateWalletOrderRequest) Price

* Price sets

func (*CreateWalletOrderRequest) Side

* Side sets

func (*CreateWalletOrderRequest) StopPrice

func (c *CreateWalletOrderRequest) StopPrice(stopPrice string) *CreateWalletOrderRequest

* StopPrice sets

func (*CreateWalletOrderRequest) Volume

* Volume sets

func (*CreateWalletOrderRequest) WalletType

* WalletType sets

type DeleteSubAccountRequest added in v1.64.0

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

func (*DeleteSubAccountRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*DeleteSubAccountRequest) GetParameters added in v1.64.0

func (d *DeleteSubAccountRequest) GetParameters() (map[string]interface{}, error)

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

func (*DeleteSubAccountRequest) GetParametersJSON added in v1.64.0

func (d *DeleteSubAccountRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*DeleteSubAccountRequest) GetParametersQuery added in v1.64.0

func (d *DeleteSubAccountRequest) GetParametersQuery() (url.Values, error)

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

func (*DeleteSubAccountRequest) GetPath added in v1.64.0

func (d *DeleteSubAccountRequest) GetPath() string

GetPath returns the request path of the API

func (*DeleteSubAccountRequest) GetQueryParameters added in v1.64.0

func (d *DeleteSubAccountRequest) GetQueryParameters() (url.Values, error)

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

func (*DeleteSubAccountRequest) GetSlugParameters added in v1.64.0

func (d *DeleteSubAccountRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*DeleteSubAccountRequest) GetSlugsMap added in v1.64.0

func (d *DeleteSubAccountRequest) GetSlugsMap() (map[string]string, error)

func (*DeleteSubAccountRequest) Sn added in v1.64.0

* Sn sets

type Deposit added in v1.64.0

type Deposit struct {
	UUID            string                     `json:"uuid"`
	Currency        string                     `json:"currency"`
	NetworkProtocol string                     `json:"network_protocol"`
	Amount          fixedpoint.Value           `json:"amount"`
	Address         string                     `json:"to_address"`
	TxID            string                     `json:"txid"`
	CreatedAt       types.MillisecondTimestamp `json:"created_at"`
	Confirmations   int64                      `json:"confirmations"`
	State           DepositState               `json:"state"`
	StateReason     string                     `json:"state_reason"`
}

type DepositState added in v1.64.0

type DepositState string
const (
	DepositStateProcessing DepositState = "processing"
	DepositStateFailed     DepositState = "failed"
	DepositStateCanceled   DepositState = "canceled"
	DepositStateDone       DepositState = "done"
)

type Depth added in v1.61.0

type Depth struct {
	Timestamp         int64                `json:"timestamp"`
	LastUpdateVersion int64                `json:"last_update_version"`
	LastUpdateId      int64                `json:"last_update_id"`
	Bids              [][]fixedpoint.Value `json:"bids"`
	Asks              [][]fixedpoint.Value `json:"asks"`
}

type GetDepositHistoryRequest added in v1.64.0

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

func (*GetDepositHistoryRequest) Currency added in v1.64.0

* Currency sets

func (*GetDepositHistoryRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetDepositHistoryRequest) GetParameters added in v1.64.0

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 added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetDepositHistoryRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetDepositHistoryRequest) GetPath added in v1.64.0

func (g *GetDepositHistoryRequest) GetPath() string

GetPath returns the request path of the API

func (*GetDepositHistoryRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetDepositHistoryRequest) GetSlugParameters added in v1.64.0

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 added in v1.64.0

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

func (*GetDepositHistoryRequest) Limit added in v1.64.0

* Limit sets

func (*GetDepositHistoryRequest) Order added in v1.64.0

* Order sets

func (*GetDepositHistoryRequest) Timestamp added in v1.64.0

* Timestamp sets

type GetDepthRequest added in v1.61.0

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

func (*GetDepthRequest) Do added in v1.61.0

func (g *GetDepthRequest) Do(ctx context.Context) (*Depth, error)

Do generates the request object and send the request object to the API endpoint

func (*GetDepthRequest) GetParameters added in v1.61.0

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

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

func (*GetDepthRequest) GetParametersJSON added in v1.61.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetDepthRequest) GetParametersQuery added in v1.61.0

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

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

func (*GetDepthRequest) GetPath added in v1.61.0

func (g *GetDepthRequest) GetPath() string

GetPath returns the request path of the API

func (*GetDepthRequest) GetQueryParameters added in v1.61.0

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

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

func (*GetDepthRequest) GetSlugParameters added in v1.61.0

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

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

func (*GetDepthRequest) GetSlugsMap added in v1.61.0

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

func (*GetDepthRequest) Limit added in v1.61.0

func (g *GetDepthRequest) Limit(limit int) *GetDepthRequest

* Limit sets

func (*GetDepthRequest) Market added in v1.61.0

func (g *GetDepthRequest) Market(market string) *GetDepthRequest

* Market sets

func (*GetDepthRequest) SortByPrice added in v1.61.0

func (g *GetDepthRequest) SortByPrice(sortByPrice bool) *GetDepthRequest

* SortByPrice sets

type GetKLinesRequest added in v1.64.0

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

func (*GetKLinesRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetKLinesRequest) GetParameters added in v1.64.0

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

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

func (*GetKLinesRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetKLinesRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetKLinesRequest) GetPath added in v1.64.0

func (g *GetKLinesRequest) GetPath() string

GetPath returns the request path of the API

func (*GetKLinesRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetKLinesRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetKLinesRequest) GetSlugsMap added in v1.64.0

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

func (*GetKLinesRequest) Limit added in v1.64.0

func (g *GetKLinesRequest) Limit(limit int) *GetKLinesRequest

* Limit sets

func (*GetKLinesRequest) Market added in v1.64.0

func (g *GetKLinesRequest) Market(market string) *GetKLinesRequest

* Market sets

func (*GetKLinesRequest) Period added in v1.64.0

func (g *GetKLinesRequest) Period(period int) *GetKLinesRequest

* Period sets

func (*GetKLinesRequest) Timestamp added in v1.64.0

func (g *GetKLinesRequest) Timestamp(timestamp time.Time) *GetKLinesRequest

* Timestamp sets

type GetMarginADRatioRequest

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

func (*GetMarginADRatioRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginADRatioRequest) GetParameters

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

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

func (*GetMarginADRatioRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarginADRatioRequest) GetParametersQuery

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

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

func (*GetMarginADRatioRequest) GetPath added in v1.60.2

func (g *GetMarginADRatioRequest) GetPath() string

GetPath returns the request path of the API

func (*GetMarginADRatioRequest) GetQueryParameters

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

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

func (*GetMarginADRatioRequest) GetSlugParameters

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

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

func (*GetMarginADRatioRequest) GetSlugsMap

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

type GetMarginBorrowingLimitsRequest

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

func (*GetMarginBorrowingLimitsRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginBorrowingLimitsRequest) GetParameters

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

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

func (*GetMarginBorrowingLimitsRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarginBorrowingLimitsRequest) GetParametersQuery

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

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

func (*GetMarginBorrowingLimitsRequest) GetPath added in v1.64.0

GetPath returns the request path of the API

func (*GetMarginBorrowingLimitsRequest) GetQueryParameters

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

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

func (*GetMarginBorrowingLimitsRequest) GetSlugParameters

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

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

func (*GetMarginBorrowingLimitsRequest) GetSlugsMap

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

type GetMarginInterestHistoryRequest

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

func (*GetMarginInterestHistoryRequest) Currency

* Currency sets

func (*GetMarginInterestHistoryRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginInterestHistoryRequest) EndTime

* EndTime sets

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) GetPath added in v1.64.0

GetPath returns the request path of the API

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

* Limit sets

func (*GetMarginInterestHistoryRequest) StartTime

* StartTime sets

type GetMarginInterestRatesRequest

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

func (*GetMarginInterestRatesRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginInterestRatesRequest) GetParameters

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

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

func (*GetMarginInterestRatesRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarginInterestRatesRequest) GetParametersQuery

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

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

func (*GetMarginInterestRatesRequest) GetPath added in v1.64.0

GetPath returns the request path of the API

func (*GetMarginInterestRatesRequest) GetQueryParameters

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

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

func (*GetMarginInterestRatesRequest) GetSlugParameters

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

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

func (*GetMarginInterestRatesRequest) GetSlugsMap

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

type GetMarginLiquidationHistoryRequest

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

func (*GetMarginLiquidationHistoryRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginLiquidationHistoryRequest) EndTime

* EndTime sets

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) GetPath added in v1.64.0

GetPath returns the request path of the API

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

* Limit sets

func (*GetMarginLiquidationHistoryRequest) StartTime

* StartTime sets

type GetMarginLoanHistoryRequest

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

func (*GetMarginLoanHistoryRequest) Currency

* Currency sets

func (*GetMarginLoanHistoryRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginLoanHistoryRequest) EndTime

* EndTime sets

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) GetPath added in v1.64.0

func (g *GetMarginLoanHistoryRequest) GetPath() string

GetPath returns the request path of the API

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

* Limit sets

func (*GetMarginLoanHistoryRequest) StartTime

* StartTime sets

type GetMarginRepaymentHistoryRequest

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

func (*GetMarginRepaymentHistoryRequest) Currency

* Currency sets

func (*GetMarginRepaymentHistoryRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetMarginRepaymentHistoryRequest) EndTime

* EndTime sets

func (*GetMarginRepaymentHistoryRequest) GetParameters

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

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

func (*GetMarginRepaymentHistoryRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarginRepaymentHistoryRequest) GetParametersQuery

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

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

func (*GetMarginRepaymentHistoryRequest) GetPath added in v1.64.0

GetPath returns the request path of the API

func (*GetMarginRepaymentHistoryRequest) GetQueryParameters

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

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

func (*GetMarginRepaymentHistoryRequest) GetSlugParameters

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

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

func (*GetMarginRepaymentHistoryRequest) GetSlugsMap

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

func (*GetMarginRepaymentHistoryRequest) Limit

* Limit sets

func (*GetMarginRepaymentHistoryRequest) StartTime

* StartTime sets

type GetMarketsRequest added in v1.64.0

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

func (*GetMarketsRequest) Do added in v1.64.0

func (g *GetMarketsRequest) Do(ctx context.Context) ([]Market, error)

Do generates the request object and send the request object to the API endpoint

func (*GetMarketsRequest) GetParameters added in v1.64.0

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

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

func (*GetMarketsRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetMarketsRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetMarketsRequest) GetPath added in v1.64.0

func (g *GetMarketsRequest) GetPath() string

GetPath returns the request path of the API

func (*GetMarketsRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetMarketsRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetMarketsRequest) GetSlugsMap added in v1.64.0

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

type GetOrderRequest

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

func (*GetOrderRequest) ClientOrderID

func (g *GetOrderRequest) ClientOrderID(clientOrderID string) *GetOrderRequest

* ClientOrderID sets

func (*GetOrderRequest) Do

func (g *GetOrderRequest) Do(ctx context.Context) (*Order, error)

Do generates the request object and send the request object to the API endpoint

func (*GetOrderRequest) GetParameters

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

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

func (*GetOrderRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetOrderRequest) GetParametersQuery

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

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

func (*GetOrderRequest) GetPath added in v1.60.2

func (g *GetOrderRequest) GetPath() string

GetPath returns the request path of the API

func (*GetOrderRequest) GetQueryParameters

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

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

func (*GetOrderRequest) GetSlugParameters

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

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

func (*GetOrderRequest) GetSlugsMap

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

func (*GetOrderRequest) Id

* Id sets

type GetOrderTradesRequest added in v1.39.0

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

func (*GetOrderTradesRequest) ClientOrderID added in v1.39.0

func (g *GetOrderTradesRequest) ClientOrderID(clientOrderID string) *GetOrderTradesRequest

* ClientOrderID sets

func (*GetOrderTradesRequest) Do added in v1.39.0

Do generates the request object and send the request object to the API endpoint

func (*GetOrderTradesRequest) GetParameters added in v1.39.0

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

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

func (*GetOrderTradesRequest) GetParametersJSON added in v1.39.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetOrderTradesRequest) GetParametersQuery added in v1.39.0

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

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

func (*GetOrderTradesRequest) GetPath added in v1.60.2

func (g *GetOrderTradesRequest) GetPath() string

GetPath returns the request path of the API

func (*GetOrderTradesRequest) GetQueryParameters added in v1.39.0

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

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

func (*GetOrderTradesRequest) GetSlugParameters added in v1.39.0

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

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

func (*GetOrderTradesRequest) GetSlugsMap added in v1.39.0

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

func (*GetOrderTradesRequest) OrderID added in v1.39.0

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

* OrderID sets

type GetRewardsRequest added in v1.64.0

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

func (*GetRewardsRequest) Currency added in v1.64.0

func (g *GetRewardsRequest) Currency(currency string) *GetRewardsRequest

* Currency sets

func (*GetRewardsRequest) Do added in v1.64.0

func (g *GetRewardsRequest) Do(ctx context.Context) ([]Reward, error)

Do generates the request object and send the request object to the API endpoint

func (*GetRewardsRequest) GetParameters added in v1.64.0

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

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

func (*GetRewardsRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetRewardsRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetRewardsRequest) GetPath added in v1.64.0

func (g *GetRewardsRequest) GetPath() string

GetPath returns the request path of the API

func (*GetRewardsRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetRewardsRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetRewardsRequest) GetSlugsMap added in v1.64.0

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

func (*GetRewardsRequest) Limit added in v1.64.0

func (g *GetRewardsRequest) Limit(limit int64) *GetRewardsRequest

* Limit sets

func (*GetRewardsRequest) Order added in v1.64.0

func (g *GetRewardsRequest) Order(order string) *GetRewardsRequest
  • Order sets order default: "desc"

Enum: "asc" "desc" order in created time.

func (*GetRewardsRequest) RewardType added in v1.64.0

func (g *GetRewardsRequest) RewardType(rewardType RewardType) *GetRewardsRequest

* RewardType sets

func (*GetRewardsRequest) Timestamp added in v1.64.0

func (g *GetRewardsRequest) Timestamp(timestamp int64) *GetRewardsRequest
  • Timestamp sets timestamp: timestamp in millisecond.

responses records whose created time less than or equal to specified timestamp if order in desc, responses records whose created time is greater than or equal to timestamp if order in asc. latest time as default.

type GetSubAccountsRequest added in v1.64.0

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

func (*GetSubAccountsRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetSubAccountsRequest) GetParameters added in v1.64.0

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

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

func (*GetSubAccountsRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetSubAccountsRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetSubAccountsRequest) GetPath added in v1.64.0

func (g *GetSubAccountsRequest) GetPath() string

GetPath returns the request path of the API

func (*GetSubAccountsRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetSubAccountsRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetSubAccountsRequest) GetSlugsMap added in v1.64.0

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

type GetTickerRequest added in v1.64.0

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

func (*GetTickerRequest) Do added in v1.64.0

func (g *GetTickerRequest) Do(ctx context.Context) (*Ticker, error)

Do generates the request object and send the request object to the API endpoint

func (*GetTickerRequest) GetParameters added in v1.64.0

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

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

func (*GetTickerRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetTickerRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetTickerRequest) GetPath added in v1.64.0

func (g *GetTickerRequest) GetPath() string

GetPath returns the request path of the API

func (*GetTickerRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetTickerRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetTickerRequest) GetSlugsMap added in v1.64.0

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

func (*GetTickerRequest) Market added in v1.64.0

func (g *GetTickerRequest) Market(market string) *GetTickerRequest

* Market sets

type GetTickersRequest added in v1.64.0

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

func (*GetTickersRequest) AddMarkets added in v1.64.0

func (g *GetTickersRequest) AddMarkets(markets ...string) *GetTickersRequest

func (*GetTickersRequest) Do added in v1.64.0

func (g *GetTickersRequest) Do(ctx context.Context) ([]Ticker, error)

Do generates the request object and send the request object to the API endpoint

func (*GetTickersRequest) GetParameters added in v1.64.0

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

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

func (*GetTickersRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetTickersRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetTickersRequest) GetPath added in v1.64.0

func (g *GetTickersRequest) GetPath() string

GetPath returns the request path of the API

func (*GetTickersRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetTickersRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetTickersRequest) GetSlugsMap added in v1.64.0

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

func (*GetTickersRequest) Markets added in v1.64.0

func (g *GetTickersRequest) Markets(markets []string) *GetTickersRequest

* Markets sets

type GetTimestampRequest added in v1.64.0

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

func (*GetTimestampRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetTimestampRequest) GetParameters added in v1.64.0

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

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

func (*GetTimestampRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetTimestampRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetTimestampRequest) GetPath added in v1.64.0

func (g *GetTimestampRequest) GetPath() string

GetPath returns the request path of the API

func (*GetTimestampRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetTimestampRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetTimestampRequest) GetSlugsMap added in v1.64.0

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

type GetUserInfoRequest added in v1.64.0

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

func (*GetUserInfoRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetUserInfoRequest) GetParameters added in v1.64.0

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

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

func (*GetUserInfoRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetUserInfoRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetUserInfoRequest) GetPath added in v1.64.0

func (g *GetUserInfoRequest) GetPath() string

GetPath returns the request path of the API

func (*GetUserInfoRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetUserInfoRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetUserInfoRequest) GetSlugsMap added in v1.64.0

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

type GetWalletAccountsRequest

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

func (*GetWalletAccountsRequest) Currency added in v1.48.0

* Currency sets

func (*GetWalletAccountsRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetWalletAccountsRequest) GetParameters

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

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

func (*GetWalletAccountsRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWalletAccountsRequest) GetParametersQuery

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

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

func (*GetWalletAccountsRequest) GetPath added in v1.64.0

func (g *GetWalletAccountsRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWalletAccountsRequest) GetQueryParameters

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

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

func (*GetWalletAccountsRequest) GetSlugParameters

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

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

func (*GetWalletAccountsRequest) GetSlugsMap

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

func (*GetWalletAccountsRequest) WalletType

* WalletType sets

type GetWalletClosedOrdersRequest added in v1.55.0

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

func (*GetWalletClosedOrdersRequest) Do added in v1.55.0

Do generates the request object and send the request object to the API endpoint

func (*GetWalletClosedOrdersRequest) GetParameters added in v1.55.0

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

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

func (*GetWalletClosedOrdersRequest) GetParametersJSON added in v1.55.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWalletClosedOrdersRequest) GetParametersQuery added in v1.55.0

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

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

func (*GetWalletClosedOrdersRequest) GetPath added in v1.64.0

func (g *GetWalletClosedOrdersRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWalletClosedOrdersRequest) GetQueryParameters added in v1.55.0

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

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

func (*GetWalletClosedOrdersRequest) GetSlugParameters added in v1.55.0

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

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

func (*GetWalletClosedOrdersRequest) GetSlugsMap added in v1.55.0

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

func (*GetWalletClosedOrdersRequest) Limit added in v1.55.0

* Limit sets

func (*GetWalletClosedOrdersRequest) Market added in v1.55.0

* Market sets

func (*GetWalletClosedOrdersRequest) OrderBy added in v1.55.0

* OrderBy sets

func (*GetWalletClosedOrdersRequest) Timestamp added in v1.55.0

* Timestamp sets

func (*GetWalletClosedOrdersRequest) WalletType added in v1.55.0

* WalletType sets

type GetWalletOpenOrdersRequest

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

func (*GetWalletOpenOrdersRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetWalletOpenOrdersRequest) GetParameters

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

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

func (*GetWalletOpenOrdersRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWalletOpenOrdersRequest) GetParametersQuery

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

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

func (*GetWalletOpenOrdersRequest) GetPath added in v1.64.0

func (g *GetWalletOpenOrdersRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWalletOpenOrdersRequest) GetQueryParameters

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

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

func (*GetWalletOpenOrdersRequest) GetSlugParameters

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

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

func (*GetWalletOpenOrdersRequest) GetSlugsMap

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

func (*GetWalletOpenOrdersRequest) Limit added in v1.55.0

* Limit sets

func (*GetWalletOpenOrdersRequest) Market

* Market sets

func (*GetWalletOpenOrdersRequest) OrderBy added in v1.55.0

* OrderBy sets

func (*GetWalletOpenOrdersRequest) Timestamp added in v1.55.0

* Timestamp sets

func (*GetWalletOpenOrdersRequest) WalletType

* WalletType sets

type GetWalletOrderHistoryRequest

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

func (*GetWalletOrderHistoryRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetWalletOrderHistoryRequest) FromID

* FromID sets

func (*GetWalletOrderHistoryRequest) GetParameters

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

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

func (*GetWalletOrderHistoryRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWalletOrderHistoryRequest) GetParametersQuery

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

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

func (*GetWalletOrderHistoryRequest) GetPath added in v1.64.0

func (g *GetWalletOrderHistoryRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWalletOrderHistoryRequest) GetQueryParameters

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

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

func (*GetWalletOrderHistoryRequest) GetSlugParameters

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

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

func (*GetWalletOrderHistoryRequest) GetSlugsMap

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

func (*GetWalletOrderHistoryRequest) Limit

* Limit sets

func (*GetWalletOrderHistoryRequest) Market

* Market sets

func (*GetWalletOrderHistoryRequest) WalletType

* WalletType sets

type GetWalletTradesRequest

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

func (*GetWalletTradesRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetWalletTradesRequest) FromID added in v1.60.0

* FromID sets

func (*GetWalletTradesRequest) GetParameters

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

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

func (*GetWalletTradesRequest) GetParametersJSON

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWalletTradesRequest) GetParametersQuery

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

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

func (*GetWalletTradesRequest) GetPath added in v1.64.0

func (g *GetWalletTradesRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWalletTradesRequest) GetQueryParameters

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

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

func (*GetWalletTradesRequest) GetSlugParameters

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

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

func (*GetWalletTradesRequest) GetSlugsMap

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

func (*GetWalletTradesRequest) Limit

* Limit sets

func (*GetWalletTradesRequest) Market

* Market sets

func (*GetWalletTradesRequest) Order added in v1.60.0

* Order sets

func (*GetWalletTradesRequest) Timestamp added in v1.60.0

func (g *GetWalletTradesRequest) Timestamp(timestamp time.Time) *GetWalletTradesRequest

* Timestamp sets

func (*GetWalletTradesRequest) WalletType

func (g *GetWalletTradesRequest) WalletType(walletType WalletType) *GetWalletTradesRequest

* WalletType sets

type GetWithdrawalAddressesRequest added in v1.64.0

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

func (*GetWithdrawalAddressesRequest) Currency added in v1.64.0

* Currency sets

func (*GetWithdrawalAddressesRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetWithdrawalAddressesRequest) GetParameters added in v1.64.0

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

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

func (*GetWithdrawalAddressesRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWithdrawalAddressesRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetWithdrawalAddressesRequest) GetPath added in v1.64.0

GetPath returns the request path of the API

func (*GetWithdrawalAddressesRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetWithdrawalAddressesRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetWithdrawalAddressesRequest) GetSlugsMap added in v1.64.0

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

func (*GetWithdrawalAddressesRequest) Limit added in v1.64.0

* Limit sets

func (*GetWithdrawalAddressesRequest) Offset added in v1.64.0

* Offset sets

type GetWithdrawalHistoryRequest added in v1.64.0

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

func (*GetWithdrawalHistoryRequest) Currency added in v1.64.0

* Currency sets

func (*GetWithdrawalHistoryRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*GetWithdrawalHistoryRequest) GetParameters added in v1.64.0

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

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

func (*GetWithdrawalHistoryRequest) GetParametersJSON added in v1.64.0

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

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetWithdrawalHistoryRequest) GetParametersQuery added in v1.64.0

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

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

func (*GetWithdrawalHistoryRequest) GetPath added in v1.64.0

func (g *GetWithdrawalHistoryRequest) GetPath() string

GetPath returns the request path of the API

func (*GetWithdrawalHistoryRequest) GetQueryParameters added in v1.64.0

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

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

func (*GetWithdrawalHistoryRequest) GetSlugParameters added in v1.64.0

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

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

func (*GetWithdrawalHistoryRequest) GetSlugsMap added in v1.64.0

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

func (*GetWithdrawalHistoryRequest) Limit added in v1.64.0

* Limit sets limit's default = 50

func (*GetWithdrawalHistoryRequest) Order added in v1.64.0

* Order sets order could be desc or asc

func (*GetWithdrawalHistoryRequest) State added in v1.64.0

* State sets

func (*GetWithdrawalHistoryRequest) Timestamp added in v1.64.0

* Timestamp sets

type KLineData added in v1.64.0

type KLineData []float64

type LiquidationRecord

type LiquidationRecord struct {
	SN              string                     `json:"sn"`
	AdRatio         fixedpoint.Value           `json:"ad_ratio"`
	ExpectedAdRatio fixedpoint.Value           `json:"expected_ad_ratio"`
	CreatedAt       types.MillisecondTimestamp `json:"created_at"`
	State           LiquidationState           `json:"state"`
}

type LiquidationState

type LiquidationState string
const (
	LiquidationStateProcessing LiquidationState = "processing"
	LiquidationStateDebt       LiquidationState = "debt"
	LiquidationStateLiquidated LiquidationState = "liquidated"
)

type Liquidity added in v1.50.3

type Liquidity string

type LoanRecord

type LoanRecord struct {
	SN           string                     `json:"sn"`
	Currency     string                     `json:"currency"`
	Amount       fixedpoint.Value           `json:"amount"`
	State        string                     `json:"state"`
	CreatedAt    types.MillisecondTimestamp `json:"created_at"`
	InterestRate fixedpoint.Value           `json:"interest_rate"`
}

type MarginBorrowingLimitMap

type MarginBorrowingLimitMap map[string]fixedpoint.Value

type MarginInterestRate

type MarginInterestRate struct {
	HourlyInterestRate     fixedpoint.Value `json:"hourly_interest_rate"`
	NextHourlyInterestRate fixedpoint.Value `json:"next_hourly_interest_rate"`
}

type MarginInterestRateMap

type MarginInterestRateMap map[string]MarginInterestRate

type MarginInterestRecord

type MarginInterestRecord struct {
	Currency     string                     `json:"currency"`
	Amount       fixedpoint.Value           `json:"amount"`
	InterestRate fixedpoint.Value           `json:"interest_rate"`
	CreatedAt    types.MillisecondTimestamp `json:"created_at"`
}

type MarginLoanRequest

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

func (*MarginLoanRequest) Amount

func (m *MarginLoanRequest) Amount(amount string) *MarginLoanRequest

* Amount sets

func (*MarginLoanRequest) Currency

func (m *MarginLoanRequest) Currency(currency string) *MarginLoanRequest

* Currency sets

func (*MarginLoanRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*MarginLoanRequest) GetParameters

func (m *MarginLoanRequest) GetParameters() (map[string]interface{}, error)

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

func (*MarginLoanRequest) GetParametersJSON

func (m *MarginLoanRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*MarginLoanRequest) GetParametersQuery

func (m *MarginLoanRequest) GetParametersQuery() (url.Values, error)

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

func (*MarginLoanRequest) GetPath added in v1.64.0

func (m *MarginLoanRequest) GetPath() string

GetPath returns the request path of the API

func (*MarginLoanRequest) GetQueryParameters

func (m *MarginLoanRequest) GetQueryParameters() (url.Values, error)

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

func (*MarginLoanRequest) GetSlugParameters

func (m *MarginLoanRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*MarginLoanRequest) GetSlugsMap

func (m *MarginLoanRequest) GetSlugsMap() (map[string]string, error)

type MarginRepayRequest

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

func (*MarginRepayRequest) Amount

func (m *MarginRepayRequest) Amount(amount string) *MarginRepayRequest

* Amount sets

func (*MarginRepayRequest) Currency

func (m *MarginRepayRequest) Currency(currency string) *MarginRepayRequest

* Currency sets

func (*MarginRepayRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*MarginRepayRequest) GetParameters

func (m *MarginRepayRequest) GetParameters() (map[string]interface{}, error)

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

func (*MarginRepayRequest) GetParametersJSON

func (m *MarginRepayRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*MarginRepayRequest) GetParametersQuery

func (m *MarginRepayRequest) GetParametersQuery() (url.Values, error)

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

func (*MarginRepayRequest) GetPath added in v1.64.0

func (m *MarginRepayRequest) GetPath() string

GetPath returns the request path of the API

func (*MarginRepayRequest) GetQueryParameters

func (m *MarginRepayRequest) GetQueryParameters() (url.Values, error)

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

func (*MarginRepayRequest) GetSlugParameters

func (m *MarginRepayRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*MarginRepayRequest) GetSlugsMap

func (m *MarginRepayRequest) GetSlugsMap() (map[string]string, error)

type MarginService

type MarginService struct {
	Client *Client
}

func (*MarginService) NewMarginTransferRequest added in v1.52.0

func (s *MarginService) NewMarginTransferRequest() *MarginTransferRequest

type MarginTransferRequest added in v1.52.0

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

func (*MarginTransferRequest) Amount added in v1.52.0

* Amount sets

func (*MarginTransferRequest) Currency added in v1.52.0

func (m *MarginTransferRequest) Currency(currency string) *MarginTransferRequest

* Currency sets

func (*MarginTransferRequest) Do added in v1.52.0

Do generates the request object and send the request object to the API endpoint

func (*MarginTransferRequest) GetParameters added in v1.52.0

func (m *MarginTransferRequest) GetParameters() (map[string]interface{}, error)

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

func (*MarginTransferRequest) GetParametersJSON added in v1.52.0

func (m *MarginTransferRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*MarginTransferRequest) GetParametersQuery added in v1.52.0

func (m *MarginTransferRequest) GetParametersQuery() (url.Values, error)

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

func (*MarginTransferRequest) GetPath added in v1.64.0

func (m *MarginTransferRequest) GetPath() string

GetPath returns the request path of the API

func (*MarginTransferRequest) GetQueryParameters added in v1.52.0

func (m *MarginTransferRequest) GetQueryParameters() (url.Values, error)

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

func (*MarginTransferRequest) GetSlugParameters added in v1.52.0

func (m *MarginTransferRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*MarginTransferRequest) GetSlugsMap added in v1.52.0

func (m *MarginTransferRequest) GetSlugsMap() (map[string]string, error)

func (*MarginTransferRequest) Side added in v1.52.0

* Side sets

type MarginTransferResponse added in v1.52.0

type MarginTransferResponse struct {
	Sn        string                     `json:"sn"`
	Side      MarginTransferSide         `json:"side"`
	Currency  string                     `json:"currency"`
	Amount    fixedpoint.Value           `json:"amount"`
	CreatedAt types.MillisecondTimestamp `json:"created_at"`
	State     string                     `json:"state"`
}

type MarginTransferSide added in v1.52.0

type MarginTransferSide string
const (
	MarginTransferSideIn  MarginTransferSide = "in"
	MarginTransferSideOut MarginTransferSide = "out"
)

type Market added in v1.64.0

type Market struct {
	ID                 string           `json:"id"`
	Name               string           `json:"name"`
	Status             string           `json:"market_status"` // active
	BaseUnit           string           `json:"base_unit"`
	BaseUnitPrecision  int              `json:"base_unit_precision"`
	QuoteUnit          string           `json:"quote_unit"`
	QuoteUnitPrecision int              `json:"quote_unit_precision"`
	MinBaseAmount      fixedpoint.Value `json:"min_base_amount"`
	MinQuoteAmount     fixedpoint.Value `json:"min_quote_amount"`
	SupportMargin      bool             `json:"m_wallet_supported"`
}

type Order

type Order = maxapi.Order

type OrderByType added in v1.55.0

type OrderByType = maxapi.OrderByType

type OrderCancelResponse added in v1.44.0

type OrderCancelResponse struct {
	Order Order
	Error *string
}

type OrderType added in v1.39.0

type OrderType = maxapi.OrderType

type Period added in v1.64.0

type Period int64

func IntervalToPeriod added in v1.64.0

func IntervalToPeriod(a string) (Period, error)

type RepaymentRecord

type RepaymentRecord struct {
	SN        string                     `json:"sn"`
	Currency  string                     `json:"currency"`
	Amount    fixedpoint.Value           `json:"amount"`
	Principal fixedpoint.Value           `json:"principal"`
	Interest  fixedpoint.Value           `json:"interest"`
	CreatedAt types.MillisecondTimestamp `json:"created_at"`
	State     string                     `json:"state"`
}

type Reward added in v1.64.0

type Reward struct {
	// UUID here is more like SN, not the real UUID
	UUID string `json:"uuid"`

	Type RewardType `json:"type"`

	Currency string `json:"currency"`

	Amount fixedpoint.Value `json:"amount"`

	Note string `json:"note"`

	// Unix timestamp in seconds
	CreatedAt types.MillisecondTimestamp `json:"created_at"`
}

type RewardType added in v1.64.0

type RewardType string

type SubAccount added in v1.64.0

type SubAccount struct {
	SN        string                     `json:"sn"`
	Name      string                     `json:"name"`
	CreatedAt types.MillisecondTimestamp `json:"created_at"`
}

type SubAccountService added in v1.64.0

type SubAccountService struct {
	Client *Client
}

func (*SubAccountService) NewCreateSubAccountRequest added in v1.64.0

func (s *SubAccountService) NewCreateSubAccountRequest() *CreateSubAccountRequest

func (*SubAccountService) NewDeleteSubAccountRequest added in v1.64.0

func (s *SubAccountService) NewDeleteSubAccountRequest() *DeleteSubAccountRequest

func (*SubAccountService) NewGetSubAccountsRequest added in v1.64.0

func (s *SubAccountService) NewGetSubAccountsRequest() *GetSubAccountsRequest

func (*SubAccountService) NewSubmitSubAccountTransferRequest added in v1.64.0

func (s *SubAccountService) NewSubmitSubAccountTransferRequest() *SubmitSubAccountTransferRequest

type SubAccountTransfer added in v1.64.0

type SubAccountTransfer struct {
	Sn       string           `json:"sn"`
	Currency string           `json:"currency"`
	Amount   fixedpoint.Value `json:"amount"`
	State    string           `json:"state"`

	CreatedAt types.MillisecondTimestamp `json:"created_at"`

	FromSubAccount struct {
		SN string `json:"sn"`
	} `json:"from_sub_account"`

	ToSubAccount struct {
		SN string `json:"sn"`
	} `json:"to_sub_account"`
}

type SubmitSubAccountTransferRequest added in v1.64.0

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

func (*SubmitSubAccountTransferRequest) Amount added in v1.64.0

* Amount sets

func (*SubmitSubAccountTransferRequest) Currency added in v1.64.0

* Currency sets

func (*SubmitSubAccountTransferRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*SubmitSubAccountTransferRequest) GetParameters added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetParameters() (map[string]interface{}, error)

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

func (*SubmitSubAccountTransferRequest) GetParametersJSON added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*SubmitSubAccountTransferRequest) GetParametersQuery added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetParametersQuery() (url.Values, error)

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

func (*SubmitSubAccountTransferRequest) GetPath added in v1.64.0

GetPath returns the request path of the API

func (*SubmitSubAccountTransferRequest) GetQueryParameters added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetQueryParameters() (url.Values, error)

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

func (*SubmitSubAccountTransferRequest) GetSlugParameters added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*SubmitSubAccountTransferRequest) GetSlugsMap added in v1.64.0

func (s *SubmitSubAccountTransferRequest) GetSlugsMap() (map[string]string, error)

func (*SubmitSubAccountTransferRequest) ToMain added in v1.64.0

* ToMain sets

func (*SubmitSubAccountTransferRequest) ToSN added in v1.64.0

* ToSN sets

type Ticker added in v1.64.0

type Ticker struct {
	Market string `json:"market"`

	At types.MillisecondTimestamp `json:"at"`

	Buy    fixedpoint.Value `json:"buy"`
	BuyVol fixedpoint.Value `json:"buy_vol"`

	Sell    fixedpoint.Value `json:"sell"`
	SellVol fixedpoint.Value `json:"sell_vol"`

	Open fixedpoint.Value `json:"open"`
	High fixedpoint.Value `json:"high"`
	Low  fixedpoint.Value `json:"low"`
	Last fixedpoint.Value `json:"last"`

	Volume        fixedpoint.Value `json:"vol"`
	VolumeInBTC   fixedpoint.Value `json:"vol_in_btc"`
	VolumeInQuote fixedpoint.Value `json:"vol_in_quote"`
}

type TimestampResponse added in v1.64.0

type TimestampResponse struct {
	TimestampInSeconds int64 `json:"timestamp"`
}

type Trade

type Trade struct {
	ID                        uint64                     `json:"id" db:"exchange_id"`
	WalletType                WalletType                 `json:"wallet_type,omitempty"`
	Price                     fixedpoint.Value           `json:"price"`
	Volume                    fixedpoint.Value           `json:"volume"`
	Funds                     fixedpoint.Value           `json:"funds"`
	Market                    string                     `json:"market"`
	MarketName                string                     `json:"market_name"`
	CreatedAt                 types.MillisecondTimestamp `json:"created_at"`
	Side                      string                     `json:"side"`
	OrderID                   uint64                     `json:"order_id"`
	Fee                       *fixedpoint.Value          `json:"fee"` // float number in string, could be optional
	FeeCurrency               string                     `json:"fee_currency"`
	FeeDiscounted             bool                       `json:"fee_discounted"`
	Liquidity                 Liquidity                  `json:"liquidity"`
	SelfTradeBidFee           fixedpoint.Value           `json:"self_trade_bid_fee"`
	SelfTradeBidFeeCurrency   string                     `json:"self_trade_bid_fee_currency"`
	SelfTradeBidFeeDiscounted bool                       `json:"self_trade_bid_fee_discounted"`
	SelfTradeBidOrderID       uint64                     `json:"self_trade_bid_order_id"`
}

func (Trade) IsBuyer added in v1.44.0

func (t Trade) IsBuyer() bool

func (Trade) IsMaker added in v1.44.0

func (t Trade) IsMaker() bool

type TransactionType added in v1.64.0

type TransactionType string
const (
	TransactionTypeExternal TransactionType = "external"
	TransactionTypeInternal TransactionType = "internal"
)

type UserInfo added in v1.64.0

type UserInfo maxapi.UserInfo

type WalletType

type WalletType = maxapi.WalletType

create type alias

type WithdrawState added in v1.64.0

type WithdrawState string
const (
	WithdrawStateProcessing WithdrawState = "processing"
	WithdrawStateFailed     WithdrawState = "failed"
	WithdrawStateCanceled   WithdrawState = "canceled"
	WithdrawStateDone       WithdrawState = "done"
)

type Withdrawal added in v1.64.0

type Withdrawal struct {
	UUID            string                     `json:"uuid"`
	Currency        string                     `json:"currency"`
	NetworkProtocol string                     `json:"network_protocol"`
	Amount          fixedpoint.Value           `json:"amount"`
	Fee             fixedpoint.Value           `json:"fee"`
	FeeCurrency     string                     `json:"fee_currency"`
	Address         string                     `json:"to_address"`
	Label           string                     `json:"label"`
	TxID            string                     `json:"txid"`
	CreatedAt       types.MillisecondTimestamp `json:"created_at"`
	State           WithdrawState              `json:"state"`
	TransactionType TransactionType            `json:"transaction_type"`
}

type WithdrawalAddress added in v1.64.0

type WithdrawalAddress struct {
	UUID            string                      `json:"uuid"`
	Currency        string                      `json:"currency"`
	NetworkProtocol string                      `json:"network_protocol"`
	Address         string                      `json:"address"`
	ExtraLabel      string                      `json:"extra_label"`
	CreatedAt       types.MillisecondTimestamp  `json:"created_at"`
	ActivatedAt     *types.MillisecondTimestamp `json:"activated_at"`
	IsInternal      bool                        `json:"is_internal"`
}

type WithdrawalRequest added in v1.64.0

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

func (*WithdrawalRequest) AddressUUID added in v1.64.0

func (w *WithdrawalRequest) AddressUUID(addressUUID string) *WithdrawalRequest

* AddressUUID sets

func (*WithdrawalRequest) Amount added in v1.64.0

func (w *WithdrawalRequest) Amount(amount float64) *WithdrawalRequest

* Amount sets

func (*WithdrawalRequest) Currency added in v1.64.0

func (w *WithdrawalRequest) Currency(currency string) *WithdrawalRequest

* Currency sets

func (*WithdrawalRequest) Do added in v1.64.0

Do generates the request object and send the request object to the API endpoint

func (*WithdrawalRequest) GetParameters added in v1.64.0

func (w *WithdrawalRequest) GetParameters() (map[string]interface{}, error)

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

func (*WithdrawalRequest) GetParametersJSON added in v1.64.0

func (w *WithdrawalRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*WithdrawalRequest) GetParametersQuery added in v1.64.0

func (w *WithdrawalRequest) GetParametersQuery() (url.Values, error)

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

func (*WithdrawalRequest) GetPath added in v1.64.0

func (w *WithdrawalRequest) GetPath() string

GetPath returns the request path of the API

func (*WithdrawalRequest) GetQueryParameters added in v1.64.0

func (w *WithdrawalRequest) GetQueryParameters() (url.Values, error)

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

func (*WithdrawalRequest) GetSlugParameters added in v1.64.0

func (w *WithdrawalRequest) GetSlugParameters() (map[string]interface{}, error)

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

func (*WithdrawalRequest) GetSlugsMap added in v1.64.0

func (w *WithdrawalRequest) GetSlugsMap() (map[string]string, error)

Source Files

Jump to

Keyboard shortcuts

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