v3

package
v1.55.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: AGPL-3.0 Imports: 12 Imported by: 2 modules, 1 package

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

Documentation

Index

Constants

View Source
const (
	LiquidityMaker = "maker"
	LiquidityTaker = "taker"
)

Variables

This section is empty.

Functions

This section is empty.

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

func (*CancelOrderRequest) Do

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

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

type CancelWalletOrderAllRequest

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

func (*CancelWalletOrderAllRequest) Do

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

func (*CancelWalletOrderAllRequest) Market

func (*CancelWalletOrderAllRequest) Side

func (*CancelWalletOrderAllRequest) WalletType

type Client added in v1.48.0

type Client struct {
	Client requestgen.AuthenticatedAPIClient
}

func (*Client) NewCancelOrderRequest added in v1.48.0

func (s *Client) NewCancelOrderRequest() *CancelOrderRequest

func (*Client) NewCancelWalletOrderAllRequest added in v1.48.0

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

func (*Client) NewCreateWalletOrderRequest added in v1.48.0

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

func (*Client) NewGetMarginADRatioRequest added in v1.48.0

func (s *Client) NewGetMarginADRatioRequest() *GetMarginADRatioRequest

func (*Client) NewGetMarginBorrowingLimitsRequest added in v1.48.0

func (s *Client) NewGetMarginBorrowingLimitsRequest() *GetMarginBorrowingLimitsRequest

func (*Client) NewGetMarginInterestHistoryRequest added in v1.48.0

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

func (*Client) NewGetMarginInterestRatesRequest added in v1.48.0

func (s *Client) NewGetMarginInterestRatesRequest() *GetMarginInterestRatesRequest

func (*Client) NewGetMarginLiquidationHistoryRequest added in v1.48.0

func (s *Client) NewGetMarginLiquidationHistoryRequest() *GetMarginLiquidationHistoryRequest

func (*Client) NewGetMarginLoanHistoryRequest added in v1.48.0

func (s *Client) NewGetMarginLoanHistoryRequest() *GetMarginLoanHistoryRequest

func (*Client) NewGetOrderRequest added in v1.48.0

func (s *Client) NewGetOrderRequest() *GetOrderRequest

func (*Client) NewGetOrderTradesRequest added in v1.48.0

func (s *Client) NewGetOrderTradesRequest() *GetOrderTradesRequest

func (*Client) NewGetWalletAccountsRequest added in v1.48.0

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

func (*Client) NewGetWalletClosedOrdersRequest added in v1.55.0

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

func (*Client) NewGetWalletOpenOrdersRequest added in v1.48.0

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

func (*Client) NewGetWalletOrderHistoryRequest added in v1.48.0

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

func (*Client) NewGetWalletTradesRequest added in v1.48.0

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

func (*Client) NewMarginLoanRequest added in v1.48.0

func (s *Client) NewMarginLoanRequest() *MarginLoanRequest

func (*Client) NewMarginRepayRequest added in v1.48.0

func (s *Client) NewMarginRepayRequest() *MarginRepayRequest

type CreateWalletOrderRequest

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

func (*CreateWalletOrderRequest) ClientOrderID

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

func (*CreateWalletOrderRequest) Do

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

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

func (*CreateWalletOrderRequest) Market

func (*CreateWalletOrderRequest) OrderType

func (c *CreateWalletOrderRequest) OrderType(orderType max.OrderType) *CreateWalletOrderRequest

func (*CreateWalletOrderRequest) Price

func (*CreateWalletOrderRequest) Side

func (*CreateWalletOrderRequest) StopPrice

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

func (*CreateWalletOrderRequest) Volume

func (*CreateWalletOrderRequest) WalletType

func (c *CreateWalletOrderRequest) WalletType(walletType max.WalletType) *CreateWalletOrderRequest

type GetMarginADRatioRequest

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

func (*GetMarginADRatioRequest) Do

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

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

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

func (*GetMarginInterestHistoryRequest) StartTime

type GetMarginInterestRatesRequest

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

func (*GetMarginInterestRatesRequest) Do

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

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

