swagger

package
v0.0.0-...-e0c7587 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 26 Imported by: 1

README

Go API client for swagger

REST API for the BitMEX Trading Platform If you are building automated tools, please subscribe to the BitMEX API RSS Feed for changes. The feed will be updated regularly and is the most reliable way to get downtime and update announcements. View Changelog --- #### Getting Started Base URI: https://www.bitmex.com/api/v1 ##### Fetching Data All REST endpoints are documented below. You can try out any query right from this interface. Most table queries accept count, start, and reverse params. Set reverse=true to get rows newest-first. Additional documentation regarding filters, timestamps, and authentication is available in the main API documentation. All table data is available via the Websocket. We highly recommend using the socket if you want to have the quickest possible data without being subject to ratelimits. ##### Return Types By default, all data is returned as JSON. Send ?_format=csv to get CSV data or ?_format=xml to get XML data. ##### Trade Data Queries This is only a small subset of what is available, to get you started. Fill in the parameters and click the Try it out! button to try any of these queries. - Pricing Data - Trade Data - OrderBook Data - Settlement Data - Exchange Statistics Every function of the BitMEX.com platform is exposed here and documented. Many more functions are available. ##### Swagger Specification ⇩ Download Swagger JSON --- ## All API Endpoints Click to expand a section.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://www.bitmex.com/api/v1

Class Method HTTP request Description
APIKeyApi APIKeyGet Get /apiKey Get your API Keys.
AnnouncementApi AnnouncementGet Get /announcement Get site announcements.
AnnouncementApi AnnouncementGetUrgent Get /announcement/urgent Get urgent (banner) announcements.
ChatApi ChatGet Get /chat Get chat messages.
ChatApi ChatGetChannels Get /chat/channels Get available channels.
ChatApi ChatGetConnected Get /chat/connected Get connected users.
ChatApi ChatNew Post /chat Send a chat message.
ExecutionApi ExecutionGet Get /execution Get all raw executions for your account.
ExecutionApi ExecutionGetTradeHistory Get /execution/tradeHistory Get all balance-affecting executions.
FundingApi FundingGet Get /funding Get funding history.
GlobalNotificationApi GlobalNotificationGet Get /globalNotification Get your current GlobalNotifications.
InstrumentApi InstrumentGet Get /instrument Get instruments.
InstrumentApi InstrumentGetActive Get /instrument/active Get all active instruments and instruments that have expired in <24hrs.
InstrumentApi InstrumentGetActiveAndIndices Get /instrument/activeAndIndices Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active.
InstrumentApi InstrumentGetActiveIntervals Get /instrument/activeIntervals Return all active contract series and interval pairs.
InstrumentApi InstrumentGetCompositeIndex Get /instrument/compositeIndex Show constituent parts of an index.
InstrumentApi InstrumentGetIndices Get /instrument/indices Get all price indices.
InstrumentApi InstrumentGetUsdVolume Get /instrument/usdVolume Get a summary of exchange statistics in USD.
InsuranceApi InsuranceGet Get /insurance Get insurance fund history.
LeaderboardApi LeaderboardGet Get /leaderboard Get current leaderboard.
LeaderboardApi LeaderboardGetName Get /leaderboard/name Get your alias on the leaderboard.
LiquidationApi LiquidationGet Get /liquidation Get liquidation orders.
OrderApi OrderAmend Put /order Amend the quantity or price of an open order.
OrderApi OrderCancel Delete /order Cancel order(s). Send multiple order IDs to cancel in bulk.
OrderApi OrderCancelAll Delete /order/all Cancels all of your orders.
OrderApi OrderCancelAllAfter Post /order/cancelAllAfter Automatically cancel all your orders after a specified timeout.
OrderApi OrderClosePosition Post /order/closePosition Close a position. [Deprecated, use POST /order with execInst: 'Close']
OrderApi OrderGetOrders Get /order Get your orders.
OrderApi OrderNew Post /order Create a new order.
OrderBookApi OrderBookGetL2 Get /orderBook/L2 Get current orderbook in vertical format.
PositionApi PositionGet Get /position Get your positions.
PositionApi PositionIsolateMargin Post /position/isolate Enable isolated margin or cross margin per-position.
PositionApi PositionTransferIsolatedMargin Post /position/transferMargin Transfer equity in or out of a position.
PositionApi PositionUpdateLeverage Post /position/leverage Choose leverage for a position.
PositionApi PositionUpdateRiskLimit Post /position/riskLimit Update your risk limit.
QuoteApi QuoteGet Get /quote Get Quotes.
QuoteApi QuoteGetBucketed Get /quote/bucketed Get previous quotes in time buckets.
SchemaApi SchemaGet Get /schema Get model schemata for data objects returned by this API.
SchemaApi SchemaWebsocketHelp Get /schema/websocketHelp Returns help text & subject list for websocket usage.
SettlementApi SettlementGet Get /settlement Get settlement history.
StatsApi StatsGet Get /stats Get exchange-wide and per-series turnover and volume statistics.
StatsApi StatsHistory Get /stats/history Get historical exchange-wide and per-series turnover and volume statistics.
StatsApi StatsHistoryUSD Get /stats/historyUSD Get a summary of exchange statistics in USD.
TradeApi TradeGet Get /trade Get Trades.
TradeApi TradeGetBucketed Get /trade/bucketed Get previous trades in time buckets.
UserApi UserCancelWithdrawal Post /user/cancelWithdrawal Cancel a withdrawal.
UserApi UserCheckReferralCode Get /user/checkReferralCode Check if a referral code is valid.
UserApi UserCommunicationToken Post /user/communicationToken Register your communication token for mobile clients
UserApi UserConfirm Post /user/confirmEmail Confirm your email address with a token.
UserApi UserConfirmWithdrawal Post /user/confirmWithdrawal Confirm a withdrawal.
UserApi UserGet Get /user Get your user model.
UserApi UserGetAffiliateStatus Get /user/affiliateStatus Get your current affiliate/referral status.
UserApi UserGetCommission Get /user/commission Get your account's commission status.
UserApi UserGetDepositAddress Get /user/depositAddress Get a deposit address.
UserApi UserGetExecutionHistory Get /user/executionHistory Get the execution history by day.
UserApi UserGetMargin Get /user/margin Get your account's margin status. Send a currency of &quot;all&quot; to receive an array of all supported currencies.
UserApi UserGetQuoteFillRatio Get /user/quoteFillRatio Get 7 days worth of Quote Fill Ratio statistics.
UserApi UserGetQuoteValueRatio Get /user/quoteValueRatio Get Quote Value Ratio statistics over the last 3 days
UserApi UserGetTradingVolume Get /user/tradingVolume Get your 30 days USD average trading volume
UserApi UserGetWallet Get /user/wallet Get your current wallet information.
UserApi UserGetWalletHistory Get /user/walletHistory Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
UserApi UserGetWalletSummary Get /user/walletSummary Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
UserApi UserLogout Post /user/logout Log out of BitMEX.
UserApi UserMinWithdrawalFee Get /user/minWithdrawalFee Get the minimum, maximum, and recommended withdrawal fees for a currency.
UserApi UserRequestWithdrawal Post /user/requestWithdrawal Request a withdrawal to an external wallet.
UserApi UserSavePreferences Post /user/preferences Save user preferences.
UserEventApi UserEventGet Get /userEvent Get your user events

Documentation For Models

Documentation For Authorization

apiExpires

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

apiKey

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

apiSignature

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

support@bitmex.com

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func CalSignature

func CalSignature(apiSecret, payload string) string

func DebugHttpRequest

func DebugHttpRequest(r *http.Request)

Save a copy of this request for debugging.

func SetAuthHeader

func SetAuthHeader(request *http.Request, apiKey APIKey, c *Configuration, httpMethod, path, postBody string,
	queryParams url.Values)

func Signature

func Signature(apiSecret, method, rawurl, query, nonce, bodyStr string) string

*

  • nonce: nonce or expires

Types

type APIClient

