Documentation ¶
Index ¶
- Constants
- type AccountSummary
- type Announcement
- type AnnouncementsNotification
- type AuthResponse
- type BookSummary
- type BuyParams
- type BuyResponse
- type CancelAllByCurrencyParams
- type CancelAllByInstrumentParams
- type CancelAllByLabelParams
- type CancelParams
- type CancelTransferByIDParams
- type CancelWithdrawalParams
- type ChangeSubaccountNameParams
- type ClientCredentialsParams
- type ClosePositionParams
- type ClosePositionResponse
- type CreateDepositAddressParams
- type Currency
- type Deposit
- type DepositAddress
- type DeribitPriceIndexNotification
- type DeribitPriceRanking
- type DeribitPriceRankingNotification
- type DisableTfaForSubaccountParams
- type EditByLabelParams
- type EditParams
- type EditResponse
- type EstimatedExpirationPriceNotification
- type FundingChartData
- type GetAccountSummaryParams
- type GetBookSummaryByCurrencyParams
- type GetBookSummaryByInstrumentParams
- type GetContractSizeParams
- type GetContractSizeResponse
- type GetCurrentDepositAddressParams
- type GetDepositsParams
- type GetDepositsResponse
- type GetFundingChartDataParams
- type GetFundingChartDataResponse
- type GetHistoricalVolatilityParams
- type GetHistoricalVolatilityResponse
- type GetIndexParams
- type GetIndexResponse
- type GetInstrumentsParams
- type GetLastSettlementsByCurrencyParams
- type GetLastSettlementsByInstrumentParams
- type GetLastSettlementsResponse
- type GetLastTradesByCurrencyAndTimeParams
- type GetLastTradesByCurrencyParams
- type GetLastTradesByInstrumentAndTimeParams
- type GetLastTradesByInstrumentParams
- type GetLastTradesResponse
- type GetMarginsParams
- type GetMarginsResponse
- type GetOpenOrdersByCurrencyParams
- type GetOpenOrdersByInstrumentParams
- type GetOrderBookParams
- type GetOrderBookResponse
- type GetOrderHistoryByCurrencyParams
- type GetOrderHistoryByInstrumentParams
- type GetOrderMarginByIDsParams
- type GetOrderMarginByIDsResponse
- type GetOrderStateParams
- type GetPositionParams
- type GetPositionsParams
- type GetSettlementHistoryByCurrencyParams
- type GetSettlementHistoryByInstrumentParams
- type GetSettlementHistoryResponse
- type GetSubaccountsParams
- type GetTradeVolumesParams
- type GetTradeVolumesResponse
- type GetTradingviewChartDataParams
- type GetTradingviewChartDataResponse
- type GetTransfersParams
- type GetTransfersResponse
- type GetUserTradesByCurrencyAndTimeParams
- type GetUserTradesByCurrencyParams
- type GetUserTradesByInstrumentAndTimeParams
- type GetUserTradesByInstrumentParams
- type GetUserTradesByOrderParams
- type GetUserTradesResponse
- type GetWithdrawalsParams
- type Greeks
- type HelloParams
- type HelloResponse
- type HistoricalVolatility
- type Instrument
- type MarkpriceOption
- type MarkpriceOptionsNotification
- type Order
- type OrderBookGroupNotification
- type OrderBookNotification
- type OrderBookNotificationItem
- type OrderBookRawNotification
- type OrderMargin
- type PerpetualNotification
- type Portfolio
- type PortfolioNotification
- type Position
- type QuoteNotification
- type SellParams
- type SellResponse
- type SessionParams
- type SetAnnouncementAsReadParams
- type SetEmailForSubaccountParams
- type SetEmailLanguageParams
- type SetHeartbeatParams
- type SetPasswordForSubaccountParams
- type Settlement
- type Stats
- type Subaccount
- type SubscribeParams
- type SubscribeResponse
- type TestResponse
- type TickerNotification
- type TickerParams
- type TickerResponse
- type ToggleNotificationsFromSubaccountParams
- type ToggleSubaccountLoginParams
- type Trade
- type TradeVolume
- type TradesNotification
- type Transfer
- type UnsubscribeParams
- type UnsubscribeResponse
- type UserChangesNotification
- type UserOrderNotification
- type UserTrade
- type UserTradesNotification
- type WithdrawParams
- type Withdrawal
- type WithdrawalPriority
Constants ¶
View Source
const ( DirectionBuy = "buy" DirectionSell = "sell" )
Direction direction, `buy` or `sell`
View Source
const ( OrderStateOpen = "open" OrderStateFilled = "filled" OrderStateRejected = "rejected" OrderStateCancelled = "cancelled" OrderStateUntriggered = "untriggered" )
OrderState order state, `"open"`, `"filled"`, `"rejected"`, `"cancelled"`, `"untriggered"`
View Source
const ( OrderTypeLimit = "limit" OrderTypeMarket = "market" OrderTypeStopLimit = "stop_limit" OrderTypeStopMarket = "stop_market" )
OrderType order type, `"limit"`, `"market"`, `"stop_limit"`, `"stop_market"`
View Source
const ( TriggerTypeIndexPrice = "index_price" TriggerTypeMarkPrice = "mark_price" TriggerTypeLastPrice = "last_price" )
TriggerType trigger type, `"index_price"`, `"mark_price"`, `"last_price"`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSummary ¶
type AccountSummary struct { AvailableFunds float64 `json:"available_funds"` AvailableWithdrawalFunds float64 `json:"available_withdrawal_funds"` Balance float64 `json:"balance"` Currency string `json:"currency"` DeltaTotal float64 `json:"delta_total"` DepositAddress string `json:"deposit_address"` Email string `json:"email"` Equity float64 `json:"equity"` FuturesPl float64 `json:"futures_pl"` FuturesSessionRpl float64 `json:"futures_session_rpl"` FuturesSessionUpl float64 `json:"futures_session_upl"` ID int `json:"id"` InitialMargin float64 `json:"initial_margin"` MaintenanceMargin float64 `json:"maintenance_margin"` MarginBalance float64 `json:"margin_balance"` OptionsDelta float64 `json:"options_delta"` OptionsGamma float64 `json:"options_gamma"` OptionsPl float64 `json:"options_pl"` OptionsSessionRpl float64 `json:"options_session_rpl"` OptionsSessionUpl float64 `json:"options_session_upl"` OptionsTheta float64 `json:"options_theta"` OptionsVega float64 `json:"options_vega"` PortfolioMarginingEnabled bool `json:"portfolio_margining_enabled"` SessionFunding float64 `json:"session_funding"` SessionRpl float64 `json:"session_rpl"` SessionUpl float64 `json:"session_upl"` SystemName string `json:"system_name"` TfaEnabled bool `json:"tfa_enabled"` TotalPl float64 `json:"total_pl"` Type string `json:"type"` Username string `json:"username"` }
type Announcement ¶
type AuthResponse ¶
type BookSummary ¶
type BookSummary struct { AskPrice *float64 `json:"ask_price"` BaseCurrency string `json:"base_currency"` BidPrice *float64 `json:"bid_price"` CreationTimestamp uint64 `json:"creation_timestamp"` CurrentFunding float64 `json:"current_funding"` EstimatedDeliveryPrice float64 `json:"estimated_delivery_price"` Funding8H float64 `json:"funding_8h"` High float64 `json:"high"` InstrumentName string `json:"instrument_name"` InterestRate float64 `json:"interest_rate"` Last *float64 `json:"last"` Low *float64 `json:"low"` MarkPrice float64 `json:"mark_price"` MidPrice *float64 `json:"mid_price"` OpenInterest float64 `json:"open_interest"` PriceChange *float64 `json:"price_change"` QuoteCurrency string `json:"quote_currency"` UnderlyingIndex string `json:"underlying_index"` UnderlyingPrice float64 `json:"underlying_price"` VolumeUsd float64 `json:"volume_usd"` Volume float64 `json:"volume"` }
type BuyParams ¶
type BuyParams struct { InstrumentName string `json:"instrument_name"` Amount float64 `json:"amount"` Type string `json:"type,omitempty"` Label string `json:"label,omitempty"` Price float64 `json:"price,omitempty"` TimeInForce string `json:"time_in_force,omitempty"` MaxShow *float64 `json:"max_show,omitempty"` PostOnly bool `json:"post_only,omitempty"` RejectPostOnly bool `json:"reject_post_only,omitempty"` ReduceOnly bool `json:"reduce_only,omitempty"` TriggerPrice float64 `json:"trigger_price,omitempty"` Trigger string `json:"trigger,omitempty"` Advanced string `json:"advanced,omitempty"` MMP bool `json:"mmp"` }
type BuyResponse ¶
type CancelAllByLabelParams ¶
type CancelAllByLabelParams struct {
Label string `json:"label"`
}
type CancelParams ¶
type CancelParams struct {
OrderID string `json:"order_id"`
}
type CancelWithdrawalParams ¶
type ClientCredentialsParams ¶
type ClosePositionParams ¶
type ClosePositionResponse ¶
type CreateDepositAddressParams ¶
type CreateDepositAddressParams struct {
Currency string `json:"currency"`
}
type Currency ¶
type Currency struct { CoinType string `json:"coin_type"` Currency string `json:"currency"` CurrencyLong string `json:"currency_long"` FeePrecision int `json:"fee_precision"` MinConfirmations int `json:"min_confirmations"` MinWithdrawalFee float64 `json:"min_withdrawal_fee"` WithdrawalFee float64 `json:"withdrawal_fee"` WithdrawalPriorities []WithdrawalPriority `json:"withdrawal_priorities"` }
type DepositAddress ¶
type DeribitPriceRanking ¶
type DeribitPriceRankingNotification ¶
type DeribitPriceRankingNotification []DeribitPriceRanking
type DisableTfaForSubaccountParams ¶
type DisableTfaForSubaccountParams struct {
Sid int `json:"sid"`
}
type EditByLabelParams ¶
type EditByLabelParams struct { Label string `json:"label"` InstrumentName string `json:"instrument_name"` Amount float64 `json:"amount"` Price float64 `json:"price"` PostOnly bool `json:"post_only,omitempty"` ReduceOnly bool `json:"reduce_only,omitempty"` RejectPostOnly bool `json:"reject_post_only,omitempty"` Advanced string `json:"advanced,omitempty"` TriggerPrice float64 `json:"trigger_price,omitempty"` MMP bool `json:"mmp"` }
type EditParams ¶
type EditParams struct { OrderID string `json:"order_id"` Amount float64 `json:"amount"` Price float64 `json:"price"` PostOnly bool `json:"post_only,omitempty"` ReduceOnly bool `json:"reduce_only,omitempty"` RejectPostOnly bool `json:"reject_post_only,omitempty"` Advanced string `json:"advanced,omitempty"` TriggerPrice float64 `json:"trigger_price,omitempty"` MMP bool `json:"mmp"` }
type EditResponse ¶
type FundingChartData ¶
type GetAccountSummaryParams ¶
type GetBookSummaryByInstrumentParams ¶
type GetBookSummaryByInstrumentParams struct {
InstrumentName string `json:"instrument_name"`
}
type GetContractSizeParams ¶
type GetContractSizeParams struct {
InstrumentName string `json:"instrument_name"`
}
type GetContractSizeResponse ¶
type GetContractSizeResponse struct {
ContractSize int `json:"contract_size"`
}
type GetCurrentDepositAddressParams ¶
type GetCurrentDepositAddressParams struct {
Currency string `json:"currency"`
}
type GetDepositsParams ¶
type GetDepositsResponse ¶
type GetFundingChartDataResponse ¶
type GetFundingChartDataResponse struct { CurrentInterest float64 `json:"current_interest"` Data []FundingChartData `json:"data"` Interest8H float64 `json:"interest_8h"` }
type GetHistoricalVolatilityParams ¶
type GetHistoricalVolatilityParams struct {
Currency string `json:"currency"`
}
type GetHistoricalVolatilityResponse ¶
type GetHistoricalVolatilityResponse []HistoricalVolatility
type GetIndexParams ¶
type GetIndexParams struct {
Currency string `json:"currency"`
}
type GetIndexResponse ¶
type GetInstrumentsParams ¶
type GetLastSettlementsResponse ¶
type GetLastSettlementsResponse struct { Settlements []Settlement `json:"settlements"` Continuation string `json:"continuation"` }
type GetLastTradesByCurrencyAndTimeParams ¶
type GetLastTradesByCurrencyAndTimeParams struct { Currency string `json:"currency"` Kind string `json:"kind,omitempty"` StartTimestamp uint64 `json:"start_timestamp"` EndTimestamp uint64 `json:"end_timestamp"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetLastTradesByCurrencyParams ¶
type GetLastTradesByCurrencyParams struct { Currency string `json:"currency"` Kind string `json:"kind,omitempty"` StartID string `json:"start_id,omitempty"` EndID string `json:"end_id,omitempty"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetLastTradesByInstrumentAndTimeParams ¶
type GetLastTradesByInstrumentAndTimeParams struct { InstrumentName string `json:"instrument_name"` StartTimestamp int `json:"start_timestamp"` EndTimestamp int `json:"end_timestamp"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetLastTradesResponse ¶
type GetMarginsParams ¶
type GetMarginsResponse ¶
type GetOrderBookParams ¶
type GetOrderBookResponse ¶
type GetOrderBookResponse struct { Timestamp uint64 `json:"timestamp"` Stats Stats `json:"stats"` State string `json:"state"` SettlementPrice float64 `json:"settlement_price"` MinPrice float64 `json:"min_price"` MaxPrice float64 `json:"max_price"` MarkPrice float64 `json:"mark_price"` MarkIV float64 `json:"mark_iv"` LastPrice float64 `json:"last_price"` InstrumentName string `json:"instrument_name"` IndexPrice float64 `json:"index_price"` Funding8H float64 `json:"funding_8h"` CurrentFunding float64 `json:"current_funding"` ChangeID uint64 `json:"change_id"` BidIV float64 `json:"bid_iv"` Bids [][]float64 `json:"bids"` BestBidPrice float64 `json:"best_bid_price"` BestBidAmount float64 `json:"best_bid_amount"` BestAskPrice float64 `json:"best_ask_price"` BestAskAmount float64 `json:"best_ask_amount"` AskIV float64 `json:"ask_iv"` Asks [][]float64 `json:"asks"` DeliveryPrice float64 `json:"delivery_price"` Greeks Greeks `json:"greeks"` InterestRate float64 `json:"interest_rate"` OpenInterest float64 `json:"open_interest"` UnderlyingIndex float64 `json:"underlying_index"` UnderlyingPrice float64 `json:"underlying_price"` }
type GetOrderMarginByIDsParams ¶
type GetOrderMarginByIDsParams struct {
IDs []string `json:"ids"`
}
type GetOrderMarginByIDsResponse ¶
type GetOrderMarginByIDsResponse []OrderMargin
type GetOrderStateParams ¶
type GetOrderStateParams struct {
OrderID string `json:"order_id"`
}
type GetPositionParams ¶
type GetPositionParams struct {
InstrumentName string `json:"instrument_name"`
}
type GetPositionsParams ¶
type GetSettlementHistoryResponse ¶
type GetSettlementHistoryResponse struct { Settlements []Settlement `json:"settlements"` Continuation string `json:"continuation"` }
type GetSubaccountsParams ¶
type GetSubaccountsParams struct {
WithPortfolio bool `json:"with_portfolio,omitempty"`
}
type GetTradeVolumesParams ¶
type GetTradeVolumesParams struct {
Extended bool `json:"extended"`
}
type GetTradeVolumesResponse ¶
type GetTradeVolumesResponse []TradeVolume
type GetTransfersParams ¶
type GetTransfersResponse ¶
type GetUserTradesByCurrencyAndTimeParams ¶
type GetUserTradesByCurrencyAndTimeParams struct { Currency string `json:"currency"` Kind string `json:"kind,omitempty"` StartTimestamp int `json:"start_timestamp"` EndTimestamp int `json:"end_timestamp"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetUserTradesByCurrencyParams ¶
type GetUserTradesByCurrencyParams struct { Currency string `json:"currency"` Kind string `json:"kind,omitempty"` StartID string `json:"start_id,omitempty"` EndID string `json:"end_id,omitempty"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetUserTradesByInstrumentAndTimeParams ¶
type GetUserTradesByInstrumentAndTimeParams struct { InstrumentName string `json:"instrument_name"` StartTimestamp int `json:"start_timestamp"` EndTimestamp int `json:"end_timestamp"` Count int `json:"count,omitempty"` IncludeOld bool `json:"include_old,omitempty"` Sorting string `json:"sorting,omitempty"` }
type GetUserTradesResponse ¶
type GetWithdrawalsParams ¶
type HelloParams ¶
type HelloResponse ¶
type HelloResponse struct {
Version string `json:"version"`
}
type HistoricalVolatility ¶
type HistoricalVolatility struct { Timestamp uint64 `json:"timestamp"` Value float64 `json:"value"` }
func (*HistoricalVolatility) UnmarshalJSON ¶
func (h *HistoricalVolatility) UnmarshalJSON(buf []byte) error
type Instrument ¶
type Instrument struct { TickSize float64 `json:"tick_size"` TakerCommission float64 `json:"taker_commission"` SettlementPeriod string `json:"settlement_period"` QuoteCurrency string `json:"quote_currency"` MinTradeAmount float64 `json:"min_trade_amount"` MakerCommission float64 `json:"maker_commission"` Leverage int `json:"leverage"` Kind string `json:"kind"` IsActive bool `json:"is_active"` InstrumentName string `json:"instrument_name"` ExpirationTimestamp uint64 `json:"expiration_timestamp"` CreationTimestamp uint64 `json:"creation_timestamp"` ContractSize uint64 `json:"contract_size"` BaseCurrency string `json:"base_currency"` BlockTradeCommission float64 `json:"block_trade_commission"` OptionType string `json:"option_type"` Strike float64 `json:"strike"` }
type MarkpriceOption ¶
type MarkpriceOptionsNotification ¶
type MarkpriceOptionsNotification []MarkpriceOption
type Order ¶
type Order struct { MMPCancelled bool `json:"mmp_cancelled"` OrderState string `json:"order_state"` MaxShow float64 `json:"max_show"` API bool `json:"api"` Amount float64 `json:"amount"` Web bool `json:"web"` InstrumentName string `json:"instrument_name"` Advanced string `json:"advanced,omitempty"` Triggered bool `json:"triggered,omitempty"` BlockTrade bool `json:"block_trade"` OriginalOrderType string `json:"original_order_type"` Price float64 `json:"price"` TimeInForce string `json:"time_in_force"` AutoReplaced bool `json:"auto_replaced"` LastUpdateTimestamp int64 `json:"last_update_timestamp"` PostOnly bool `json:"post_only"` Replaced bool `json:"replaced"` FilledAmount float64 `json:"filled_amount"` AveragePrice float64 `json:"average_price"` OrderID string `json:"order_id"` ReduceOnly bool `json:"reduce_only"` Commission float64 `json:"commission"` AppName string `json:"app_name"` Label string `json:"label"` TriggerOrderID string `json:"trigger_order_id"` TriggedPrice float64 `json:"trigger_price"` CreationTimestamp int64 `json:"creation_timestamp"` Direction string `json:"direction"` IsLiquidation bool `json:"is_liquidation"` OrderType string `json:"order_type"` USD float64 `json:"usd,omitempty"` ProfitLoss float64 `json:"profit_loss"` Implv float64 `json:"implv,omitempty"` Trigger string `json:"trigger"` }
type OrderBookNotification ¶
type OrderBookNotification struct { Type string `json:"type"` Timestamp int64 `json:"timestamp"` InstrumentName string `json:"instrument_name"` PrevChangeID int64 `json:"prev_change_id"` ChangeID int64 `json:"change_id"` Bids []OrderBookNotificationItem `json:"bids"` // [action, price, amount] Asks []OrderBookNotificationItem `json:"asks"` // [action, price, amount] }
type OrderBookNotificationItem ¶
type OrderBookNotificationItem struct { Action string `json:"action"` Price float64 `json:"price"` Amount float64 `json:"amount"` }
OrderBookNotificationItem ... ["change",6947.0,82640.0] ["new",6942.5,6940.0] ["delete",6914.0,0.0]
func (*OrderBookNotificationItem) UnmarshalJSON ¶
func (item *OrderBookNotificationItem) UnmarshalJSON(buf []byte) error
type OrderBookRawNotification ¶
type OrderBookRawNotification struct { Timestamp int64 `json:"timestamp"` InstrumentName string `json:"instrument_name"` PrevChangeID int64 `json:"prev_change_id"` ChangeID int64 `json:"change_id"` Bids []OrderBookNotificationItem `json:"bids"` // [action, price, amount] Asks []OrderBookNotificationItem `json:"asks"` // [action, price, amount] }
type OrderMargin ¶
type PerpetualNotification ¶
type Portfolio ¶
type Portfolio struct { AvailableFunds int `json:"available_funds"` AvailableWithdrawalFunds int `json:"available_withdrawal_funds"` Balance int `json:"balance"` Currency string `json:"currency"` Equity int `json:"equity"` InitialMargin int `json:"initial_margin"` MaintenanceMargin int `json:"maintenance_margin"` MarginBalance int `json:"margin_balance"` }
type PortfolioNotification ¶
type PortfolioNotification struct { TotalPl float64 `json:"total_pl"` SessionUpl float64 `json:"session_upl"` SessionRpl float64 `json:"session_rpl"` ProjectedMaintenanceMargin float64 `json:"projected_maintenance_margin"` ProjectedInitialMargin float64 `json:"projected_initial_margin"` ProjectedDeltaTotal float64 `json:"projected_delta_total"` PortfolioMarginingEnabled bool `json:"portfolio_margining_enabled"` OptionsVega float64 `json:"options_vega"` OptionsValue float64 `json:"options_value"` OptionsTheta float64 `json:"options_theta"` OptionsSessionUpl float64 `json:"options_session_upl"` OptionsSessionRpl float64 `json:"options_session_rpl"` OptionsPl float64 `json:"options_pl"` OptionsGamma float64 `json:"options_gamma"` OptionsDelta float64 `json:"options_delta"` MarginBalance float64 `json:"margin_balance"` MaintenanceMargin float64 `json:"maintenance_margin"` InitialMargin float64 `json:"initial_margin"` FuturesSessionUpl float64 `json:"futures_session_upl"` FuturesSessionRpl float64 `json:"futures_session_rpl"` FuturesPl float64 `json:"futures_pl"` EstimatedLiquidationRatio float64 `json:"estimated_liquidation_ratio"` Equity float64 `json:"equity"` DeltaTotal float64 `json:"delta_total"` Currency string `json:"currency"` Balance float64 `json:"balance"` AvailableWithdrawalFunds float64 `json:"available_withdrawal_funds"` AvailableFunds float64 `json:"available_funds"` }
type Position ¶
type Position struct { AveragePrice float64 `json:"average_price"` AveragePriceUSD float64 `json:"average_price_usd"` Delta float64 `json:"delta"` Direction string `json:"direction"` EstimatedLiquidationPrice float64 `json:"estimated_liquidation_price"` FloatingProfitLoss float64 `json:"floating_profit_loss"` FloatingProfitLossUSD float64 `json:"floating_profit_loss_usd"` Gamma float64 `json:"gamma"` IndexPrice float64 `json:"index_price"` InitialMargin float64 `json:"initial_margin"` InstrumentName string `json:"instrument_name"` Kind string `json:"kind"` Leverage int `json:"leverage"` MaintenanceMargin float64 `json:"maintenance_margin"` MarkPrice float64 `json:"mark_price"` OpenOrdersMargin float64 `json:"open_orders_margin"` RealizedFunding float64 `json:"realized_funding"` RealizedProfitLoss float64 `json:"realized_profit_loss"` SettlementPrice float64 `json:"settlement_price"` Size float64 `json:"size"` SizeCurrency float64 `json:"size_currency"` Theta float64 `json:"theta"` TotalProfitLoss float64 `json:"total_profit_loss"` Vega float64 `json:"vega"` }
type QuoteNotification ¶
type QuoteNotification struct { Timestamp uint64 `json:"timestamp"` InstrumentName string `json:"instrument_name"` BestBidPrice *float64 `json:"best_bid_price"` BestBidAmount float64 `json:"best_bid_amount"` BestAskPrice *float64 `json:"best_ask_price"` BestAskAmount float64 `json:"best_ask_amount"` }
type SellParams ¶
type SellParams struct { InstrumentName string `json:"instrument_name"` Amount float64 `json:"amount"` Type string `json:"type,omitempty"` Label string `json:"label,omitempty"` Price float64 `json:"price,omitempty"` TimeInForce string `json:"time_in_force,omitempty"` MaxShow *float64 `json:"max_show,omitempty"` PostOnly bool `json:"post_only,omitempty"` RejectPostOnly bool `json:"reject_post_only,omitempty"` ReduceOnly bool `json:"reduce_only,omitempty"` TriggerPrice float64 `json:"trigger_price,omitempty"` Trigger string `json:"trigger,omitempty"` Advanced string `json:"advanced,omitempty"` MMP bool `json:"mmp"` }
type SellResponse ¶
type SessionParams ¶
type SessionParams struct {
Scope string `json:"scope"`
}
type SetAnnouncementAsReadParams ¶
type SetAnnouncementAsReadParams struct {
AnnouncementID int `json:"announcement_id"`
}
type SetEmailLanguageParams ¶
type SetEmailLanguageParams struct {
Language string `json:"language"`
}
type SetHeartbeatParams ¶
type SetHeartbeatParams struct {
Interval float64 `json:"interval"`
}
type Settlement ¶
type Settlement struct { Funded float64 `json:"funded"` Funding float64 `json:"funding"` Type string `json:"type"` Timestamp uint64 `json:"timestamp"` SessionProfitLoss float64 `json:"session_profit_loss"` ProfitLoss float64 `json:"profit_loss"` Position float64 `json:"position"` MarkPrice float64 `json:"mark_price"` InstrumentName string `json:"instrument_name"` IndexPrice float64 `json:"index_price"` SessionBankrupcy float64 `json:"session_bankrupcy"` SessionTax float64 `json:"session_tax"` SessionTaxRate float64 `json:"session_tax_rate"` Socialized float64 `json:"socialized"` }
type Subaccount ¶
type Subaccount struct { Email string `json:"email"` ID int `json:"id"` IsPassword bool `json:"is_password"` LoginEnabled bool `json:"login_enabled"` Portfolio struct { Eth Portfolio `json:"eth"` Btc Portfolio `json:"btc"` } `json:"portfolio"` ReceiveNotifications bool `json:"receive_notifications"` SystemName string `json:"system_name"` TfaEnabled bool `json:"tfa_enabled"` Type string `json:"type"` Username string `json:"username"` }
type SubscribeParams ¶
type SubscribeParams struct {
Channels []string `json:"channels"`
}
type SubscribeResponse ¶
type SubscribeResponse []string
type TestResponse ¶
type TestResponse struct {
Version string `json:"version"`
}
type TickerNotification ¶
type TickerNotification struct { Timestamp uint64 `json:"timestamp"` Stats Stats `json:"stats"` State string `json:"state"` SettlementPrice float64 `json:"settlement_price"` OpenInterest float64 `json:"open_interest"` MinPrice float64 `json:"min_price"` MaxPrice float64 `json:"max_price"` MarkPrice float64 `json:"mark_price"` LastPrice float64 `json:"last_price"` InstrumentName string `json:"instrument_name"` IndexPrice float64 `json:"index_price"` Funding8H float64 `json:"funding_8h"` CurrentFunding float64 `json:"current_funding"` BestBidPrice *float64 `json:"best_bid_price"` BestBidAmount float64 `json:"best_bid_amount"` BestAskPrice *float64 `json:"best_ask_price"` BestAskAmount float64 `json:"best_ask_amount"` }
type TickerParams ¶
type TickerParams struct {
InstrumentName string `json:"instrument_name"`
}
type TickerResponse ¶
type TickerResponse struct { BestAskAmount float64 `json:"best_ask_amount"` BestAskPrice float64 `json:"best_ask_price"` BestBidAmount float64 `json:"best_bid_amount"` BestBidPrice float64 `json:"best_bid_price"` CurrentFunding float64 `json:"current_funding"` Funding8H float64 `json:"funding_8h"` IndexPrice float64 `json:"index_price"` InstrumentName string `json:"instrument_name"` LastPrice float64 `json:"last_price"` MarkPrice float64 `json:"mark_price"` MaxPrice float64 `json:"max_price"` MinPrice float64 `json:"min_price"` OpenInterest float64 `json:"open_interest"` SettlementPrice float64 `json:"settlement_price"` State string `json:"state"` Stats Stats `json:"stats"` Timestamp int64 `json:"timestamp"` }
type Trade ¶
type Trade struct { Amount float64 `json:"amount"` BlockTradeID string `json:"block_trade_id"` Direction string `json:"direction"` IndexPrice float64 `json:"index_price"` InstrumentName string `json:"instrument_name"` IV float64 `json:"iv"` Liquidation string `json:"liquidation"` MarkPrice float64 `json:"mark_price"` Price float64 `json:"price"` TickDirection int `json:"tick_direction"` Timestamp uint64 `json:"timestamp"` TradeID string `json:"trade_id"` TradeSeq uint64 `json:"trade_seq"` }
type TradeVolume ¶
type TradeVolume struct { PutsVolume float64 `json:"puts_volume"` PutsVolume30D float64 `json:"puts_volume_30d"` PutsVolume7D float64 `json:"puts_volume_7d"` FuturesVolume float64 `json:"futures_volume"` FuturesVolume30D float64 `json:"futures_volume_30d"` FuturesVolume7D float64 `json:"futures_volume_7d"` CurrencyPair string `json:"currency_pair"` CallsVolume float64 `json:"calls_volume"` CallsVolume30D float64 `json:"calls_volume_30d"` CallsVolume7D float64 `json:"calls_volume_7d"` }
type TradesNotification ¶
type TradesNotification []Trade
type Transfer ¶
type Transfer struct { Amount float64 `json:"amount"` CreatedTimestamp uint64 `json:"created_timestamp"` Currency string `json:"currency"` Direction string `json:"direction"` ID int `json:"id"` OtherSide string `json:"other_side"` State string `json:"state"` Type string `json:"type"` UpdatedTimestamp uint64 `json:"updated_timestamp"` }
type UnsubscribeParams ¶
type UnsubscribeParams struct {
Channels []string `json:"channels"`
}
type UnsubscribeResponse ¶
type UnsubscribeResponse []string
type UserChangesNotification ¶
type UserOrderNotification ¶
type UserOrderNotification []Order
type UserTrade ¶
type UserTrade struct { UnderlyingPrice float64 `json:"underlying_price"` TradeSeq uint64 `json:"trade_seq"` TradeID string `json:"trade_id"` Timestamp uint64 `json:"timestamp"` TickDirection int `json:"tick_direction"` State string `json:"state"` SelfTrade bool `json:"self_trade"` ReduceOnly bool `json:"reduce_only"` ProfitLost float64 `json:"profit_lost"` Price float64 `json:"price"` PostOnly bool `json:"post_only"` OrderType string `json:"order_type"` OrderID string `json:"order_id"` MatchingID *string `json:"matching_id"` MarkPrice float64 `json:"mark_price"` Liquidity string `json:"liquidity"` Liquidation string `json:"liquidation"` Label string `json:"label"` IV float64 `json:"iv"` InstrumentName string `json:"instrument_name"` IndexPrice float64 `json:"index_price"` FeeCurrency string `json:"fee_currency"` Fee float64 `json:"fee"` Direction string `json:"direction"` Amount float64 `json:"amount"` BlockTradeID string `json:"block_trade_id"` }
type UserTradesNotification ¶
type UserTradesNotification []UserTrade
type WithdrawParams ¶
type Withdrawal ¶
type Withdrawal struct { Address string `json:"address"` Amount float64 `json:"amount"` ConfirmedTimestamp *uint64 `json:"confirmed_timestamp,omitempty"` CreatedTimestamp uint64 `json:"created_timestamp"` Currency string `json:"currency"` Fee float64 `json:"fee"` ID uint64 `json:"id"` Priority float64 `json:"priority"` State string `json:"state"` TransactionID *string `json:"transaction_id,omitempty"` UpdatedTimestamp uint64 `json:"updated_timestamp"` }
type WithdrawalPriority ¶
Source Files ¶
- account_summary.go
- announcement.go
- announcements_notification.go
- auth_response.go
- book_summary.go
- buy_params.go
- buy_response.go
- cancel_all_by_currency_params.go
- cancel_all_by_instrument_params.go
- cancel_params.go
- cancel_transfer_by_id_params.go
- cancel_withdrawal_params.go
- change_subaccount_name_params.go
- client_credentials_params.go
- close_position_params.go
- close_position_response.go
- common.go
- create_deposit_address_params.go
- currency.go
- deposit.go
- deposit_address.go
- deribit_price_index_notification.go
- deribit_price_ranking_notification.go
- disable_tfa_for_subaccount_params.go
- edit_params.go
- edit_response.go
- estimated_expiration_price_notification.go
- get_account_summary_params.go
- get_book_summary_by_currency_params.go
- get_book_summary_by_instrument_params.go
- get_contract_size_params.go
- get_contract_size_response.go
- get_current_deposit_address_params.go
- get_deposits_params.go
- get_deposits_response.go
- get_funding_chart_data_params.go
- get_funding_chart_data_response.go
- get_historical_volatility_params.go
- get_historical_volatility_response.go
- get_index_params.go
- get_index_response.go
- get_instruments_params.go
- get_last_settlements_by_currency_params.go
- get_last_settlements_by_instrument_params.go
- get_last_settlements_response.go
- get_last_trades_by_currency_and_time_params.go
- get_last_trades_by_currency_params.go
- get_last_trades_by_instrument_and_time_params.go
- get_last_trades_by_instrument_params.go
- get_last_trades_response.go
- get_margins_params.go
- get_margins_response.go
- get_open_orders_by_currency_params.go
- get_open_orders_by_instrument_params.go
- get_order_book_params.go
- get_order_book_response.go
- get_order_history_by_currency_params.go
- get_order_history_by_instrument_params.go
- get_order_margin_by_ids_params.go
- get_order_margin_by_ids_response.go
- get_order_state_params.go
- get_position_params.go
- get_positions_params.go
- get_settlement_history_by_currency_params.go
- get_settlement_history_by_instrument_params.go
- get_settlement_history_response.go
- get_subaccounts_params.go
- get_trade_volumes_params.go
- get_trade_volumes_response.go
- get_tradingview_chart_data_params.go
- get_tradingview_chart_data_response.go
- get_transfers_params.go
- get_transfers_response.go
- get_user_trades_by_currency_and_time_params.go
- get_user_trades_by_currency_params.go
- get_user_trades_by_instrument_and_time_params.go
- get_user_trades_by_instrument_params.go
- get_user_trades_by_order_params.go
- get_user_trades_response.go
- get_withdrawals_params.go
- hello_params.go
- hello_response.go
- instrument.go
- markprice_options_notification.go
- order.go
- order_book_notification.go
- perpetual_notification.go
- portfolio.go
- portfolio_notification.go
- position.go
- quote_notification.go
- sell_params.go
- sell_response.go
- session_params.go
- set_announcement_as_read_params.go
- set_email_for_subaccount_params.go
- set_email_language_params.go
- set_password_for_subaccount_params.go
- settlement.go
- subaccount.go
- subscribe_params.go
- subscribe_response.go
- test_response.go
- ticker_notification.go
- ticker_params.go
- ticker_response.go
- toggle_notifications_from_subaccount_params.go
- toggle_subaccount_login_params.go
- trade.go
- trades_notification.go
- trading_params.go
- transfer.go
- unsubscribe_params.go
- unsubscribe_response.go
- user_changes_notification.go
- user_order_notification.go
- user_trade.go
- user_trades_notification.go
- withdraw_params.go
- withdrawal.go
Click to show internal directories.
Click to hide internal directories.