func (*GetMarginLiquidationHistoryRequest) StartTime

type GetMarginLoanHistoryRequest

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

func (*GetMarginLoanHistoryRequest) Currency

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

func (*GetMarginLoanHistoryRequest) StartTime

type GetMarginRepaymentHistoryRequest

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

func (*GetMarginRepaymentHistoryRequest) Currency

func (*GetMarginRepaymentHistoryRequest) Do

func (*GetMarginRepaymentHistoryRequest) EndTime

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

func (*GetMarginRepaymentHistoryRequest) StartTime

type GetOrderRequest

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

func (*GetOrderRequest) ClientOrderID

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

func (*GetOrderRequest) Do

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

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

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

func (*GetOrderTradesRequest) Do added in v1.39.0

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

type GetWalletAccountsRequest

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

func (*GetWalletAccountsRequest) Currency added in v1.48.0

func (*GetWalletAccountsRequest) Do

func (g *GetWalletAccountsRequest) Do(ctx context.Context) ([]max.Account, error)

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

func (g *GetWalletAccountsRequest) WalletType(walletType max.WalletType) *GetWalletAccountsRequest

type GetWalletClosedOrdersRequest added in v1.55.0

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

func (*GetWalletClosedOrdersRequest) Do added in v1.55.0

func (g *GetWalletClosedOrdersRequest) Do(ctx context.Context) ([]max.Order, error)

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

func (*GetWalletClosedOrdersRequest) Market added in v1.55.0

func (*GetWalletClosedOrdersRequest) OrderBy added in v1.55.0

func (g *GetWalletClosedOrdersRequest) OrderBy(orderBy max.OrderByType) *GetWalletClosedOrdersRequest

func (*GetWalletClosedOrdersRequest) Timestamp added in v1.55.0

func (*GetWalletClosedOrdersRequest) WalletType added in v1.55.0

func (g *GetWalletClosedOrdersRequest) WalletType(walletType max.WalletType) *GetWalletClosedOrdersRequest

type GetWalletOpenOrdersRequest

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

func (*GetWalletOpenOrdersRequest) Do

func (g *GetWalletOpenOrdersRequest) Do(ctx context.Context) ([]max.Order, error)

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

func (*GetWalletOpenOrdersRequest) Market

func (*GetWalletOpenOrdersRequest) OrderBy added in v1.55.0

func (g *GetWalletOpenOrdersRequest) OrderBy(orderBy max.OrderByType) *GetWalletOpenOrdersRequest

func (*GetWalletOpenOrdersRequest) Timestamp added in v1.55.0

func (*GetWalletOpenOrdersRequest) WalletType

func (g *GetWalletOpenOrdersRequest) WalletType(walletType max.WalletType) *GetWalletOpenOrdersRequest

type GetWalletOrderHistoryRequest

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

func (*GetWalletOrderHistoryRequest) Do

func (g *GetWalletOrderHistoryRequest) Do(ctx context.Context) ([]max.Order, error)

func (*GetWalletOrderHistoryRequest) FromID

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

func (*GetWalletOrderHistoryRequest) Market

func (*GetWalletOrderHistoryRequest) WalletType

func (g *GetWalletOrderHistoryRequest) WalletType(walletType max.WalletType) *GetWalletOrderHistoryRequest

type GetWalletTradesRequest

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

func (*GetWalletTradesRequest) Do

func (*GetWalletTradesRequest) EndTime

func (*GetWalletTradesRequest) From

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

func (*GetWalletTradesRequest) Market

func (*GetWalletTradesRequest) StartTime

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

func (*GetWalletTradesRequest) WalletType

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

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

func (*MarginLoanRequest) Currency

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

func (*MarginLoanRequest) Do

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

func (*MarginRepayRequest) Currency

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

func (*MarginRepayRequest) Do

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) 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 *maxapi.RestClient
}

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

func (*MarginTransferRequest) Currency added in v1.52.0

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

func (*MarginTransferRequest) Do added in v1.52.0

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

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 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 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 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 as string
	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 WalletType

type WalletType = maxapi.WalletType

create type alias

Jump to

Keyboard shortcuts

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