Versions in this module Expand all Collapse all v1 v1.1.0 May 5, 2018 Changes in this version type APIKey + Timeout int64 v1.0.0 Apr 11, 2018 Changes in this version + const ContextAPIKey + const ContextAccessToken + const ContextBasicAuth + const ContextOAuth2 + func CacheExpires(r *http.Response) time.Time + func CalSignature(apiSecret, payload string) string + func DebugHttpRequest(r *http.Request) + func SetAuthHeader(request *http.Request, apiKey APIKey, c *Configuration, ...) + func Signature(apiSecret, method, path, query, nonce, bodyStr string) string + type APIClient struct + APIKeyApi *APIKeyApiService + AnnouncementApi *AnnouncementApiService + ChatApi *ChatApiService + ExecutionApi *ExecutionApiService + FundingApi *FundingApiService + InstrumentApi *InstrumentApiService + InsuranceApi *InsuranceApiService + LeaderboardApi *LeaderboardApiService + LiquidationApi *LiquidationApiService + NotificationApi *NotificationApiService + OrderApi *OrderApiService + OrderBookApi *OrderBookApiService + PositionApi *PositionApiService + QuoteApi *QuoteApiService + SchemaApi *SchemaApiService + SettlementApi *SettlementApiService + StatsApi *StatsApiService + TradeApi *TradeApiService + UserApi *UserApiService + func NewAPIClient(cfg *Configuration) *APIClient + func (c *APIClient) ChangeBasePath(path string) + type APIKey struct + Host string + Key string + Prefix string + Secret string + type APIKeyApiService service + func (a *APIKeyApiService) APIKeyDisable(ctx context.Context, apiKeyID string) (ApiKey, *http.Response, error) + func (a *APIKeyApiService) APIKeyEnable(ctx context.Context, apiKeyID string) (ApiKey, *http.Response, error) + func (a *APIKeyApiService) APIKeyGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]ApiKey, *http.Response, error) + func (a *APIKeyApiService) APIKeyNew(ctx context.Context, localVarOptionals map[string]interface{}) (ApiKey, *http.Response, error) + func (a *APIKeyApiService) APIKeyRemove(ctx context.Context, apiKeyID string) (InlineResponse200, *http.Response, error) + type APIResponse struct + Message string + Method string + Operation string + Payload []byte + RequestURL string + func NewAPIResponse(r *http.Response) *APIResponse + func NewAPIResponseWithError(errorMessage string) *APIResponse + type AccessToken struct + Created time.Time + Id string + Ttl float64 + UserId float64 + type Affiliate struct + Account float32 + Currency string + ExecComm float32 + ExecTurnover float32 + PayoutPcnt float64 + PendingPayout float32 + PrevComm float32 + PrevPayout float32 + PrevTimestamp time.Time + PrevTurnover float32 + ReferrerAccount float64 + Timestamp time.Time + TotalComm float32 + TotalReferrals float32 + TotalTurnover float32 + type Announcement struct + Content string + Date time.Time + Id float32 + Link string + Title string + type AnnouncementApiService service + func (a *AnnouncementApiService) AnnouncementGet(localVarOptionals map[string]interface{}) ([]Announcement, *http.Response, error) + func (a *AnnouncementApiService) AnnouncementGetUrgent(ctx context.Context) ([]Announcement, *http.Response, error) + type ApiKey struct + Cidr string + Created time.Time + Enabled bool + Id string + Name string + Nonce float32 + Permissions []XAny + Secret string + UserId float32 + type BasicAuth struct + Password string + UserName string + type Chat struct + ChannelID float64 + Date time.Time + FromBot bool + Html string + Id float32 + Message string + User string + type ChatApiService service + func (a *ChatApiService) ChatGet(localVarOptionals map[string]interface{}) ([]Chat, *http.Response, error) + func (a *ChatApiService) ChatGetChannels() ([]ChatChannel, *http.Response, error) + func (a *ChatApiService) ChatGetConnected() (ConnectedUsers, *http.Response, error) + func (a *ChatApiService) ChatNew(ctx context.Context, message string, localVarOptionals map[string]interface{}) (Chat, *http.Response, error) + type ChatChannel struct + Id float32 + Name string + type Configuration struct + BasePath string + DefaultHeader map[string]string + ExpireTime int64 + HTTPClient *http.Client + Host string + Scheme string + UserAgent string + func NewConfiguration() *Configuration + func (c *Configuration) AddDefaultHeader(key string, value string) + type ConnectedUsers struct + Bots float32 + Users float32 + type ErrorError struct + Message string + Name string + type Execution struct + Account float32 + AvgPx float64 + ClOrdID string + ClOrdLinkID string + Commission float64 + ContingencyType string + CumQty float32 + Currency string + DisplayQty float32 + ExDestination string + ExecComm float32 + ExecCost float32 + ExecID string + ExecInst string + ExecType string + ForeignNotional float64 + HomeNotional float64 + LastLiquidityInd string + LastMkt string + LastPx float64 + LastQty float32 + LeavesQty float32 + MultiLegReportingType string + OrdRejReason string + OrdStatus string + OrdType string + OrderID string + OrderQty float32 + PegOffsetValue float64 + PegPriceType string + Price float64 + SettlCurrency string + Side string + SimpleCumQty float64 + SimpleLeavesQty float64 + SimpleOrderQty float64 + StopPx float64 + Symbol string + Text string + TimeInForce string + Timestamp time.Time + TradePublishIndicator string + TransactTime time.Time + TrdMatchID string + Triggered string + UnderlyingLastPx float64 + WorkingIndicator bool + type ExecutionApiService service + func (a *ExecutionApiService) ExecutionGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]Execution, *http.Response, error) + func (a *ExecutionApiService) ExecutionGetTradeHistory(ctx context.Context, localVarOptionals map[string]interface{}) ([]Execution, *http.Response, error) + type Funding struct + FundingInterval time.Time + FundingRate float64 + FundingRateDaily float64 + Symbol string + Timestamp time.Time + type FundingApiService service + func (a *FundingApiService) FundingGet(localVarOptionals map[string]interface{}) ([]Funding, *http.Response, error) + type IndexComposite struct + IndexSymbol string + LastPrice float64 + Logged time.Time + Reference string + Symbol string + Timestamp time.Time + Weight float64 + type InlineResponse200 struct + Success bool + type Instrument struct + AskPrice float64 + BankruptLimitDownPrice float64 + BankruptLimitUpPrice float64 + BidPrice float64 + BuyLeg string + CalcInterval time.Time + Capped bool + ClosingTimestamp time.Time + Deleverage bool + Expiry time.Time + FairBasis float64 + FairBasisRate float64 + FairMethod string + FairPrice float64 + Front time.Time + FundingBaseSymbol string + FundingInterval time.Time + FundingPremiumSymbol string + FundingQuoteSymbol string + FundingRate float64 + FundingTimestamp time.Time + HasLiquidity bool + HighPrice float64 + ImpactAskPrice float64 + ImpactBidPrice float64 + ImpactMidPrice float64 + IndicativeFundingRate float64 + IndicativeSettlePrice float64 + IndicativeTaxRate float64 + InitMargin float64 + InsuranceFee float64 + InverseLeg string + IsInverse bool + IsQuanto bool + LastChangePcnt float64 + LastPrice float64 + LastPriceProtected float64 + LastTickDirection string + Limit float64 + LimitDownPrice float64 + LimitUpPrice float64 + Listing time.Time + LotSize float32 + LowPrice float64 + MaintMargin float64 + MakerFee float64 + MarkMethod string + MarkPrice float64 + MaxOrderQty float32 + MaxPrice float64 + MidPrice float64 + Multiplier float32 + OpenInterest float32 + OpenValue float32 + OpeningTimestamp time.Time + PositionCurrency string + PrevClosePrice float64 + PrevPrice24h float64 + PrevTotalTurnover float32 + PrevTotalVolume float32 + PublishInterval time.Time + PublishTime time.Time + QuoteCurrency string + QuoteToSettleMultiplier float32 + RebalanceInterval time.Time + RebalanceTimestamp time.Time + Reference string + ReferenceSymbol string + RelistInterval time.Time + RiskLimit float32 + RiskStep float32 + RootSymbol string + SellLeg string + SessionInterval time.Time + SettlCurrency string + Settle time.Time + SettledPrice float64 + SettlementFee float64 + State string + Symbol string + TakerFee float64 + Taxed bool + TickSize float64 + Timestamp time.Time + TotalTurnover float32 + TotalVolume float32 + Turnover float32 + Turnover24h float32 + Typ string + Underlying string + UnderlyingSymbol string + UnderlyingToPositionMultiplier float32 + UnderlyingToSettleMultiplier float32 + Volume float32 + Volume24h float32 + Vwap float64 + type InstrumentApiService service + func (a *InstrumentApiService) InstrumentGet(localVarOptionals map[string]interface{}) ([]Instrument, *http.Response, error) + func (a *InstrumentApiService) InstrumentGetActive() ([]Instrument, *http.Response, error) + func (a *InstrumentApiService) InstrumentGetActiveAndIndices() ([]Instrument, *http.Response, error) + func (a *InstrumentApiService) InstrumentGetActiveIntervals() (InstrumentInterval, *http.Response, error) + func (a *InstrumentApiService) InstrumentGetCompositeIndex(localVarOptionals map[string]interface{}) ([]IndexComposite, *http.Response, error) + func (a *InstrumentApiService) InstrumentGetIndices() ([]Instrument, *http.Response, error) + type InstrumentInterval struct + Intervals []string + Symbols []string + type Insurance struct + Currency string + Timestamp time.Time + WalletBalance float32 + type InsuranceApiService service + func (a *InsuranceApiService) InsuranceGet(localVarOptionals map[string]interface{}) ([]Insurance, *http.Response, error) + type Leaderboard struct + IsMe bool + IsRealName bool + Name string + Profit float64 + type LeaderboardApiService service + func (a *LeaderboardApiService) LeaderboardGet(localVarOptionals map[string]interface{}) ([]Leaderboard, *http.Response, error) + type Liquidation struct + LeavesQty float32 + OrderID string + Price float64 + Side string + Symbol string + type LiquidationApiService service + func (a *LiquidationApiService) LiquidationGet(localVarOptionals map[string]interface{}) ([]Liquidation, *http.Response, error) + type Margin struct + Account float32 + Action string + Amount float32 + AvailableMargin float32 + Commission float64 + ConfirmedDebit float32 + Currency string + ExcessMargin float32 + ExcessMarginPcnt float64 + GrossComm float32 + GrossExecCost float32 + GrossLastValue float32 + GrossMarkValue float32 + GrossOpenCost float32 + GrossOpenPremium float32 + IndicativeTax float32 + InitMargin float32 + MaintMargin float32 + MarginBalance float32 + MarginBalancePcnt float64 + MarginLeverage float64 + MarginUsedPcnt float64 + PendingCredit float32 + PendingDebit float32 + PrevRealisedPnl float32 + PrevState string + PrevUnrealisedPnl float32 + RealisedPnl float32 + RiskLimit float32 + RiskValue float32 + SessionMargin float32 + State string + SyntheticMargin float32 + TargetExcessMargin float32 + TaxableMargin float32 + Timestamp time.Time + UnrealisedPnl float32 + UnrealisedProfit float32 + VarMargin float32 + WalletBalance float32 + WithdrawableMargin float32 + type ModelError struct + Error_ *ErrorError + type Notification struct + Body string + Closable bool + Date time.Time + Id float32 + Persist bool + Sound string + Title string + Ttl float32 + Type_ string + WaitForVisibility bool + type NotificationApiService service + func (a *NotificationApiService) NotificationGet(ctx context.Context) ([]Notification, *http.Response, error) + type Order struct + Account float32 + AvgPx float64 + ClOrdID string + ClOrdLinkID string + ContingencyType string + CumQty float32 + Currency string + DisplayQty float32 + ExDestination string + ExecInst string + LeavesQty float32 + MultiLegReportingType string + OrdRejReason string + OrdStatus string + OrdType string + OrderID string + OrderQty float32 + PegOffsetValue float64 + PegPriceType string + Price float64 + SettlCurrency string + Side string + SimpleCumQty float64 + SimpleLeavesQty float64 + SimpleOrderQty float64 + StopPx float64 + Symbol string + Text string + TimeInForce string + Timestamp time.Time + TransactTime time.Time + Triggered string + WorkingIndicator bool + type OrderApiService service + func (a *OrderApiService) OrderAmend(ctx context.Context, localVarOptionals map[string]interface{}) (Order, *http.Response, error) + func (a *OrderApiService) OrderAmendBulk(ctx context.Context, localVarOptionals map[string]interface{}) ([]Order, *http.Response, error) + func (a *OrderApiService) OrderCancel(ctx context.Context, localVarOptionals map[string]interface{}) ([]Order, *http.Response, error) + func (a *OrderApiService) OrderCancelAll(ctx context.Context, localVarOptionals map[string]interface{}) (interface{}, *http.Response, error) + func (a *OrderApiService) OrderCancelAllAfter(ctx context.Context, timeout float64) (interface{}, *http.Response, error) + func (a *OrderApiService) OrderClosePosition(ctx context.Context, symbol string, localVarOptionals map[string]interface{}) (Order, *http.Response, error) + func (a *OrderApiService) OrderGetOrders(ctx context.Context, localVarOptionals map[string]interface{}) ([]Order, *http.Response, error) + func (a *OrderApiService) OrderNew(ctx context.Context, symbol string, localVarOptionals map[string]interface{}) (Order, *http.Response, error) + func (a *OrderApiService) OrderNewBulk(ctx context.Context, localVarOptionals map[string]interface{}) ([]Order, *http.Response, error) + type OrderBook struct + AskPrice float64 + AskSize float32 + BidPrice float64 + BidSize float32 + Level float32 + Symbol string + Timestamp time.Time + type OrderBookApiService service + func (a *OrderBookApiService) OrderBookGet(symbol string, localVarOptionals map[string]interface{}) ([]OrderBook, *http.Response, error) + func (a *OrderBookApiService) OrderBookGetL2(symbol string, localVarOptionals map[string]interface{}) ([]OrderBookL2, *http.Response, error) + type OrderBookL2 struct + Id float32 + Price float64 + Side string + Size float32 + Symbol string + type Position struct + Account float32 + AvgCostPrice float64 + AvgEntryPrice float64 + BankruptPrice float64 + BreakEvenPrice float64 + Commission float64 + CrossMargin bool + Currency string + CurrentComm float32 + CurrentCost float32 + CurrentQty float32 + CurrentTimestamp time.Time + DeleveragePercentile float64 + ExecBuyCost float32 + ExecBuyQty float32 + ExecComm float32 + ExecCost float32 + ExecQty float32 + ExecSellCost float32 + ExecSellQty float32 + ForeignNotional float64 + GrossExecCost float32 + GrossOpenCost float32 + GrossOpenPremium float32 + HomeNotional float64 + IndicativeTax float32 + IndicativeTaxRate float64 + InitMargin float32 + InitMarginReq float64 + IsOpen bool + LastPrice float64 + LastValue float32 + Leverage float64 + LiquidationPrice float64 + LongBankrupt float32 + MaintMargin float32 + MaintMarginReq float64 + MarginCallPrice float64 + MarkPrice float64 + MarkValue float32 + OpenOrderBuyCost float32 + OpenOrderBuyPremium float32 + OpenOrderBuyQty float32 + OpenOrderSellCost float32 + OpenOrderSellPremium float32 + OpenOrderSellQty float32 + OpeningComm float32 + OpeningCost float32 + OpeningQty float32 + OpeningTimestamp time.Time + PosAllowance float32 + PosComm float32 + PosCost float32 + PosCost2 float32 + PosCross float32 + PosInit float32 + PosLoss float32 + PosMaint float32 + PosMargin float32 + PosState string + PrevClosePrice float64 + PrevRealisedPnl float32 + PrevUnrealisedPnl float32 + QuoteCurrency string + RealisedCost float32 + RealisedGrossPnl float32 + RealisedPnl float32 + RealisedTax float32 + RebalancedPnl float32 + RiskLimit float32 + RiskValue float32 + SessionMargin float32 + ShortBankrupt float32 + SimpleCost float64 + SimplePnl float64 + SimplePnlPcnt float64 + SimpleQty float64 + SimpleValue float64 + Symbol string + TargetExcessMargin float32 + TaxBase float32 + TaxableMargin float32 + Timestamp time.Time + Underlying string + UnrealisedCost float32 + UnrealisedGrossPnl float32 + UnrealisedPnl float32 + UnrealisedPnlPcnt float64 + UnrealisedRoePcnt float64 + UnrealisedTax float32 + VarMargin float32 + type PositionApiService service + func (a *PositionApiService) PositionGet(ctx context.Context, localVarOptionals map[string]interface{}) ([]Position, *http.Response, error) + func (a *PositionApiService) PositionIsolateMargin(ctx context.Context, symbol string, localVarOptionals map[string]interface{}) (Position, *http.Response, error) + func (a *PositionApiService) PositionTransferIsolatedMargin(ctx context.Context, symbol string, amount float32) (Position, *http.Response, error) + func (a *PositionApiService) PositionUpdateLeverage(ctx context.Context, symbol string, leverage float64) (Position, *http.Response, error) + func (a *PositionApiService) PositionUpdateRiskLimit(ctx context.Context, symbol string, riskLimit float32) (Position, *http.Response, error) + type Quote struct + AskPrice float64 + AskSize float32 + BidPrice float64 + BidSize float32 + Symbol string + Timestamp time.Time + type QuoteApiService service + func (a *QuoteApiService) QuoteGet(localVarOptionals map[string]interface{}) ([]Quote, *http.Response, error) + func (a *QuoteApiService) QuoteGetBucketed(localVarOptionals map[string]interface{}) ([]Quote, *http.Response, error) + type SchemaApiService service + func (a *SchemaApiService) SchemaGet(localVarOptionals map[string]interface{}) (interface{}, *http.Response, error) + func (a *SchemaApiService) SchemaWebsocketHelp() (interface{}, *http.Response, error) + type Settlement struct + Bankrupt float32 + SettledPrice float64 + SettlementType string + Symbol string + TaxBase float32 + TaxRate float64 + Timestamp time.Time + type SettlementApiService service + func (a *SettlementApiService) SettlementGet(localVarOptionals map[string]interface{}) ([]Settlement, *http.Response, error) + type Stats struct + Currency string + OpenInterest float32 + OpenValue float32 + RootSymbol string + Turnover24h float32 + Volume24h float32 + type StatsApiService service + func (a *StatsApiService) StatsGet() ([]Stats, *http.Response, error) + func (a *StatsApiService) StatsHistory() ([]StatsHistory, *http.Response, error) + func (a *StatsApiService) StatsHistoryUSD() ([]StatsUsd, *http.Response, error) + type StatsHistory struct + Currency string + Date time.Time + RootSymbol string + Turnover float32 + Volume float32 + type StatsUsd struct + Currency string + RootSymbol string + Turnover float32 + Turnover24h float32 + Turnover30d float32 + Turnover365d float32 + type Trade struct + ForeignNotional float64 + GrossValue float32 + HomeNotional float64 + Price float64 + Side string + Size float32 + Symbol string + TickDirection string + Timestamp time.Time + TrdMatchID string + type TradeApiService service + func (a *TradeApiService) TradeGet(localVarOptionals map[string]interface{}) ([]Trade, *http.Response, error) + func (a *TradeApiService) TradeGetBucketed(localVarOptionals map[string]interface{}) ([]TradeBin, *http.Response, error) + type TradeBin struct + Close float64 + ForeignNotional float64 + High float64 + HomeNotional float64 + LastSize float32 + Low float64 + Open float64 + Symbol string + Timestamp time.Time + Trades float32 + Turnover float32 + Volume float32 + Vwap float64 + type Transaction struct + Account float32 + Address string + Amount float32 + Currency string + Fee float32 + Text string + Timestamp time.Time + TransactID string + TransactStatus string + TransactTime time.Time + TransactType string + Tx string + type User struct + AffiliateID string + Country string + Created time.Time + Email string + Firstname string + Id float32 + LastUpdated time.Time + Lastname string + OwnerId float32 + PgpPubKey string + Phone string + Preferences *UserPreferences + TFAEnabled string + Username string + type UserApiService service + func (a *UserApiService) UserCancelWithdrawal(token string) (Transaction, *http.Response, error) + func (a *UserApiService) UserCheckReferralCode(localVarOptionals map[string]interface{}) (float64, *http.Response, error) + func (a *UserApiService) UserConfirm(token string) (AccessToken, *http.Response, error) + func (a *UserApiService) UserConfirmEnableTFA(ctx context.Context, token string, localVarOptionals map[string]interface{}) (bool, *http.Response, error) + func (a *UserApiService) UserConfirmWithdrawal(token string) (Transaction, *http.Response, error) + func (a *UserApiService) UserDisableTFA(ctx context.Context, token string, localVarOptionals map[string]interface{}) (bool, *http.Response, error) + func (a *UserApiService) UserGet(ctx context.Context) (User, *http.Response, error) + func (a *UserApiService) UserGetAffiliateStatus(ctx context.Context) (Affiliate, *http.Response, error) + func (a *UserApiService) UserGetCommission(ctx context.Context) ([]UserCommission, *http.Response, error) + func (a *UserApiService) UserGetDepositAddress(ctx context.Context, localVarOptionals map[string]interface{}) (string, *http.Response, error) + func (a *UserApiService) UserGetMargin(ctx context.Context, localVarOptionals map[string]interface{}) (Margin, *http.Response, error) + func (a *UserApiService) UserGetWallet(ctx context.Context, localVarOptionals map[string]interface{}) (Wallet, *http.Response, error) + func (a *UserApiService) UserGetWalletHistory(ctx context.Context, localVarOptionals map[string]interface{}) ([]Transaction, *http.Response, error) + func (a *UserApiService) UserGetWalletSummary(ctx context.Context, localVarOptionals map[string]interface{}) ([]Transaction, *http.Response, error) + func (a *UserApiService) UserLogout() (*http.Response, error) + func (a *UserApiService) UserLogoutAll(ctx context.Context) (float64, *http.Response, error) + func (a *UserApiService) UserMinWithdrawalFee(localVarOptionals map[string]interface{}) (interface{}, *http.Response, error) + func (a *UserApiService) UserRequestEnableTFA(ctx context.Context, localVarOptionals map[string]interface{}) (bool, *http.Response, error) + func (a *UserApiService) UserRequestWithdrawal(ctx context.Context, currency string, amount float32, address string, ...) (Transaction, *http.Response, error) + func (a *UserApiService) UserSavePreferences(ctx context.Context, prefs string, localVarOptionals map[string]interface{}) (User, *http.Response, error) + func (a *UserApiService) UserUpdate(ctx context.Context, localVarOptionals map[string]interface{}) (User, *http.Response, error) + type UserCommission struct + MakerFee float64 + MaxFee float64 + SettlementFee float64 + TakerFee float64 + type UserPreferences struct + AlertOnLiquidations bool + AnimationsEnabled bool + AnnouncementsLastSeen time.Time + ChatChannelID float64 + ColorTheme string + Currency string + Debug bool + DisableEmails []string + HideConfirmDialogs []string + HideConnectionModal bool + HideFromLeaderboard bool + HideNameFromLeaderboard bool + HideNotifications []string + Locale string + MsgsSeen []string + OrderBookBinning *interface{} + OrderBookType string + OrderClearImmediate bool + OrderControlsPlusMinus bool + Sounds []string + StrictIPCheck bool + StrictTimeout bool + TickerGroup string + TickerPinned bool + TradeLayout string + type Wallet struct + Account float32 + Addr string + Amount float32 + ConfirmedDebit float32 + Currency string + DeltaAmount float32 + DeltaDeposited float32 + DeltaTransferIn float32 + DeltaTransferOut float32 + DeltaWithdrawn float32 + Deposited float32 + PendingCredit float32 + PendingDebit float32 + PrevAmount float32 + PrevDeposited float32 + PrevTimestamp time.Time + PrevTransferIn float32 + PrevTransferOut float32 + PrevWithdrawn float32 + Script string + Timestamp time.Time + TransferIn float32 + TransferOut float32 + WithdrawalLock []string + Withdrawn float32 + type XAny struct