Documentation
¶
Index ¶
- Constants
- type API
- type AddressBookItem
- type AddressBookType
- type Advanced
- type Amount
- type AnnouncementNotification
- type AskIv
- type Asks
- type AveragePrice
- type BaseMessage
- type BestAskAmount
- type BestAskPrice
- type BestBidAmount
- type BestBidPrice
- type BidIv
- type Bids
- type BookEntry
- type BookNotification
- type BookNotificationRaw
- type BookState
- type BookSummary
- type Commission
- type Continuation
- type ContractSize
- type CumulativeAmount
- type CumulativeQuantity
- type Currency
- type CurrencyAddress
- type CurrencyAmount
- type CurrencyPortfolio
- type CurrencyTransactionID
- type CurrencyWithAny
- type CurrentFunding
- type DeliveryPrice
- type Deposit
- type DepositState
- type DeribitPriceIndexNotification
- type DeribitPriceRankingNotification
- type DeribitPriceRankingNotificationItems0
- type Direction
- type ErrorMessage
- type EstimatedExpirationPriceNotification
- type Fee
- type FilledAmount
- type FilledQuantity
- type Funding8h
- type GetAnnouncementsResponse
- type GetAnnouncementsResponseResultItems0
- type GetTimeResponse
- type Greeks
- type ImpliedVolatility
- type Implv
- type IndexPrice
- type Instrument
- type InstrumentName
- type InterestRate
- type KeyNumberPair
- type Kind
- type KindWithAny
- type Label
- type LastPrice
- type MarkIv
- type MarkPrice
- type MarkPriceInfo
- type MarkpriceOptionsNotification
- type MarkpriceOptionsNotificationItems0
- type MatchingID
- type MaxPrice
- type MaxShow
- type MinPrice
- type OkResponse
- type OpenInterest
- type Order
- type OrderID
- type OrderIDInitialMarginPair
- type OrderState
- type OrderStateInUserTrade
- type OrderType
- type OrderType2
- type OrderV1
- type PerpetualNotification
- type Portfolio
- type Position
- type PostOnly
- type Price
- type PrivateAccountResponse
- type PrivateAccountResponseResult
- type PrivateAddToAddressBookResponse
- type PrivateAddressBookResponse
- type PrivateBuyAndSellResponse
- type PrivateBuyAndSellResponseResult
- type PrivateCancelResponse
- type PrivateCreateSubaccountResponse
- type PrivateCreateSubaccountResponseResult
- type PrivateDepositAddressResponse
- type PrivateDepositAddressResponseResult
- type PrivateEditResponse
- type PrivateEditResponseResult
- type PrivateGetDepositsResponse
- type PrivateGetDepositsResponseResult
- type PrivateGetEmailLanguageResponse
- type PrivateGetMarginsResponse
- type PrivateGetMarginsResponseResult
- type PrivateGetOpenOrdersResponse
- type PrivateGetOrderHistoryResponse
- type PrivateGetOrderMarginByIdsResponse
- type PrivateGetOrderStateResponse
- type PrivateGetPositionResponse
- type PrivateGetPositionsResponse
- type PrivateGetSubaccountsResponse
- type PrivateGetSubaccountsResponseResultItems0
- type PrivateGetTransfersResponse
- type PrivateGetTransfersResponseResult
- type PrivateGetWithdrawalsResponse
- type PrivateGetWithdrawalsResponseResult
- type PrivateGetopenordersResponse
- type PrivateGetopenordersResponseResult
- type PrivateOrderhistoryResponse
- type PrivateOrderhistoryResponseResult
- type PrivateOrderstateResponse
- type PrivateOrderstateResponseResult
- type PrivatePositionsResponse
- type PrivatePositionsResponseResult
- type PrivateRemoveFromAddressBookResponse
- type PrivateSettlementResponse
- type PrivateSettlementhistoryResponse
- type PrivateSettlementhistoryResponseResult
- type PrivateSubmitTransferResponse
- type PrivateSubscribeResponse
- type PrivateTradehistoryResponse
- type PrivateTradehistoryResponseResult
- type PrivateWithdrawResponse
- type ProfitLoss
- type PublicAuthResponse
- type PublicAuthResponseResult
- type PublicCurrenciesResponse
- type PublicGetBookSummaryResponse
- type PublicGetContractSizeResponse
- type PublicGetContractSizeResponseResult
- type PublicGetFooterResponse
- type PublicGetFooterResponseResultItems0
- type PublicGetFundingChartDataResponse
- type PublicGetFundingChartDataResponseResult
- type PublicGetInstrumentsResponse
- type PublicGetOptionMarkPricesResponse
- type PublicGetOrderBookResponse
- type PublicGetTradesVolumesResponse
- type PublicGetlasttradesResponse
- type PublicGetlasttradesResponseResult
- type PublicGetorderbookResponse
- type PublicGetorderbookResponseResult
- type PublicHistoricalVolatilityResponse
- type PublicIndexResponse
- type PublicIndexResponseResult
- type PublicTestResponse
- type PublicTestResponseResult
- type PublicTickerResponse
- type PublicTrade
- type PublicTradesHistoryResponse
- type PublicTradesHistoryResponseResult
- type Quantity
- type QuoteNotification
- type ReduceOnly
- type ResultCount
- type Settlement
- type SettlementPrice
- type SettlementResponse
- type SettlementResponseResult
- type SettlementType
- type SimpleOrderType
- type Sorting
- type Stats
- type StopPrice
- type TickDirection
- type TickerNotification
- type TickerNotificationWithBidsAndAsks
- type TimeInForce
- type Timestamp
- type TimestampForBookNotifications
- type Trade
- type TradeID
- type TradeSeq
- type TradesVolumes
- type TransferDirection
- type TransferID
- type TransferItem
- type TransferOtherSide
- type TransferState
- type TransferType
- type Trigger
- type Triggered
- type UnderlyingIndex
- type UnderlyingPrice
- type Usd
- type UserPortfolioNotification
- type UserTrade
- type UserTradesByOrderResponse
- type UserTradesHistoryResponse
- type UserTradesHistoryResponseResult
- type WalletAddressType
- type Withdrawal
- type WithdrawalState
Constants ¶
const ( // CurrencyPortfolioCurrencyBtc captures enum value "btc" CurrencyPortfolioCurrencyBtc string = "btc" // CurrencyPortfolioCurrencyEth captures enum value "eth" CurrencyPortfolioCurrencyEth string = "eth" )
const ( // InstrumentBaseCurrencyBTC captures enum value "BTC" InstrumentBaseCurrencyBTC string = "BTC" // InstrumentBaseCurrencyETH captures enum value "ETH" InstrumentBaseCurrencyETH string = "ETH" )
const ( // InstrumentOptionTypeCall captures enum value "call" InstrumentOptionTypeCall string = "call" // InstrumentOptionTypePut captures enum value "put" InstrumentOptionTypePut string = "put" )
const ( // InstrumentSettlementPeriodMonth captures enum value "month" InstrumentSettlementPeriodMonth string = "month" // InstrumentSettlementPeriodWeek captures enum value "week" InstrumentSettlementPeriodWeek string = "week" // InstrumentSettlementPeriodPerpetual captures enum value "perpetual" InstrumentSettlementPeriodPerpetual string = "perpetual" )
const ( // PrivateAccountResponseResultTypeMain captures enum value "main" PrivateAccountResponseResultTypeMain string = "main" // PrivateAccountResponseResultTypeSubaccount captures enum value "subaccount" PrivateAccountResponseResultTypeSubaccount string = "subaccount" )
const ( // PrivateGetSubaccountsResponseResultItems0TypeMain captures enum value "main" PrivateGetSubaccountsResponseResultItems0TypeMain string = "main" // PrivateGetSubaccountsResponseResultItems0TypeSubaccount captures enum value "subaccount" PrivateGetSubaccountsResponseResultItems0TypeSubaccount string = "subaccount" )
const ( // TradesVolumesCurrencyPairBtcUsd captures enum value "btc_usd" TradesVolumesCurrencyPairBtcUsd string = "btc_usd" // TradesVolumesCurrencyPairEthUsd captures enum value "eth_usd" TradesVolumesCurrencyPairEthUsd string = "eth_usd" )
const ( // UserTradeLiquidityM captures enum value "M" UserTradeLiquidityM string = "M" // UserTradeLiquidityT captures enum value "T" UserTradeLiquidityT string = "T" )
const ( // UserTradeOrderTypeLimit captures enum value "limit" UserTradeOrderTypeLimit string = "limit" // UserTradeOrderTypeMarket captures enum value "market" UserTradeOrderTypeMarket string = "market" // UserTradeOrderTypeLiquidation captures enum value "liquidation" UserTradeOrderTypeLiquidation string = "liquidation" )
const ( // BaseMessageJsonrpcNr20 captures enum value "2.0" BaseMessageJsonrpcNr20 string = "2.0" )
const ( // InstrumentQuoteCurrencyUSD captures enum value "USD" InstrumentQuoteCurrencyUSD string = "USD" )
const ( // OkResponseResultOk captures enum value "ok" OkResponseResultOk string = "ok" )
const ( // PrivateCreateSubaccountResponseResultTypeSubaccount captures enum value "subaccount" PrivateCreateSubaccountResponseResultTypeSubaccount string = "subaccount" )
const ( // PublicAuthResponseResultTokenTypeBearer captures enum value "bearer" PublicAuthResponseResultTokenTypeBearer string = "bearer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressBookItem ¶
type AddressBookItem struct {
// address
// Required: true
Address CurrencyAddress `json:"address"`
// creation timestamp
// Required: true
CreationTimestamp Timestamp `json:"creation_timestamp"`
// currency
// Required: true
Currency Currency `json:"currency"`
// type
Type AddressBookType `json:"type,omitempty"`
}
AddressBookItem address book item swagger:model address_book_item
func (*AddressBookItem) MarshalBinary ¶
func (m *AddressBookItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddressBookItem) UnmarshalBinary ¶
func (m *AddressBookItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddressBookType ¶
type AddressBookType string
AddressBookType Address book type swagger:model address_book_type
const ( // AddressBookTypeTransfer captures enum value "transfer" AddressBookTypeTransfer AddressBookType = "transfer" // AddressBookTypeWithdrawal captures enum value "withdrawal" AddressBookTypeWithdrawal AddressBookType = "withdrawal" )
type Advanced ¶
type Advanced string
Advanced advanced type: `"usd"` or `"implv"` (Only for options; field is omitted if not applicable).
swagger:model advanced
type Amount ¶
type Amount float64
Amount It represents the requested order size. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH. swagger:model amount
type AnnouncementNotification ¶
type AnnouncementNotification struct {
// action
Action string `json:"action,omitempty"`
// body
// Required: true
Body *string `json:"body"`
// milliseconds since the Unix epoch
// Required: true
Date *int64 `json:"date"`
// id
// Required: true
ID *int64 `json:"id"`
// important
// Required: true
Important *bool `json:"important"`
// number
Number int64 `json:"number,omitempty"`
// title
// Required: true
Title *string `json:"title"`
}
AnnouncementNotification announcement notification swagger:model announcement_notification
func (*AnnouncementNotification) MarshalBinary ¶
func (m *AnnouncementNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AnnouncementNotification) UnmarshalBinary ¶
func (m *AnnouncementNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AskIv ¶
type AskIv float64
AskIv (Only for option) implied volatility for best ask swagger:model ask_iv
type AveragePrice ¶
type AveragePrice float64
AveragePrice Average fill price of the order swagger:model average_price
type BaseMessage ¶
type BaseMessage struct {
// The id that was sent in the request
ID int64 `json:"id,omitempty"`
// The JSON-RPC version (2.0)
// Required: true
// Enum: [2.0]
Jsonrpc *string `json:"jsonrpc"`
// false for production server, true for test server
// Required: true
Testnet *bool `json:"testnet"`
// Duration of the handling of the request, in microseconds
// Required: true
UsDiff *int64 `json:"usDiff"`
// The timestamp (in microseconds) of receipt of the request
// Required: true
UsIn *int64 `json:"usIn"`
// The timestamp (in microseconds) of sending of the response
// Required: true
UsOut *int64 `json:"usOut"`
}
BaseMessage base message swagger:model base_message
func (*BaseMessage) MarshalBinary ¶
func (m *BaseMessage) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BaseMessage) UnmarshalBinary ¶
func (m *BaseMessage) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BestAskAmount ¶
type BestAskAmount float64
BestAskAmount It represents the requested order size of all best asks swagger:model best_ask_amount
type BestAskPrice ¶
type BestAskPrice float64
BestAskPrice The current best ask price, `null` if there aren't any asks swagger:model best_ask_price
type BestBidAmount ¶
type BestBidAmount float64
BestBidAmount It represents the requested order size of all best bids swagger:model best_bid_amount
type BestBidPrice ¶
type BestBidPrice float64
BestBidPrice The current best bid price, `null` if there aren't any bids swagger:model best_bid_price
type BidIv ¶
type BidIv float64
BidIv (Only for option) implied volatility for best bid swagger:model bid_iv
type BookEntry ¶
type BookEntry struct {
// amount
// Required: true
Amount Amount `json:"amount"`
// cumulative amount
// Required: true
CumulativeAmount CumulativeAmount `json:"cumulative_amount"`
// cumulative quantity
// Required: true
CumulativeQuantity CumulativeQuantity `json:"cumulative_quantity"`
// price
// Required: true
Price Price `json:"price"`
// quantity
// Required: true
Quantity Quantity `json:"quantity"`
}
BookEntry book entry swagger:model book_entry
func (*BookEntry) MarshalBinary ¶
MarshalBinary interface implementation
func (*BookEntry) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type BookNotification ¶
type BookNotification struct {
// asks
// Required: true
Asks [][]float64 `json:"asks"`
// bids
// Required: true
Bids [][]float64 `json:"bids"`
// id of the notification
// Required: true
ChangeID *int64 `json:"change_id"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// timestamp
Timestamp TimestampForBookNotifications `json:"timestamp,omitempty"`
}
BookNotification book notification swagger:model book_notification
func (*BookNotification) MarshalBinary ¶
func (m *BookNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BookNotification) UnmarshalBinary ¶
func (m *BookNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BookNotificationRaw ¶
type BookNotificationRaw struct {
// asks
// Required: true
Asks [][]float64 `json:"asks"`
// bids
// Required: true
Bids [][]float64 `json:"bids"`
// id of the notification
// Required: true
ChangeID *int64 `json:"change_id"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// id of the previous notification
PrevChangeID int64 `json:"prev_change_id,omitempty"`
// timestamp
Timestamp TimestampForBookNotifications `json:"timestamp,omitempty"`
}
BookNotificationRaw book notification raw swagger:model book_notification_raw
func (*BookNotificationRaw) MarshalBinary ¶
func (m *BookNotificationRaw) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BookNotificationRaw) UnmarshalBinary ¶
func (m *BookNotificationRaw) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BookState ¶
type BookState string
BookState The state of the order book. Possible values are `open` and `closed`. swagger:model book_state
type BookSummary ¶
type BookSummary struct {
// The current best ask price, `null` if there aren't any asks
// Required: true
AskPrice *float64 `json:"ask_price"`
// Base currency
// Required: true
BaseCurrency *string `json:"base_currency"`
// The current best bid price, `null` if there aren't any bids
// Required: true
BidPrice *float64 `json:"bid_price"`
// creation timestamp
// Required: true
CreationTimestamp Timestamp `json:"creation_timestamp"`
// Current funding (perpetual only)
CurrentFunding float64 `json:"current_funding,omitempty"`
// Estimated delivery price, in USD (futures only). For more details, see Documentation > General > Expiration Price
EstimatedDeliveryPrice float64 `json:"estimated_delivery_price,omitempty"`
// Funding 8h (perpetual only)
Funding8h float64 `json:"funding_8h,omitempty"`
// Price of the 24h highest trade
// Required: true
High *float64 `json:"high"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// Interest rate used in implied volatility calculations (options only)
InterestRate float64 `json:"interest_rate,omitempty"`
// The price of the latest trade, `null` if there weren't any trades
// Required: true
Last *float64 `json:"last"`
// Price of the 24h lowest trade, `null` if there weren't any trades
// Required: true
Low *float64 `json:"low"`
// The current instrument market price
// Required: true
MarkPrice *float64 `json:"mark_price"`
// The average of the best bid and ask, `null` if there aren't any asks or bids
// Required: true
MidPrice *float64 `json:"mid_price"`
// The total amount of outstanding contracts in the corresponding amount units. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
// Required: true
OpenInterest *float64 `json:"open_interest"`
// Quote currency
// Required: true
QuoteCurrency *string `json:"quote_currency"`
// Name of the underlying future, or `'index_price'` (options only)
UnderlyingIndex string `json:"underlying_index,omitempty"`
// underlying price for implied volatility calculations (options only)
UnderlyingPrice float64 `json:"underlying_price,omitempty"`
// The total 24h traded volume (in base currency)
// Required: true
Volume *float64 `json:"volume"`
// Volume in usd (futures only)
VolumeUsd float64 `json:"volume_usd,omitempty"`
}
BookSummary book summary swagger:model book_summary
func (*BookSummary) MarshalBinary ¶
func (m *BookSummary) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BookSummary) UnmarshalBinary ¶
func (m *BookSummary) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Commission ¶
type Commission float64
Commission Commission paid so far (in base currency) swagger:model commission
type Continuation ¶
type Continuation string
Continuation Continuation token for pagination. swagger:model continuation
type ContractSize ¶
type ContractSize float64
ContractSize Contract size, for futures in USD, for options in BTC. swagger:model contract_size
type CumulativeAmount ¶
type CumulativeAmount float64
CumulativeAmount The cumulative amount of all orders up till given price swagger:model cumulative_amount
type CumulativeQuantity ¶
type CumulativeQuantity float64
CumulativeQuantity The cumulative quantity swagger:model cumulative_quantity
type CurrencyAddress ¶
type CurrencyAddress string
CurrencyAddress Address in proper format for currency swagger:model currency_address
type CurrencyAmount ¶
type CurrencyAmount float64
CurrencyAmount Amount of funds in given currency swagger:model currency_amount
type CurrencyPortfolio ¶
type CurrencyPortfolio struct {
// available funds
// Required: true
AvailableFunds *float64 `json:"available_funds"`
// available withdrawal funds
// Required: true
AvailableWithdrawalFunds *float64 `json:"available_withdrawal_funds"`
// balance
// Required: true
Balance *float64 `json:"balance"`
// currency
// Required: true
// Enum: [btc eth]
Currency *string `json:"currency"`
// equity
// Required: true
Equity *float64 `json:"equity"`
// initial margin
// Required: true
InitialMargin *float64 `json:"initial_margin"`
// maintenance margin
// Required: true
MaintenanceMargin *float64 `json:"maintenance_margin"`
// margin balance
// Required: true
MarginBalance *float64 `json:"margin_balance"`
}
CurrencyPortfolio currency portfolio swagger:model currency_portfolio
func (*CurrencyPortfolio) MarshalBinary ¶
func (m *CurrencyPortfolio) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CurrencyPortfolio) UnmarshalBinary ¶
func (m *CurrencyPortfolio) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CurrencyTransactionID ¶
type CurrencyTransactionID string
CurrencyTransactionID Transaction id in proper format for currency, `null` if id is not available swagger:model currency_transaction_id
type CurrencyWithAny ¶
type CurrencyWithAny string
CurrencyWithAny Currency, i.e `"BTC"`, `"ETH"` or `"any"` if don't care swagger:model currency_with_any
const ( // CurrencyWithAnyBTC captures enum value "BTC" CurrencyWithAnyBTC CurrencyWithAny = "BTC" // CurrencyWithAnyETH captures enum value "ETH" CurrencyWithAnyETH CurrencyWithAny = "ETH" // CurrencyWithAnyAny captures enum value "any" CurrencyWithAnyAny CurrencyWithAny = "any" )
type CurrentFunding ¶
type CurrentFunding float64
CurrentFunding Current funding (perpetual only) swagger:model current_funding
type DeliveryPrice ¶
type DeliveryPrice float64
DeliveryPrice The settlement price for the instrument. Only when `state = closed` swagger:model delivery_price
type Deposit ¶
type Deposit struct {
// address
// Required: true
Address CurrencyAddress `json:"address"`
// amount
// Required: true
Amount CurrencyAmount `json:"amount"`
// currency
// Required: true
Currency Currency `json:"currency"`
// received timestamp
// Required: true
ReceivedTimestamp Timestamp `json:"received_timestamp"`
// state
// Required: true
State DepositState `json:"state"`
// transaction id
// Required: true
TransactionID CurrencyTransactionID `json:"transaction_id"`
// updated timestamp
// Required: true
UpdatedTimestamp Timestamp `json:"updated_timestamp"`
}
Deposit deposit swagger:model deposit
func (*Deposit) MarshalBinary ¶
MarshalBinary interface implementation
func (*Deposit) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type DepositState ¶
type DepositState string
DepositState Deposit state, allowed values : `pending`, `completed`, `rejected`, `replaced` swagger:model deposit_state
const ( // DepositStatePending captures enum value "pending" DepositStatePending DepositState = "pending" // DepositStateCompleted captures enum value "completed" DepositStateCompleted DepositState = "completed" // DepositStateRejected captures enum value "rejected" DepositStateRejected DepositState = "rejected" // DepositStateReplaced captures enum value "replaced" DepositStateReplaced DepositState = "replaced" )
type DeribitPriceIndexNotification ¶
type DeribitPriceIndexNotification struct {
// index name
// Required: true
IndexName *string `json:"index_name"`
// Current value of Deribit Index
// Required: true
Price *float64 `json:"price"`
// timestamp
// Required: true
Timestamp Timestamp `json:"timestamp"`
}
DeribitPriceIndexNotification deribit price index notification swagger:model deribit_price_index_notification
func (*DeribitPriceIndexNotification) MarshalBinary ¶
func (m *DeribitPriceIndexNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DeribitPriceIndexNotification) UnmarshalBinary ¶
func (m *DeribitPriceIndexNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DeribitPriceRankingNotification ¶
type DeribitPriceRankingNotification []*DeribitPriceRankingNotificationItems0
DeribitPriceRankingNotification deribit price ranking notification swagger:model deribit_price_ranking_notification
type DeribitPriceRankingNotificationItems0 ¶
type DeribitPriceRankingNotificationItems0 struct {
// Stock exchange status
Enabled bool `json:"enabled,omitempty"`
// Stock exchange identifier
Identifier string `json:"identifier,omitempty"`
// Stock exchange index price
Price float64 `json:"price,omitempty"`
// The timestamp of the last update from stock exchange
Timestamp int64 `json:"timestamp,omitempty"`
// The weight of the ranking given in percent
Weight float64 `json:"weight,omitempty"`
}
DeribitPriceRankingNotificationItems0 deribit price ranking notification items0 swagger:model DeribitPriceRankingNotificationItems0
func (*DeribitPriceRankingNotificationItems0) MarshalBinary ¶
func (m *DeribitPriceRankingNotificationItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DeribitPriceRankingNotificationItems0) UnmarshalBinary ¶
func (m *DeribitPriceRankingNotificationItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ErrorMessage ¶
type ErrorMessage struct {
// error
// Required: true
Error *int64 `json:"error"`
// message
// Required: true
Message *string `json:"message"`
}
ErrorMessage error message swagger:model error_message
func (*ErrorMessage) MarshalBinary ¶
func (m *ErrorMessage) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ErrorMessage) UnmarshalBinary ¶
func (m *ErrorMessage) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EstimatedExpirationPriceNotification ¶
type EstimatedExpirationPriceNotification struct {
// When `true` then prize is given as an estimated value, otherwise it's current index price
// Required: true
IsEstimated *bool `json:"is_estimated"`
// Index current or estimated price
// Required: true
Price *float64 `json:"price"`
// Number of seconds till finalizing the nearest instrument
// Required: true
Seconds *int64 `json:"seconds"`
}
EstimatedExpirationPriceNotification estimated expiration price notification swagger:model estimated_expiration_price_notification
func (*EstimatedExpirationPriceNotification) MarshalBinary ¶
func (m *EstimatedExpirationPriceNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EstimatedExpirationPriceNotification) UnmarshalBinary ¶
func (m *EstimatedExpirationPriceNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FilledAmount ¶
type FilledAmount float64
FilledAmount Filled amount of the order. For perpetual and futures the filled_amount is in USD units, for options - in units or corresponding cryptocurrency contracts, e.g., BTC or ETH. swagger:model filled_amount
type FilledQuantity ¶
type FilledQuantity float64
FilledQuantity The number of contracts to be traded. swagger:model filled_quantity
type Funding8h ¶
type Funding8h float64
Funding8h Funding 8h (perpetual only) swagger:model funding_8h
type GetAnnouncementsResponse ¶
type GetAnnouncementsResponse struct {
// result
// Required: true
Result []*GetAnnouncementsResponseResultItems0 `json:"result"`
}
GetAnnouncementsResponse get announcements response swagger:model get_announcements_response
func (*GetAnnouncementsResponse) MarshalBinary ¶
func (m *GetAnnouncementsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetAnnouncementsResponse) UnmarshalBinary ¶
func (m *GetAnnouncementsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GetAnnouncementsResponseResultItems0 ¶
type GetAnnouncementsResponseResultItems0 struct {
// The HTML body of the announcement
// Required: true
Body *string `json:"body"`
// A unique identifier for the announcement
// Required: true
ID *float64 `json:"id"`
// Whether the announcement is marked as important
// Required: true
Important *bool `json:"important"`
// The timestamp in ms at which the announcement was published
// Required: true
PublicationTime *int64 `json:"publication_time"`
// The title of the announcement
// Required: true
Title *string `json:"title"`
}
GetAnnouncementsResponseResultItems0 get announcements response result items0 swagger:model GetAnnouncementsResponseResultItems0
func (*GetAnnouncementsResponseResultItems0) MarshalBinary ¶
func (m *GetAnnouncementsResponseResultItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetAnnouncementsResponseResultItems0) UnmarshalBinary ¶
func (m *GetAnnouncementsResponseResultItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GetTimeResponse ¶
type GetTimeResponse struct {
// Current timestamp (milliseconds)
// Required: true
Result *int64 `json:"result"`
}
GetTimeResponse get time response swagger:model get_time_response
func (*GetTimeResponse) MarshalBinary ¶
func (m *GetTimeResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetTimeResponse) UnmarshalBinary ¶
func (m *GetTimeResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Greeks ¶
type Greeks struct {
// (Only for option) The delta value for the option
// Required: true
Delta *float64 `json:"delta"`
// (Only for option) The gamma value for the option
// Required: true
Gamma *float64 `json:"gamma"`
// (Only for option) The rho value for the option
// Required: true
Rho *float64 `json:"rho"`
// (Only for option) The theta value for the option
// Required: true
Theta *float64 `json:"theta"`
// (Only for option) The vega value for the option
// Required: true
Vega *float64 `json:"vega"`
}
Greeks Only for options swagger:model greeks
func (*Greeks) MarshalBinary ¶
MarshalBinary interface implementation
func (*Greeks) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ImpliedVolatility ¶
type ImpliedVolatility float64
ImpliedVolatility Value of the volatility of the underlying instrument swagger:model implied_volatility
type Implv ¶
type Implv float64
Implv Implied volatility in percent. (Only if `advanced="implv"`) swagger:model implv
type Instrument ¶
type Instrument struct {
// The underlying currency being traded.
// Required: true
// Enum: [BTC ETH]
BaseCurrency *string `json:"base_currency"`
// Contract size for instrument
// Required: true
ContractSize *float64 `json:"contract_size"`
// The time when the instrument was first created (milliseconds)
// Required: true
CreationTimestamp *int64 `json:"creation_timestamp"`
// The time when the instrument will expire (milliseconds)
// Required: true
ExpirationTimestamp *int64 `json:"expiration_timestamp"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// Indicates if the instrument can currently be traded.
// Required: true
IsActive *bool `json:"is_active"`
// kind
// Required: true
Kind Kind `json:"kind"`
// Minimum amount for trading. For perpetual and futures - in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
// Required: true
MinTradeAmount *float64 `json:"min_trade_amount"`
// The option type (only for options)
// Enum: [call put]
OptionType string `json:"option_type,omitempty"`
// The currency in which the instrument prices are quoted.
// Required: true
// Enum: [USD]
QuoteCurrency *string `json:"quote_currency"`
// The settlement period.
// Required: true
// Enum: [month week perpetual]
SettlementPeriod *string `json:"settlement_period"`
// The strike value. (only for options)
Strike float64 `json:"strike,omitempty"`
// specifies minimal price change and, as follows, the number of decimal places for instrument prices
// Required: true
TickSize *float64 `json:"tick_size"`
}
Instrument instrument swagger:model instrument
func (*Instrument) MarshalBinary ¶
func (m *Instrument) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Instrument) UnmarshalBinary ¶
func (m *Instrument) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstrumentName ¶
type InstrumentName string
InstrumentName Unique instrument identifier swagger:model instrument_name
type InterestRate ¶
type InterestRate float64
InterestRate Interest rate used in implied volatility calculations (options only) swagger:model interest_rate
type KeyNumberPair ¶
type KeyNumberPair struct {
// name
// Required: true
Name *string `json:"name"`
// value
// Required: true
Value *float64 `json:"value"`
}
KeyNumberPair key number pair swagger:model key_number_pair
func (*KeyNumberPair) MarshalBinary ¶
func (m *KeyNumberPair) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*KeyNumberPair) UnmarshalBinary ¶
func (m *KeyNumberPair) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type KindWithAny ¶
type KindWithAny string
KindWithAny Instrument kind, `"future"` or `"option"` or `"any"` if don't care swagger:model kind_with_any
const ( // KindWithAnyFuture captures enum value "future" KindWithAnyFuture KindWithAny = "future" // KindWithAnyOption captures enum value "option" KindWithAnyOption KindWithAny = "option" // KindWithAnyAny captures enum value "any" KindWithAnyAny KindWithAny = "any" )
type LastPrice ¶
type LastPrice float64
LastPrice The price for the last trade swagger:model last_price
type MarkIv ¶
type MarkIv float64
MarkIv (Only for option) implied volatility for mark price swagger:model mark_iv
type MarkPrice ¶
type MarkPrice float64
MarkPrice The mark price for the instrument swagger:model mark_price
type MarkPriceInfo ¶
type MarkPriceInfo struct {
// instrument name
InstrumentName string `json:"instrument_name,omitempty"`
// implied volatility of mark price
Iv float64 `json:"iv,omitempty"`
// mark_price of instrument
MarkPrice float64 `json:"mark_price,omitempty"`
}
MarkPriceInfo mark price info swagger:model mark_price_info
func (*MarkPriceInfo) MarshalBinary ¶
func (m *MarkPriceInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MarkPriceInfo) UnmarshalBinary ¶
func (m *MarkPriceInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MarkpriceOptionsNotification ¶
type MarkpriceOptionsNotification []*MarkpriceOptionsNotificationItems0
MarkpriceOptionsNotification markprice options notification swagger:model markprice_options_notification
type MarkpriceOptionsNotificationItems0 ¶
type MarkpriceOptionsNotificationItems0 struct {
// instrument name
InstrumentName InstrumentName `json:"instrument_name,omitempty"`
// iv
Iv ImpliedVolatility `json:"iv,omitempty"`
// mark price
MarkPrice MarkPrice `json:"mark_price,omitempty"`
}
MarkpriceOptionsNotificationItems0 markprice options notification items0 swagger:model MarkpriceOptionsNotificationItems0
func (*MarkpriceOptionsNotificationItems0) MarshalBinary ¶
func (m *MarkpriceOptionsNotificationItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MarkpriceOptionsNotificationItems0) UnmarshalBinary ¶
func (m *MarkpriceOptionsNotificationItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MatchingID ¶
type MatchingID string
MatchingID Matching (taker) order id, `null` if it is not users order swagger:model matching_id
type MaxPrice ¶
type MaxPrice float64
MaxPrice The maximum price for the future. Any buy orders you submit higher than this price, will be clamped to this maximum. swagger:model max_price
type MaxShow ¶
type MaxShow float64
MaxShow Maximum amount within an order to be shown to other traders, 0 for invisible order. swagger:model max_show
type MinPrice ¶
type MinPrice float64
MinPrice The minimum price for the future. Any sell orders you submit lower than this price will be clamped to this minimum. swagger:model min_price
type OkResponse ¶
type OkResponse struct {
// Result of method execution. `ok` in case of success
// Required: true
// Enum: [ok]
Result *string `json:"result"`
}
OkResponse ok response swagger:model ok_response
func (*OkResponse) MarshalBinary ¶
func (m *OkResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*OkResponse) UnmarshalBinary ¶
func (m *OkResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type OpenInterest ¶
type OpenInterest float64
OpenInterest The total amount of outstanding contracts in the corresponding amount units. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH. swagger:model open_interest
type Order ¶
type Order struct {
// advanced
Advanced Advanced `json:"advanced,omitempty"`
// amount
Amount Amount `json:"amount,omitempty"`
// api
// Required: true
API API `json:"api"`
// average price
AveragePrice AveragePrice `json:"average_price,omitempty"`
// commission
Commission Commission `json:"commission,omitempty"`
// creation timestamp
// Required: true
CreationTimestamp Timestamp `json:"creation_timestamp"`
// direction
// Required: true
Direction Direction `json:"direction"`
// filled amount
FilledAmount FilledAmount `json:"filled_amount,omitempty"`
// implv
Implv Implv `json:"implv,omitempty"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// `true` if order was automatically created during liquidation
// Required: true
IsLiquidation *bool `json:"is_liquidation"`
// label
// Required: true
Label Label `json:"label"`
// last update timestamp
// Required: true
LastUpdateTimestamp Timestamp `json:"last_update_timestamp"`
// max show
// Required: true
MaxShow MaxShow `json:"max_show"`
// order id
// Required: true
OrderID OrderID `json:"order_id"`
// order state
// Required: true
OrderState OrderState `json:"order_state"`
// order type
// Required: true
OrderType OrderType `json:"order_type"`
// post only
// Required: true
PostOnly PostOnly `json:"post_only"`
// price
// Required: true
Price Price `json:"price"`
// profit loss
ProfitLoss ProfitLoss `json:"profit_loss,omitempty"`
// reduce only
ReduceOnly ReduceOnly `json:"reduce_only,omitempty"`
// stop price
StopPrice StopPrice `json:"stop_price,omitempty"`
// time in force
// Required: true
TimeInForce TimeInForce `json:"time_in_force"`
// trigger
Trigger Trigger `json:"trigger,omitempty"`
// triggered
Triggered Triggered `json:"triggered,omitempty"`
// usd
Usd Usd `json:"usd,omitempty"`
}
Order order swagger:model order
func (*Order) MarshalBinary ¶
MarshalBinary interface implementation
func (*Order) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type OrderIDInitialMarginPair ¶
type OrderIDInitialMarginPair struct {
// Initial margin of order, in base currency
// Required: true
InitialMargin *float64 `json:"initial_margin"`
// order id
// Required: true
OrderID OrderID `json:"order_id"`
}
OrderIDInitialMarginPair order id initial margin pair swagger:model order_id_initial_margin_pair
func (*OrderIDInitialMarginPair) MarshalBinary ¶
func (m *OrderIDInitialMarginPair) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*OrderIDInitialMarginPair) UnmarshalBinary ¶
func (m *OrderIDInitialMarginPair) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type OrderState ¶
type OrderState string
OrderState order state, `"open"`, `"filled"`, `"rejected"`, `"cancelled"`, `"untriggered"` swagger:model order_state
const ( // OrderStateOpen captures enum value "open" OrderStateOpen OrderState = "open" // OrderStateFilled captures enum value "filled" OrderStateFilled OrderState = "filled" // OrderStateRejected captures enum value "rejected" OrderStateRejected OrderState = "rejected" // OrderStateCancelled captures enum value "cancelled" OrderStateCancelled OrderState = "cancelled" // OrderStateUntriggered captures enum value "untriggered" OrderStateUntriggered OrderState = "untriggered" // OrderStateTriggered captures enum value "triggered" OrderStateTriggered OrderState = "triggered" )
type OrderStateInUserTrade ¶
type OrderStateInUserTrade string
OrderStateInUserTrade order state, `"open"`, `"filled"`, `"rejected"`, `"cancelled"`, `"untriggered"` or `"archive"` (if order was archived) swagger:model order_state_in_user_trade
const ( // OrderStateInUserTradeOpen captures enum value "open" OrderStateInUserTradeOpen OrderStateInUserTrade = "open" // OrderStateInUserTradeFilled captures enum value "filled" OrderStateInUserTradeFilled OrderStateInUserTrade = "filled" // OrderStateInUserTradeRejected captures enum value "rejected" OrderStateInUserTradeRejected OrderStateInUserTrade = "rejected" // OrderStateInUserTradeCancelled captures enum value "cancelled" OrderStateInUserTradeCancelled OrderStateInUserTrade = "cancelled" // OrderStateInUserTradeUntriggered captures enum value "untriggered" OrderStateInUserTradeUntriggered OrderStateInUserTrade = "untriggered" // OrderStateInUserTradeArchive captures enum value "archive" OrderStateInUserTradeArchive OrderStateInUserTrade = "archive" )
type OrderType ¶
type OrderType string
OrderType order type, `"limit"`, `"market"`, `"stop_limit"`, `"stop_market"` swagger:model order_type
const ( // OrderTypeMarket captures enum value "market" OrderTypeMarket OrderType = "market" // OrderTypeLimit captures enum value "limit" OrderTypeLimit OrderType = "limit" // OrderTypeStopMarket captures enum value "stop_market" OrderTypeStopMarket OrderType = "stop_market" // OrderTypeStopLimit captures enum value "stop_limit" OrderTypeStopLimit OrderType = "stop_limit" )
type OrderType2 ¶
type OrderType2 string
OrderType2 Order type, `"all"`, `"limit"`, `"stop_all"`, `"stop_limit"` or `"stop_market"` swagger:model order_type2
const ( // OrderType2All captures enum value "all" OrderType2All OrderType2 = "all" // OrderType2Limit captures enum value "limit" OrderType2Limit OrderType2 = "limit" // OrderType2StopAll captures enum value "stop_all" OrderType2StopAll OrderType2 = "stop_all" // OrderType2StopLimit captures enum value "stop_limit" OrderType2StopLimit OrderType2 = "stop_limit" // OrderType2StopMarket captures enum value "stop_market" OrderType2StopMarket OrderType2 = "stop_market" )
type OrderV1 ¶
type OrderV1 struct {
// advanced
Advanced Advanced `json:"advanced,omitempty"`
// api
// Required: true
API API `json:"api"`
// average price
AveragePrice AveragePrice `json:"average_price,omitempty"`
// commission
Commission Commission `json:"commission,omitempty"`
// created
// Required: true
Created Timestamp `json:"created"`
// direction
// Required: true
Direction Direction `json:"direction"`
// filled quantity
FilledQuantity FilledQuantity `json:"filled_quantity,omitempty"`
// implv
Implv Implv `json:"implv,omitempty"`
// instrument
// Required: true
Instrument *string `json:"instrument"`
// label
// Required: true
Label Label `json:"label"`
// last update
// Required: true
LastUpdate Timestamp `json:"last_update"`
// max show
// Required: true
MaxShow MaxShow `json:"max_show"`
// order id
// Required: true
OrderID OrderID `json:"order_id"`
// order state
// Required: true
OrderState OrderState `json:"order_state"`
// order type
// Required: true
OrderType OrderType `json:"order_type"`
// post only
// Required: true
PostOnly PostOnly `json:"post_only"`
// price
// Required: true
Price Price `json:"price"`
// quantity
Quantity Quantity `json:"quantity,omitempty"`
// stop price
StopPrice StopPrice `json:"stop_price,omitempty"`
// trigger
Trigger Trigger `json:"trigger,omitempty"`
// triggered
Triggered Triggered `json:"triggered,omitempty"`
// usd
Usd Usd `json:"usd,omitempty"`
}
OrderV1 order v1 swagger:model order_v1
func (*OrderV1) MarshalBinary ¶
MarshalBinary interface implementation
func (*OrderV1) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PerpetualNotification ¶
type PerpetualNotification struct {
// Current interest
// Required: true
Interest *float64 `json:"interest"`
}
PerpetualNotification perpetual notification swagger:model perpetual_notification
func (*PerpetualNotification) MarshalBinary ¶
func (m *PerpetualNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerpetualNotification) UnmarshalBinary ¶
func (m *PerpetualNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Portfolio ¶
type Portfolio struct {
// btc
// Required: true
Btc *CurrencyPortfolio `json:"btc"`
// eth
// Required: true
Eth *CurrencyPortfolio `json:"eth"`
}
Portfolio portfolio swagger:model portfolio
func (*Portfolio) MarshalBinary ¶
MarshalBinary interface implementation
func (*Portfolio) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Position ¶
type Position struct {
// Average price of trades that built this position
// Required: true
AveragePrice *float64 `json:"average_price"`
// Only for options, average price in USD
AveragePriceUsd float64 `json:"average_price_usd,omitempty"`
// Delta parameter
// Required: true
Delta *float64 `json:"delta"`
// direction
// Required: true
Direction Direction `json:"direction"`
// Only for futures, estimated liquidation price
EstimatedLiquidationPrice float64 `json:"estimated_liquidation_price,omitempty"`
// Floating profit or loss
// Required: true
FloatingProfitLoss *float64 `json:"floating_profit_loss"`
// Only for options, floating profit or loss in USD
FloatingProfitLossUsd float64 `json:"floating_profit_loss_usd,omitempty"`
// Current index price
// Required: true
IndexPrice *float64 `json:"index_price"`
// Initial margin
// Required: true
InitialMargin *float64 `json:"initial_margin"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// kind
// Required: true
Kind Kind `json:"kind"`
// Maintenance margin
// Required: true
MaintenanceMargin *float64 `json:"maintenance_margin"`
// Current mark price for position's instrument
// Required: true
MarkPrice *float64 `json:"mark_price"`
// Open orders margin
// Required: true
OpenOrdersMargin *float64 `json:"open_orders_margin"`
// Realized profit or loss
// Required: true
RealizedProfitLoss *float64 `json:"realized_profit_loss"`
// Last settlement price for position's instrument 0 if instrument wasn't settled yet
// Required: true
SettlementPrice *float64 `json:"settlement_price"`
// Position size for futures size in quote currency (e.g. USD), for options size is in base currency (e.g. BTC)
// Required: true
Size *float64 `json:"size"`
// Only for futures, position size in base currency
SizeCurrency float64 `json:"size_currency,omitempty"`
// Profit or loss from position
// Required: true
TotalProfitLoss *float64 `json:"total_profit_loss"`
}
Position position swagger:model position
func (*Position) MarshalBinary ¶
MarshalBinary interface implementation
func (*Position) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PostOnly ¶
type PostOnly bool
PostOnly `true` for post-only orders only swagger:model post_only
type PrivateAccountResponse ¶
type PrivateAccountResponse struct {
// result
// Required: true
Result *PrivateAccountResponseResult `json:"result"`
}
PrivateAccountResponse private account response swagger:model private_account_response
func (*PrivateAccountResponse) MarshalBinary ¶
func (m *PrivateAccountResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateAccountResponse) UnmarshalBinary ¶
func (m *PrivateAccountResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateAccountResponseResult ¶
type PrivateAccountResponseResult struct {
// The account's available funds
// Required: true
AvailableFunds *float64 `json:"available_funds"`
// The account's available to withdrawal funds
// Required: true
AvailableWithdrawalFunds *float64 `json:"available_withdrawal_funds"`
// The account's balance
// Required: true
Balance *float64 `json:"balance"`
// The selected currency
// Required: true
Currency *string `json:"currency"`
// The sum of position deltas
// Required: true
DeltaTotal *float64 `json:"delta_total"`
// The deposit address for the account (if available)
DepositAddress string `json:"deposit_address,omitempty"`
// User email (available when parameter `extended` = `true`)
// Required: true
Email *string `json:"email"`
// The account's current equity
// Required: true
Equity *float64 `json:"equity"`
// Futures profit and Loss
// Required: true
FuturesPl *float64 `json:"futures_pl"`
// Futures session realized profit and Loss
// Required: true
FuturesSessionRpl *float64 `json:"futures_session_rpl"`
// Futures session unrealized profit and Loss
// Required: true
FuturesSessionUpl *float64 `json:"futures_session_upl"`
// Account id (available when parameter `extended` = `true`)
// Required: true
ID *int64 `json:"id"`
// The account's initial margin
// Required: true
InitialMargin *float64 `json:"initial_margin"`
// The maintenance margin.
// Required: true
MaintenanceMargin *float64 `json:"maintenance_margin"`
// The account's margin balance
MarginBalance float64 `json:"margin_balance,omitempty"`
// Options summary delta
// Required: true
OptionsDelta *float64 `json:"options_delta"`
// Options summary gamma
// Required: true
OptionsGamma *float64 `json:"options_gamma"`
// Options profit and Loss
// Required: true
OptionsPl *float64 `json:"options_pl"`
// Options session realized profit and Loss
// Required: true
OptionsSessionRpl *float64 `json:"options_session_rpl"`
// Options session unrealized profit and Loss
// Required: true
OptionsSessionUpl *float64 `json:"options_session_upl"`
// Options summary theta
// Required: true
OptionsTheta *float64 `json:"options_theta"`
// Options summary vega
// Required: true
OptionsVega *float64 `json:"options_vega"`
// `true` when portfolio margining is enabled for user
PortfolioMarginingEnabled bool `json:"portfolio_margining_enabled,omitempty"`
// Projected initial margin (for portfolio margining users)
ProjectedInitialMargin float64 `json:"projected_initial_margin,omitempty"`
// Projected maintenance margin (for portfolio margining users)
ProjectedMaintenanceMargin float64 `json:"projected_maintenance_margin,omitempty"`
// Session funding
// Required: true
SessionFunding *float64 `json:"session_funding"`
// Session realized profit and loss
// Required: true
SessionRpl *float64 `json:"session_rpl"`
// Session unrealized profit and loss
// Required: true
SessionUpl *float64 `json:"session_upl"`
// System generated user nickname (available when parameter `extended` = `true`)
// Required: true
SystemName *string `json:"system_name"`
// Whether two factor authentication is enabled (available when parameter `extended` = `true`)
// Required: true
TfaEnabled *bool `json:"tfa_enabled"`
// Profit and loss
// Required: true
TotalPl *float64 `json:"total_pl"`
// Account type (available when parameter `extended` = `true`)
// Required: true
// Enum: [main subaccount]
Type *string `json:"type"`
// Account name (given by user) (available when parameter `extended` = `true`)
// Required: true
Username *string `json:"username"`
}
PrivateAccountResponseResult private account response result swagger:model PrivateAccountResponseResult
func (*PrivateAccountResponseResult) MarshalBinary ¶
func (m *PrivateAccountResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateAccountResponseResult) UnmarshalBinary ¶
func (m *PrivateAccountResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateAddToAddressBookResponse ¶
type PrivateAddToAddressBookResponse struct {
// result
// Required: true
Result *AddressBookItem `json:"result"`
}
PrivateAddToAddressBookResponse private add to address book response swagger:model private_add_to_address_book_response
func (*PrivateAddToAddressBookResponse) MarshalBinary ¶
func (m *PrivateAddToAddressBookResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateAddToAddressBookResponse) UnmarshalBinary ¶
func (m *PrivateAddToAddressBookResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateAddressBookResponse ¶
type PrivateAddressBookResponse struct {
// result
// Required: true
Result []*AddressBookItem `json:"result"`
}
PrivateAddressBookResponse private address book response swagger:model private_address_book_response
func (*PrivateAddressBookResponse) MarshalBinary ¶
func (m *PrivateAddressBookResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateAddressBookResponse) UnmarshalBinary ¶
func (m *PrivateAddressBookResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateBuyAndSellResponse ¶
type PrivateBuyAndSellResponse struct {
// result
// Required: true
Result *PrivateBuyAndSellResponseResult `json:"result"`
}
PrivateBuyAndSellResponse private buy and sell response swagger:model private_buy_and_sell_response
func (*PrivateBuyAndSellResponse) MarshalBinary ¶
func (m *PrivateBuyAndSellResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateBuyAndSellResponse) UnmarshalBinary ¶
func (m *PrivateBuyAndSellResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateBuyAndSellResponseResult ¶
type PrivateBuyAndSellResponseResult struct {
// order
// Required: true
Order *Order `json:"order"`
// trades
// Required: true
Trades []*UserTrade `json:"trades"`
}
PrivateBuyAndSellResponseResult private buy and sell response result swagger:model PrivateBuyAndSellResponseResult
func (*PrivateBuyAndSellResponseResult) MarshalBinary ¶
func (m *PrivateBuyAndSellResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateBuyAndSellResponseResult) UnmarshalBinary ¶
func (m *PrivateBuyAndSellResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateCancelResponse ¶
type PrivateCancelResponse struct {
// result
// Required: true
Result *Order `json:"result"`
}
PrivateCancelResponse private cancel response swagger:model private_cancel_response
func (*PrivateCancelResponse) MarshalBinary ¶
func (m *PrivateCancelResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateCancelResponse) UnmarshalBinary ¶
func (m *PrivateCancelResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateCreateSubaccountResponse ¶
type PrivateCreateSubaccountResponse struct {
// result
// Required: true
Result *PrivateCreateSubaccountResponseResult `json:"result"`
}
PrivateCreateSubaccountResponse private create subaccount response swagger:model private_create_subaccount_response
func (*PrivateCreateSubaccountResponse) MarshalBinary ¶
func (m *PrivateCreateSubaccountResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateCreateSubaccountResponse) UnmarshalBinary ¶
func (m *PrivateCreateSubaccountResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateCreateSubaccountResponseResult ¶
type PrivateCreateSubaccountResponseResult struct {
// User email
// Required: true
Email *string `json:"email"`
// Subaccount identifier
// Required: true
ID *int64 `json:"id"`
// `true` when password for the subaccount has been configured
// Required: true
IsPassword *bool `json:"is_password"`
// Informs whether login to the subaccount is enabled
// Required: true
LoginEnabled *bool `json:"login_enabled"`
// portfolio
Portfolio *Portfolio `json:"portfolio,omitempty"`
// When `true` - receive all notification emails on the main email
// Required: true
ReceiveNotifications *bool `json:"receive_notifications"`
// System generated user nickname
// Required: true
SystemName *string `json:"system_name"`
// Whether the two factor authentication is enabled
// Required: true
TfaEnabled *bool `json:"tfa_enabled"`
// Account type
// Required: true
// Enum: [subaccount]
Type *string `json:"type"`
// Account name (given by user)
// Required: true
Username *string `json:"username"`
}
PrivateCreateSubaccountResponseResult private create subaccount response result swagger:model PrivateCreateSubaccountResponseResult
func (*PrivateCreateSubaccountResponseResult) MarshalBinary ¶
func (m *PrivateCreateSubaccountResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateCreateSubaccountResponseResult) UnmarshalBinary ¶
func (m *PrivateCreateSubaccountResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateDepositAddressResponse ¶
type PrivateDepositAddressResponse struct {
// result
// Required: true
Result *PrivateDepositAddressResponseResult `json:"result"`
}
PrivateDepositAddressResponse private deposit address response swagger:model private_deposit_address_response
func (*PrivateDepositAddressResponse) MarshalBinary ¶
func (m *PrivateDepositAddressResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateDepositAddressResponse) UnmarshalBinary ¶
func (m *PrivateDepositAddressResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateDepositAddressResponseResult ¶
type PrivateDepositAddressResponseResult struct {
// address
// Required: true
Address CurrencyAddress `json:"address"`
// creation timestamp
// Required: true
CreationTimestamp Timestamp `json:"creation_timestamp"`
// currency
// Required: true
Currency Currency `json:"currency"`
// type
// Required: true
Type WalletAddressType `json:"type"`
}
PrivateDepositAddressResponseResult Object if address is created, null otherwise swagger:model PrivateDepositAddressResponseResult
func (*PrivateDepositAddressResponseResult) MarshalBinary ¶
func (m *PrivateDepositAddressResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateDepositAddressResponseResult) UnmarshalBinary ¶
func (m *PrivateDepositAddressResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateEditResponse ¶
type PrivateEditResponse struct {
// result
// Required: true
Result *PrivateEditResponseResult `json:"result"`
}
PrivateEditResponse private edit response swagger:model private_edit_response
func (*PrivateEditResponse) MarshalBinary ¶
func (m *PrivateEditResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateEditResponse) UnmarshalBinary ¶
func (m *PrivateEditResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateEditResponseResult ¶
type PrivateEditResponseResult struct {
// order
// Required: true
Order *Order `json:"order"`
// trades
// Required: true
Trades []*UserTrade `json:"trades"`
}
PrivateEditResponseResult private edit response result swagger:model PrivateEditResponseResult
func (*PrivateEditResponseResult) MarshalBinary ¶
func (m *PrivateEditResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateEditResponseResult) UnmarshalBinary ¶
func (m *PrivateEditResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetDepositsResponse ¶
type PrivateGetDepositsResponse struct {
// result
// Required: true
Result *PrivateGetDepositsResponseResult `json:"result"`
}
PrivateGetDepositsResponse private get deposits response swagger:model private_get_deposits_response
func (*PrivateGetDepositsResponse) MarshalBinary ¶
func (m *PrivateGetDepositsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetDepositsResponse) UnmarshalBinary ¶
func (m *PrivateGetDepositsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetDepositsResponseResult ¶
type PrivateGetDepositsResponseResult struct {
// count
// Required: true
Count ResultCount `json:"count"`
// data
// Required: true
Data []*Deposit `json:"data"`
}
PrivateGetDepositsResponseResult private get deposits response result swagger:model PrivateGetDepositsResponseResult
func (*PrivateGetDepositsResponseResult) MarshalBinary ¶
func (m *PrivateGetDepositsResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetDepositsResponseResult) UnmarshalBinary ¶
func (m *PrivateGetDepositsResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetEmailLanguageResponse ¶
type PrivateGetEmailLanguageResponse struct {
// The abbreviation of the language
// Required: true
Result *string `json:"result"`
}
PrivateGetEmailLanguageResponse private get email language response swagger:model private_get_email_language_response
func (*PrivateGetEmailLanguageResponse) MarshalBinary ¶
func (m *PrivateGetEmailLanguageResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetEmailLanguageResponse) UnmarshalBinary ¶
func (m *PrivateGetEmailLanguageResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetMarginsResponse ¶
type PrivateGetMarginsResponse struct {
// result
// Required: true
Result *PrivateGetMarginsResponseResult `json:"result"`
}
PrivateGetMarginsResponse private get margins response swagger:model private_get_margins_response
func (*PrivateGetMarginsResponse) MarshalBinary ¶
func (m *PrivateGetMarginsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetMarginsResponse) UnmarshalBinary ¶
func (m *PrivateGetMarginsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetMarginsResponseResult ¶
type PrivateGetMarginsResponseResult struct {
// Margin when buying
// Required: true
Buy *float64 `json:"buy"`
// max price
// Required: true
MaxPrice MaxPrice `json:"max_price"`
// min price
// Required: true
MinPrice MinPrice `json:"min_price"`
// Margin when selling
// Required: true
Sell *float64 `json:"sell"`
}
PrivateGetMarginsResponseResult private get margins response result swagger:model PrivateGetMarginsResponseResult
func (*PrivateGetMarginsResponseResult) MarshalBinary ¶
func (m *PrivateGetMarginsResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetMarginsResponseResult) UnmarshalBinary ¶
func (m *PrivateGetMarginsResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetOpenOrdersResponse ¶
type PrivateGetOpenOrdersResponse struct {
// result
// Required: true
Result []*Order `json:"result"`
}
PrivateGetOpenOrdersResponse private get open orders response swagger:model private_get_open_orders_response
func (*PrivateGetOpenOrdersResponse) MarshalBinary ¶
func (m *PrivateGetOpenOrdersResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetOpenOrdersResponse) UnmarshalBinary ¶
func (m *PrivateGetOpenOrdersResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetOrderHistoryResponse ¶
type PrivateGetOrderHistoryResponse struct {
// result
// Required: true
Result []*Order `json:"result"`
}
PrivateGetOrderHistoryResponse private get order history response swagger:model private_get_order_history_response
func (*PrivateGetOrderHistoryResponse) MarshalBinary ¶
func (m *PrivateGetOrderHistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetOrderHistoryResponse) UnmarshalBinary ¶
func (m *PrivateGetOrderHistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetOrderMarginByIdsResponse ¶
type PrivateGetOrderMarginByIdsResponse struct {
// result
// Required: true
Result []*OrderIDInitialMarginPair `json:"result"`
}
PrivateGetOrderMarginByIdsResponse private get order margin by ids response swagger:model private_get_order_margin_by_ids_response
func (*PrivateGetOrderMarginByIdsResponse) MarshalBinary ¶
func (m *PrivateGetOrderMarginByIdsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetOrderMarginByIdsResponse) UnmarshalBinary ¶
func (m *PrivateGetOrderMarginByIdsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetOrderStateResponse ¶
type PrivateGetOrderStateResponse struct {
// result
// Required: true
Result *Order `json:"result"`
}
PrivateGetOrderStateResponse private get order state response swagger:model private_get_order_state_response
func (*PrivateGetOrderStateResponse) MarshalBinary ¶
func (m *PrivateGetOrderStateResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetOrderStateResponse) UnmarshalBinary ¶
func (m *PrivateGetOrderStateResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetPositionResponse ¶
type PrivateGetPositionResponse struct {
// result
// Required: true
Result *Position `json:"result"`
}
PrivateGetPositionResponse private get position response swagger:model private_get_position_response
func (*PrivateGetPositionResponse) MarshalBinary ¶
func (m *PrivateGetPositionResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetPositionResponse) UnmarshalBinary ¶
func (m *PrivateGetPositionResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetPositionsResponse ¶
type PrivateGetPositionsResponse struct {
// result
// Required: true
Result []*Position `json:"result"`
}
PrivateGetPositionsResponse private get positions response swagger:model private_get_positions_response
func (*PrivateGetPositionsResponse) MarshalBinary ¶
func (m *PrivateGetPositionsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetPositionsResponse) UnmarshalBinary ¶
func (m *PrivateGetPositionsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetSubaccountsResponse ¶
type PrivateGetSubaccountsResponse struct {
// result
// Required: true
Result []*PrivateGetSubaccountsResponseResultItems0 `json:"result"`
}
PrivateGetSubaccountsResponse private get subaccounts response swagger:model private_get_subaccounts_response
func (*PrivateGetSubaccountsResponse) MarshalBinary ¶
func (m *PrivateGetSubaccountsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetSubaccountsResponse) UnmarshalBinary ¶
func (m *PrivateGetSubaccountsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetSubaccountsResponseResultItems0 ¶
type PrivateGetSubaccountsResponseResultItems0 struct {
// User email
// Required: true
Email *string `json:"email"`
// Account/Subaccount identifier
// Required: true
ID *int64 `json:"id"`
// `true` when password for the subaccount has been configured
// Required: true
IsPassword *bool `json:"is_password"`
// Informs whether login to the subaccount is enabled
LoginEnabled bool `json:"login_enabled,omitempty"`
// New email address that has not yet been confirmed. This field is only included if `with_portfolio` == `true`.
NotConfirmedEmail string `json:"not_confirmed_email,omitempty"`
// Only if with_portfolio == true
Portfolio *Portfolio `json:"portfolio,omitempty"`
// When `true` - receive all notification emails on the main email
// Required: true
ReceiveNotifications *bool `json:"receive_notifications"`
// System generated user nickname
// Required: true
SystemName *string `json:"system_name"`
// Whether the two factor authentication is enabled
// Required: true
TfaEnabled *bool `json:"tfa_enabled"`
// type
// Required: true
// Enum: [main subaccount]
Type *string `json:"type"`
// username
// Required: true
Username *string `json:"username"`
}
PrivateGetSubaccountsResponseResultItems0 private get subaccounts response result items0 swagger:model PrivateGetSubaccountsResponseResultItems0
func (*PrivateGetSubaccountsResponseResultItems0) MarshalBinary ¶
func (m *PrivateGetSubaccountsResponseResultItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetSubaccountsResponseResultItems0) UnmarshalBinary ¶
func (m *PrivateGetSubaccountsResponseResultItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetTransfersResponse ¶
type PrivateGetTransfersResponse struct {
// result
// Required: true
Result *PrivateGetTransfersResponseResult `json:"result"`
}
PrivateGetTransfersResponse private get transfers response swagger:model private_get_transfers_response
func (*PrivateGetTransfersResponse) MarshalBinary ¶
func (m *PrivateGetTransfersResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetTransfersResponse) UnmarshalBinary ¶
func (m *PrivateGetTransfersResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetTransfersResponseResult ¶
type PrivateGetTransfersResponseResult struct {
// count
// Required: true
Count ResultCount `json:"count"`
// data
// Required: true
Data []*TransferItem `json:"data"`
}
PrivateGetTransfersResponseResult private get transfers response result swagger:model PrivateGetTransfersResponseResult
func (*PrivateGetTransfersResponseResult) MarshalBinary ¶
func (m *PrivateGetTransfersResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetTransfersResponseResult) UnmarshalBinary ¶
func (m *PrivateGetTransfersResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetWithdrawalsResponse ¶
type PrivateGetWithdrawalsResponse struct {
// result
// Required: true
Result *PrivateGetWithdrawalsResponseResult `json:"result"`
}
PrivateGetWithdrawalsResponse private get withdrawals response swagger:model private_get_withdrawals_response
func (*PrivateGetWithdrawalsResponse) MarshalBinary ¶
func (m *PrivateGetWithdrawalsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetWithdrawalsResponse) UnmarshalBinary ¶
func (m *PrivateGetWithdrawalsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetWithdrawalsResponseResult ¶
type PrivateGetWithdrawalsResponseResult struct {
// count
// Required: true
Count ResultCount `json:"count"`
// data
// Required: true
Data []*Withdrawal `json:"data"`
}
PrivateGetWithdrawalsResponseResult private get withdrawals response result swagger:model PrivateGetWithdrawalsResponseResult
func (*PrivateGetWithdrawalsResponseResult) MarshalBinary ¶
func (m *PrivateGetWithdrawalsResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetWithdrawalsResponseResult) UnmarshalBinary ¶
func (m *PrivateGetWithdrawalsResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetopenordersResponse ¶
type PrivateGetopenordersResponse struct {
// result
// Required: true
Result *PrivateGetopenordersResponseResult `json:"result"`
}
PrivateGetopenordersResponse private getopenorders response swagger:model private_getopenorders_response
func (*PrivateGetopenordersResponse) MarshalBinary ¶
func (m *PrivateGetopenordersResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetopenordersResponse) UnmarshalBinary ¶
func (m *PrivateGetopenordersResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateGetopenordersResponseResult ¶
type PrivateGetopenordersResponseResult struct {
// advanced type (`false`, or `usd` or `implv`)
// Required: true
Adv *bool `json:"adv"`
// true - created with API
// Required: true
API *bool `json:"api"`
// average fill price of the order
// Required: true
AvgPrice *float64 `json:"avgPrice"`
// Commission paid so far (in BTC)
// Required: true
Commission *float64 `json:"commission"`
// The timestamp (in ms) that the order was created
// Required: true
Created *int64 `json:"created"`
// direction, `"buy"` or `"sell"`
// Required: true
Direction *string `json:"direction"`
// Defines trigger type, required for stop limit orders, possible values `"index_price"`, `"mark_price"` (Only valid for stop orders)
// Required: true
ExecInst *string `json:"execInst"`
// The number of contracts already filled
// Required: true
FilledQuantity *float64 `json:"filledQuantity"`
// Option implied volatility in percent. (Only when `adv=implv`)
// Required: true
Implv *float64 `json:"implv"`
// instrument name of the order
// Required: true
Instrument *string `json:"instrument"`
// user defined label (up to 32 characters)
// Required: true
Label *string `json:"label"`
// The timestamp (in ms) that the order was last updated
// Required: true
LastUpdate *int64 `json:"lastUpdate"`
// Maximum quantity within an order to be shown to other customers, 0 for invisible order.
// Required: true
MaxShow *float64 `json:"max_show"`
// id of the order
// Required: true
OrderID *float64 `json:"orderId"`
// `true` for post-only orders only
// Required: true
PostOnly *bool `json:"postOnly"`
// price
// Required: true
Price *float64 `json:"price"`
// The number of contracts to be traded
// Required: true
Quantity *float64 `json:"quantity"`
// order state
// Required: true
State *string `json:"state"`
// stop price (Only for future stop orders)
// Required: true
StopPx *float64 `json:"stopPx"`
// Whether the stop order has been triggered (Only for future stop orders)
// Required: true
Triggered *bool `json:"triggered"`
// order type, `"limit"`,` "market"`, `"stop_limit"`
// Required: true
Type *string `json:"type"`
// Option price in USD (Only if `adv=usd`)
// Required: true
Usd *float64 `json:"usd"`
}
PrivateGetopenordersResponseResult private getopenorders response result swagger:model PrivateGetopenordersResponseResult
func (*PrivateGetopenordersResponseResult) MarshalBinary ¶
func (m *PrivateGetopenordersResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateGetopenordersResponseResult) UnmarshalBinary ¶
func (m *PrivateGetopenordersResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateOrderhistoryResponse ¶
type PrivateOrderhistoryResponse struct {
// result
// Required: true
Result *PrivateOrderhistoryResponseResult `json:"result"`
}
PrivateOrderhistoryResponse private orderhistory response swagger:model private_orderhistory_response
func (*PrivateOrderhistoryResponse) MarshalBinary ¶
func (m *PrivateOrderhistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateOrderhistoryResponse) UnmarshalBinary ¶
func (m *PrivateOrderhistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateOrderhistoryResponseResult ¶
type PrivateOrderhistoryResponseResult struct {
// advanced type (`false`, or `"usd"` or `"implv"`)
// Required: true
Adv *bool `json:"adv"`
// true - created with API
// Required: true
API *bool `json:"api"`
// average fill price of the order
// Required: true
AvgPrice *float64 `json:"avgPrice"`
// Commission paid so far (in BTC)
// Required: true
Commission *float64 `json:"commission"`
// The timestamp (in ms) that the order was created
// Required: true
Created *int64 `json:"created"`
// direction, `"buy"` or `"sell"`
// Required: true
Direction *string `json:"direction"`
// Defines trigger type, required for stop limit orders, possible values `"index_price"`, `"mark_price"` (Only valid for stop orders)
// Required: true
ExecInst *string `json:"execInst"`
// The number of contracts already filled
// Required: true
FilledQuantity *float64 `json:"filledQuantity"`
// Option implied volatility in percent. (Only when `adv=implv`)
// Required: true
Implv *float64 `json:"implv"`
// instrument name of the order
// Required: true
Instrument *string `json:"instrument"`
// user defined label (up to 32 characters)
// Required: true
Label *string `json:"label"`
// The timestamp (in ms) that the order was last updated
// Required: true
LastUpdate *int64 `json:"lastUpdate"`
// Maximum quantity within an order to be shown to other customers, 0 for invisible order.
// Required: true
MaxShow *float64 `json:"max_show"`
// id of the order
// Required: true
OrderID *float64 `json:"orderId"`
// true for post-only orders only
// Required: true
PostOnly *bool `json:"postOnly"`
// price
// Required: true
Price *float64 `json:"price"`
// The number of contracts to be traded
// Required: true
Quantity *float64 `json:"quantity"`
// order state
// Required: true
State *string `json:"state"`
// stop price (Only for future stop orders)
// Required: true
StopPx *float64 `json:"stopPx"`
// Whether the stop order has been triggered (Only for future stop orders)
// Required: true
Triggered *bool `json:"triggered"`
// order type, `"limit"`, `"market"`, `"stop_limit"`
// Required: true
Type *string `json:"type"`
// Option price in USD (Only if `adv=usd`)
// Required: true
Usd *float64 `json:"usd"`
}
PrivateOrderhistoryResponseResult private orderhistory response result swagger:model PrivateOrderhistoryResponseResult
func (*PrivateOrderhistoryResponseResult) MarshalBinary ¶
func (m *PrivateOrderhistoryResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateOrderhistoryResponseResult) UnmarshalBinary ¶
func (m *PrivateOrderhistoryResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateOrderstateResponse ¶
type PrivateOrderstateResponse struct {
// result
// Required: true
Result *PrivateOrderstateResponseResult `json:"result"`
}
PrivateOrderstateResponse private orderstate response swagger:model private_orderstate_response
func (*PrivateOrderstateResponse) MarshalBinary ¶
func (m *PrivateOrderstateResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateOrderstateResponse) UnmarshalBinary ¶
func (m *PrivateOrderstateResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateOrderstateResponseResult ¶
type PrivateOrderstateResponseResult struct {
// advanced type (`false`, or `"usd"` or `"implv"`)
// Required: true
Adv *bool `json:"adv"`
// true - created with API
// Required: true
API *bool `json:"api"`
// average fill price of the order
// Required: true
AvgPrice *float64 `json:"avgPrice"`
// Commission paid so far (in BTC)
// Required: true
Commission *float64 `json:"commission"`
// The timestamp (in ms) that the order was created
// Required: true
Created *int64 `json:"created"`
// direction, "buy" or "sell"
// Required: true
Direction *string `json:"direction"`
// Defines trigger type, required for stop limit orders, possible values `"index_price"`, `"mark_price"` (Only valid for stop orders)
// Required: true
ExecInst *string `json:"execInst"`
// The number of contracts already filled
// Required: true
FilledQuantity *float64 `json:"filledQuantity"`
// Option implied volatility in percent. (Only when `adv=implv`)
// Required: true
Implv *float64 `json:"implv"`
// instrument name of the order
// Required: true
Instrument *string `json:"instrument"`
// user defined label (up to 32 characters)
// Required: true
Label *string `json:"label"`
// The timestamp (in ms) that the order was last updated
// Required: true
LastUpdate *int64 `json:"lastUpdate"`
// Maximum quantity within an order to be shown to other customers, 0 for invisible order.
// Required: true
MaxShow *float64 `json:"max_show"`
// id of the order
// Required: true
OrderID *float64 `json:"orderId"`
// true for post-only orders only
// Required: true
PostOnly *bool `json:"postOnly"`
// price
// Required: true
Price *float64 `json:"price"`
// The number of contracts to be traded
// Required: true
Quantity *float64 `json:"quantity"`
// order state
// Required: true
State *string `json:"state"`
// stop price (Only for future stop orders)
// Required: true
StopPx *float64 `json:"stopPx"`
// Whether the stop order has been triggered (Only for future stop orders)
// Required: true
Triggered *bool `json:"triggered"`
// order type, `"limit"`, `"market"`, `"stop_limit"`
// Required: true
Type *string `json:"type"`
// Option price in USD (Only if `adv=usd`)
// Required: true
Usd *float64 `json:"usd"`
}
PrivateOrderstateResponseResult private orderstate response result swagger:model PrivateOrderstateResponseResult
func (*PrivateOrderstateResponseResult) MarshalBinary ¶
func (m *PrivateOrderstateResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateOrderstateResponseResult) UnmarshalBinary ¶
func (m *PrivateOrderstateResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivatePositionsResponse ¶
type PrivatePositionsResponse struct {
// result
// Required: true
Result *PrivatePositionsResponseResult `json:"result"`
}
PrivatePositionsResponse private positions response swagger:model private_positions_response
func (*PrivatePositionsResponse) MarshalBinary ¶
func (m *PrivatePositionsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivatePositionsResponse) UnmarshalBinary ¶
func (m *PrivatePositionsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivatePositionsResponseResult ¶
type PrivatePositionsResponseResult struct {
// average price for the position
// Required: true
AveragePrice *float64 `json:"averagePrice"`
// The base currency of the instrument
// Required: true
Currency *string `json:"currency"`
// The position delta
// Required: true
Delta *float64 `json:"delta"`
// The direction of the position. Can be "buy" (long) or "sell" (short)
// Required: true
Direction *string `json:"direction"`
// Estimated liquidation price
// Required: true
EstLiqPrice *float64 `json:"estLiqPrice"`
// floating PnL
// Required: true
FloatingPl *float64 `json:"floatingPl"`
// index price
// Required: true
IndexPrice *float64 `json:"indexPrice"`
// initial margin
// Required: true
InitialMargin *float64 `json:"initialMargin"`
// name of the instrument
// Required: true
Instrument *string `json:"instrument"`
// The type of instrument. "future" or "option"
// Required: true
Kind *string `json:"kind"`
// maintenance margin
// Required: true
MaintenanceMargin *float64 `json:"maintenanceMargin"`
// mark price
// Required: true
MarkPrice *float64 `json:"markPrice"`
// The margin used to back the position
// Required: true
OpenOrderMargin *float64 `json:"openOrderMargin"`
// The PnL for the position
// Required: true
ProfitLoss *float64 `json:"profitLoss"`
// realized PnL
// Required: true
RealizedPl *float64 `json:"realizedPl"`
// The settlement price for the instrument
// Required: true
SettlementPrice *float64 `json:"settlementPrice"`
// The position size in contracts. Can be negative (short) or positive (long)
// Required: true
Size *float64 `json:"size"`
// position size in BTC (0 if currency <>`BTC`)
// Required: true
SizeBtc *float64 `json:"sizeBtc"`
// position size in the base currency for the instrument
// Required: true
SizeCurrency *float64 `json:"sizeCurrency"`
}
PrivatePositionsResponseResult private positions response result swagger:model PrivatePositionsResponseResult
func (*PrivatePositionsResponseResult) MarshalBinary ¶
func (m *PrivatePositionsResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivatePositionsResponseResult) UnmarshalBinary ¶
func (m *PrivatePositionsResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateRemoveFromAddressBookResponse ¶
type PrivateRemoveFromAddressBookResponse struct {
// ok
// Required: true
Result *string `json:"result"`
}
PrivateRemoveFromAddressBookResponse private remove from address book response swagger:model private_remove_from_address_book_response
func (*PrivateRemoveFromAddressBookResponse) MarshalBinary ¶
func (m *PrivateRemoveFromAddressBookResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateRemoveFromAddressBookResponse) UnmarshalBinary ¶
func (m *PrivateRemoveFromAddressBookResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateSettlementResponse ¶
type PrivateSettlementResponse struct {
// result
// Required: true
Result []string `json:"result"`
}
PrivateSettlementResponse private settlement response swagger:model private_settlement_response
func (*PrivateSettlementResponse) MarshalBinary ¶
func (m *PrivateSettlementResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateSettlementResponse) UnmarshalBinary ¶
func (m *PrivateSettlementResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateSettlementhistoryResponse ¶
type PrivateSettlementhistoryResponse struct {
// result
// Required: true
Result *PrivateSettlementhistoryResponseResult `json:"result"`
}
PrivateSettlementhistoryResponse private settlementhistory response swagger:model private_settlementhistory_response
func (*PrivateSettlementhistoryResponse) MarshalBinary ¶
func (m *PrivateSettlementhistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateSettlementhistoryResponse) UnmarshalBinary ¶
func (m *PrivateSettlementhistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateSettlementhistoryResponseResult ¶
type PrivateSettlementhistoryResponseResult struct {
// Funded amount (bankruptcy only)
// Required: true
Funded *string `json:"funded"`
// Underlying index price at time of event (settlement and delivery only)
// Required: true
IndexPrice *float64 `json:"indexPrice"`
// instrument name (settlement and delivery only)
// Required: true
Instrument *string `json:"instrument"`
// Mark price for at the time (settlement and delivery only)
// Required: true
MarkPrice *float64 `json:"markPrice"`
// position size (settlement and delivery only)
// Required: true
Position *string `json:"position"`
// profit and loss (settlement and delivery only)
// Required: true
ProfitLoss *float64 `json:"profitLoss"`
// in BTC
// Required: true
SessionBankrupcy *float64 `json:"sessionBankrupcy"`
// session profit loss
// Required: true
SessionProfitLoss *string `json:"sessionProfitLoss"`
// in BTC
// Required: true
SessionTax *float64 `json:"sessionTax"`
// in BTC
// Required: true
SessionTaxRate *float64 `json:"sessionTaxRate"`
// The amount of the losses socialized
// Required: true
Socialized *float64 `json:"socialized"`
// The timestamp of the settlement
// Required: true
TimeStamp *int64 `json:"timeStamp"`
// type
// Required: true
Type SettlementType `json:"type"`
}
PrivateSettlementhistoryResponseResult private settlementhistory response result swagger:model PrivateSettlementhistoryResponseResult
func (*PrivateSettlementhistoryResponseResult) MarshalBinary ¶
func (m *PrivateSettlementhistoryResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateSettlementhistoryResponseResult) UnmarshalBinary ¶
func (m *PrivateSettlementhistoryResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateSubmitTransferResponse ¶
type PrivateSubmitTransferResponse struct {
// result
// Required: true
Result *TransferItem `json:"result"`
}
PrivateSubmitTransferResponse private submit transfer response swagger:model private_submit_transfer_response
func (*PrivateSubmitTransferResponse) MarshalBinary ¶
func (m *PrivateSubmitTransferResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateSubmitTransferResponse) UnmarshalBinary ¶
func (m *PrivateSubmitTransferResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateSubscribeResponse ¶
type PrivateSubscribeResponse struct {
// A list of subscribed channels.
// Required: true
Result []string `json:"result"`
}
PrivateSubscribeResponse private subscribe response swagger:model private_subscribe_response
func (*PrivateSubscribeResponse) MarshalBinary ¶
func (m *PrivateSubscribeResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateSubscribeResponse) UnmarshalBinary ¶
func (m *PrivateSubscribeResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateTradehistoryResponse ¶
type PrivateTradehistoryResponse struct {
// result
// Required: true
Result *PrivateTradehistoryResponseResult `json:"result"`
}
PrivateTradehistoryResponse private tradehistory response swagger:model private_tradehistory_response
func (*PrivateTradehistoryResponse) MarshalBinary ¶
func (m *PrivateTradehistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateTradehistoryResponse) UnmarshalBinary ¶
func (m *PrivateTradehistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateTradehistoryResponseResult ¶
type PrivateTradehistoryResponseResult struct {
// Trade direction of the taker
// Required: true
Direction *string `json:"direction"`
// Index price at trade
// Required: true
IndexPrice *string `json:"indexPrice"`
// The name of the instrument
// Required: true
Instrument *string `json:"instrument"`
// option implied volatility for the price (Options only)
// Required: true
Iv *string `json:"iv"`
// The price of the trade
// Required: true
Price *string `json:"price"`
// The quantity traded
// Required: true
Quantity *string `json:"quantity"`
// Direction of the "tick".
// Required: true
TickDirection *string `json:"tickDirection"`
// The timestamp of the trade in ms
// Required: true
TimeStamp *int64 `json:"timeStamp"`
// The ID for the trade
// Required: true
TradeID *string `json:"tradeId"`
// The trade sequence number
// Required: true
TradeSeq *string `json:"tradeSeq"`
}
PrivateTradehistoryResponseResult private tradehistory response result swagger:model PrivateTradehistoryResponseResult
func (*PrivateTradehistoryResponseResult) MarshalBinary ¶
func (m *PrivateTradehistoryResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateTradehistoryResponseResult) UnmarshalBinary ¶
func (m *PrivateTradehistoryResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PrivateWithdrawResponse ¶
type PrivateWithdrawResponse struct {
// result
// Required: true
Result *Withdrawal `json:"result"`
}
PrivateWithdrawResponse private withdraw response swagger:model private_withdraw_response
func (*PrivateWithdrawResponse) MarshalBinary ¶
func (m *PrivateWithdrawResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrivateWithdrawResponse) UnmarshalBinary ¶
func (m *PrivateWithdrawResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ProfitLoss ¶
type ProfitLoss float64
ProfitLoss Profit and loss in base currency. swagger:model profit_loss
type PublicAuthResponse ¶
type PublicAuthResponse struct {
// result
// Required: true
Result *PublicAuthResponseResult `json:"result"`
}
PublicAuthResponse public auth response swagger:model public_auth_response
func (*PublicAuthResponse) MarshalBinary ¶
func (m *PublicAuthResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicAuthResponse) UnmarshalBinary ¶
func (m *PublicAuthResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicAuthResponseResult ¶
type PublicAuthResponseResult struct {
// access token
// Required: true
AccessToken *string `json:"access_token"`
// Token lifetime in seconds
// Required: true
ExpiresIn *int64 `json:"expires_in"`
// Can be used to request a new token (with a new lifetime)
// Required: true
RefreshToken *string `json:"refresh_token"`
// Type of the access for assigned token
// Required: true
Scope *string `json:"scope"`
// Copied from the input (if applicable)
State string `json:"state,omitempty"`
// Authorization type, allowed value - `bearer`
// Required: true
// Enum: [bearer]
TokenType *string `json:"token_type"`
}
PublicAuthResponseResult public auth response result swagger:model PublicAuthResponseResult
func (*PublicAuthResponseResult) MarshalBinary ¶
func (m *PublicAuthResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicAuthResponseResult) UnmarshalBinary ¶
func (m *PublicAuthResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicCurrenciesResponse ¶
type PublicCurrenciesResponse struct {
// result
// Required: true
Result []Currency `json:"result"`
}
PublicCurrenciesResponse public currencies response swagger:model public_currencies_response
func (*PublicCurrenciesResponse) MarshalBinary ¶
func (m *PublicCurrenciesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicCurrenciesResponse) UnmarshalBinary ¶
func (m *PublicCurrenciesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetBookSummaryResponse ¶
type PublicGetBookSummaryResponse struct {
// result
// Required: true
Result []*BookSummary `json:"result"`
}
PublicGetBookSummaryResponse public get book summary response swagger:model public_get_book_summary_response
func (*PublicGetBookSummaryResponse) MarshalBinary ¶
func (m *PublicGetBookSummaryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetBookSummaryResponse) UnmarshalBinary ¶
func (m *PublicGetBookSummaryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetContractSizeResponse ¶
type PublicGetContractSizeResponse struct {
// result
// Required: true
Result *PublicGetContractSizeResponseResult `json:"result"`
}
PublicGetContractSizeResponse public get contract size response swagger:model public_get_contract_size_response
func (*PublicGetContractSizeResponse) MarshalBinary ¶
func (m *PublicGetContractSizeResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetContractSizeResponse) UnmarshalBinary ¶
func (m *PublicGetContractSizeResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetContractSizeResponseResult ¶
type PublicGetContractSizeResponseResult struct {
// contract size
// Required: true
ContractSize ContractSize `json:"contract_size"`
}
PublicGetContractSizeResponseResult public get contract size response result swagger:model PublicGetContractSizeResponseResult
func (*PublicGetContractSizeResponseResult) MarshalBinary ¶
func (m *PublicGetContractSizeResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetContractSizeResponseResult) UnmarshalBinary ¶
func (m *PublicGetContractSizeResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetFooterResponse ¶
type PublicGetFooterResponse struct {
// Required: true
Result []*PublicGetFooterResponseResultItems0 `json:"result"`
}
PublicGetFooterResponse public get footer response swagger:model public_get_footer_response
func (*PublicGetFooterResponse) MarshalBinary ¶
func (m *PublicGetFooterResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetFooterResponse) UnmarshalBinary ¶
func (m *PublicGetFooterResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetFooterResponseResultItems0 ¶
type PublicGetFooterResponseResultItems0 struct {
// Required: true
Name *string `json:"name"`
// Required: true
TitleEn *string `json:"title_en"`
TitleJa string `json:"title_ja,omitempty"`
TitleKo string `json:"title_ko,omitempty"`
TitleRu string `json:"title_ru,omitempty"`
TitleZh string `json:"title_zh,omitempty"`
// Required: true
Type *string `json:"type"`
}
PublicGetFooterResponseResultItems0 public get footer response result items0 swagger:model PublicGetFooterResponseResultItems0
func (*PublicGetFooterResponseResultItems0) MarshalBinary ¶
func (m *PublicGetFooterResponseResultItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetFooterResponseResultItems0) UnmarshalBinary ¶
func (m *PublicGetFooterResponseResultItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetFundingChartDataResponse ¶
type PublicGetFundingChartDataResponse struct {
// result
// Required: true
Result *PublicGetFundingChartDataResponseResult `json:"result"`
}
PublicGetFundingChartDataResponse public get funding chart data response swagger:model public_get_funding_chart_data_response
func (*PublicGetFundingChartDataResponse) MarshalBinary ¶
func (m *PublicGetFundingChartDataResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetFundingChartDataResponse) UnmarshalBinary ¶
func (m *PublicGetFundingChartDataResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetFundingChartDataResponseResult ¶
type PublicGetFundingChartDataResponseResult struct {
// Current interest
// Required: true
CurrentInterest *float64 `json:"current_interest"`
// data
// Required: true
Data []string `json:"data"`
// Current index price
// Required: true
IndexPrice *float64 `json:"index_price"`
// Current interest 8h
// Required: true
Interest8h *float64 `json:"interest_8h"`
// maximal interest
// Required: true
Max *float64 `json:"max"`
}
PublicGetFundingChartDataResponseResult public get funding chart data response result swagger:model PublicGetFundingChartDataResponseResult
func (*PublicGetFundingChartDataResponseResult) MarshalBinary ¶
func (m *PublicGetFundingChartDataResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetFundingChartDataResponseResult) UnmarshalBinary ¶
func (m *PublicGetFundingChartDataResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetInstrumentsResponse ¶
type PublicGetInstrumentsResponse struct {
// result
// Required: true
Result []*Instrument `json:"result"`
}
PublicGetInstrumentsResponse public get instruments response swagger:model public_get_instruments_response
func (*PublicGetInstrumentsResponse) MarshalBinary ¶
func (m *PublicGetInstrumentsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetInstrumentsResponse) UnmarshalBinary ¶
func (m *PublicGetInstrumentsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetOptionMarkPricesResponse ¶
type PublicGetOptionMarkPricesResponse struct {
// Object with instrument names as keys and two elements arrays as value. First element in array is mark price and second one is iv.
// Required: true
Result interface{} `json:"result"`
}
PublicGetOptionMarkPricesResponse public get option mark prices response swagger:model public_get_option_mark_prices_response
func (*PublicGetOptionMarkPricesResponse) MarshalBinary ¶
func (m *PublicGetOptionMarkPricesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetOptionMarkPricesResponse) UnmarshalBinary ¶
func (m *PublicGetOptionMarkPricesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetOrderBookResponse ¶
type PublicGetOrderBookResponse struct {
// result
// Required: true
Result *TickerNotificationWithBidsAndAsks `json:"result"`
}
PublicGetOrderBookResponse public get order book response swagger:model public_get_order_book_response
func (*PublicGetOrderBookResponse) MarshalBinary ¶
func (m *PublicGetOrderBookResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetOrderBookResponse) UnmarshalBinary ¶
func (m *PublicGetOrderBookResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetTradesVolumesResponse ¶
type PublicGetTradesVolumesResponse struct {
// result
// Required: true
Result []*TradesVolumes `json:"result"`
}
PublicGetTradesVolumesResponse public get trades volumes response swagger:model public_get_trades_volumes_response
func (*PublicGetTradesVolumesResponse) MarshalBinary ¶
func (m *PublicGetTradesVolumesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetTradesVolumesResponse) UnmarshalBinary ¶
func (m *PublicGetTradesVolumesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetlasttradesResponse ¶
type PublicGetlasttradesResponse struct {
// result
// Required: true
Result *PublicGetlasttradesResponseResult `json:"result"`
}
PublicGetlasttradesResponse public getlasttrades response swagger:model public_getlasttrades_response
func (*PublicGetlasttradesResponse) MarshalBinary ¶
func (m *PublicGetlasttradesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetlasttradesResponse) UnmarshalBinary ¶
func (m *PublicGetlasttradesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetlasttradesResponseResult ¶
type PublicGetlasttradesResponseResult struct {
// Trade direction of the taker
// Required: true
Direction *string `json:"direction"`
// Index price at trade
// Required: true
IndexPrice *string `json:"indexPrice"`
// The name of the instrument
// Required: true
Instrument *string `json:"instrument"`
// option implied volatility for the price (Options only)
// Required: true
Iv *string `json:"iv"`
// The price of the trade
// Required: true
Price *string `json:"price"`
// The quantity traded
// Required: true
Quantity *string `json:"quantity"`
// Direction of the "tick". 0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick
// Required: true
TickDirection *string `json:"tickDirection"`
// The timestamp of the trade in ms
// Required: true
TimeStamp *int64 `json:"timeStamp"`
// The ID for the trade
// Required: true
TradeID *string `json:"tradeId"`
// The trade sequence number
// Required: true
TradeSeq *string `json:"tradeSeq"`
}
PublicGetlasttradesResponseResult public getlasttrades response result swagger:model PublicGetlasttradesResponseResult
func (*PublicGetlasttradesResponseResult) MarshalBinary ¶
func (m *PublicGetlasttradesResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetlasttradesResponseResult) UnmarshalBinary ¶
func (m *PublicGetlasttradesResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetorderbookResponse ¶
type PublicGetorderbookResponse struct {
// result
// Required: true
Result *PublicGetorderbookResponseResult `json:"result"`
}
PublicGetorderbookResponse public getorderbook response swagger:model public_getorderbook_response
func (*PublicGetorderbookResponse) MarshalBinary ¶
func (m *PublicGetorderbookResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetorderbookResponse) UnmarshalBinary ¶
func (m *PublicGetorderbookResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicGetorderbookResponseResult ¶
type PublicGetorderbookResponseResult struct {
// (Only for option) implied volatility for best ask
// Required: true
AskIv *float64 `json:"askIv"`
// The list of all asks, best ask first. See below for entry details
// Required: true
Asks []string `json:"asks"`
// (Only for option) implied volatility for best bid
// Required: true
BidIv *float64 `json:"bidIv"`
// The list of all bids, best bid first. See below for entry details
// Required: true
Bids []string `json:"bids"`
// The cumulative quantity
// Required: true
Cm *float64 `json:"cm"`
// The settlement price for this instrument. Only when `state=closed`
// Required: true
DeliveryPrice *float64 `json:"deliveryPrice"`
// (Only for options) The delta value for the option
// Required: true
Delta *float64 `json:"delta"`
// (Only for options) The gamma value for the option
// Required: true
Gamma *float64 `json:"gamma"`
// The 24h high for the instrument
// Required: true
High *float64 `json:"high"`
// (Only for option) Interest rate used for implied volatility calculations
// Required: true
IR *float64 `json:"iR"`
// The name of the instrument.
// Required: true
Instrument *string `json:"instrument"`
// The price for the last trade
// Required: true
Last *float64 `json:"last"`
// The 24h low for the instrument
// Required: true
Low *float64 `json:"low"`
// The mark price for the instrument
// Required: true
Mark *float64 `json:"mark"`
// (Only for option) implied volatility for mark price
// Required: true
MarkIv *float64 `json:"markIv"`
// (Only for futures) The maximum price for the future. Any buy orders you submit higher than this price, will be clamped to this maximum.
// Required: true
Max *float64 `json:"max"`
// (Only for futures) The minimum price for the future. Any sell orders you submit lower than this price will be clamped to this minimum.
// Required: true
Min *float64 `json:"min"`
// (Only for options)The order id of an unfilled order you have at this price. This field only shows if you have an order at this price level, and the request has been [signed](rpc-authentication.md).
// Required: true
Oid *float64 `json:"oid"`
// The price level
// Required: true
Price *float64 `json:"price"`
// The total quantity of orders for this price level
// Required: true
Quantity *float64 `json:"quantity"`
// The settlement price for this instrument. Only when `state=open`
// Required: true
SettlementPrice *float64 `json:"settlementPrice"`
// The state of the order book. Possible values are `"open"` and `"closed"`.
// Required: true
State *string `json:"state"`
// (Only for option) The theta value for the option
// Required: true
Theta *float64 `json:"theta"`
// The order book timestamp in milliseconds
// Required: true
Tstamp *int64 `json:"tstamp"`
// (Only for option) underlying future instrument name or `"index_price"`
// Required: true
UIx *float64 `json:"uIx"`
// (Only for option) underlying price used for ask/bid implied volatility
// Required: true
UPx *float64 `json:"uPx"`
// (Only for option) The vega value for the option
// Required: true
Vega *float64 `json:"vega"`
}
PublicGetorderbookResponseResult public getorderbook response result swagger:model PublicGetorderbookResponseResult
func (*PublicGetorderbookResponseResult) MarshalBinary ¶
func (m *PublicGetorderbookResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicGetorderbookResponseResult) UnmarshalBinary ¶
func (m *PublicGetorderbookResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicHistoricalVolatilityResponse ¶
type PublicHistoricalVolatilityResponse struct {
// result
// Required: true
Result []string `json:"result"`
}
PublicHistoricalVolatilityResponse public historical volatility response swagger:model public_historical_volatility_response
func (*PublicHistoricalVolatilityResponse) MarshalBinary ¶
func (m *PublicHistoricalVolatilityResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicHistoricalVolatilityResponse) UnmarshalBinary ¶
func (m *PublicHistoricalVolatilityResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicIndexResponse ¶
type PublicIndexResponse struct {
// result
// Required: true
Result *PublicIndexResponseResult `json:"result"`
}
PublicIndexResponse public index response swagger:model public_index_response
func (*PublicIndexResponse) MarshalBinary ¶
func (m *PublicIndexResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicIndexResponse) UnmarshalBinary ¶
func (m *PublicIndexResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicIndexResponseResult ¶
type PublicIndexResponseResult struct {
// The current index price for BTC-USD (only for selected currency == BTC)
// Required: true
BTC *float64 `json:"BTC"`
// The current index price for ETH-USD (only for selected currency == ETH)
ETH float64 `json:"ETH,omitempty"`
// Estimated delivery price for the currency. For more details, see Documentation > General > Expiration Price
// Required: true
Edp *float64 `json:"edp"`
}
PublicIndexResponseResult public index response result swagger:model PublicIndexResponseResult
func (*PublicIndexResponseResult) MarshalBinary ¶
func (m *PublicIndexResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicIndexResponseResult) UnmarshalBinary ¶
func (m *PublicIndexResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTestResponse ¶
type PublicTestResponse struct {
// result
// Required: true
Result *PublicTestResponseResult `json:"result"`
}
PublicTestResponse public test response swagger:model public_test_response
func (*PublicTestResponse) MarshalBinary ¶
func (m *PublicTestResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTestResponse) UnmarshalBinary ¶
func (m *PublicTestResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTestResponseResult ¶
type PublicTestResponseResult struct {
// The API version
// Required: true
Version *string `json:"version"`
}
PublicTestResponseResult public test response result swagger:model PublicTestResponseResult
func (*PublicTestResponseResult) MarshalBinary ¶
func (m *PublicTestResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTestResponseResult) UnmarshalBinary ¶
func (m *PublicTestResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTickerResponse ¶
type PublicTickerResponse struct {
// result
// Required: true
Result *TickerNotification `json:"result"`
}
PublicTickerResponse public ticker response swagger:model public_ticker_response
func (*PublicTickerResponse) MarshalBinary ¶
func (m *PublicTickerResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTickerResponse) UnmarshalBinary ¶
func (m *PublicTickerResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTrade ¶
type PublicTrade struct {
// Trade amount. For perpetual and futures - in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
// Required: true
Amount *float64 `json:"amount"`
// Trade direction of the taker
// Required: true
Direction Direction `json:"direction"`
// Index Price at the moment of trade
// Required: true
IndexPrice *float64 `json:"index_price"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// Option implied volatility for the price (Option only)
Iv float64 `json:"iv,omitempty"`
// The price of the trade
// Required: true
Price Price `json:"price"`
// tick direction
// Required: true
TickDirection TickDirection `json:"tick_direction"`
// The timestamp of the trade
// Required: true
Timestamp *int64 `json:"timestamp"`
// trade id
// Required: true
TradeID TradeID `json:"trade_id"`
// trade seq
// Required: true
TradeSeq TradeSeq `json:"trade_seq"`
}
PublicTrade public trade swagger:model public_trade
func (*PublicTrade) MarshalBinary ¶
func (m *PublicTrade) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTrade) UnmarshalBinary ¶
func (m *PublicTrade) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTradesHistoryResponse ¶
type PublicTradesHistoryResponse struct {
// result
// Required: true
Result *PublicTradesHistoryResponseResult `json:"result"`
}
PublicTradesHistoryResponse public trades history response swagger:model public_trades_history_response
func (*PublicTradesHistoryResponse) MarshalBinary ¶
func (m *PublicTradesHistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTradesHistoryResponse) UnmarshalBinary ¶
func (m *PublicTradesHistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicTradesHistoryResponseResult ¶
type PublicTradesHistoryResponseResult struct {
// has more
// Required: true
HasMore *bool `json:"has_more"`
// trades
// Required: true
Trades []*PublicTrade `json:"trades"`
}
PublicTradesHistoryResponseResult public trades history response result swagger:model PublicTradesHistoryResponseResult
func (*PublicTradesHistoryResponseResult) MarshalBinary ¶
func (m *PublicTradesHistoryResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicTradesHistoryResponseResult) UnmarshalBinary ¶
func (m *PublicTradesHistoryResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Quantity ¶
type Quantity float64
Quantity The number of contracts to be traded. swagger:model quantity
type QuoteNotification ¶
type QuoteNotification struct {
// best ask amount
// Required: true
BestAskAmount BestAskAmount `json:"best_ask_amount"`
// best ask price
// Required: true
BestAskPrice BestAskPrice `json:"best_ask_price"`
// best bid amount
// Required: true
BestBidAmount BestBidAmount `json:"best_bid_amount"`
// best bid price
// Required: true
BestBidPrice BestBidPrice `json:"best_bid_price"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// timestamp
// Required: true
Timestamp Timestamp `json:"timestamp"`
}
QuoteNotification quote notification swagger:model quote_notification
func (*QuoteNotification) MarshalBinary ¶
func (m *QuoteNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*QuoteNotification) UnmarshalBinary ¶
func (m *QuoteNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ReduceOnly ¶
type ReduceOnly bool
ReduceOnly `true` for reduce-only orders only swagger:model reduce_only
type ResultCount ¶
type ResultCount int64
ResultCount Total number of results available swagger:model result_count
type Settlement ¶
type Settlement struct {
// funded amount (bankruptcy only)
Funded float64 `json:"funded,omitempty"`
// funding (in base currency ; settlement for perpetual product only)
// Required: true
Funding *float64 `json:"funding"`
// underlying index price at time of event (in quote currency; settlement and delivery only)
// Required: true
IndexPrice *float64 `json:"index_price"`
// instrument name (settlement and delivery only)
// Required: true
InstrumentName *string `json:"instrument_name"`
// mark price for at the settlement time (in quote currency; settlement and delivery only)
MarkPrice float64 `json:"mark_price,omitempty"`
// position size (in quote currency; settlement and delivery only)
// Required: true
Position *float64 `json:"position"`
// profit and loss (in base currency; settlement and delivery only)
ProfitLoss float64 `json:"profit_loss,omitempty"`
// value of session bankrupcy (in base currency; bankruptcy only)
SessionBankrupcy float64 `json:"session_bankrupcy,omitempty"`
// total value of session profit and losses (in base currency)
// Required: true
SessionProfitLoss *float64 `json:"session_profit_loss"`
// total amount of paid taxes/fees (in base currency; bankruptcy only)
SessionTax float64 `json:"session_tax,omitempty"`
// rate of paid texes/fees (in base currency; bankruptcy only)
SessionTaxRate float64 `json:"session_tax_rate,omitempty"`
// the amount of the socialized losses (in base currency; bankruptcy only)
Socialized float64 `json:"socialized,omitempty"`
// timestamp
// Required: true
Timestamp Timestamp `json:"timestamp"`
// type
// Required: true
Type SettlementType `json:"type"`
}
Settlement settlement swagger:model settlement
func (*Settlement) MarshalBinary ¶
func (m *Settlement) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Settlement) UnmarshalBinary ¶
func (m *Settlement) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SettlementPrice ¶
type SettlementPrice float64
SettlementPrice The settlement price for the instrument. Only when `state = open` swagger:model settlement_price
type SettlementResponse ¶
type SettlementResponse struct {
// result
// Required: true
Result *SettlementResponseResult `json:"result"`
}
SettlementResponse settlement response swagger:model settlement_response
func (*SettlementResponse) MarshalBinary ¶
func (m *SettlementResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SettlementResponse) UnmarshalBinary ¶
func (m *SettlementResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SettlementResponseResult ¶
type SettlementResponseResult struct {
// continuation
// Required: true
Continuation Continuation `json:"continuation"`
// settlements
// Required: true
Settlements []*Settlement `json:"settlements"`
}
SettlementResponseResult settlement response result swagger:model SettlementResponseResult
func (*SettlementResponseResult) MarshalBinary ¶
func (m *SettlementResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SettlementResponseResult) UnmarshalBinary ¶
func (m *SettlementResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SettlementType ¶
type SettlementType string
SettlementType The type of settlement. `settlement`, `delivery` or `bankruptcy`. swagger:model settlement_type
const ( // SettlementTypeSettlement captures enum value "settlement" SettlementTypeSettlement SettlementType = "settlement" // SettlementTypeDelivery captures enum value "delivery" SettlementTypeDelivery SettlementType = "delivery" // SettlementTypeBankruptcy captures enum value "bankruptcy" SettlementTypeBankruptcy SettlementType = "bankruptcy" )
type SimpleOrderType ¶
type SimpleOrderType string
SimpleOrderType Order type, `"all"`, `"limit"`, `"stop"` swagger:model simple_order_type
const ( // SimpleOrderTypeAll captures enum value "all" SimpleOrderTypeAll SimpleOrderType = "all" // SimpleOrderTypeLimit captures enum value "limit" SimpleOrderTypeLimit SimpleOrderType = "limit" // SimpleOrderTypeStop captures enum value "stop" SimpleOrderTypeStop SimpleOrderType = "stop" )
type Stats ¶
type Stats struct {
// highest price during 24h
// Required: true
High *float64 `json:"high"`
// lowest price during 24h
// Required: true
Low *float64 `json:"low"`
// volume during last 24h in base currency
// Required: true
Volume *float64 `json:"volume"`
}
Stats stats swagger:model stats
func (*Stats) MarshalBinary ¶
MarshalBinary interface implementation
func (*Stats) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type StopPrice ¶
type StopPrice float64
StopPrice stop price (Only for future stop orders) swagger:model stop_price
type TickDirection ¶
type TickDirection int64
TickDirection Direction of the "tick" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick). swagger:model tick_direction
type TickerNotification ¶
type TickerNotification struct {
// ask iv
AskIv AskIv `json:"ask_iv,omitempty"`
// best ask amount
// Required: true
BestAskAmount BestAskAmount `json:"best_ask_amount"`
// best ask price
// Required: true
BestAskPrice BestAskPrice `json:"best_ask_price"`
// best bid amount
// Required: true
BestBidAmount BestBidAmount `json:"best_bid_amount"`
// best bid price
// Required: true
BestBidPrice BestBidPrice `json:"best_bid_price"`
// bid iv
BidIv BidIv `json:"bid_iv,omitempty"`
// current funding
CurrentFunding CurrentFunding `json:"current_funding,omitempty"`
// delivery price
DeliveryPrice DeliveryPrice `json:"delivery_price,omitempty"`
// funding 8h
Funding8h Funding8h `json:"funding_8h,omitempty"`
// greeks
Greeks *Greeks `json:"greeks,omitempty"`
// index price
// Required: true
IndexPrice IndexPrice `json:"index_price"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// interest rate
InterestRate InterestRate `json:"interest_rate,omitempty"`
// last price
// Required: true
LastPrice LastPrice `json:"last_price"`
// mark iv
MarkIv MarkIv `json:"mark_iv,omitempty"`
// mark price
// Required: true
MarkPrice MarkPrice `json:"mark_price"`
// max price
// Required: true
MaxPrice MaxPrice `json:"max_price"`
// min price
// Required: true
MinPrice MinPrice `json:"min_price"`
// open interest
// Required: true
OpenInterest OpenInterest `json:"open_interest"`
// settlement price
SettlementPrice SettlementPrice `json:"settlement_price,omitempty"`
// state
// Required: true
State BookState `json:"state"`
// stats
// Required: true
Stats *Stats `json:"stats"`
// timestamp
// Required: true
Timestamp Timestamp `json:"timestamp"`
// underlying index
UnderlyingIndex UnderlyingIndex `json:"underlying_index,omitempty"`
// underlying price
UnderlyingPrice UnderlyingPrice `json:"underlying_price,omitempty"`
}
TickerNotification ticker notification swagger:model ticker_notification
func (*TickerNotification) MarshalBinary ¶
func (m *TickerNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TickerNotification) UnmarshalBinary ¶
func (m *TickerNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TickerNotificationWithBidsAndAsks ¶
type TickerNotificationWithBidsAndAsks struct {
// ask iv
AskIv AskIv `json:"ask_iv,omitempty"`
// asks
// Required: true
Asks Asks `json:"asks"`
// best ask amount
// Required: true
BestAskAmount BestAskAmount `json:"best_ask_amount"`
// best ask price
// Required: true
BestAskPrice BestAskPrice `json:"best_ask_price"`
// best bid amount
// Required: true
BestBidAmount BestBidAmount `json:"best_bid_amount"`
// best bid price
// Required: true
BestBidPrice BestBidPrice `json:"best_bid_price"`
// bid iv
BidIv BidIv `json:"bid_iv,omitempty"`
// bids
// Required: true
Bids Bids `json:"bids"`
// current funding
CurrentFunding CurrentFunding `json:"current_funding,omitempty"`
// delivery price
DeliveryPrice DeliveryPrice `json:"delivery_price,omitempty"`
// funding 8h
Funding8h Funding8h `json:"funding_8h,omitempty"`
// greeks
Greeks *Greeks `json:"greeks,omitempty"`
// index price
// Required: true
IndexPrice IndexPrice `json:"index_price"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// interest rate
InterestRate InterestRate `json:"interest_rate,omitempty"`
// last price
// Required: true
LastPrice LastPrice `json:"last_price"`
// mark iv
MarkIv MarkIv `json:"mark_iv,omitempty"`
// mark price
// Required: true
MarkPrice MarkPrice `json:"mark_price"`
// max price
// Required: true
MaxPrice MaxPrice `json:"max_price"`
// min price
// Required: true
MinPrice MinPrice `json:"min_price"`
// open interest
// Required: true
OpenInterest OpenInterest `json:"open_interest"`
// settlement price
SettlementPrice SettlementPrice `json:"settlement_price,omitempty"`
// state
// Required: true
State BookState `json:"state"`
// stats
// Required: true
Stats *Stats `json:"stats"`
// timestamp
// Required: true
Timestamp Timestamp `json:"timestamp"`
// underlying index
UnderlyingIndex UnderlyingIndex `json:"underlying_index,omitempty"`
// underlying price
UnderlyingPrice UnderlyingPrice `json:"underlying_price,omitempty"`
}
TickerNotificationWithBidsAndAsks ticker notification with bids and asks swagger:model ticker_notification_with_bids_and_asks
func (*TickerNotificationWithBidsAndAsks) MarshalBinary ¶
func (m *TickerNotificationWithBidsAndAsks) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TickerNotificationWithBidsAndAsks) UnmarshalBinary ¶
func (m *TickerNotificationWithBidsAndAsks) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TimeInForce ¶
type TimeInForce string
TimeInForce Order time in force: `"good_til_cancelled"`, `"fill_or_kill"`, `"immediate_or_cancel"` swagger:model time_in_force
const ( // TimeInForceGoodTilCancelled captures enum value "good_til_cancelled" TimeInForceGoodTilCancelled TimeInForce = "good_til_cancelled" // TimeInForceFillOrKill captures enum value "fill_or_kill" TimeInForceFillOrKill TimeInForce = "fill_or_kill" // TimeInForceImmediateOrCancel captures enum value "immediate_or_cancel" TimeInForceImmediateOrCancel TimeInForce = "immediate_or_cancel" )
type Timestamp ¶
type Timestamp int64
Timestamp The timestamp (seconds since the Unix epoch, with millisecond precision) swagger:model timestamp
type TimestampForBookNotifications ¶
type TimestampForBookNotifications int64
TimestampForBookNotifications The timestamp of last change (seconds since the Unix epoch, with millisecond precision) swagger:model timestamp_for_book_notifications
type Trade ¶
type Trade struct {
// user defined label
// Required: true
Label *string `json:"label"`
// Matching order id
// Required: true
MatchingID *int64 `json:"matchingId"`
// price
// Required: true
Price *float64 `json:"price"`
// Trade quantity
// Required: true
Quantity *int64 `json:"quantity"`
// true if the trade is against own order. This can only happen when your account has self-trading enabled. Contact an administrator if you think you need that.
// Required: true
SelfTrade *bool `json:"selfTrade"`
// Trade sequence number for the instrument
// Required: true
TradeSeq *int64 `json:"tradeSeq"`
}
Trade trade swagger:model trade
func (*Trade) MarshalBinary ¶
MarshalBinary interface implementation
func (*Trade) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TradeID ¶
type TradeID string
TradeID Unique (per currency) trade identifier swagger:model trade_id
type TradeSeq ¶
type TradeSeq int64
TradeSeq The sequence number of the trade within instrument swagger:model trade_seq
type TradesVolumes ¶
type TradesVolumes struct {
// Total 24h trade volume for call options. This is expressed in the base currency, e.g. BTC for `btc_usd`
// Required: true
CallsVolume *float64 `json:"calls_volume"`
// Currency pair: `"btc_usd"` or `"eth_usd"`
// Required: true
// Enum: [btc_usd eth_usd]
CurrencyPair *string `json:"currency_pair"`
// Total 24h trade volume for futures. This is expressed in the base currency, e.g. BTC for `btc_usd`
// Required: true
FuturesVolume *float64 `json:"futures_volume"`
// Total 24h trade volume for put options. This is expressed in the base currency, e.g. BTC for `btc_usd`
// Required: true
PutsVolume *float64 `json:"puts_volume"`
}
TradesVolumes trades volumes swagger:model trades_volumes
func (*TradesVolumes) MarshalBinary ¶
func (m *TradesVolumes) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TradesVolumes) UnmarshalBinary ¶
func (m *TradesVolumes) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TransferDirection ¶
type TransferDirection string
TransferDirection Transfer direction swagger:model transfer_direction
const ( // TransferDirectionPayment captures enum value "payment" TransferDirectionPayment TransferDirection = "payment" // TransferDirectionIncome captures enum value "income" TransferDirectionIncome TransferDirection = "income" )
type TransferItem ¶
type TransferItem struct {
// amount
// Required: true
Amount CurrencyAmount `json:"amount"`
// created timestamp
// Required: true
CreatedTimestamp Timestamp `json:"created_timestamp"`
// currency
// Required: true
Currency Currency `json:"currency"`
// direction
Direction TransferDirection `json:"direction,omitempty"`
// id
// Required: true
ID TransferID `json:"id"`
// other side
// Required: true
OtherSide TransferOtherSide `json:"other_side"`
// state
// Required: true
State TransferState `json:"state"`
// type
// Required: true
Type TransferType `json:"type"`
// updated timestamp
// Required: true
UpdatedTimestamp Timestamp `json:"updated_timestamp"`
}
TransferItem transfer item swagger:model transfer_item
func (*TransferItem) MarshalBinary ¶
func (m *TransferItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TransferItem) UnmarshalBinary ¶
func (m *TransferItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TransferOtherSide ¶
type TransferOtherSide string
TransferOtherSide For transfer from/to subaccount returns this subaccount name, for transfer to other account returns address, for transfer from other account returns that accounts username. swagger:model transfer_other_side
type TransferState ¶
type TransferState string
TransferState Transfer state, allowed values : `prepared`, `confirmed`, `cancelled`, `waiting_for_admin`, `rejection_reason` swagger:model transfer_state
const ( // TransferStatePrepared captures enum value "prepared" TransferStatePrepared TransferState = "prepared" // TransferStateConfirmed captures enum value "confirmed" TransferStateConfirmed TransferState = "confirmed" // TransferStateCancelled captures enum value "cancelled" TransferStateCancelled TransferState = "cancelled" // TransferStateWaitingForAdmin captures enum value "waiting_for_admin" TransferStateWaitingForAdmin TransferState = "waiting_for_admin" // TransferStateRejectionReason captures enum value "rejection_reason" TransferStateRejectionReason TransferState = "rejection_reason" )
type TransferType ¶
type TransferType string
TransferType Type of transfer: `user` - sent to user, `subaccount` - sent to subaccount swagger:model transfer_type
const ( // TransferTypeUser captures enum value "user" TransferTypeUser TransferType = "user" // TransferTypeSubaccount captures enum value "subaccount" TransferTypeSubaccount TransferType = "subaccount" )
type Trigger ¶
type Trigger string
Trigger Trigger type (Only for stop orders). Allowed values: `"index_price"`, `"mark_price"`, `"last_price"`. swagger:model trigger
type Triggered ¶
type Triggered bool
Triggered Whether the stop order has been triggered (Only for stop orders) swagger:model triggered
type UnderlyingIndex ¶
type UnderlyingIndex float64
UnderlyingIndex Name of the underlying future, or `index_price` (options only) swagger:model underlying_index
type UnderlyingPrice ¶
type UnderlyingPrice float64
UnderlyingPrice Underlying price for implied volatility calculations (options only) swagger:model underlying_price
type UserPortfolioNotification ¶
type UserPortfolioNotification struct {
// The account's available funds
// Required: true
AvailableFunds *float64 `json:"available_funds"`
// The account's available to withdrawal funds
// Required: true
AvailableWithdrawalFunds *float64 `json:"available_withdrawal_funds"`
// The account's balance
// Required: true
Balance *float64 `json:"balance"`
// The selected currency
// Required: true
Currency *string `json:"currency"`
// The sum of position deltas
// Required: true
DeltaTotal *float64 `json:"delta_total"`
// The account's current equity
// Required: true
Equity *float64 `json:"equity"`
// Futures profit and Loss
// Required: true
FuturesPl *float64 `json:"futures_pl"`
// Futures session realized profit and Loss
// Required: true
FuturesSessionRpl *float64 `json:"futures_session_rpl"`
// Futures session unrealized profit and Loss
// Required: true
FuturesSessionUpl *float64 `json:"futures_session_upl"`
// The account's initial margin
// Required: true
InitialMargin *float64 `json:"initial_margin"`
// The maintenance margin.
// Required: true
MaintenanceMargin *float64 `json:"maintenance_margin"`
// The account's margin balance
// Required: true
MarginBalance *float64 `json:"margin_balance"`
// Options summary delta
// Required: true
OptionsDelta *float64 `json:"options_delta"`
// Options summary gamma
// Required: true
OptionsGamma *float64 `json:"options_gamma"`
// Options profit and Loss
// Required: true
OptionsPl *float64 `json:"options_pl"`
// Options session realized profit and Loss
// Required: true
OptionsSessionRpl *float64 `json:"options_session_rpl"`
// Options session unrealized profit and Loss
// Required: true
OptionsSessionUpl *float64 `json:"options_session_upl"`
// Options summary theta
// Required: true
OptionsTheta *float64 `json:"options_theta"`
// Options summary vega
// Required: true
OptionsVega *float64 `json:"options_vega"`
// When `true` portfolio margining is enabled for user
// Required: true
PortfolioMarginingEnabled *bool `json:"portfolio_margining_enabled"`
// Projected initial margin (for portfolio margining users)
ProjectedInitialMargin float64 `json:"projected_initial_margin,omitempty"`
// Projected maintenance margin (for portfolio margining users)
ProjectedMaintenanceMargin float64 `json:"projected_maintenance_margin,omitempty"`
// Session funding
// Required: true
SessionFunding *float64 `json:"session_funding"`
// Session realized profit and loss
// Required: true
SessionRpl *float64 `json:"session_rpl"`
// Session unrealized profit and loss
// Required: true
SessionUpl *float64 `json:"session_upl"`
// Profit and loss
// Required: true
TotalPl *float64 `json:"total_pl"`
}
UserPortfolioNotification user portfolio notification swagger:model user_portfolio_notification
func (*UserPortfolioNotification) MarshalBinary ¶
func (m *UserPortfolioNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserPortfolioNotification) UnmarshalBinary ¶
func (m *UserPortfolioNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserTrade ¶
type UserTrade struct {
// Trade amount. For perpetual and futures - in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
// Required: true
Amount *float64 `json:"amount"`
// Trade direction of the taker
// Required: true
Direction Direction `json:"direction"`
// User's fee in units of the specified `fee_currency`
// Required: true
Fee *float64 `json:"fee"`
// fee currency
// Required: true
FeeCurrency Currency `json:"fee_currency"`
// Index Price at the moment of trade
// Required: true
IndexPrice *float64 `json:"index_price"`
// instrument name
// Required: true
InstrumentName InstrumentName `json:"instrument_name"`
// Option implied volatility for the price (Option only)
Iv float64 `json:"iv,omitempty"`
// User defined label (presented only when previously set for order by user)
Label string `json:"label,omitempty"`
// Describes what was role of users order: `"M"` when it was maker order, `"T"` when it was taker order
// Enum: [M T]
Liquidity string `json:"liquidity,omitempty"`
// Always `null`, except for a self-trade which is possible only if self-trading is switched on for the account (in that case this will be id of the maker order of the subscriber)
// Required: true
MatchingID *string `json:"matching_id"`
// Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
// Required: true
OrderID *string `json:"order_id"`
// Order type: `"limit`, `"market"`, or `"liquidation"`
// Enum: [limit market liquidation]
OrderType string `json:"order_type,omitempty"`
// The price of the trade
// Required: true
Price Price `json:"price"`
// `true` if the trade is against own order. This can only happen when your account has self-trading enabled. Contact an administrator if you think you need that
// Required: true
SelfTrade *bool `json:"self_trade"`
// state
// Required: true
State OrderStateInUserTrade `json:"state"`
// tick direction
// Required: true
TickDirection TickDirection `json:"tick_direction"`
// The timestamp of the trade
// Required: true
Timestamp *int64 `json:"timestamp"`
// trade id
// Required: true
TradeID TradeID `json:"trade_id"`
// trade seq
// Required: true
TradeSeq TradeSeq `json:"trade_seq"`
}
UserTrade user trade swagger:model user_trade
func (*UserTrade) MarshalBinary ¶
MarshalBinary interface implementation
func (*UserTrade) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type UserTradesByOrderResponse ¶
type UserTradesByOrderResponse []*UserTrade
UserTradesByOrderResponse user trades by order response swagger:model user_trades_by_order_response
type UserTradesHistoryResponse ¶
type UserTradesHistoryResponse struct {
// result
// Required: true
Result *UserTradesHistoryResponseResult `json:"result"`
}
UserTradesHistoryResponse user trades history response swagger:model user_trades_history_response
func (*UserTradesHistoryResponse) MarshalBinary ¶
func (m *UserTradesHistoryResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserTradesHistoryResponse) UnmarshalBinary ¶
func (m *UserTradesHistoryResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserTradesHistoryResponseResult ¶
type UserTradesHistoryResponseResult struct {
// has more
// Required: true
HasMore *bool `json:"has_more"`
// trades
// Required: true
Trades []*UserTrade `json:"trades"`
}
UserTradesHistoryResponseResult user trades history response result swagger:model UserTradesHistoryResponseResult
func (*UserTradesHistoryResponseResult) MarshalBinary ¶
func (m *UserTradesHistoryResponseResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserTradesHistoryResponseResult) UnmarshalBinary ¶
func (m *UserTradesHistoryResponseResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WalletAddressType ¶
type WalletAddressType string
WalletAddressType Address type/purpose, allowed values : `deposit`, `withdrawal`, `transfer` swagger:model wallet_address_type
const ( // WalletAddressTypeDeposit captures enum value "deposit" WalletAddressTypeDeposit WalletAddressType = "deposit" // WalletAddressTypeWithdrawal captures enum value "withdrawal" WalletAddressTypeWithdrawal WalletAddressType = "withdrawal" // WalletAddressTypeTransfer captures enum value "transfer" WalletAddressTypeTransfer WalletAddressType = "transfer" )
type Withdrawal ¶
type Withdrawal struct {
// address
// Required: true
Address CurrencyAddress `json:"address"`
// amount
// Required: true
Amount CurrencyAmount `json:"amount"`
// The timestamp (seconds since the Unix epoch, with millisecond precision) of withdrawal confirmation, `null` when not confirmed
// Required: true
ConfirmedTimestamp *int64 `json:"confirmed_timestamp"`
// created timestamp
CreatedTimestamp Timestamp `json:"created_timestamp,omitempty"`
// currency
// Required: true
Currency Currency `json:"currency"`
// fee
Fee Fee `json:"fee,omitempty"`
// Withdrawal id in Deribit system
ID int64 `json:"id,omitempty"`
// Id of priority level
Priority float64 `json:"priority,omitempty"`
// state
// Required: true
State WithdrawalState `json:"state"`
// transaction id
// Required: true
TransactionID CurrencyTransactionID `json:"transaction_id"`
// updated timestamp
// Required: true
UpdatedTimestamp Timestamp `json:"updated_timestamp"`
}
Withdrawal withdrawal swagger:model withdrawal
func (*Withdrawal) MarshalBinary ¶
func (m *Withdrawal) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Withdrawal) UnmarshalBinary ¶
func (m *Withdrawal) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WithdrawalState ¶
type WithdrawalState string
WithdrawalState Withdrawal state, allowed values : `unconfirmed`, `confirmed`, `cancelled`, `completed`, `interrupted`, `rejected` swagger:model withdrawal_state
const ( // WithdrawalStateUnconfirmed captures enum value "unconfirmed" WithdrawalStateUnconfirmed WithdrawalState = "unconfirmed" // WithdrawalStateConfirmed captures enum value "confirmed" WithdrawalStateConfirmed WithdrawalState = "confirmed" // WithdrawalStateCancelled captures enum value "cancelled" WithdrawalStateCancelled WithdrawalState = "cancelled" // WithdrawalStateCompleted captures enum value "completed" WithdrawalStateCompleted WithdrawalState = "completed" // WithdrawalStateInterrupted captures enum value "interrupted" WithdrawalStateInterrupted WithdrawalState = "interrupted" // WithdrawalStateRejected captures enum value "rejected" WithdrawalStateRejected WithdrawalState = "rejected" )
Source Files
¶
- address_book_item.go
- address_book_type.go
- advanced.go
- amount.go
- announcement_notification.go
- api.go
- ask_iv.go
- asks.go
- average_price.go
- base_message.go
- best_ask_amount.go
- best_ask_price.go
- best_bid_amount.go
- best_bid_price.go
- bid_iv.go
- bids.go
- book_entry.go
- book_notification.go
- book_notification_raw.go
- book_state.go
- book_summary.go
- commission.go
- continuation.go
- contract_size.go
- cumulative_amount.go
- cumulative_quantity.go
- currency.go
- currency_address.go
- currency_amount.go
- currency_portfolio.go
- currency_transaction_id.go
- currency_with_any.go
- current_funding.go
- delivery_price.go
- deposit.go
- deposit_state.go
- deribit_price_index_notification.go
- deribit_price_ranking_notification.go
- direction.go
- error_message.go
- estimated_expiration_price_notification.go
- fee.go
- filled_amount.go
- filled_quantity.go
- funding8h.go
- get_announcements_response.go
- get_time_response.go
- greeks.go
- implied_volatility.go
- implv.go
- index_price.go
- instrument.go
- instrument_name.go
- interest_rate.go
- key_number_pair.go
- kind.go
- kind_with_any.go
- label.go
- last_price.go
- mark_iv.go
- mark_price.go
- mark_price_info.go
- markprice_options_notification.go
- matching_id.go
- max_price.go
- max_show.go
- min_price.go
- ok_response.go
- open_interest.go
- order.go
- order_id.go
- order_id_initial_margin_pair.go
- order_state.go
- order_state_in_user_trade.go
- order_type.go
- order_type2.go
- order_v1.go
- perpetual_notification.go
- portfolio.go
- position.go
- post_only.go
- price.go
- private_account_response.go
- private_add_to_address_book_response.go
- private_address_book_response.go
- private_buy_and_sell_response.go
- private_cancel_response.go
- private_create_subaccount_response.go
- private_deposit_address_response.go
- private_edit_response.go
- private_get_deposits_response.go
- private_get_email_language_response.go
- private_get_margins_response.go
- private_get_open_orders_response.go
- private_get_order_history_response.go
- private_get_order_margin_by_ids_response.go
- private_get_order_state_response.go
- private_get_position_response.go
- private_get_positions_response.go
- private_get_subaccounts_response.go
- private_get_transfers_response.go
- private_get_withdrawals_response.go
- private_getopenorders_response.go
- private_orderhistory_response.go
- private_orderstate_response.go
- private_positions_response.go
- private_remove_from_address_book_response.go
- private_settlement_response.go
- private_settlementhistory_response.go
- private_submit_transfer_response.go
- private_subscribe_response.go
- private_tradehistory_response.go
- private_withdraw_response.go
- profit_loss.go
- public_auth_response.go
- public_currencies_response.go
- public_get_book_summary_response.go
- public_get_contract_size_response.go
- public_get_footer_response.go
- public_get_funding_chart_data_response.go
- public_get_instruments_response.go
- public_get_option_mark_prices_response.go
- public_get_order_book_response.go
- public_get_trades_volumes_response.go
- public_getlasttrades_response.go
- public_getorderbook_response.go
- public_historical_volatility_response.go
- public_index_response.go
- public_test_response.go
- public_ticker_response.go
- public_trade.go
- public_trades_history_response.go
- quantity.go
- quote_notification.go
- reduce_only.go
- result_count.go
- settlement.go
- settlement_price.go
- settlement_response.go
- settlement_type.go
- simple_order_type.go
- sorting.go
- stats.go
- stop_price.go
- tick_direction.go
- ticker_notification.go
- ticker_notification_with_bids_and_asks.go
- time_in_force.go
- timestamp.go
- timestamp_for_book_notifications.go
- trade.go
- trade_id.go
- trade_seq.go
- trades_volumes.go
- transfer_direction.go
- transfer_id.go
- transfer_item.go
- transfer_other_side.go
- transfer_state.go
- transfer_type.go
- trigger.go
- triggered.go
- underlying_index.go
- underlying_price.go
- usd.go
- user_portfolio_notification.go
- user_trade.go
- user_trades_by_order_response.go
- user_trades_history_response.go
- wallet_address_type.go
- withdrawal.go
- withdrawal_state.go