# Functions
ParseMessage accepts the raw messages from max public websocket channels and parses them into market data Return types: *BookEvent, *PublicTradeEvent, *SubscriptionEvent, *ErrorEvent.
ToErrorResponse tries to convert/parse the server response to the standard Error interface object.
# Constants
Order types that the API can return.
Order types that the API can return.
Order types that the API can return.
Order types that the API can return.
Order types that the API can return.
Order types that the API can return.
ProductionAPIURL is the official MAX API v2 Endpoint.
2018-09-01 08:00:00 +0800 CST.
# Structs
Account is for max rest api v2, Balance and Type will be conflict with types.PrivateBalanceUpdate.
go:generate PostRequest -url "/api/v2/order/delete" -type CancelOrderRequest -responseType .Order.
go:generate PostRequest -url "/api/v2/orders" -type CreateOrderRequest -responseType .Order.
ErrorResponse is the custom error type that is returned if the API returns an error.
go:generate GetRequest -url "v2/members/accounts/:currency" -type GetAccountRequest -responseType .Account.
go:generate GetRequest -url "v2/members/accounts" -type GetAccountsRequest -responseType []Account.
go:generate GetRequest -url "v3/deposits" -type GetDepositHistoryRequest -responseType []Deposit.
go:generate GetRequest -url "/api/v2/k" -type GetKLinesRequest -responseType []KLineData.
go:generate GetRequest -url "/api/v2/markets" -type GetMarketsRequest -responseType []Market.
go:generate GetRequest -url "v2/trades/my" -type GetPrivateTradesRequest -responseType []Trade.
go:generate GetRequest -url "v2/rewards/:path_type" -type GetRewardsOfTypeRequest -responseType []Reward.
go:generate GetRequest -url "v2/rewards" -type GetRewardsRequest -responseType []Reward.
go:generate GetRequest -url "/api/v2/tickers/:market" -type GetTickerRequest -responseType .Ticker.
go:generate GetRequest -url "/api/v2/tickers" -type GetTickersRequest -responseType .TickerMap.
go:generate GetRequest -url "/api/v2/timestamp" -type GetTimestampRequest -responseType .Timestamp.
go:generate GetRequest -url "v2/members/vip_level" -type GetVipLevelRequest -responseType .VipLevel.
go:generate GetRequest -url "v2/withdraw_addresses" -type GetWithdrawalAddressesRequest -responseType []WithdrawalAddress.
go:generate GetRequest -url "v3/withdrawals" -type GetWithdrawHistoryRequest -responseType []Withdraw.
{
"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
}
}
*/.
Order represents one returned order (POST order/GET order/GET orders) on the max platform.
OrderService manages the Order endpoint.
Subscription is used for presenting the subscription metadata.
Trade represents one returned trade on the max platform.
go:generate PostRequest -url "v2/withdrawal" -type WithdrawalRequest -responseType .Withdraw.
# Type aliases
submitted -> accepted -> processing -> sent -> confirmed.