Documentation ¶
Index ¶
- Constants
- Variables
- func ParseMessage(payload []byte) (interface{}, error)
- func ParseUserEvent(v *fastjson.Value) (interface{}, error)
- type Account
- type AccountService
- func (s *AccountService) NewGetAccountRequest() *GetAccountRequest
- func (s *AccountService) NewGetAccountsRequest() *GetAccountsRequest
- func (s *AccountService) NewGetDepositHistoryRequest() *GetDepositHistoryRequest
- func (s *AccountService) NewGetMeRequest() *GetMeRequest
- func (s *AccountService) NewGetVipLevelRequest() *GetVipLevelRequest
- func (s *AccountService) NewGetWithdrawalHistoryRequest() *GetWithdrawHistoryRequest
- type AccountSnapshotEvent
- type AccountUpdateEvent
- type AuthEvent
- type AuthMessage
- type Balance
- type BalanceMessage
- type BaseEvent
- type BookEntry
- type BookEvent
- type CreateMultiOrderRequest
- func (r *CreateMultiOrderRequest) AddOrders(orders ...Order) *CreateMultiOrderRequest
- func (r *CreateMultiOrderRequest) Do(ctx context.Context) (multiOrderResponse *MultiOrderResponse, err error)
- func (r *CreateMultiOrderRequest) GroupID(groupID uint32) *CreateMultiOrderRequest
- func (r *CreateMultiOrderRequest) Market(market string) *CreateMultiOrderRequest
- type CreateOrderRequest
- func (c *CreateOrderRequest) ClientOrderID(clientOrderID string) *CreateOrderRequest
- func (c *CreateOrderRequest) Do(ctx context.Context) (*Order, error)
- func (c *CreateOrderRequest) GetParameters() (map[string]interface{}, error)
- func (c *CreateOrderRequest) GetParametersJSON() ([]byte, error)
- func (c *CreateOrderRequest) GetParametersQuery() (url.Values, error)
- func (c *CreateOrderRequest) GetQueryParameters() (url.Values, error)
- func (c *CreateOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (c *CreateOrderRequest) GetSlugsMap() (map[string]string, error)
- func (c *CreateOrderRequest) GroupID(groupID string) *CreateOrderRequest
- func (c *CreateOrderRequest) Market(market string) *CreateOrderRequest
- func (c *CreateOrderRequest) OrderType(orderType string) *CreateOrderRequest
- func (c *CreateOrderRequest) Price(price string) *CreateOrderRequest
- func (c *CreateOrderRequest) Side(side string) *CreateOrderRequest
- func (c *CreateOrderRequest) StopPrice(stopPrice string) *CreateOrderRequest
- func (c *CreateOrderRequest) Volume(volume string) *CreateOrderRequest
- type Deposit
- type ErrorEvent
- type ErrorField
- type ErrorResponse
- type GetAccountRequest
- func (g *GetAccountRequest) Currency(currency string) *GetAccountRequest
- func (g *GetAccountRequest) Do(ctx context.Context) (*Account, error)
- func (g *GetAccountRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountRequest) GetSlugsMap() (map[string]string, error)
- type GetAccountsRequest
- func (g *GetAccountsRequest) Do(ctx context.Context) ([]Account, error)
- func (g *GetAccountsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountsRequest) GetSlugsMap() (map[string]string, error)
- type GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) Currency(currency string) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) Do(ctx context.Context) ([]Deposit, error)
- func (g *GetDepositHistoryRequest) From(from int64) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetDepositHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetDepositHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetDepositHistoryRequest) Limit(limit int) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) State(state string) *GetDepositHistoryRequest
- func (g *GetDepositHistoryRequest) To(to int64) *GetDepositHistoryRequest
- type GetMeRequest
- func (g *GetMeRequest) Do(ctx context.Context) (*UserInfo, error)
- func (g *GetMeRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMeRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMeRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMeRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMeRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMeRequest) GetSlugsMap() (map[string]string, error)
- type GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]Order, error)
- func (g *GetOrderHistoryRequest) FromID(fromID uint64) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderHistoryRequest) Limit(limit uint) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Market(market string) *GetOrderHistoryRequest
- type GetOrderRequest
- func (g *GetOrderRequest) ClientOrderID(clientOrderID string) *GetOrderRequest
- func (g *GetOrderRequest) Do(ctx context.Context) (*Order, error)
- func (g *GetOrderRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderRequest) Id(id uint64) *GetOrderRequest
- type GetOrdersRequest
- func (g *GetOrdersRequest) Do(ctx context.Context) ([]Order, error)
- func (g *GetOrdersRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrdersRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrdersRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrdersRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrdersRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrdersRequest) GroupID(groupID uint32) *GetOrdersRequest
- func (g *GetOrdersRequest) Limit(limit int) *GetOrdersRequest
- func (g *GetOrdersRequest) Market(market string) *GetOrdersRequest
- func (g *GetOrdersRequest) Offset(offset int) *GetOrdersRequest
- func (g *GetOrdersRequest) OrderBy(orderBy string) *GetOrdersRequest
- func (g *GetOrdersRequest) Page(page int) *GetOrdersRequest
- func (g *GetOrdersRequest) Side(side string) *GetOrdersRequest
- func (g *GetOrdersRequest) State(state []OrderState) *GetOrdersRequest
- type GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) Do(ctx context.Context) ([]Trade, error)
- func (p *GetPrivateTradesRequest) From(from int64) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) GetParameters() (map[string]interface{}, error)
- func (p *GetPrivateTradesRequest) GetParametersJSON() ([]byte, error)
- func (p *GetPrivateTradesRequest) GetParametersQuery() (url.Values, error)
- func (p *GetPrivateTradesRequest) GetQueryParameters() (url.Values, error)
- func (p *GetPrivateTradesRequest) GetSlugParameters() (map[string]interface{}, error)
- func (p *GetPrivateTradesRequest) GetSlugsMap() (map[string]string, error)
- func (p *GetPrivateTradesRequest) Limit(limit int64) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) Market(market string) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) Offset(offset int64) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) OrderBy(orderBy string) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) Pagination(pagination bool) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) Timestamp(timestamp time.Time) *GetPrivateTradesRequest
- func (p *GetPrivateTradesRequest) To(to int64) *GetPrivateTradesRequest
- type GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) Do(ctx context.Context) ([]Reward, error)
- func (g *GetRewardsOfTypeRequest) From(from int64) *GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetRewardsOfTypeRequest) GetParametersJSON() ([]byte, error)
- func (g *GetRewardsOfTypeRequest) GetParametersQuery() (url.Values, error)
- func (g *GetRewardsOfTypeRequest) GetQueryParameters() (url.Values, error)
- func (g *GetRewardsOfTypeRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetRewardsOfTypeRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetRewardsOfTypeRequest) Limit(limit int64) *GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) Offset(offset int64) *GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) Page(page int64) *GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) PathType(pathType RewardType) *GetRewardsOfTypeRequest
- func (g *GetRewardsOfTypeRequest) To(to int64) *GetRewardsOfTypeRequest
- type GetRewardsRequest
- func (g *GetRewardsRequest) Currency(currency string) *GetRewardsRequest
- func (g *GetRewardsRequest) Do(ctx context.Context) ([]Reward, error)
- func (g *GetRewardsRequest) From(from int64) *GetRewardsRequest
- func (g *GetRewardsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetRewardsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetRewardsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetRewardsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetRewardsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetRewardsRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetRewardsRequest) Limit(limit int64) *GetRewardsRequest
- func (g *GetRewardsRequest) Offset(offset int64) *GetRewardsRequest
- func (g *GetRewardsRequest) Page(page int64) *GetRewardsRequest
- func (g *GetRewardsRequest) To(to int64) *GetRewardsRequest
- type GetVipLevelRequest
- func (g *GetVipLevelRequest) Do(ctx context.Context) (*VipLevel, error)
- func (g *GetVipLevelRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetVipLevelRequest) GetParametersJSON() ([]byte, error)
- func (g *GetVipLevelRequest) GetParametersQuery() (url.Values, error)
- func (g *GetVipLevelRequest) GetQueryParameters() (url.Values, error)
- func (g *GetVipLevelRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetVipLevelRequest) GetSlugsMap() (map[string]string, error)
- type GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Currency(currency string) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) Do(ctx context.Context) ([]Withdraw, error)
- func (g *GetWithdrawHistoryRequest) From(from int64) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetWithdrawHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetWithdrawHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetWithdrawHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetWithdrawHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetWithdrawHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetWithdrawHistoryRequest) Limit(limit int) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) State(state string) *GetWithdrawHistoryRequest
- func (g *GetWithdrawHistoryRequest) To(to int64) *GetWithdrawHistoryRequest
- type GetWithdrawalAddressesRequest
- func (g *GetWithdrawalAddressesRequest) Currency(currency string) *GetWithdrawalAddressesRequest
- func (g *GetWithdrawalAddressesRequest) Do(ctx context.Context) ([]WithdrawalAddress, error)
- func (g *GetWithdrawalAddressesRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetWithdrawalAddressesRequest) GetParametersJSON() ([]byte, error)
- func (g *GetWithdrawalAddressesRequest) GetParametersQuery() (url.Values, error)
- func (g *GetWithdrawalAddressesRequest) GetQueryParameters() (url.Values, error)
- func (g *GetWithdrawalAddressesRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetWithdrawalAddressesRequest) GetSlugsMap() (map[string]string, error)
- type Interval
- type KLine
- type KLineEvent
- type KLinePayload
- type MarkerInfo
- type Market
- type MultiOrderRequestParams
- type MultiOrderResponse
- type Options
- type Order
- type OrderCancelAllRequest
- func (o *OrderCancelAllRequest) Do(ctx context.Context) ([]Order, error)
- func (o *OrderCancelAllRequest) GetParameters() (map[string]interface{}, error)
- func (o *OrderCancelAllRequest) GetParametersJSON() ([]byte, error)
- func (o *OrderCancelAllRequest) GetParametersQuery() (url.Values, error)
- func (o *OrderCancelAllRequest) GetQueryParameters() (url.Values, error)
- func (o *OrderCancelAllRequest) GetSlugParameters() (map[string]interface{}, error)
- func (o *OrderCancelAllRequest) GetSlugsMap() (map[string]string, error)
- func (o *OrderCancelAllRequest) GroupID(groupID uint32) *OrderCancelAllRequest
- func (o *OrderCancelAllRequest) Market(market string) *OrderCancelAllRequest
- func (o *OrderCancelAllRequest) Side(side string) *OrderCancelAllRequest
- type OrderCancelRequest
- func (o *OrderCancelRequest) ClientOrderID(clientOrderID string) *OrderCancelRequest
- func (o *OrderCancelRequest) Do(ctx context.Context) (*Order, error)
- func (o *OrderCancelRequest) GetParameters() (map[string]interface{}, error)
- func (o *OrderCancelRequest) GetParametersJSON() ([]byte, error)
- func (o *OrderCancelRequest) GetParametersQuery() (url.Values, error)
- func (o *OrderCancelRequest) GetQueryParameters() (url.Values, error)
- func (o *OrderCancelRequest) GetSlugParameters() (map[string]interface{}, error)
- func (o *OrderCancelRequest) GetSlugsMap() (map[string]string, error)
- func (o *OrderCancelRequest) Id(id uint64) *OrderCancelRequest
- type OrderService
- func (s *OrderService) All(market string, limit, page int, states ...OrderState) ([]Order, error)
- func (s *OrderService) Closed(market string, options QueryOrderOptions) ([]Order, error)
- func (s *OrderService) CreateMulti(market string, orders []Order) (*MultiOrderResponse, error)
- func (s *OrderService) NewCreateMultiOrderRequest() *CreateMultiOrderRequest
- func (s *OrderService) NewCreateOrderRequest() *CreateOrderRequest
- func (s *OrderService) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
- func (s *OrderService) NewGetOrderRequest() *GetOrderRequest
- func (s *OrderService) NewGetOrdersRequest() *GetOrdersRequest
- func (s *OrderService) NewOrderCancelAllRequest() *OrderCancelAllRequest
- func (s *OrderService) NewOrderCancelRequest() *OrderCancelRequest
- func (s *OrderService) Open(market string, options QueryOrderOptions) ([]Order, error)
- type OrderSnapshotEvent
- type OrderState
- type OrderStateToQuery
- type OrderType
- type OrderUpdate
- type OrderUpdateEvent
- type PrivateRequestParams
- type PublicService
- func (s *PublicService) KLines(symbol string, resolution string, start time.Time, limit int) ([]KLine, error)
- func (s *PublicService) Markets() ([]Market, error)
- func (s *PublicService) Ticker(market string) (*Ticker, error)
- func (s *PublicService) Tickers() (map[string]Ticker, error)
- func (s *PublicService) Timestamp() (serverTimestamp int64, err error)
- type PublicTradeEvent
- type QueryOrderOptions
- type QueryTradeOptions
- type RestClient
- func (c *RestClient) Auth(key string, secret string) *RestClient
- func (c *RestClient) Do(req *http.Request) (resp *http.Response, err error)
- func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, m string, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) NewRequest(ctx context.Context, method string, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
- type Reward
- type RewardService
- type RewardType
- type SubscribeOptions
- type Subscription
- type SubscriptionEvent
- type Ticker
- type Trade
- type TradeEntry
- type TradeInfo
- type TradeService
- type TradeSnapshot
- type TradeSnapshotEvent
- type TradeUpdate
- type TradeUpdateEvent
- type UserBank
- type UserInfo
- type VipLevel
- type VipLevelSettings
- type WebsocketCommand
- type Withdraw
- type WithdrawalAddress
- type WithdrawalRequest
- func (w *WithdrawalRequest) AddressUUID(addressUUID string) *WithdrawalRequest
- func (w *WithdrawalRequest) Amount(amount float64) *WithdrawalRequest
- func (w *WithdrawalRequest) Currency(currency string) *WithdrawalRequest
- func (w *WithdrawalRequest) Do(ctx context.Context) (*Withdraw, error)
- func (w *WithdrawalRequest) GetParameters() (map[string]interface{}, error)
- func (w *WithdrawalRequest) GetParametersJSON() ([]byte, error)
- func (w *WithdrawalRequest) GetParametersQuery() (url.Values, error)
- func (w *WithdrawalRequest) GetQueryParameters() (url.Values, error)
- func (w *WithdrawalRequest) GetSlugParameters() (map[string]interface{}, error)
- func (w *WithdrawalRequest) GetSlugsMap() (map[string]string, error)
- type WithdrawalService
Constants ¶
const ( All = iota Active Closed )
const ( OrderStateDone = OrderState("done") OrderStateCancel = OrderState("cancel") OrderStateWait = OrderState("wait") OrderStateConvert = OrderState("convert") OrderStateFinalizing = OrderState("finalizing") OrderStateFailed = OrderState("failed") )
const ( OrderTypeMarket = OrderType("market") OrderTypeLimit = OrderType("limit") OrderTypePostOnly = OrderType("post_only") OrderTypeStopLimit = OrderType("stop_limit") OrderTypeStopMarket = OrderType("stop_market") OrderTypeIOCLimit = OrderType("ioc_limit") )
Order types that the API can return.
const ( // ProductionAPIURL is the official MAX API v2 Endpoint ProductionAPIURL = "https://max-api.maicoin.com/api/v2" UserAgent = "bbgo/" + version.Version // 2018-09-01 08:00:00 +0800 CST TimestampSince = 1535760000 )
const ( RewardAirdrop = RewardType("airdrop_reward") RewardCommission = RewardType("commission") RewardHolding = RewardType("holding_reward") RewardMining = RewardType("mining_reward") RewardTrading = RewardType("trading_reward") RewardRedemption = RewardType("redemption_reward") RewardVipRebate = RewardType("vip_rebate") )
const Buy = 1
const Sell = -1
Variables ¶
var ErrIncorrectBookEntryElementLength = errors.New("incorrect book entry element length")
var ErrMessageTypeNotSupported = errors.New("message type currently not supported")
var SubscribeAction = "subscribe"
var UnsubscribeAction = "unsubscribe"
var WebSocketURL = "wss://max-stream.maicoin.com/ws"
Functions ¶
func ParseMessage ¶
ParseMessage accepts the raw messages from max public websocket channels and parses them into market data Return types: *BookEvent, *PublicTradeEvent, *SubscriptionEvent, *ErrorEvent
func ParseUserEvent ¶
Types ¶
type Account ¶
type Account struct { Currency string `json:"currency"` Balance fixedpoint.Value `json:"balance"` Locked fixedpoint.Value `json:"locked"` Type string `json:"type"` FiatCurrency string `json:"fiat_currency"` FiatBalance fixedpoint.Value `json:"fiat_balance"` }
Account is for max rest api v2, Balance and Type will be conflict with types.PrivateBalanceUpdate
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func (*AccountService) NewGetAccountRequest ¶ added in v1.31.0
func (s *AccountService) NewGetAccountRequest() *GetAccountRequest
func (*AccountService) NewGetAccountsRequest ¶ added in v1.31.0
func (s *AccountService) NewGetAccountsRequest() *GetAccountsRequest
func (*AccountService) NewGetDepositHistoryRequest ¶
func (s *AccountService) NewGetDepositHistoryRequest() *GetDepositHistoryRequest
func (*AccountService) NewGetMeRequest ¶ added in v1.31.0
func (s *AccountService) NewGetMeRequest() *GetMeRequest
NewGetMeRequest returns the current user info by the current used MAX key and secret
func (*AccountService) NewGetVipLevelRequest ¶ added in v1.31.0
func (s *AccountService) NewGetVipLevelRequest() *GetVipLevelRequest
func (*AccountService) NewGetWithdrawalHistoryRequest ¶
func (s *AccountService) NewGetWithdrawalHistoryRequest() *GetWithdrawHistoryRequest
type AccountSnapshotEvent ¶
type AccountSnapshotEvent struct { BaseEvent Balances []BalanceMessage `json:"B"` }
type AccountUpdateEvent ¶
type AccountUpdateEvent struct { BaseEvent Balances []BalanceMessage `json:"B"` }
type AuthMessage ¶
type BalanceMessage ¶
type BalanceMessage struct { Currency string `json:"cu"` Available fixedpoint.Value `json:"av"` Locked fixedpoint.Value `json:"l"` }
type BookEntry ¶
func (*BookEntry) PriceVolumePair ¶
func (e *BookEntry) PriceVolumePair() (pv types.PriceVolume, err error)
type BookEvent ¶
type BookEvent struct { Event string `json:"e"` Market string `json:"M"` Channel string `json:"c"` Timestamp int64 `json:"t"` // Millisecond timestamp Bids []BookEntry Asks []BookEntry }
type CreateMultiOrderRequest ¶
type CreateMultiOrderRequest struct {
// contains filtered or unexported fields
}
func (*CreateMultiOrderRequest) AddOrders ¶
func (r *CreateMultiOrderRequest) AddOrders(orders ...Order) *CreateMultiOrderRequest
func (*CreateMultiOrderRequest) Do ¶
func (r *CreateMultiOrderRequest) Do(ctx context.Context) (multiOrderResponse *MultiOrderResponse, err error)
func (*CreateMultiOrderRequest) GroupID ¶ added in v1.15.0
func (r *CreateMultiOrderRequest) GroupID(groupID uint32) *CreateMultiOrderRequest
func (*CreateMultiOrderRequest) Market ¶
func (r *CreateMultiOrderRequest) Market(market string) *CreateMultiOrderRequest
type CreateOrderRequest ¶
type CreateOrderRequest struct {
// contains filtered or unexported fields
}
func (*CreateOrderRequest) ClientOrderID ¶
func (c *CreateOrderRequest) ClientOrderID(clientOrderID string) *CreateOrderRequest
func (*CreateOrderRequest) Do ¶
func (c *CreateOrderRequest) Do(ctx context.Context) (*Order, error)
func (*CreateOrderRequest) GetParameters ¶ added in v1.31.0
func (c *CreateOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CreateOrderRequest) GetParametersJSON ¶ added in v1.31.0
func (c *CreateOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CreateOrderRequest) GetParametersQuery ¶ added in v1.31.0
func (c *CreateOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CreateOrderRequest) GetQueryParameters ¶ added in v1.31.0
func (c *CreateOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CreateOrderRequest) GetSlugParameters ¶ added in v1.31.0
func (c *CreateOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*CreateOrderRequest) GetSlugsMap ¶ added in v1.31.0
func (c *CreateOrderRequest) GetSlugsMap() (map[string]string, error)
func (*CreateOrderRequest) GroupID ¶ added in v1.31.0
func (c *CreateOrderRequest) GroupID(groupID string) *CreateOrderRequest
func (*CreateOrderRequest) Market ¶
func (c *CreateOrderRequest) Market(market string) *CreateOrderRequest
func (*CreateOrderRequest) OrderType ¶
func (c *CreateOrderRequest) OrderType(orderType string) *CreateOrderRequest
func (*CreateOrderRequest) Price ¶
func (c *CreateOrderRequest) Price(price string) *CreateOrderRequest
func (*CreateOrderRequest) Side ¶
func (c *CreateOrderRequest) Side(side string) *CreateOrderRequest
func (*CreateOrderRequest) StopPrice ¶
func (c *CreateOrderRequest) StopPrice(stopPrice string) *CreateOrderRequest
func (*CreateOrderRequest) Volume ¶
func (c *CreateOrderRequest) Volume(volume string) *CreateOrderRequest
type Deposit ¶
type Deposit struct { Currency string `json:"currency"` CurrencyVersion string `json:"currency_version"` // "eth" Amount fixedpoint.Value `json:"amount"` Fee fixedpoint.Value `json:"fee"` TxID string `json:"txid"` State string `json:"state"` Confirmations int64 `json:"confirmations"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
type ErrorEvent ¶
func (ErrorEvent) Time ¶
func (e ErrorEvent) Time() time.Time
type ErrorField ¶
ErrorResponse is the custom error type that is returned if the API returns an error.
type ErrorResponse ¶
type ErrorResponse struct { *requestgen.Response Err ErrorField `json:"error"` }
func ToErrorResponse ¶ added in v1.17.0
func ToErrorResponse(response *requestgen.Response) (errorResponse *ErrorResponse, err error)
ToErrorResponse tries to convert/parse the server response to the standard Error interface object
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type GetAccountRequest ¶ added in v1.31.0
type GetAccountRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountRequest) Currency ¶ added in v1.31.0
func (g *GetAccountRequest) Currency(currency string) *GetAccountRequest
func (*GetAccountRequest) Do ¶ added in v1.31.0
func (g *GetAccountRequest) Do(ctx context.Context) (*Account, error)
func (*GetAccountRequest) GetParameters ¶ added in v1.31.0
func (g *GetAccountRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetAccountRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetAccountRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetAccountRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetAccountRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetAccountRequest) GetSlugsMap() (map[string]string, error)
type GetAccountsRequest ¶ added in v1.31.0
type GetAccountsRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountsRequest) Do ¶ added in v1.31.0
func (g *GetAccountsRequest) Do(ctx context.Context) ([]Account, error)
func (*GetAccountsRequest) GetParameters ¶ added in v1.31.0
func (g *GetAccountsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountsRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetAccountsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountsRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetAccountsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountsRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetAccountsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountsRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountsRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetAccountsRequest) GetSlugsMap() (map[string]string, error)
type GetDepositHistoryRequest ¶
type GetDepositHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetDepositHistoryRequest) Currency ¶
func (g *GetDepositHistoryRequest) Currency(currency string) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) Do ¶
func (g *GetDepositHistoryRequest) Do(ctx context.Context) ([]Deposit, error)
func (*GetDepositHistoryRequest) From ¶
func (g *GetDepositHistoryRequest) From(from int64) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) GetParameters ¶ added in v1.31.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.31.0
func (g *GetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetDepositHistoryRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetDepositHistoryRequest) GetQueryParameters ¶ added in v1.31.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.31.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.31.0
func (g *GetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetDepositHistoryRequest) Limit ¶
func (g *GetDepositHistoryRequest) Limit(limit int) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) State ¶
func (g *GetDepositHistoryRequest) State(state string) *GetDepositHistoryRequest
func (*GetDepositHistoryRequest) To ¶
func (g *GetDepositHistoryRequest) To(to int64) *GetDepositHistoryRequest
type GetMeRequest ¶ added in v1.31.0
type GetMeRequest struct {
// contains filtered or unexported fields
}
func (*GetMeRequest) Do ¶ added in v1.31.0
func (g *GetMeRequest) Do(ctx context.Context) (*UserInfo, error)
func (*GetMeRequest) GetParameters ¶ added in v1.31.0
func (g *GetMeRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMeRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetMeRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMeRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetMeRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMeRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetMeRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMeRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetMeRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMeRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetMeRequest) GetSlugsMap() (map[string]string, error)
type GetOrderHistoryRequest ¶ added in v1.31.0
type GetOrderHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderHistoryRequest) Do ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]Order, error)
func (*GetOrderHistoryRequest) FromID ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) FromID(fromID uint64) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) GetParameters ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderHistoryRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderHistoryRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderHistoryRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderHistoryRequest) Limit ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) Limit(limit uint) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Market ¶ added in v1.31.0
func (g *GetOrderHistoryRequest) Market(market string) *GetOrderHistoryRequest
type GetOrderRequest ¶ added in v1.31.0
type GetOrderRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderRequest) ClientOrderID ¶ added in v1.31.0
func (g *GetOrderRequest) ClientOrderID(clientOrderID string) *GetOrderRequest
func (*GetOrderRequest) Do ¶ added in v1.31.0
func (g *GetOrderRequest) Do(ctx context.Context) (*Order, error)
func (*GetOrderRequest) GetParameters ¶ added in v1.31.0
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 ¶ added in v1.31.0
func (g *GetOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderRequest) GetSlugParameters ¶ added in v1.31.0
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 ¶ added in v1.31.0
func (g *GetOrderRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderRequest) Id ¶ added in v1.31.0
func (g *GetOrderRequest) Id(id uint64) *GetOrderRequest
type GetOrdersRequest ¶ added in v1.31.0
type GetOrdersRequest struct {
// contains filtered or unexported fields
}
func (*GetOrdersRequest) Do ¶ added in v1.31.0
func (g *GetOrdersRequest) Do(ctx context.Context) ([]Order, error)
func (*GetOrdersRequest) GetParameters ¶ added in v1.31.0
func (g *GetOrdersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrdersRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrdersRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrdersRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrdersRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrdersRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrdersRequest) GroupID ¶ added in v1.31.0
func (g *GetOrdersRequest) GroupID(groupID uint32) *GetOrdersRequest
func (*GetOrdersRequest) Limit ¶ added in v1.31.0
func (g *GetOrdersRequest) Limit(limit int) *GetOrdersRequest
func (*GetOrdersRequest) Market ¶ added in v1.31.0
func (g *GetOrdersRequest) Market(market string) *GetOrdersRequest
func (*GetOrdersRequest) Offset ¶ added in v1.31.0
func (g *GetOrdersRequest) Offset(offset int) *GetOrdersRequest
func (*GetOrdersRequest) OrderBy ¶ added in v1.31.0
func (g *GetOrdersRequest) OrderBy(orderBy string) *GetOrdersRequest
func (*GetOrdersRequest) Page ¶ added in v1.31.0
func (g *GetOrdersRequest) Page(page int) *GetOrdersRequest
func (*GetOrdersRequest) Side ¶ added in v1.31.0
func (g *GetOrdersRequest) Side(side string) *GetOrdersRequest
func (*GetOrdersRequest) State ¶ added in v1.31.0
func (g *GetOrdersRequest) State(state []OrderState) *GetOrdersRequest
type GetPrivateTradesRequest ¶ added in v1.31.0
type GetPrivateTradesRequest struct {
// contains filtered or unexported fields
}
func (*GetPrivateTradesRequest) Do ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Do(ctx context.Context) ([]Trade, error)
func (*GetPrivateTradesRequest) From ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) From(from int64) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) GetParameters ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetPrivateTradesRequest) GetParametersJSON ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetPrivateTradesRequest) GetParametersQuery ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetPrivateTradesRequest) GetQueryParameters ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetPrivateTradesRequest) GetSlugParameters ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetPrivateTradesRequest) GetSlugsMap ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) GetSlugsMap() (map[string]string, error)
func (*GetPrivateTradesRequest) Limit ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Limit(limit int64) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) Market ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Market(market string) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) Offset ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Offset(offset int64) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) OrderBy ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) OrderBy(orderBy string) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) Pagination ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Pagination(pagination bool) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) Timestamp ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) Timestamp(timestamp time.Time) *GetPrivateTradesRequest
func (*GetPrivateTradesRequest) To ¶ added in v1.31.0
func (p *GetPrivateTradesRequest) To(to int64) *GetPrivateTradesRequest
type GetRewardsOfTypeRequest ¶ added in v1.31.0
type GetRewardsOfTypeRequest struct {
// contains filtered or unexported fields
}
func (*GetRewardsOfTypeRequest) Do ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) Do(ctx context.Context) ([]Reward, error)
func (*GetRewardsOfTypeRequest) From ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) From(from int64) *GetRewardsOfTypeRequest
func (*GetRewardsOfTypeRequest) GetParameters ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetRewardsOfTypeRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetRewardsOfTypeRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetRewardsOfTypeRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetRewardsOfTypeRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetRewardsOfTypeRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) GetSlugsMap() (map[string]string, error)
func (*GetRewardsOfTypeRequest) Limit ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) Limit(limit int64) *GetRewardsOfTypeRequest
func (*GetRewardsOfTypeRequest) Offset ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) Offset(offset int64) *GetRewardsOfTypeRequest
func (*GetRewardsOfTypeRequest) Page ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) Page(page int64) *GetRewardsOfTypeRequest
func (*GetRewardsOfTypeRequest) PathType ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) PathType(pathType RewardType) *GetRewardsOfTypeRequest
func (*GetRewardsOfTypeRequest) To ¶ added in v1.31.0
func (g *GetRewardsOfTypeRequest) To(to int64) *GetRewardsOfTypeRequest
type GetRewardsRequest ¶ added in v1.31.0
type GetRewardsRequest struct {
// contains filtered or unexported fields
}
func (*GetRewardsRequest) Currency ¶ added in v1.31.0
func (g *GetRewardsRequest) Currency(currency string) *GetRewardsRequest
func (*GetRewardsRequest) Do ¶ added in v1.31.0
func (g *GetRewardsRequest) Do(ctx context.Context) ([]Reward, error)
func (*GetRewardsRequest) From ¶ added in v1.31.0
func (g *GetRewardsRequest) From(from int64) *GetRewardsRequest
func (*GetRewardsRequest) GetParameters ¶ added in v1.31.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.31.0
func (g *GetRewardsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetRewardsRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetRewardsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetRewardsRequest) GetQueryParameters ¶ added in v1.31.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.31.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.31.0
func (g *GetRewardsRequest) GetSlugsMap() (map[string]string, error)
func (*GetRewardsRequest) Limit ¶ added in v1.31.0
func (g *GetRewardsRequest) Limit(limit int64) *GetRewardsRequest
func (*GetRewardsRequest) Offset ¶ added in v1.31.0
func (g *GetRewardsRequest) Offset(offset int64) *GetRewardsRequest
func (*GetRewardsRequest) Page ¶ added in v1.31.0
func (g *GetRewardsRequest) Page(page int64) *GetRewardsRequest
func (*GetRewardsRequest) To ¶ added in v1.31.0
func (g *GetRewardsRequest) To(to int64) *GetRewardsRequest
type GetVipLevelRequest ¶ added in v1.31.0
type GetVipLevelRequest struct {
// contains filtered or unexported fields
}
func (*GetVipLevelRequest) Do ¶ added in v1.31.0
func (g *GetVipLevelRequest) Do(ctx context.Context) (*VipLevel, error)
func (*GetVipLevelRequest) GetParameters ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetVipLevelRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetVipLevelRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetVipLevelRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetVipLevelRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetVipLevelRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetVipLevelRequest) GetSlugsMap() (map[string]string, error)
type GetWithdrawHistoryRequest ¶
type GetWithdrawHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetWithdrawHistoryRequest) Currency ¶
func (g *GetWithdrawHistoryRequest) Currency(currency string) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) Do ¶
func (g *GetWithdrawHistoryRequest) Do(ctx context.Context) ([]Withdraw, error)
func (*GetWithdrawHistoryRequest) From ¶
func (g *GetWithdrawHistoryRequest) From(from int64) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) GetParameters ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetWithdrawHistoryRequest) GetParametersJSON ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetWithdrawHistoryRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetWithdrawHistoryRequest) GetQueryParameters ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetWithdrawHistoryRequest) GetSlugParameters ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetWithdrawHistoryRequest) GetSlugsMap ¶ added in v1.31.0
func (g *GetWithdrawHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetWithdrawHistoryRequest) Limit ¶
func (g *GetWithdrawHistoryRequest) Limit(limit int) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) State ¶
func (g *GetWithdrawHistoryRequest) State(state string) *GetWithdrawHistoryRequest
func (*GetWithdrawHistoryRequest) To ¶
func (g *GetWithdrawHistoryRequest) To(to int64) *GetWithdrawHistoryRequest
type GetWithdrawalAddressesRequest ¶ added in v1.16.0
type GetWithdrawalAddressesRequest struct {
// contains filtered or unexported fields
}
func (*GetWithdrawalAddressesRequest) Currency ¶ added in v1.16.0
func (g *GetWithdrawalAddressesRequest) Currency(currency string) *GetWithdrawalAddressesRequest
func (*GetWithdrawalAddressesRequest) Do ¶ added in v1.16.0
func (g *GetWithdrawalAddressesRequest) Do(ctx context.Context) ([]WithdrawalAddress, error)
func (*GetWithdrawalAddressesRequest) GetParameters ¶ added in v1.31.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.31.0
func (g *GetWithdrawalAddressesRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetWithdrawalAddressesRequest) GetParametersQuery ¶ added in v1.31.0
func (g *GetWithdrawalAddressesRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetWithdrawalAddressesRequest) GetQueryParameters ¶ added in v1.31.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.31.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.31.0
func (g *GetWithdrawalAddressesRequest) GetSlugsMap() (map[string]string, error)
type KLine ¶
type KLine struct { Symbol string Interval string StartTime, EndTime time.Time Open, High, Low, Close fixedpoint.Value Volume fixedpoint.Value Closed bool }
type KLineEvent ¶
type KLinePayload ¶
type KLinePayload struct { StartTime int64 `json:"ST"` EndTime int64 `json:"ET"` Market string `json:"M"` Resolution string `json:"R"` Open string `json:"O"` High string `json:"H"` Low string `json:"L"` Close string `json:"C"` Volume string `json:"v"` LastTradeID int `json:"ti"` Closed bool `json:"x"` }
{ "c": "kline", "M": "btcusdt", "e": "update", "T": 1602999650179, "k": { "ST": 1602999900000, "ET": 1602999900000, "M": "btcusdt", "R": "5m", "O": "11417.21", "H": "11417.21", "L": "11417.21", "C": "11417.21", "v": "0", "ti": 0, "x": false } }
func (KLinePayload) KLine ¶
func (k KLinePayload) KLine() types.KLine
type MarkerInfo ¶
type Market ¶
type Market struct { ID string `json:"id"` Name string `json:"name"` 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"` }
type MultiOrderRequestParams ¶
type MultiOrderRequestParams struct { *PrivateRequestParams Market string `json:"market"` Orders []Order `json:"orders"` }
type MultiOrderResponse ¶
type Order ¶
type Order struct { ID uint64 `json:"id,omitempty"` Side string `json:"side"` OrderType OrderType `json:"ord_type"` Price string `json:"price,omitempty"` StopPrice string `json:"stop_price,omitempty"` AveragePrice string `json:"avg_price,omitempty"` State OrderState `json:"state,omitempty"` Market string `json:"market,omitempty"` Volume string `json:"volume"` RemainingVolume string `json:"remaining_volume,omitempty"` ExecutedVolume string `json:"executed_volume,omitempty"` TradesCount int64 `json:"trades_count,omitempty"` GroupID uint32 `json:"group_id,omitempty"` ClientOID string `json:"client_oid,omitempty"` CreatedAt time.Time `json:"-" db:"created_at"` CreatedAtMs types.MillisecondTimestamp `json:"created_at_in_ms,omitempty"` InsertedAt time.Time `json:"-" db:"inserted_at"` }
Order represents one returned order (POST order/GET order/GET orders) on the max platform.
type OrderCancelAllRequest ¶ added in v1.5.0
type OrderCancelAllRequest struct {
// contains filtered or unexported fields
}
func (*OrderCancelAllRequest) Do ¶ added in v1.5.0
func (o *OrderCancelAllRequest) Do(ctx context.Context) ([]Order, error)
func (*OrderCancelAllRequest) GetParameters ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*OrderCancelAllRequest) GetParametersJSON ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*OrderCancelAllRequest) GetParametersQuery ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*OrderCancelAllRequest) GetQueryParameters ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*OrderCancelAllRequest) GetSlugParameters ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*OrderCancelAllRequest) GetSlugsMap ¶ added in v1.31.0
func (o *OrderCancelAllRequest) GetSlugsMap() (map[string]string, error)
func (*OrderCancelAllRequest) GroupID ¶ added in v1.5.0
func (o *OrderCancelAllRequest) GroupID(groupID uint32) *OrderCancelAllRequest
func (*OrderCancelAllRequest) Market ¶ added in v1.5.0
func (o *OrderCancelAllRequest) Market(market string) *OrderCancelAllRequest
func (*OrderCancelAllRequest) Side ¶ added in v1.5.0
func (o *OrderCancelAllRequest) Side(side string) *OrderCancelAllRequest
type OrderCancelRequest ¶
type OrderCancelRequest struct {
// contains filtered or unexported fields
}
func (*OrderCancelRequest) ClientOrderID ¶
func (o *OrderCancelRequest) ClientOrderID(clientOrderID string) *OrderCancelRequest
func (*OrderCancelRequest) Do ¶
func (o *OrderCancelRequest) Do(ctx context.Context) (*Order, error)
func (*OrderCancelRequest) GetParameters ¶ added in v1.31.0
func (o *OrderCancelRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*OrderCancelRequest) GetParametersJSON ¶ added in v1.31.0
func (o *OrderCancelRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*OrderCancelRequest) GetParametersQuery ¶ added in v1.31.0
func (o *OrderCancelRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*OrderCancelRequest) GetQueryParameters ¶ added in v1.31.0
func (o *OrderCancelRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*OrderCancelRequest) GetSlugParameters ¶ added in v1.31.0
func (o *OrderCancelRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*OrderCancelRequest) GetSlugsMap ¶ added in v1.31.0
func (o *OrderCancelRequest) GetSlugsMap() (map[string]string, error)
func (*OrderCancelRequest) Id ¶ added in v1.31.0
func (o *OrderCancelRequest) Id(id uint64) *OrderCancelRequest
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
OrderService manages the Order endpoint.
func (*OrderService) All ¶
func (s *OrderService) All(market string, limit, page int, states ...OrderState) ([]Order, error)
All returns all orders for the authenticated account.
func (*OrderService) Closed ¶
func (s *OrderService) Closed(market string, options QueryOrderOptions) ([]Order, error)
Open returns open orders
func (*OrderService) CreateMulti ¶
func (s *OrderService) CreateMulti(market string, orders []Order) (*MultiOrderResponse, error)
Create multiple order in a single request
func (*OrderService) NewCreateMultiOrderRequest ¶
func (s *OrderService) NewCreateMultiOrderRequest() *CreateMultiOrderRequest
func (*OrderService) NewCreateOrderRequest ¶
func (s *OrderService) NewCreateOrderRequest() *CreateOrderRequest
func (*OrderService) NewGetOrderHistoryRequest ¶ added in v1.31.0
func (s *OrderService) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
func (*OrderService) NewGetOrderRequest ¶ added in v1.31.0
func (s *OrderService) NewGetOrderRequest() *GetOrderRequest
func (*OrderService) NewGetOrdersRequest ¶ added in v1.31.0
func (s *OrderService) NewGetOrdersRequest() *GetOrdersRequest
func (*OrderService) NewOrderCancelAllRequest ¶ added in v1.5.0
func (s *OrderService) NewOrderCancelAllRequest() *OrderCancelAllRequest
func (*OrderService) NewOrderCancelRequest ¶
func (s *OrderService) NewOrderCancelRequest() *OrderCancelRequest
func (*OrderService) Open ¶
func (s *OrderService) Open(market string, options QueryOrderOptions) ([]Order, error)
Open returns open orders
type OrderSnapshotEvent ¶
type OrderSnapshotEvent struct { BaseEvent Orders []OrderUpdate `json:"o"` }
type OrderState ¶
type OrderState string
type OrderStateToQuery ¶
type OrderStateToQuery int
type OrderUpdate ¶
type OrderUpdate struct { Event string `json:"e"` ID uint64 `json:"i"` Side string `json:"sd"` OrderType OrderType `json:"ot"` Price string `json:"p"` StopPrice string `json:"sp"` Volume string `json:"v"` AveragePrice string `json:"ap"` State OrderState `json:"S"` Market string `json:"M"` RemainingVolume string `json:"rv"` ExecutedVolume string `json:"ev"` TradesCount int64 `json:"tc"` GroupID uint32 `json:"gi"` ClientOID string `json:"ci"` CreatedAtMs int64 `json:"T"` }
type OrderUpdateEvent ¶
type OrderUpdateEvent struct { BaseEvent Orders []OrderUpdate `json:"o"` }
type PrivateRequestParams ¶
type PublicService ¶
type PublicService struct {
// contains filtered or unexported fields
}
func (*PublicService) Markets ¶
func (s *PublicService) Markets() ([]Market, error)
func (*PublicService) Timestamp ¶
func (s *PublicService) Timestamp() (serverTimestamp int64, err error)
type PublicTradeEvent ¶
type PublicTradeEvent struct { Event string `json:"e"` Market string `json:"M"` Channel string `json:"c"` Trades []TradeEntry `json:"t"` Timestamp int64 `json:"T"` }
func (*PublicTradeEvent) Time ¶
func (e *PublicTradeEvent) Time() time.Time
type QueryOrderOptions ¶
type QueryTradeOptions ¶
type QueryTradeOptions struct { Market string `json:"market"` Timestamp int64 `json:"timestamp,omitempty"` From int64 `json:"from,omitempty"` To int64 `json:"to,omitempty"` OrderBy string `json:"order_by,omitempty"` Page int `json:"page,omitempty"` Offset int `json:"offset,omitempty"` Limit int64 `json:"limit,omitempty"` }
func (*QueryTradeOptions) Map ¶
func (options *QueryTradeOptions) Map() map[string]interface{}
func (*QueryTradeOptions) Params ¶
func (options *QueryTradeOptions) Params() url.Values
type RestClient ¶
type RestClient struct { BaseURL *url.URL // Authentication APIKey string APISecret string AccountService *AccountService PublicService *PublicService TradeService *TradeService OrderService *OrderService RewardService *RewardService WithdrawalService *WithdrawalService // contains filtered or unexported fields }
func NewRestClient ¶
func NewRestClient(baseURL string) *RestClient
func NewRestClientWithHttpClient ¶
func NewRestClientWithHttpClient(baseURL string, httpClient *http.Client) *RestClient
func (*RestClient) Auth ¶
func (c *RestClient) Auth(key string, secret string) *RestClient
Auth sets api key and secret for usage is requests that requires authentication.
func (*RestClient) NewAuthenticatedRequest ¶ added in v1.31.0
func (*RestClient) NewRequest ¶ added in v1.31.0
func (c *RestClient) NewRequest(ctx context.Context, method string, refURL string, params url.Values, payload interface{}) (*http.Request, error)
NewRequest create new API request. Relative url can be provided in refURL.
func (*RestClient) SendRequest ¶ added in v1.31.0
func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
SendRequest sends the request to the API server and handle the response
type Reward ¶ added in v1.13.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"` State string `json:"state"` Note string `json:"note"` // Unix timestamp in seconds CreatedAt types.Timestamp `json:"created_at"` }
type RewardService ¶ added in v1.13.0
type RewardService struct {
// contains filtered or unexported fields
}
func (*RewardService) NewGetRewardsOfTypeRequest ¶ added in v1.31.0
func (s *RewardService) NewGetRewardsOfTypeRequest(pathType RewardType) *GetRewardsOfTypeRequest
func (*RewardService) NewGetRewardsRequest ¶ added in v1.31.0
func (s *RewardService) NewGetRewardsRequest() *GetRewardsRequest
type RewardType ¶ added in v1.13.0
type RewardType string
func ParseRewardType ¶ added in v1.13.0
func ParseRewardType(s string) (RewardType, error)
func (RewardType) RewardType ¶ added in v1.13.0
func (t RewardType) RewardType() (types.RewardType, error)
func (*RewardType) UnmarshalJSON ¶ added in v1.13.0
func (t *RewardType) UnmarshalJSON(o []byte) error
type SubscribeOptions ¶ added in v1.13.0
type Subscription ¶
type Subscription struct { Channel string `json:"channel"` Market string `json:"market"` Depth int `json:"depth,omitempty"` Resolution string `json:"resolution,omitempty"` }
Subscription is used for presenting the subscription metadata. This is used for sending subscribe and unsubscribe requests
type SubscriptionEvent ¶
type SubscriptionEvent struct { Event string `json:"e"` Timestamp int64 `json:"T"` CommandID string `json:"i"` Subscriptions []Subscription `json:"s"` }
func (SubscriptionEvent) Time ¶
func (e SubscriptionEvent) Time() time.Time
type Trade ¶
type Trade struct { ID uint64 `json:"id" db:"exchange_id"` Price string `json:"price" db:"price"` Volume string `json:"volume" db:"volume"` Funds string `json:"funds"` Market string `json:"market" db:"market"` MarketName string `json:"market_name"` CreatedAt int64 `json:"created_at"` CreatedAtMilliSeconds types.MillisecondTimestamp `json:"created_at_in_ms"` Side string `json:"side" db:"side"` OrderID uint64 `json:"order_id"` Fee string `json:"fee" db:"fee"` // float number as string FeeCurrency string `json:"fee_currency" db:"fee_currency"` Info TradeInfo `json:"info,omitempty"` }
Trade represents one returned trade on the max platform.
type TradeEntry ¶
type TradeEntry struct { Trend string `json:"tr"` Price string `json:"p"` Volume string `json:"v"` Timestamp int64 `json:"T"` }
func (TradeEntry) Time ¶
func (e TradeEntry) Time() time.Time
type TradeInfo ¶
type TradeInfo struct { // Maker tells you the maker trade side Maker string `json:"maker,omitempty"` Bid *MarkerInfo `json:"bid,omitempty"` Ask *MarkerInfo `json:"ask,omitempty"` }
type TradeService ¶
type TradeService struct {
// contains filtered or unexported fields
}
func (*TradeService) NewGetPrivateTradeRequest ¶ added in v1.31.0
func (s *TradeService) NewGetPrivateTradeRequest() *GetPrivateTradesRequest
type TradeSnapshot ¶
type TradeSnapshot []TradeUpdate
type TradeSnapshotEvent ¶
type TradeSnapshotEvent struct { BaseEvent Trades []TradeUpdate `json:"t"` }
type TradeUpdate ¶
type TradeUpdateEvent ¶
type TradeUpdateEvent struct { BaseEvent Trades []TradeUpdate `json:"t"` }
type UserInfo ¶
type UserInfo struct { Sn string `json:"sn"` Name string `json:"name"` Type string `json:"member_type"` Level int `json:"level"` VipLevel int `json:"vip_level"` Email string `json:"email"` Accounts []Account `json:"accounts"` Bank *UserBank `json:"bank,omitempty"` IsFrozen bool `json:"is_frozen"` IsActivated bool `json:"is_activated"` KycApproved bool `json:"kyc_approved"` KycState string `json:"kyc_state"` PhoneSet bool `json:"phone_set"` PhoneNumber string `json:"phone_number"` ProfileVerified bool `json:"profile_verified"` CountryCode string `json:"country_code"` IdentityNumber string `json:"identity_number"` WithDrawable bool `json:"withdrawable"` ReferralCode string `json:"referral_code"` }
type VipLevel ¶ added in v1.14.1
type VipLevel struct { Current VipLevelSettings `json:"current_vip_level"` Next VipLevelSettings `json:"next_vip_level"` }
type VipLevelSettings ¶ added in v1.14.1
type WebsocketCommand ¶
type WebsocketCommand struct { // Action is used for specify the action of the websocket session. // Valid values are "subscribe", "unsubscribe" and "auth" Action string `json:"action"` Subscriptions []Subscription `json:"subscriptions,omitempty"` }
type Withdraw ¶
type Withdraw struct { UUID string `json:"uuid"` Currency string `json:"currency"` CurrencyVersion string `json:"currency_version"` // "eth" Amount fixedpoint.Value `json:"amount"` Fee fixedpoint.Value `json:"fee"` FeeCurrency string `json:"fee_currency"` TxID string `json:"txid"` // State can be "submitting", "submitted", // "rejected", "accepted", "suspect", "approved", "delisted_processing", // "processing", "retryable", "sent", "canceled", // "failed", "pending", "confirmed", // "kgi_manually_processing", "kgi_manually_confirmed", "kgi_possible_failed", // "sygna_verifying" State string `json:"state"` Confirmations int `json:"confirmations"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` Notes string `json:"notes"` }
type WithdrawalAddress ¶ added in v1.16.0
type WithdrawalAddress struct { UUID string `json:"uuid"` Currency string `json:"currency"` CurrencyVersion string `json:"currency_version"` Address string `json:"address"` ExtraLabel string `json:"extra_label"` State string `json:"state"` SygnaVaspCode string `json:"sygna_vasp_code"` SygnaUserType string `json:"sygna_user_type"` SygnaUserCode string `json:"sygna_user_code"` IsInternal bool `json:"is_internal"` }
type WithdrawalRequest ¶ added in v1.16.0
type WithdrawalRequest struct {
// contains filtered or unexported fields
}
func (*WithdrawalRequest) AddressUUID ¶ added in v1.16.0
func (w *WithdrawalRequest) AddressUUID(addressUUID string) *WithdrawalRequest
func (*WithdrawalRequest) Amount ¶ added in v1.16.0
func (w *WithdrawalRequest) Amount(amount float64) *WithdrawalRequest
func (*WithdrawalRequest) Currency ¶ added in v1.16.0
func (w *WithdrawalRequest) Currency(currency string) *WithdrawalRequest
func (*WithdrawalRequest) Do ¶ added in v1.16.0
func (w *WithdrawalRequest) Do(ctx context.Context) (*Withdraw, error)
func (*WithdrawalRequest) GetParameters ¶ added in v1.31.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.31.0
func (w *WithdrawalRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*WithdrawalRequest) GetParametersQuery ¶ added in v1.31.0
func (w *WithdrawalRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*WithdrawalRequest) GetQueryParameters ¶ added in v1.31.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.31.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.31.0
func (w *WithdrawalRequest) GetSlugsMap() (map[string]string, error)
type WithdrawalService ¶ added in v1.16.0
type WithdrawalService struct {
// contains filtered or unexported fields
}
func (*WithdrawalService) NewGetWithdrawalAddressesRequest ¶ added in v1.16.0
func (s *WithdrawalService) NewGetWithdrawalAddressesRequest() *GetWithdrawalAddressesRequest
func (*WithdrawalService) NewGetWithdrawalHistoryRequest ¶ added in v1.16.0
func (s *WithdrawalService) NewGetWithdrawalHistoryRequest() *GetWithdrawHistoryRequest
func (*WithdrawalService) NewWithdrawalRequest ¶ added in v1.16.0
func (s *WithdrawalService) NewWithdrawalRequest() *WithdrawalRequest
Source Files ¶
- account.go
- auth.go
- create_order_request_requestgen.go
- get_account_request_requestgen.go
- get_accounts_request_requestgen.go
- get_deposit_history_request_requestgen.go
- get_me_request_requestgen.go
- get_order_history_request_requestgen.go
- get_order_request_requestgen.go
- get_orders_request_requestgen.go
- get_private_trades_request_requestgen.go
- get_rewards_of_type_request_requestgen.go
- get_rewards_request_requestgen.go
- get_vip_level_request_requestgen.go
- get_withdraw_history_request_requestgen.go
- get_withdrawal_addresses_request_requestgen.go
- order.go
- order_cancel_all_request_requestgen.go
- order_cancel_request_requestgen.go
- public.go
- public_parser.go
- restapi.go
- reward.go
- trade.go
- userdata.go
- websocket.go
- withdrawal.go
- withdrawal_request_requestgen.go