type APIClient struct {
	APIKeyApi *APIKeyApiService

	AnnouncementApi *AnnouncementApiService

	ChatApi *ChatApiService

	ExecutionApi *ExecutionApiService

	FundingApi *FundingApiService

	GlobalNotificationApi *GlobalNotificationApiService

	InstrumentApi *InstrumentApiService

	InsuranceApi *InsuranceApiService

	LeaderboardApi *LeaderboardApiService

	LiquidationApi *LiquidationApiService

	OrderApi *OrderApiService

	OrderBookApi *OrderBookApiService

	PositionApi *PositionApiService

	QuoteApi *QuoteApiService

	SchemaApi *SchemaApiService

	SettlementApi *SettlementApiService

	StatsApi *StatsApiService

	TradeApi *TradeApiService

	UserApi *UserApiService

	UserEventApi *UserEventApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the BitMEX API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
	Secret string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIKeyApiAPIKeyGetOpts

type APIKeyApiAPIKeyGetOpts struct {
	Reverse optional.Bool
}

type APIKeyApiService

type APIKeyApiService service

func (*APIKeyApiService) APIKeyGet

func (a *APIKeyApiService) APIKeyGet(ctx context.Context, localVarOptionals *APIKeyApiAPIKeyGetOpts) ([]ApiKey, *http.Response, error)

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AccessToken

type AccessToken struct {
	Id string `json:"id"`
	// time to live in seconds (2 weeks by default)
	Ttl     float64   `json:"ttl,omitempty"`
	Created time.Time `json:"created,omitempty"`
	UserId  float64   `json:"userId,omitempty"`
}

type Affiliate

type Affiliate struct {
	ReferrerAccount  float64 `json:"referrerAccount,omitempty"`
	ReferralDiscount float64 `json:"referralDiscount,omitempty"`
	AffiliatePayout  float64 `json:"affiliatePayout,omitempty"`
	Id               float64 `json:"id,omitempty"`
}

type Announcement

type Announcement struct {
	Id      float32   `json:"id"`
	Link    string    `json:"link,omitempty"`
	Title   string    `json:"title,omitempty"`
	Content string    `json:"content,omitempty"`
	Date    time.Time `json:"date,omitempty"`
}

Public Announcements

type AnnouncementApiAnnouncementGetOpts

type AnnouncementApiAnnouncementGetOpts struct {
	Columns optional.String
}

type AnnouncementApiService

type AnnouncementApiService service

func (*AnnouncementApiService) AnnouncementGet

func (a *AnnouncementApiService) AnnouncementGet(ctx context.Context, localVarOptionals *AnnouncementApiAnnouncementGetOpts) ([]Announcement, *http.Response, error)

func (*AnnouncementApiService) AnnouncementGetUrgent

func (a *AnnouncementApiService) AnnouncementGetUrgent(ctx context.Context) ([]Announcement, *http.Response, error)

AnnouncementApiService Get urgent (banner) announcements.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Announcement

type ApiKey

type ApiKey struct {
	Id          string    `json:"id"`
	Secret      string    `json:"secret"`
	Name        string    `json:"name"`
	Nonce       float32   `json:"nonce"`
	Cidr        string    `json:"cidr,omitempty"`
	Permissions []XAny    `json:"permissions,omitempty"`
	Enabled     bool      `json:"enabled,omitempty"`
	UserId      float32   `json:"userId"`
	Created     time.Time `json:"created,omitempty"`
}

Persistent API Keys for Developers

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Chat

type Chat struct {
	Id        float32   `json:"id,omitempty"`
	Date      time.Time `json:"date"`
	User      string    `json:"user"`
	Message   string    `json:"message"`
	Html      string    `json:"html"`
	FromBot   bool      `json:"fromBot,omitempty"`
	ChannelID float64   `json:"channelID,omitempty"`
}

Trollbox Data

type ChatApiChatGetOpts

type ChatApiChatGetOpts struct {
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	ChannelID optional.Float64
}

type ChatApiChatNewOpts

type ChatApiChatNewOpts struct {
	ChannelID optional.Float64
}

type ChatApiService

type ChatApiService service

func (*ChatApiService) ChatGet

func (a *ChatApiService) ChatGet(ctx context.Context, localVarOptionals *ChatApiChatGetOpts) ([]Chat, *http.Response, error)

func (*ChatApiService) ChatGetChannels

func (a *ChatApiService) ChatGetChannels(ctx context.Context) ([]ChatChannel, *http.Response, error)

ChatApiService Get available channels.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []ChatChannel

func (*ChatApiService) ChatGetConnected

func (a *ChatApiService) ChatGetConnected(ctx context.Context) (ConnectedUsers, *http.Response, error)

ChatApiService Get connected users. Returns an array with browser users in the first position and API users (bots) in the second position.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ConnectedUsers

func (*ChatApiService) ChatNew

func (a *ChatApiService) ChatNew(ctx context.Context, message string, localVarOptionals *ChatApiChatNewOpts) (Chat, *http.Response, error)

type ChatChannel

type ChatChannel struct {
	Id   float32 `json:"id,omitempty"`
	Name string  `json:"name"`
}

type CommunicationToken

type CommunicationToken struct {
	Id          string  `json:"id"`
	UserId      float32 `json:"userId"`
	DeviceToken string  `json:"deviceToken"`
	Channel     string  `json:"channel"`
}

User communication SNS token

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client

	ExpireTime int64
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type ConnectedUsers

type ConnectedUsers struct {
	Users float32 `json:"users,omitempty"`
	Bots  float32 `json:"bots,omitempty"`
}

type ErrorError

type ErrorError struct {
	Message string `json:"message,omitempty"`
	Name    string `json:"name,omitempty"`
}

type Execution

type Execution struct {
	ExecID                string    `json:"execID,omitempty"`
	OrderID               string    `json:"orderID,omitempty"`
	ClOrdID               string    `json:"clOrdID,omitempty"`
	ClOrdLinkID           string    `json:"clOrdLinkID,omitempty"`
	Account               float32   `json:"account,omitempty"`
	Symbol                string    `json:"symbol"`
	Side                  string    `json:"side,omitempty"`
	LastQty               float32   `json:"lastQty,omitempty"`
	LastPx                float64   `json:"lastPx,omitempty"`
	UnderlyingLastPx      float64   `json:"underlyingLastPx,omitempty"`
	LastMkt               string    `json:"lastMkt,omitempty"`
	LastLiquidityInd      string    `json:"lastLiquidityInd,omitempty"`
	SimpleOrderQty        float64   `json:"simpleOrderQty,omitempty"`
	OrderQty              float32   `json:"orderQty,omitempty"`
	Price                 float64   `json:"price,omitempty"`
	DisplayQty            float32   `json:"displayQty,omitempty"`
	StopPx                float64   `json:"stopPx,omitempty"`
	PegOffsetValue        float64   `json:"pegOffsetValue,omitempty"`
	PegPriceType          string    `json:"pegPriceType,omitempty"`
	Currency              string    `json:"currency,omitempty"`
	SettlCurrency         string    `json:"settlCurrency,omitempty"`
	ExecType              string    `json:"execType,omitempty"`
	OrdType               string    `json:"ordType,omitempty"`
	TimeInForce           string    `json:"timeInForce,omitempty"`
	ExecInst              string    `json:"execInst,omitempty"`
	ContingencyType       string    `json:"contingencyType,omitempty"`
	ExDestination         string    `json:"exDestination,omitempty"`
	OrdStatus             string    `json:"ordStatus,omitempty"`
	Triggered             string    `json:"triggered,omitempty"`
	WorkingIndicator      bool      `json:"workingIndicator,omitempty"`
	OrdRejReason          string    `json:"ordRejReason,omitempty"`
	SimpleLeavesQty       float64   `json:"simpleLeavesQty,omitempty"`
	LeavesQty             float32   `json:"leavesQty,omitempty"`
	SimpleCumQty          float64   `json:"simpleCumQty,omitempty"`
	CumQty                float32   `json:"cumQty,omitempty"`
	AvgPx                 float64   `json:"avgPx,omitempty"`
	Commission            float64   `json:"commission,omitempty"`
	TradePublishIndicator string    `json:"tradePublishIndicator,omitempty"`
	MultiLegReportingType string    `json:"multiLegReportingType,omitempty"`
	Text                  string    `json:"text,omitempty"`
	TrdMatchID            string    `json:"trdMatchID,omitempty"`
	ExecCost              float32   `json:"execCost,omitempty"`
	ExecComm              float32   `json:"execComm,omitempty"`
	HomeNotional          float64   `json:"homeNotional,omitempty"`
	ForeignNotional       float64   `json:"foreignNotional,omitempty"`
	TransactTime          time.Time `json:"transactTime,omitempty"`
	Timestamp             time.Time `json:"timestamp"`
}

Raw Order and Balance Data

type ExecutionApiExecutionGetOpts

type ExecutionApiExecutionGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type ExecutionApiExecutionGetTradeHistoryOpts

type ExecutionApiExecutionGetTradeHistoryOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type ExecutionApiService

type ExecutionApiService service

func (*ExecutionApiService) ExecutionGet

func (a *ExecutionApiService) ExecutionGet(ctx context.Context, localVarOptionals *ExecutionApiExecutionGetOpts) ([]Execution, *http.Response, error)

func (*ExecutionApiService) ExecutionGetTradeHistory

func (a *ExecutionApiService) ExecutionGetTradeHistory(ctx context.Context, localVarOptionals *ExecutionApiExecutionGetTradeHistoryOpts) ([]Execution, *http.Response, error)

type Funding

type Funding struct {
	Timestamp        time.Time `json:"timestamp"`
	Symbol           string    `json:"symbol"`
	FundingInterval  time.Time `json:"fundingInterval,omitempty"`
	FundingRate      float64   `json:"fundingRate,omitempty"`
	FundingRateDaily float64   `json:"fundingRateDaily,omitempty"`
}

Swap Funding History

type FundingApiFundingGetOpts

type FundingApiFundingGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type FundingApiService

type FundingApiService service

func (*FundingApiService) FundingGet

func (a *FundingApiService) FundingGet(ctx context.Context, localVarOptionals *FundingApiFundingGetOpts) ([]Funding, *http.Response, error)

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GlobalNotification

type GlobalNotification struct {
	Id                float32   `json:"id,omitempty"`
	Date              time.Time `json:"date"`
	Title             string    `json:"title"`
	Body              string    `json:"body"`
	Ttl               float32   `json:"ttl"`
	Type_             string    `json:"type,omitempty"`
	Closable          bool      `json:"closable,omitempty"`
	Persist           bool      `json:"persist,omitempty"`
	WaitForVisibility bool      `json:"waitForVisibility,omitempty"`
	Sound             string    `json:"sound,omitempty"`
}

Account Notifications

type GlobalNotificationApiService

type GlobalNotificationApiService service

func (*GlobalNotificationApiService) GlobalNotificationGet

func (a *GlobalNotificationApiService) GlobalNotificationGet(ctx context.Context) ([]GlobalNotification, *http.Response, error)

GlobalNotificationApiService Get your current GlobalNotifications. This is an upcoming feature and currently does not return data.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []GlobalNotification

type IndexComposite

type IndexComposite struct {
	Timestamp            time.Time `json:"timestamp"`
	Symbol               string    `json:"symbol,omitempty"`
	IndexSymbol          string    `json:"indexSymbol,omitempty"`
	IndexMultiplier      float64   `json:"indexMultiplier,omitempty"`
	Reference            string    `json:"reference,omitempty"`
	LastPrice            float64   `json:"lastPrice,omitempty"`
	SourcePrice          float64   `json:"sourcePrice,omitempty"`
	ConversionIndex      string    `json:"conversionIndex,omitempty"`
	ConversionIndexPrice float64   `json:"conversionIndexPrice,omitempty"`
	Weight               float64   `json:"weight,omitempty"`
	Logged               time.Time `json:"logged,omitempty"`
}

type InlineResponse200

type InlineResponse200 struct {
	Name string `json:"name,omitempty"`
}

type Instrument

type Instrument struct {
	Symbol                         string    `json:"symbol"`
	RootSymbol                     string    `json:"rootSymbol,omitempty"`
	State                          string    `json:"state,omitempty"`
	Typ                            string    `json:"typ,omitempty"`
	Listing                        time.Time `json:"listing,omitempty"`
	Front                          time.Time `json:"front,omitempty"`
	Expiry                         time.Time `json:"expiry,omitempty"`
	Settle                         time.Time `json:"settle,omitempty"`
	ListedSettle                   time.Time `json:"listedSettle,omitempty"`
	RelistInterval                 time.Time `json:"relistInterval,omitempty"`
	InverseLeg                     string    `json:"inverseLeg,omitempty"`
	SellLeg                        string    `json:"sellLeg,omitempty"`
	BuyLeg                         string    `json:"buyLeg,omitempty"`
	OptionStrikePcnt               float64   `json:"optionStrikePcnt,omitempty"`
	OptionStrikeRound              float64   `json:"optionStrikeRound,omitempty"`
	OptionStrikePrice              float64   `json:"optionStrikePrice,omitempty"`
	OptionMultiplier               float64   `json:"optionMultiplier,omitempty"`
	PositionCurrency               string    `json:"positionCurrency,omitempty"`
	Underlying                     string    `json:"underlying,omitempty"`
	QuoteCurrency                  string    `json:"quoteCurrency,omitempty"`
	UnderlyingSymbol               string    `json:"underlyingSymbol,omitempty"`
	Reference                      string    `json:"reference,omitempty"`
	ReferenceSymbol                string    `json:"referenceSymbol,omitempty"`
	CalcInterval                   time.Time `json:"calcInterval,omitempty"`
	PublishInterval                time.Time `json:"publishInterval,omitempty"`
	PublishTime                    time.Time `json:"publishTime,omitempty"`
	MaxOrderQty                    float32   `json:"maxOrderQty,omitempty"`
	MaxPrice                       float64   `json:"maxPrice,omitempty"`
	LotSize                        float32   `json:"lotSize,omitempty"`
	TickSize                       float64   `json:"tickSize,omitempty"`
	Multiplier                     float32   `json:"multiplier,omitempty"`
	SettlCurrency                  string    `json:"settlCurrency,omitempty"`
	UnderlyingToPositionMultiplier float32   `json:"underlyingToPositionMultiplier,omitempty"`
	UnderlyingToSettleMultiplier   float32   `json:"underlyingToSettleMultiplier,omitempty"`
	QuoteToSettleMultiplier        float32   `json:"quoteToSettleMultiplier,omitempty"`
	IsQuanto                       bool      `json:"isQuanto,omitempty"`
	IsInverse                      bool      `json:"isInverse,omitempty"`
	InitMargin                     float64   `json:"initMargin,omitempty"`
	MaintMargin                    float64   `json:"maintMargin,omitempty"`
	RiskLimit                      float32   `json:"riskLimit,omitempty"`
	RiskStep                       float32   `json:"riskStep,omitempty"`
	Limit                          float64   `json:"limit,omitempty"`
	Capped                         bool      `json:"capped,omitempty"`
	Taxed                          bool      `json:"taxed,omitempty"`
	Deleverage                     bool      `json:"deleverage,omitempty"`
	MakerFee                       float64   `json:"makerFee,omitempty"`
	TakerFee                       float64   `json:"takerFee,omitempty"`
	SettlementFee                  float64   `json:"settlementFee,omitempty"`
	InsuranceFee                   float64   `json:"insuranceFee,omitempty"`
	FundingBaseSymbol              string    `json:"fundingBaseSymbol,omitempty"`
	FundingQuoteSymbol             string    `json:"fundingQuoteSymbol,omitempty"`
	FundingPremiumSymbol           string    `json:"fundingPremiumSymbol,omitempty"`
	FundingTimestamp               time.Time `json:"fundingTimestamp,omitempty"`
	FundingInterval                time.Time `json:"fundingInterval,omitempty"`
	FundingRate                    float64   `json:"fundingRate,omitempty"`
	IndicativeFundingRate          float64   `json:"indicativeFundingRate,omitempty"`
	RebalanceTimestamp             time.Time `json:"rebalanceTimestamp,omitempty"`
	RebalanceInterval              time.Time `json:"rebalanceInterval,omitempty"`
	OpeningTimestamp               time.Time `json:"openingTimestamp,omitempty"`
	ClosingTimestamp               time.Time `json:"closingTimestamp,omitempty"`
	SessionInterval                time.Time `json:"sessionInterval,omitempty"`
	PrevClosePrice                 float64   `json:"prevClosePrice,omitempty"`
	LimitDownPrice                 float64   `json:"limitDownPrice,omitempty"`
	LimitUpPrice                   float64   `json:"limitUpPrice,omitempty"`
	BankruptLimitDownPrice         float64   `json:"bankruptLimitDownPrice,omitempty"`
	BankruptLimitUpPrice           float64   `json:"bankruptLimitUpPrice,omitempty"`
	PrevTotalVolume                float32   `json:"prevTotalVolume,omitempty"`
	TotalVolume                    float32   `json:"totalVolume,omitempty"`
	Volume                         float32   `json:"volume,omitempty"`
	Volume24h                      float32   `json:"volume24h,omitempty"`
	PrevTotalTurnover              float32   `json:"prevTotalTurnover,omitempty"`
	TotalTurnover                  float32   `json:"totalTurnover,omitempty"`
	Turnover                       float32   `json:"turnover,omitempty"`
	Turnover24h                    float32   `json:"turnover24h,omitempty"`
	HomeNotional24h                float64   `json:"homeNotional24h,omitempty"`
	ForeignNotional24h             float64   `json:"foreignNotional24h,omitempty"`
	PrevPrice24h                   float64   `json:"prevPrice24h,omitempty"`
	Vwap                           float64   `json:"vwap,omitempty"`
	HighPrice                      float64   `json:"highPrice,omitempty"`
	LowPrice                       float64   `json:"lowPrice,omitempty"`
	LastPrice                      float64   `json:"lastPrice,omitempty"`
	LastPriceProtected             float64   `json:"lastPriceProtected,omitempty"`
	LastTickDirection              string    `json:"lastTickDirection,omitempty"`
	LastChangePcnt                 float64   `json:"lastChangePcnt,omitempty"`
	BidPrice                       float64   `json:"bidPrice,omitempty"`
	MidPrice                       float64   `json:"midPrice,omitempty"`
	AskPrice                       float64   `json:"askPrice,omitempty"`
	ImpactBidPrice                 float64   `json:"impactBidPrice,omitempty"`
	ImpactMidPrice                 float64   `json:"impactMidPrice,omitempty"`
	ImpactAskPrice                 float64   `json:"impactAskPrice,omitempty"`
	HasLiquidity                   bool      `json:"hasLiquidity,omitempty"`
	OpenInterest                   float32   `json:"openInterest,omitempty"`
	OpenValue                      float32   `json:"openValue,omitempty"`
	FairMethod                     string    `json:"fairMethod,omitempty"`
	FairBasisRate                  float64   `json:"fairBasisRate,omitempty"`
	FairBasis                      float64   `json:"fairBasis,omitempty"`
	FairPrice                      float64   `json:"fairPrice,omitempty"`
	MarkMethod                     string    `json:"markMethod,omitempty"`
	MarkPrice                      float64   `json:"markPrice,omitempty"`
	IndicativeTaxRate              float64   `json:"indicativeTaxRate,omitempty"`
	IndicativeSettlePrice          float64   `json:"indicativeSettlePrice,omitempty"`
	OptionUnderlyingPrice          float64   `json:"optionUnderlyingPrice,omitempty"`
	SettledPriceAdjustmentRate     float64   `json:"settledPriceAdjustmentRate,omitempty"`
	SettledPrice                   float64   `json:"settledPrice,omitempty"`
	Timestamp                      time.Time `json:"timestamp,omitempty"`
}

Tradeable Contracts, Indices, and History

type InstrumentApiInstrumentGetCompositeIndexOpts

type InstrumentApiInstrumentGetCompositeIndexOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type InstrumentApiInstrumentGetOpts

type InstrumentApiInstrumentGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type InstrumentApiInstrumentGetUsdVolumeOpts

type InstrumentApiInstrumentGetUsdVolumeOpts struct {
	Symbol  optional.String
	Columns optional.String
}

type InstrumentApiService

type InstrumentApiService service

func (*InstrumentApiService) InstrumentGet

func (a *InstrumentApiService) InstrumentGet(ctx context.Context, localVarOptionals *InstrumentApiInstrumentGetOpts) ([]Instrument, *http.Response, error)

func (*InstrumentApiService) InstrumentGetActive

func (a *InstrumentApiService) InstrumentGetActive(ctx context.Context) ([]Instrument, *http.Response, error)

InstrumentApiService Get all active instruments and instruments that have expired in &lt;24hrs.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Instrument

func (*InstrumentApiService) InstrumentGetActiveAndIndices

func (a *InstrumentApiService) InstrumentGetActiveAndIndices(ctx context.Context) ([]Instrument, *http.Response, error)

InstrumentApiService Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Instrument

func (*InstrumentApiService) InstrumentGetActiveIntervals

func (a *InstrumentApiService) InstrumentGetActiveIntervals(ctx context.Context) (InstrumentInterval, *http.Response, error)

InstrumentApiService Return all active contract series and interval pairs. This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as &#x60;[\&quot;XBT:perpetual\&quot;, \&quot;XBT:quarterly\&quot;, \&quot;XBT:biquarterly\&quot;, \&quot;ETH:quarterly\&quot;, ...]&#x60;. These identifiers are usable in any query&#39;s &#x60;symbol&#x60; param. The second array is the current resolution of these intervals. Results are mapped at the same index.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return InstrumentInterval

func (*InstrumentApiService) InstrumentGetCompositeIndex

func (a *InstrumentApiService) InstrumentGetCompositeIndex(ctx context.Context, localVarOptionals *InstrumentApiInstrumentGetCompositeIndexOpts) ([]IndexComposite, *http.Response, error)

func (*InstrumentApiService) InstrumentGetIndices

func (a *InstrumentApiService) InstrumentGetIndices(ctx context.Context) ([]Instrument, *http.Response, error)

InstrumentApiService Get all price indices.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Instrument

func (*InstrumentApiService) InstrumentGetUsdVolume

func (a *InstrumentApiService) InstrumentGetUsdVolume(ctx context.Context, localVarOptionals *InstrumentApiInstrumentGetUsdVolumeOpts) ([]StatsUsdBySymbol, *http.Response, error)

type InstrumentInterval

type InstrumentInterval struct {
	Intervals []string `json:"intervals"`
	Symbols   []string `json:"symbols"`
}

type Insurance

type Insurance struct {
	Currency      string    `json:"currency"`
	Timestamp     time.Time `json:"timestamp"`
	WalletBalance float32   `json:"walletBalance,omitempty"`
}

Insurance Fund Data

type InsuranceApiInsuranceGetOpts

type InsuranceApiInsuranceGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type InsuranceApiService

type InsuranceApiService service

func (*InsuranceApiService) InsuranceGet

func (a *InsuranceApiService) InsuranceGet(ctx context.Context, localVarOptionals *InsuranceApiInsuranceGetOpts) ([]Insurance, *http.Response, error)

type Leaderboard

type Leaderboard struct {
	Name       string  `json:"name"`
	IsRealName bool    `json:"isRealName,omitempty"`
	Profit     float64 `json:"profit,omitempty"`
}

Information on Top Users

type LeaderboardApiLeaderboardGetOpts

type LeaderboardApiLeaderboardGetOpts struct {
	Method optional.String
}

type LeaderboardApiService

type LeaderboardApiService service

func (*LeaderboardApiService) LeaderboardGet

func (a *LeaderboardApiService) LeaderboardGet(ctx context.Context, localVarOptionals *LeaderboardApiLeaderboardGetOpts) ([]Leaderboard, *http.Response, error)

func (*LeaderboardApiService) LeaderboardGetName

func (a *LeaderboardApiService) LeaderboardGetName(ctx context.Context) (InlineResponse200, *http.Response, error)

LeaderboardApiService Get your alias on the leaderboard.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return InlineResponse200

type Liquidation

type Liquidation struct {
	Id float64 `json:"id,omitempty"`
}

Active Liquidations

type LiquidationApiLiquidationGetOpts

type LiquidationApiLiquidationGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type LiquidationApiService

type LiquidationApiService service

func (*LiquidationApiService) LiquidationGet

func (a *LiquidationApiService) LiquidationGet(ctx context.Context, localVarOptionals *LiquidationApiLiquidationGetOpts) ([]Liquidation, *http.Response, error)

type Margin

type Margin struct {
	Account            float32   `json:"account"`
	Currency           string    `json:"currency"`
	RiskLimit          float32   `json:"riskLimit,omitempty"`
	PrevState          string    `json:"prevState,omitempty"`
	State              string    `json:"state,omitempty"`
	Action             string    `json:"action,omitempty"`
	Amount             float32   `json:"amount,omitempty"`
	PendingCredit      float32   `json:"pendingCredit,omitempty"`
	PendingDebit       float32   `json:"pendingDebit,omitempty"`
	ConfirmedDebit     float32   `json:"confirmedDebit,omitempty"`
	PrevRealisedPnl    float32   `json:"prevRealisedPnl,omitempty"`
	PrevUnrealisedPnl  float32   `json:"prevUnrealisedPnl,omitempty"`
	GrossComm          float32   `json:"grossComm,omitempty"`
	GrossOpenCost      float32   `json:"grossOpenCost,omitempty"`
	GrossOpenPremium   float32   `json:"grossOpenPremium,omitempty"`
	GrossExecCost      float32   `json:"grossExecCost,omitempty"`
	GrossMarkValue     float32   `json:"grossMarkValue,omitempty"`
	RiskValue          float32   `json:"riskValue,omitempty"`
	TaxableMargin      float32   `json:"taxableMargin,omitempty"`
	InitMargin         float32   `json:"initMargin,omitempty"`
	MaintMargin        float32   `json:"maintMargin,omitempty"`
	SessionMargin      float32   `json:"sessionMargin,omitempty"`
	TargetExcessMargin float32   `json:"targetExcessMargin,omitempty"`
	VarMargin          float32   `json:"varMargin,omitempty"`
	RealisedPnl        float32   `json:"realisedPnl,omitempty"`
	UnrealisedPnl      float32   `json:"unrealisedPnl,omitempty"`
	IndicativeTax      float32   `json:"indicativeTax,omitempty"`
	UnrealisedProfit   float32   `json:"unrealisedProfit,omitempty"`
	SyntheticMargin    float32   `json:"syntheticMargin,omitempty"`
	WalletBalance      float32   `json:"walletBalance,omitempty"`
	MarginBalance      float32   `json:"marginBalance,omitempty"`
	MarginBalancePcnt  float64   `json:"marginBalancePcnt,omitempty"`
	MarginLeverage     float64   `json:"marginLeverage,omitempty"`
	MarginUsedPcnt     float64   `json:"marginUsedPcnt,omitempty"`
	ExcessMargin       float32   `json:"excessMargin,omitempty"`
	ExcessMarginPcnt   float64   `json:"excessMarginPcnt,omitempty"`
	AvailableMargin    float32   `json:"availableMargin,omitempty"`
	WithdrawableMargin float32   `json:"withdrawableMargin,omitempty"`
	GrossLastValue     float32   `json:"grossLastValue,omitempty"`
	Commission         float64   `json:"commission,omitempty"`
	MakerFeeDiscount   float64   `json:"makerFeeDiscount,omitempty"`
	TakerFeeDiscount   float64   `json:"takerFeeDiscount,omitempty"`
	Timestamp          time.Time `json:"timestamp,omitempty"`
}

type ModelError

type ModelError struct {
	Error_ *ErrorError `json:"error"`
}

type Order

type Order struct {
	OrderID               string    `json:"orderID"`
	ClOrdID               string    `json:"clOrdID,omitempty"`
	ClOrdLinkID           string    `json:"clOrdLinkID,omitempty"`
	Account               float32   `json:"account,omitempty"`
	Symbol                string    `json:"symbol,omitempty"`
	Side                  string    `json:"side,omitempty"`
	SimpleOrderQty        float64   `json:"simpleOrderQty,omitempty"`
	OrderQty              float32   `json:"orderQty,omitempty"`
	Price                 float64   `json:"price,omitempty"`
	DisplayQty            float32   `json:"displayQty,omitempty"`
	StopPx                float64   `json:"stopPx,omitempty"`
	PegOffsetValue        float64   `json:"pegOffsetValue,omitempty"`
	PegPriceType          string    `json:"pegPriceType,omitempty"`
	Currency              string    `json:"currency,omitempty"`
	SettlCurrency         string    `json:"settlCurrency,omitempty"`
	OrdType               string    `json:"ordType,omitempty"`
	TimeInForce           string    `json:"timeInForce,omitempty"`
	ExecInst              string    `json:"execInst,omitempty"`
	ContingencyType       string    `json:"contingencyType,omitempty"`
	ExDestination         string    `json:"exDestination,omitempty"`
	OrdStatus             string    `json:"ordStatus,omitempty"`
	Triggered             string    `json:"triggered,omitempty"`
	WorkingIndicator      bool      `json:"workingIndicator,omitempty"`
	OrdRejReason          string    `json:"ordRejReason,omitempty"`
	SimpleLeavesQty       float64   `json:"simpleLeavesQty,omitempty"`
	LeavesQty             float32   `json:"leavesQty,omitempty"`
	SimpleCumQty          float64   `json:"simpleCumQty,omitempty"`
	CumQty                float32   `json:"cumQty,omitempty"`
	AvgPx                 float64   `json:"avgPx,omitempty"`
	MultiLegReportingType string    `json:"multiLegReportingType,omitempty"`
	Text                  string    `json:"text,omitempty"`
	TransactTime          time.Time `json:"transactTime,omitempty"`
	Timestamp             time.Time `json:"timestamp,omitempty"`
}

Placement, Cancellation, Amending, and History

type OrderApiOrderAmendOpts

type OrderApiOrderAmendOpts struct {
	OrderID         optional.String
	OrigClOrdID     optional.String
	ClOrdID         optional.String
	SimpleOrderQty  optional.Float64
	OrderQty        optional.Float32
	SimpleLeavesQty optional.Float64
	LeavesQty       optional.Float32
	Price           optional.Float64
	StopPx          optional.Float64
	PegOffsetValue  optional.Float64
	Text            optional.String
}

type OrderApiOrderCancelAllOpts

type OrderApiOrderCancelAllOpts struct {
	Symbol optional.String
	Filter optional.String
	Text   optional.String
}

type OrderApiOrderCancelOpts

type OrderApiOrderCancelOpts struct {
	OrderID optional.String
	ClOrdID optional.String
	Text    optional.String
}

type OrderApiOrderClosePositionOpts

type OrderApiOrderClosePositionOpts struct {
	Price optional.Float64
}

type OrderApiOrderGetOrdersOpts

type OrderApiOrderGetOrdersOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type OrderApiOrderNewOpts

type OrderApiOrderNewOpts struct {
	Side            optional.String
	SimpleOrderQty  optional.Float64
	OrderQty        optional.Float32
	Price           optional.Float64
	DisplayQty      optional.Float32
	StopPx          optional.Float64
	ClOrdID         optional.String
	ClOrdLinkID     optional.String
	PegOffsetValue  optional.Float64
	PegPriceType    optional.String
	OrdType         optional.String
	TimeInForce     optional.String
	ExecInst        optional.String
	ContingencyType optional.String
	Text            optional.String
}

type OrderApiService

type OrderApiService service

func (*OrderApiService) OrderAmend

func (a *OrderApiService) OrderAmend(ctx context.Context, localVarOptionals *OrderApiOrderAmendOpts) (Order, *http.Response, error)

func (*OrderApiService) OrderCancel

func (a *OrderApiService) OrderCancel(ctx context.Context, localVarOptionals *OrderApiOrderCancelOpts) ([]Order, *http.Response, error)

func (*OrderApiService) OrderCancelAll

func (a *OrderApiService) OrderCancelAll(ctx context.Context, localVarOptionals *OrderApiOrderCancelAllOpts) ([]Order, *http.Response, error)

func (*OrderApiService) OrderCancelAllAfter

func (a *OrderApiService) OrderCancelAllAfter(ctx context.Context, timeout float64) (interface{}, *http.Response, error)

OrderApiService Automatically cancel all your orders after a specified timeout. Useful as a dead-man&#39;s switch to ensure your orders are canceled in case of an outage. If called repeatedly, the existing offset will be canceled and a new one will be inserted in its place. Example usage: call this route at 15s intervals with an offset of 60000 (60s). If this route is not called within 60 seconds, all your orders will be automatically canceled. This is also available via [WebSocket](https://www.bitmex.com/app/wsAPI#Dead-Mans-Switch-Auto-Cancel).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param timeout Timeout in ms. Set to 0 to cancel this timer.

@return interface{}

func (*OrderApiService) OrderClosePosition

func (a *OrderApiService) OrderClosePosition(ctx context.Context, symbol string, localVarOptionals *OrderApiOrderClosePositionOpts) (Order, *http.Response, error)

func (*OrderApiService) OrderGetOrders

func (a *OrderApiService) OrderGetOrders(ctx context.Context, localVarOptionals *OrderApiOrderGetOrdersOpts) ([]Order, *http.Response, error)

func (*OrderApiService) OrderNew

func (a *OrderApiService) OrderNew(ctx context.Context, symbol string, localVarOptionals *OrderApiOrderNewOpts) (Order, *http.Response, error)

type OrderBookApiOrderBookGetL2Opts

type OrderBookApiOrderBookGetL2Opts struct {
	Depth optional.Float32
}

type OrderBookApiService

type OrderBookApiService service

func (*OrderBookApiService) OrderBookGetL2

func (a *OrderBookApiService) OrderBookGetL2(ctx context.Context, symbol string, localVarOptionals *OrderBookApiOrderBookGetL2Opts) ([]OrderBookL2, *http.Response, error)

type OrderBookL2

type OrderBookL2 struct {
	Id     float32 `json:"id"`
	Symbol string  `json:"symbol"`
	Side   string  `json:"side"`
	Size   float32 `json:"size,omitempty"`
	Price  float64 `json:"price,omitempty"`
}

type Position

type Position struct {
	Account              float32   `json:"account"`
	Symbol               string    `json:"symbol"`
	Currency             string    `json:"currency,omitempty"`
	Underlying           string    `json:"underlying,omitempty"`
	QuoteCurrency        string    `json:"quoteCurrency,omitempty"`
	Commission           float64   `json:"commission,omitempty"`
	InitMarginReq        float64   `json:"initMarginReq,omitempty"`
	MaintMarginReq       float64   `json:"maintMarginReq,omitempty"`
	RiskLimit            float32   `json:"riskLimit,omitempty"`
	Leverage             float64   `json:"leverage,omitempty"`
	CrossMargin          bool      `json:"crossMargin,omitempty"`
	DeleveragePercentile float64   `json:"deleveragePercentile,omitempty"`
	RebalancedPnl        float32   `json:"rebalancedPnl,omitempty"`
	PrevRealisedPnl      float32   `json:"prevRealisedPnl,omitempty"`
	PrevUnrealisedPnl    float32   `json:"prevUnrealisedPnl,omitempty"`
	PrevClosePrice       float64   `json:"prevClosePrice,omitempty"`
	OpeningTimestamp     time.Time `json:"openingTimestamp,omitempty"`
	OpeningQty           float32   `json:"openingQty,omitempty"`
	OpeningCost          float32   `json:"openingCost,omitempty"`
	OpeningComm          float32   `json:"openingComm,omitempty"`
	OpenOrderBuyQty      float32   `json:"openOrderBuyQty,omitempty"`
	OpenOrderBuyCost     float32   `json:"openOrderBuyCost,omitempty"`
	OpenOrderBuyPremium  float32   `json:"openOrderBuyPremium,omitempty"`
	OpenOrderSellQty     float32   `json:"openOrderSellQty,omitempty"`
	OpenOrderSellCost    float32   `json:"openOrderSellCost,omitempty"`
	OpenOrderSellPremium float32   `json:"openOrderSellPremium,omitempty"`
	ExecBuyQty           float32   `json:"execBuyQty,omitempty"`
	ExecBuyCost          float32   `json:"execBuyCost,omitempty"`
	ExecSellQty          float32   `json:"execSellQty,omitempty"`
	ExecSellCost         float32   `json:"execSellCost,omitempty"`
	ExecQty              float32   `json:"execQty,omitempty"`
	ExecCost             float32   `json:"execCost,omitempty"`
	ExecComm             float32   `json:"execComm,omitempty"`
	CurrentTimestamp     time.Time `json:"currentTimestamp,omitempty"`
	CurrentQty           float32   `json:"currentQty,omitempty"`
	CurrentCost          float32   `json:"currentCost,omitempty"`
	CurrentComm          float32   `json:"currentComm,omitempty"`
	RealisedCost         float32   `json:"realisedCost,omitempty"`
	UnrealisedCost       float32   `json:"unrealisedCost,omitempty"`
	GrossOpenCost        float32   `json:"grossOpenCost,omitempty"`
	GrossOpenPremium     float32   `json:"grossOpenPremium,omitempty"`
	GrossExecCost        float32   `json:"grossExecCost,omitempty"`
	IsOpen               bool      `json:"isOpen,omitempty"`
	MarkPrice            float64   `json:"markPrice,omitempty"`
	MarkValue            float32   `json:"markValue,omitempty"`
	RiskValue            float32   `json:"riskValue,omitempty"`
	HomeNotional         float64   `json:"homeNotional,omitempty"`
	ForeignNotional      float64   `json:"foreignNotional,omitempty"`
	PosState             string    `json:"posState,omitempty"`
	PosCost              float32   `json:"posCost,omitempty"`
	PosCost2             float32   `json:"posCost2,omitempty"`
	PosCross             float32   `json:"posCross,omitempty"`
	PosInit              float32   `json:"posInit,omitempty"`
	PosComm              float32   `json:"posComm,omitempty"`
	PosLoss              float32   `json:"posLoss,omitempty"`
	PosMargin            float32   `json:"posMargin,omitempty"`
	PosMaint             float32   `json:"posMaint,omitempty"`
	PosAllowance         float32   `json:"posAllowance,omitempty"`
	TaxableMargin        float32   `json:"taxableMargin,omitempty"`
	InitMargin           float32   `json:"initMargin,omitempty"`
	MaintMargin          float32   `json:"maintMargin,omitempty"`
	SessionMargin        float32   `json:"sessionMargin,omitempty"`
	TargetExcessMargin   float32   `json:"targetExcessMargin,omitempty"`
	VarMargin            float32   `json:"varMargin,omitempty"`
	RealisedGrossPnl     float32   `json:"realisedGrossPnl,omitempty"`
	RealisedTax          float32   `json:"realisedTax,omitempty"`
	RealisedPnl          float32   `json:"realisedPnl,omitempty"`
	UnrealisedGrossPnl   float32   `json:"unrealisedGrossPnl,omitempty"`
	LongBankrupt         float32   `json:"longBankrupt,omitempty"`
	ShortBankrupt        float32   `json:"shortBankrupt,omitempty"`
	TaxBase              float32   `json:"taxBase,omitempty"`
	IndicativeTaxRate    float64   `json:"indicativeTaxRate,omitempty"`
	IndicativeTax        float32   `json:"indicativeTax,omitempty"`
	UnrealisedTax        float32   `json:"unrealisedTax,omitempty"`
	UnrealisedPnl        float32   `json:"unrealisedPnl,omitempty"`
	UnrealisedPnlPcnt    float64   `json:"unrealisedPnlPcnt,omitempty"`
	UnrealisedRoePcnt    float64   `json:"unrealisedRoePcnt,omitempty"`
	SimpleQty            float64   `json:"simpleQty,omitempty"`
	SimpleCost           float64   `json:"simpleCost,omitempty"`
	SimpleValue          float64   `json:"simpleValue,omitempty"`
	SimplePnl            float64   `json:"simplePnl,omitempty"`
	SimplePnlPcnt        float64   `json:"simplePnlPcnt,omitempty"`
	AvgCostPrice         float64   `json:"avgCostPrice,omitempty"`
	AvgEntryPrice        float64   `json:"avgEntryPrice,omitempty"`
	BreakEvenPrice       float64   `json:"breakEvenPrice,omitempty"`
	MarginCallPrice      float64   `json:"marginCallPrice,omitempty"`
	LiquidationPrice     float64   `json:"liquidationPrice,omitempty"`
	BankruptPrice        float64   `json:"bankruptPrice,omitempty"`
	Timestamp            time.Time `json:"timestamp,omitempty"`
	LastPrice            float64   `json:"lastPrice,omitempty"`
	LastValue            float32   `json:"lastValue,omitempty"`
}

Summary of Open and Closed Positions

type PositionApiPositionGetOpts

type PositionApiPositionGetOpts struct {
	Filter  optional.String
	Columns optional.String
	Count   optional.Float32
}

type PositionApiPositionIsolateMarginOpts

type PositionApiPositionIsolateMarginOpts struct {
	Enabled optional.Bool
}

type PositionApiService

type PositionApiService service

func (*PositionApiService) PositionGet

func (a *PositionApiService) PositionGet(ctx context.Context, localVarOptionals *PositionApiPositionGetOpts) ([]Position, *http.Response, error)

func (*PositionApiService) PositionIsolateMargin

func (a *PositionApiService) PositionIsolateMargin(ctx context.Context, symbol string, localVarOptionals *PositionApiPositionIsolateMarginOpts) (Position, *http.Response, error)

func (*PositionApiService) PositionTransferIsolatedMargin

func (a *PositionApiService) PositionTransferIsolatedMargin(ctx context.Context, symbol string, amount float32) (Position, *http.Response, error)

PositionApiService Transfer equity in or out of a position. When margin is isolated on a position, use this function to add or remove margin from the position. Note that you cannot remove margin below the initial margin threshold.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param symbol Symbol of position to isolate.
  • @param amount Amount to transfer, in Satoshis. May be negative.

@return Position

func (*PositionApiService) PositionUpdateLeverage

func (a *PositionApiService) PositionUpdateLeverage(ctx context.Context, symbol string, leverage float64) (Position, *http.Response, error)

PositionApiService Choose leverage for a position. Users can choose an isolated leverage. This will automatically enable isolated margin.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param symbol Symbol of position to adjust.
  • @param leverage Leverage value. Send a number between 0.01 and 100 to enable isolated margin with a fixed leverage. Send 0 to enable cross margin.

@return Position

func (*PositionApiService) PositionUpdateRiskLimit

func (a *PositionApiService) PositionUpdateRiskLimit(ctx context.Context, symbol string, riskLimit float32) (Position, *http.Response, error)

PositionApiService Update your risk limit. Risk Limits limit the size of positions you can trade at various margin levels. Larger positions require more margin. Please see the Risk Limit documentation for more details.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param symbol Symbol of position to update risk limit on.
  • @param riskLimit New Risk Limit, in Satoshis.

@return Position

type Quote

type Quote struct {
	Timestamp time.Time `json:"timestamp"`
	Symbol    string    `json:"symbol"`
	BidSize   float32   `json:"bidSize,omitempty"`
	BidPrice  float64   `json:"bidPrice,omitempty"`
	AskPrice  float64   `json:"askPrice,omitempty"`
	AskSize   float32   `json:"askSize,omitempty"`
}

Best Bid/Offer Snapshots & Historical Bins

type QuoteApiQuoteGetBucketedOpts

type QuoteApiQuoteGetBucketedOpts struct {
	BinSize   optional.String
	Partial   optional.Bool
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type QuoteApiQuoteGetOpts

type QuoteApiQuoteGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type QuoteApiService

type QuoteApiService service

func (*QuoteApiService) QuoteGet

func (a *QuoteApiService) QuoteGet(ctx context.Context, localVarOptionals *QuoteApiQuoteGetOpts) ([]Quote, *http.Response, error)

func (*QuoteApiService) QuoteGetBucketed

func (a *QuoteApiService) QuoteGetBucketed(ctx context.Context, localVarOptionals *QuoteApiQuoteGetBucketedOpts) ([]Quote, *http.Response, error)

type QuoteFillRatio

type QuoteFillRatio struct {
	Date                time.Time `json:"date"`
	Account             float64   `json:"account,omitempty"`
	QuoteCount          float64   `json:"quoteCount,omitempty"`
	DealtCount          float64   `json:"dealtCount,omitempty"`
	QuotesMavg7         float64   `json:"quotesMavg7,omitempty"`
	DealtMavg7          float64   `json:"dealtMavg7,omitempty"`
	QuoteFillRatioMavg7 float64   `json:"quoteFillRatioMavg7,omitempty"`
}

Daily Quote Fill Ratio Statistic

type QuoteValueRatio

type QuoteValueRatio struct {
	Timestamp  time.Time `json:"timestamp,omitempty"`
	Account    float64   `json:"account,omitempty"`
	Symbol     string    `json:"symbol,omitempty"`
	QuoteCount float64   `json:"quoteCount,omitempty"`
	VolumeXBT  float64   `json:"volumeXBT,omitempty"`
	QVR        float64   `json:"QVR,omitempty"`
	Id         float64   `json:"id,omitempty"`
}

Hourly Quote Value Ratio Statistic

type SchemaApiSchemaGetOpts

type SchemaApiSchemaGetOpts struct {
	Model optional.String
}

type SchemaApiService

type SchemaApiService service

func (*SchemaApiService) SchemaGet

func (a *SchemaApiService) SchemaGet(ctx context.Context, localVarOptionals *SchemaApiSchemaGetOpts) (interface{}, *http.Response, error)

func (*SchemaApiService) SchemaWebsocketHelp

func (a *SchemaApiService) SchemaWebsocketHelp(ctx context.Context) (interface{}, *http.Response, error)

SchemaApiService Returns help text &amp; subject list for websocket usage.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return interface{}

type Settlement

type Settlement struct {
	Id float64 `json:"id,omitempty"`
}

Historical Settlement Data

type SettlementApiService

type SettlementApiService service

func (*SettlementApiService) SettlementGet

func (a *SettlementApiService) SettlementGet(ctx context.Context, localVarOptionals *SettlementApiSettlementGetOpts) ([]Settlement, *http.Response, error)

type SettlementApiSettlementGetOpts

type SettlementApiSettlementGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type Stats

type Stats struct {
	RootSymbol   string  `json:"rootSymbol"`
	Currency     string  `json:"currency,omitempty"`
	Volume24h    float32 `json:"volume24h,omitempty"`
	Turnover24h  float32 `json:"turnover24h,omitempty"`
	OpenInterest float32 `json:"openInterest,omitempty"`
	OpenValue    float32 `json:"openValue,omitempty"`
}

Exchange Statistics

type StatsApiService

type StatsApiService service

func (*StatsApiService) StatsGet

func (a *StatsApiService) StatsGet(ctx context.Context) ([]Stats, *http.Response, error)

StatsApiService Get exchange-wide and per-series turnover and volume statistics.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Stats

func (*StatsApiService) StatsHistory

func (a *StatsApiService) StatsHistory(ctx context.Context) ([]StatsHistory, *http.Response, error)

StatsApiService Get historical exchange-wide and per-series turnover and volume statistics.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []StatsHistory

func (*StatsApiService) StatsHistoryUSD

func (a *StatsApiService) StatsHistoryUSD(ctx context.Context) ([]StatsUsd, *http.Response, error)

StatsApiService Get a summary of exchange statistics in USD.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []StatsUsd

type StatsHistory

type StatsHistory struct {
	Date       time.Time `json:"date"`
	RootSymbol string    `json:"rootSymbol"`
	Currency   string    `json:"currency,omitempty"`
	Volume     float32   `json:"volume,omitempty"`
	Turnover   float32   `json:"turnover,omitempty"`
}

type StatsUsd

type StatsUsd struct {
	RootSymbol   string  `json:"rootSymbol"`
	Currency     string  `json:"currency,omitempty"`
	Turnover24h  float32 `json:"turnover24h,omitempty"`
	Turnover30d  float32 `json:"turnover30d,omitempty"`
	Turnover365d float32 `json:"turnover365d,omitempty"`
	Turnover     float32 `json:"turnover,omitempty"`
}

type StatsUsdBySymbol

type StatsUsdBySymbol struct {
	Symbol       string  `json:"symbol"`
	Currency     string  `json:"currency,omitempty"`
	Turnover24h  float32 `json:"turnover24h,omitempty"`
	Turnover30d  float32 `json:"turnover30d,omitempty"`
	Turnover365d float32 `json:"turnover365d,omitempty"`
	Turnover     float32 `json:"turnover,omitempty"`
}

type Trade

type Trade struct {
	Timestamp       time.Time `json:"timestamp"`
	Symbol          string    `json:"symbol"`
	Side            string    `json:"side,omitempty"`
	Size            float32   `json:"size,omitempty"`
	Price           float64   `json:"price,omitempty"`
	TickDirection   string    `json:"tickDirection,omitempty"`
	TrdMatchID      string    `json:"trdMatchID,omitempty"`
	GrossValue      float32   `json:"grossValue,omitempty"`
	HomeNotional    float64   `json:"homeNotional,omitempty"`
	ForeignNotional float64   `json:"foreignNotional,omitempty"`
}

Individual & Bucketed Trades

type TradeApiService

type TradeApiService service

func (*TradeApiService) TradeGet

func (a *TradeApiService) TradeGet(ctx context.Context, localVarOptionals *TradeApiTradeGetOpts) ([]Trade, *http.Response, error)

func (*TradeApiService) TradeGetBucketed

func (a *TradeApiService) TradeGetBucketed(ctx context.Context, localVarOptionals *TradeApiTradeGetBucketedOpts) ([]TradeBin, *http.Response, error)

type TradeApiTradeGetBucketedOpts

type TradeApiTradeGetBucketedOpts struct {
	BinSize   optional.String
	Partial   optional.Bool
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type TradeApiTradeGetOpts

type TradeApiTradeGetOpts struct {
	Symbol    optional.String
	Filter    optional.String
	Columns   optional.String
	Count     optional.Float32
	Start     optional.Float32
	Reverse   optional.Bool
	StartTime optional.Time
	EndTime   optional.Time
}

type TradeBin

type TradeBin struct {
	Timestamp       time.Time `json:"timestamp"`
	Symbol          string    `json:"symbol"`
	Open            float64   `json:"open,omitempty"`
	High            float64   `json:"high,omitempty"`
	Low             float64   `json:"low,omitempty"`
	Close           float64   `json:"close,omitempty"`
	Trades          float32   `json:"trades,omitempty"`
	Volume          float32   `json:"volume,omitempty"`
	Vwap            float64   `json:"vwap,omitempty"`
	LastSize        float32   `json:"lastSize,omitempty"`
	Turnover        float32   `json:"turnover,omitempty"`
	HomeNotional    float64   `json:"homeNotional,omitempty"`
	ForeignNotional float64   `json:"foreignNotional,omitempty"`
}

type TradingVolume

type TradingVolume struct {
	AdvUsd float64 `json:"advUsd"`
}

30 days USD average trading volume

type Transaction

type Transaction struct {
	TransactID     string    `json:"transactID"`
	Account        float32   `json:"account,omitempty"`
	Currency       string    `json:"currency,omitempty"`
	TransactType   string    `json:"transactType,omitempty"`
	Amount         float32   `json:"amount,omitempty"`
	Fee            float32   `json:"fee,omitempty"`
	TransactStatus string    `json:"transactStatus,omitempty"`
	Address        string    `json:"address,omitempty"`
	Tx             string    `json:"tx,omitempty"`
	Text           string    `json:"text,omitempty"`
	TransactTime   time.Time `json:"transactTime,omitempty"`
	Timestamp      time.Time `json:"timestamp,omitempty"`
}

type User

type User struct {
	Id               float32          `json:"id,omitempty"`
	OwnerId          float32          `json:"ownerId,omitempty"`
	Firstname        string           `json:"firstname,omitempty"`
	Lastname         string           `json:"lastname,omitempty"`
	Username         string           `json:"username"`
	Email            string           `json:"email,omitempty"`
	Phone            string           `json:"phone,omitempty"`
	Created          time.Time        `json:"created,omitempty"`
	LastUpdated      time.Time        `json:"lastUpdated,omitempty"`
	Preferences      *UserPreferences `json:"preferences,omitempty"`
	TFAEnabled       string           `json:"TFAEnabled,omitempty"`
	AffiliateID      string           `json:"affiliateID,omitempty"`
	PgpPubKey        string           `json:"pgpPubKey,omitempty"`
	PgpPubKeyCreated time.Time        `json:"pgpPubKeyCreated,omitempty"`
	Country          string           `json:"country,omitempty"`
	GeoipCountry     string           `json:"geoipCountry,omitempty"`
	GeoipRegion      string           `json:"geoipRegion,omitempty"`
	Typ              string           `json:"typ,omitempty"`
}

Account Operations

type UserApiService

type UserApiService service

func (*UserApiService) UserCancelWithdrawal

func (a *UserApiService) UserCancelWithdrawal(ctx context.Context, token string) (Transaction, *http.Response, error)

UserApiService Cancel a withdrawal.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param token

@return Transaction

func (*UserApiService) UserCheckReferralCode

func (a *UserApiService) UserCheckReferralCode(ctx context.Context, localVarOptionals *UserApiUserCheckReferralCodeOpts) (float64, *http.Response, error)

func (*UserApiService) UserCommunicationToken

func (a *UserApiService) UserCommunicationToken(ctx context.Context, token string, platformAgent string) ([]CommunicationToken, *http.Response, error)

UserApiService Register your communication token for mobile clients

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param token
  • @param platformAgent

@return []CommunicationToken

func (*UserApiService) UserConfirm

func (a *UserApiService) UserConfirm(ctx context.Context, token string) (AccessToken, *http.Response, error)

UserApiService Confirm your email address with a token.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param token

@return AccessToken

func (*UserApiService) UserConfirmWithdrawal

func (a *UserApiService) UserConfirmWithdrawal(ctx context.Context, token string) (Transaction, *http.Response, error)

UserApiService Confirm a withdrawal.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param token

@return Transaction

func (*UserApiService) UserGet

func (a *UserApiService) UserGet(ctx context.Context) (User, *http.Response, error)

UserApiService Get your user model.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return User

func (*UserApiService) UserGetAffiliateStatus

func (a *UserApiService) UserGetAffiliateStatus(ctx context.Context, localVarOptionals *UserApiUserGetAffiliateStatusOpts) (Affiliate, *http.Response, error)

func (*UserApiService) UserGetCommission

func (a *UserApiService) UserGetCommission(ctx context.Context) (UserCommissionsBySymbol, *http.Response, error)

UserApiService Get your account&#39;s commission status.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return UserCommissionsBySymbol

func (*UserApiService) UserGetDepositAddress

func (a *UserApiService) UserGetDepositAddress(ctx context.Context, localVarOptionals *UserApiUserGetDepositAddressOpts) (string, *http.Response, error)

func (*UserApiService) UserGetExecutionHistory

func (a *UserApiService) UserGetExecutionHistory(ctx context.Context, symbol string, timestamp time.Time) (interface{}, *http.Response, error)

UserApiService Get the execution history by day.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param symbol
  • @param timestamp

@return interface{}

func (*UserApiService) UserGetMargin

func (a *UserApiService) UserGetMargin(ctx context.Context, localVarOptionals *UserApiUserGetMarginOpts) (Margin, *http.Response, error)

func (*UserApiService) UserGetQuoteFillRatio

func (a *UserApiService) UserGetQuoteFillRatio(ctx context.Context) (QuoteFillRatio, *http.Response, error)

UserApiService Get 7 days worth of Quote Fill Ratio statistics.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return QuoteFillRatio

func (*UserApiService) UserGetQuoteValueRatio

func (a *UserApiService) UserGetQuoteValueRatio(ctx context.Context) (QuoteValueRatio, *http.Response, error)

UserApiService Get Quote Value Ratio statistics over the last 3 days

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return QuoteValueRatio

func (*UserApiService) UserGetTradingVolume

func (a *UserApiService) UserGetTradingVolume(ctx context.Context) (TradingVolume, *http.Response, error)

UserApiService Get your 30 days USD average trading volume

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return TradingVolume

func (*UserApiService) UserGetWallet

func (a *UserApiService) UserGetWallet(ctx context.Context, localVarOptionals *UserApiUserGetWalletOpts) (Wallet, *http.Response, error)

func (*UserApiService) UserGetWalletHistory

func (a *UserApiService) UserGetWalletHistory(ctx context.Context, localVarOptionals *UserApiUserGetWalletHistoryOpts) ([]Transaction, *http.Response, error)

func (*UserApiService) UserGetWalletSummary

func (a *UserApiService) UserGetWalletSummary(ctx context.Context, localVarOptionals *UserApiUserGetWalletSummaryOpts) ([]Transaction, *http.Response, error)

func (*UserApiService) UserLogout

func (a *UserApiService) UserLogout(ctx context.Context) (*http.Response, error)

UserApiService Log out of BitMEX.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

func (*UserApiService) UserMinWithdrawalFee

func (a *UserApiService) UserMinWithdrawalFee(ctx context.Context, localVarOptionals *UserApiUserMinWithdrawalFeeOpts) (interface{}, *http.Response, error)

func (*UserApiService) UserRequestWithdrawal

func (a *UserApiService) UserRequestWithdrawal(ctx context.Context, currency string, amount float32, localVarOptionals *UserApiUserRequestWithdrawalOpts) (Transaction, *http.Response, error)

func (*UserApiService) UserSavePreferences

func (a *UserApiService) UserSavePreferences(ctx context.Context, prefs string, localVarOptionals *UserApiUserSavePreferencesOpts) (User, *http.Response, error)

type UserApiUserCheckReferralCodeOpts

type UserApiUserCheckReferralCodeOpts struct {
	ReferralCode optional.String
}

type UserApiUserGetAffiliateStatusOpts

type UserApiUserGetAffiliateStatusOpts struct {
	Currency optional.String
}

type UserApiUserGetDepositAddressOpts

type UserApiUserGetDepositAddressOpts struct {
	Currency optional.String
}

type UserApiUserGetMarginOpts

type UserApiUserGetMarginOpts struct {
	Currency optional.String
}

type UserApiUserGetWalletHistoryOpts

type UserApiUserGetWalletHistoryOpts struct {
	Currency optional.String
	Count    optional.Float64
	Start    optional.Float64
}

type UserApiUserGetWalletOpts

type UserApiUserGetWalletOpts struct {
	Currency optional.String
}

type UserApiUserGetWalletSummaryOpts

type UserApiUserGetWalletSummaryOpts struct {
	Currency optional.String
}

type UserApiUserMinWithdrawalFeeOpts

type UserApiUserMinWithdrawalFeeOpts struct {
	Currency optional.String
	Amount   optional.Float64
}

type UserApiUserRequestWithdrawalOpts

type UserApiUserRequestWithdrawalOpts struct {
	OtpToken     optional.String
	Address      optional.String
	AddressId    optional.Float64
	TargetUserId optional.Float64
	Fee          optional.Float64
	Text         optional.String
}

type UserApiUserSavePreferencesOpts

type UserApiUserSavePreferencesOpts struct {
	Overwrite optional.Bool
}

type UserCommissionsBySymbol

type UserCommissionsBySymbol struct {
}

type UserEvent

type UserEvent struct {
	Id             float64     `json:"id,omitempty"`
	Type_          string      `json:"type"`
	Status         string      `json:"status"`
	UserId         float64     `json:"userId"`
	CreatedById    float64     `json:"createdById"`
	Ip             string      `json:"ip,omitempty"`
	GeoipCountry   string      `json:"geoipCountry,omitempty"`
	GeoipRegion    string      `json:"geoipRegion,omitempty"`
	GeoipSubRegion string      `json:"geoipSubRegion,omitempty"`
	EventMeta      interface{} `json:"eventMeta,omitempty"`
	Created        time.Time   `json:"created"`
}

User Events for Auditing

type UserEventApiService

type UserEventApiService service

func (*UserEventApiService) UserEventGet

func (a *UserEventApiService) UserEventGet(ctx context.Context, localVarOptionals *UserEventApiUserEventGetOpts) ([]UserEvent, *http.Response, error)

type UserEventApiUserEventGetOpts

type UserEventApiUserEventGetOpts struct {
	Count   optional.Float64
	StartId optional.Float64
}

type UserPreferences

type UserPreferences struct {
	AlertOnLiquidations     bool        `json:"alertOnLiquidations,omitempty"`
	AnimationsEnabled       bool        `json:"animationsEnabled,omitempty"`
	AnnouncementsLastSeen   time.Time   `json:"announcementsLastSeen,omitempty"`
	ChatChannelID           float64     `json:"chatChannelID,omitempty"`
	ColorTheme              string      `json:"colorTheme,omitempty"`
	Currency                string      `json:"currency,omitempty"`
	Debug                   bool        `json:"debug,omitempty"`
	DisableEmails           []string    `json:"disableEmails,omitempty"`
	DisablePush             []string    `json:"disablePush,omitempty"`
	HideConfirmDialogs      []string    `json:"hideConfirmDialogs,omitempty"`
	HideConnectionModal     bool        `json:"hideConnectionModal,omitempty"`
	HideFromLeaderboard     bool        `json:"hideFromLeaderboard,omitempty"`
	HideNameFromLeaderboard bool        `json:"hideNameFromLeaderboard,omitempty"`
	HideNotifications       []string    `json:"hideNotifications,omitempty"`
	HidePhoneConfirm        bool        `json:"hidePhoneConfirm,omitempty"`
	Locale                  string      `json:"locale,omitempty"`
	MsgsSeen                []string    `json:"msgsSeen,omitempty"`
	OrderBookBinning        interface{} `json:"orderBookBinning,omitempty"`
	OrderBookType           string      `json:"orderBookType,omitempty"`
	OrderClearImmediate     bool        `json:"orderClearImmediate,omitempty"`
	OrderControlsPlusMinus  bool        `json:"orderControlsPlusMinus,omitempty"`
	ShowLocaleNumbers       bool        `json:"showLocaleNumbers,omitempty"`
	Sounds                  []string    `json:"sounds,omitempty"`
	StrictIPCheck           bool        `json:"strictIPCheck,omitempty"`
	StrictTimeout           bool        `json:"strictTimeout,omitempty"`
	TickerGroup             string      `json:"tickerGroup,omitempty"`
	TickerPinned            bool        `json:"tickerPinned,omitempty"`
	TradeLayout             string      `json:"tradeLayout,omitempty"`
}

type Wallet

type Wallet struct {
	Account          float32   `json:"account"`
	Currency         string    `json:"currency"`
	PrevDeposited    float32   `json:"prevDeposited,omitempty"`
	PrevWithdrawn    float32   `json:"prevWithdrawn,omitempty"`
	PrevTransferIn   float32   `json:"prevTransferIn,omitempty"`
	PrevTransferOut  float32   `json:"prevTransferOut,omitempty"`
	PrevAmount       float32   `json:"prevAmount,omitempty"`
	PrevTimestamp    time.Time `json:"prevTimestamp,omitempty"`
	DeltaDeposited   float32   `json:"deltaDeposited,omitempty"`
	DeltaWithdrawn   float32   `json:"deltaWithdrawn,omitempty"`
	DeltaTransferIn  float32   `json:"deltaTransferIn,omitempty"`
	DeltaTransferOut float32   `json:"deltaTransferOut,omitempty"`
	DeltaAmount      float32   `json:"deltaAmount,omitempty"`
	Deposited        float32   `json:"deposited,omitempty"`
	Withdrawn        float32   `json:"withdrawn,omitempty"`
	TransferIn       float32   `json:"transferIn,omitempty"`
	TransferOut      float32   `json:"transferOut,omitempty"`
	Amount           float32   `json:"amount,omitempty"`
	PendingCredit    float32   `json:"pendingCredit,omitempty"`
	PendingDebit     float32   `json:"pendingDebit,omitempty"`
	ConfirmedDebit   float32   `json:"confirmedDebit,omitempty"`
	Timestamp        time.Time `json:"timestamp,omitempty"`
}

type XAny

type XAny struct {
}

Jump to

Keyboard shortcuts

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