Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AccountManagementApiService
- func (a *AccountManagementApiService) PrivateChangeSubaccountNameGet(ctx context.Context, sid int32, name string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateCreateSubaccountGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateDisableTfaForSubaccountGet(ctx context.Context, sid int32) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetAccountSummaryGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetEmailLanguageGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetNewAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetPositionGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetPositionsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateGetSubaccountsGet(ctx context.Context, localVarOptionals *PrivateGetSubaccountsGetOpts) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateSetAnnouncementAsReadGet(ctx context.Context, announcementId float32) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateSetEmailForSubaccountGet(ctx context.Context, sid int32, email string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateSetEmailLanguageGet(ctx context.Context, language string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateSetPasswordForSubaccountGet(ctx context.Context, sid int32, password string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateToggleNotificationsFromSubaccountGet(ctx context.Context, sid int32, state bool) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PrivateToggleSubaccountLoginGet(ctx context.Context, sid int32, state string) (map[string]interface{}, *http.Response, error)
- func (a *AccountManagementApiService) PublicGetAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- type AddressBookItem
- type AuthenticationApiService
- type BasicAuth
- type BookSummary
- type Configuration
- type Currency
- type CurrencyPortfolio
- type CurrencyWithdrawalPriorities
- type Deposit
- type GenericOpenAPIError
- type Instrument
- type InternalApiService
- func (a *InternalApiService) PrivateAddToAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateDisableTfaWithRecoveryCodeGet(ctx context.Context, password string, code string) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateRemoveFromAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateSubmitTransferToUserGet(ctx context.Context, currency string, amount float32, destination string, ...) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PublicGetFooterGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PublicGetOptionMarkPricesGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *InternalApiService) PublicValidateFieldGet(ctx context.Context, field string, value string, ...) (map[string]interface{}, *http.Response, error)
- type KeyNumberPair
- type MarketDataApiService
- func (a *MarketDataApiService) PublicGetBookSummaryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetBookSummaryByInstrumentGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetContractSizeGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetCurrenciesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetFundingChartDataGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetHistoricalVolatilityGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetIndexGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetInstrumentsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastSettlementsByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastSettlementsByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastTradesByCurrencyAndTimeGet(ctx context.Context, currency string, startTimestamp int32, endTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastTradesByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastTradesByInstrumentAndTimeGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetLastTradesByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetOrderBookGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetTradeVolumesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicGetTradingviewChartDataGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *MarketDataApiService) PublicTickerGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- type Order
- type OrderIdInitialMarginPair
- type Portfolio
- type PortfolioEth
- type Position
- type PrivateAddToAddressBookGetOpts
- type PrivateApiService
- func (a *PrivateApiService) PrivateAddToAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateBuyGet(ctx context.Context, instrumentName string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelAllByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelAllByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelAllGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelTransferByIdGet(ctx context.Context, currency string, id int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCancelWithdrawalGet(ctx context.Context, currency string, id float32) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateChangeSubaccountNameGet(ctx context.Context, sid int32, name string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateClosePositionGet(ctx context.Context, instrumentName string, type_ string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCreateDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateCreateSubaccountGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateDisableTfaForSubaccountGet(ctx context.Context, sid int32) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateDisableTfaWithRecoveryCodeGet(ctx context.Context, password string, code string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateEditGet(ctx context.Context, orderId string, amount float32, price float32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetAccountSummaryGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetCurrentDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetDepositsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetEmailLanguageGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetMarginsGet(ctx context.Context, instrumentName string, amount float32, price float32) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetNewAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOpenOrdersByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOpenOrdersByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOrderHistoryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOrderHistoryByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOrderMarginByIdsGet(ctx context.Context, ids []string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetOrderStateGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetPositionGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetPositionsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetSettlementHistoryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetSettlementHistoryByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetSubaccountsGet(ctx context.Context, localVarOptionals *PrivateGetSubaccountsGetOpts) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetTransfersGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetUserTradesByCurrencyAndTimeGet(ctx context.Context, currency string, startTimestamp int32, endTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetUserTradesByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetUserTradesByInstrumentAndTimeGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetUserTradesByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetUserTradesByOrderGet(ctx context.Context, orderId string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateGetWithdrawalsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateRemoveFromAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSellGet(ctx context.Context, instrumentName string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSetAnnouncementAsReadGet(ctx context.Context, announcementId float32) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSetEmailForSubaccountGet(ctx context.Context, sid int32, email string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSetEmailLanguageGet(ctx context.Context, language string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSetPasswordForSubaccountGet(ctx context.Context, sid int32, password string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateSubmitTransferToUserGet(ctx context.Context, currency string, amount float32, destination string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateToggleNotificationsFromSubaccountGet(ctx context.Context, sid int32, state bool) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateToggleSubaccountLoginGet(ctx context.Context, sid int32, state string) (map[string]interface{}, *http.Response, error)
- func (a *PrivateApiService) PrivateWithdrawGet(ctx context.Context, currency string, address string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- type PrivateBuyGetOpts
- type PrivateCancelAllByCurrencyGetOpts
- type PrivateCancelAllByInstrumentGetOpts
- type PrivateCancelTransferByIdGetOpts
- type PrivateClosePositionGetOpts
- type PrivateEditGetOpts
- type PrivateGetAccountSummaryGetOpts
- type PrivateGetDepositsGetOpts
- type PrivateGetOpenOrdersByCurrencyGetOpts
- type PrivateGetOpenOrdersByInstrumentGetOpts
- type PrivateGetOrderHistoryByCurrencyGetOpts
- type PrivateGetOrderHistoryByInstrumentGetOpts
- type PrivateGetPositionsGetOpts
- type PrivateGetSettlementHistoryByCurrencyGetOpts
- type PrivateGetSettlementHistoryByInstrumentGetOpts
- type PrivateGetSubaccountsGetOpts
- type PrivateGetTransfersGetOpts
- type PrivateGetUserTradesByCurrencyAndTimeGetOpts
- type PrivateGetUserTradesByCurrencyGetOpts
- type PrivateGetUserTradesByInstrumentAndTimeGetOpts
- type PrivateGetUserTradesByInstrumentGetOpts
- type PrivateGetUserTradesByOrderGetOpts
- type PrivateGetWithdrawalsGetOpts
- type PrivateRemoveFromAddressBookGetOpts
- type PrivateSellGetOpts
- type PrivateSubmitTransferToUserGetOpts
- type PrivateWithdrawGetOpts
- type PublicApiService
- func (a *PublicApiService) PublicAuthGet(ctx context.Context, grantType string, username string, password string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetBookSummaryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetBookSummaryByInstrumentGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetContractSizeGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetCurrenciesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetFundingChartDataGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetHistoricalVolatilityGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetIndexGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetInstrumentsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastSettlementsByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastSettlementsByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastTradesByCurrencyAndTimeGet(ctx context.Context, currency string, startTimestamp int32, endTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastTradesByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastTradesByInstrumentAndTimeGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetLastTradesByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetOrderBookGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetTimeGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetTradeVolumesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicGetTradingviewChartDataGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicTestGet(ctx context.Context, localVarOptionals *PublicTestGetOpts) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicTickerGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
- func (a *PublicApiService) PublicValidateFieldGet(ctx context.Context, field string, value string, ...) (map[string]interface{}, *http.Response, error)
- type PublicAuthGetOpts
- type PublicGetBookSummaryByCurrencyGetOpts
- type PublicGetFundingChartDataGetOpts
- type PublicGetInstrumentsGetOpts
- type PublicGetLastSettlementsByCurrencyGetOpts
- type PublicGetLastSettlementsByInstrumentGetOpts
- type PublicGetLastTradesByCurrencyAndTimeGetOpts
- type PublicGetLastTradesByCurrencyGetOpts
- type PublicGetLastTradesByInstrumentAndTimeGetOpts
- type PublicGetLastTradesByInstrumentGetOpts
- type PublicGetOrderBookGetOpts
- type PublicTestGetOpts
- type PublicTrade
- type PublicValidateFieldGetOpts
- type Settlement
- type SupportingApiService
- type TradesVolumes
- type TradingApiService
- func (a *TradingApiService) PrivateBuyGet(ctx context.Context, instrumentName string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateCancelAllByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateCancelAllByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateCancelAllGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateCancelGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateClosePositionGet(ctx context.Context, instrumentName string, type_ string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateEditGet(ctx context.Context, orderId string, amount float32, price float32, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetMarginsGet(ctx context.Context, instrumentName string, amount float32, price float32) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOpenOrdersByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOpenOrdersByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOrderHistoryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOrderHistoryByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOrderMarginByIdsGet(ctx context.Context, ids []string) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetOrderStateGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetSettlementHistoryByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetSettlementHistoryByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetUserTradesByCurrencyAndTimeGet(ctx context.Context, currency string, startTimestamp int32, endTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetUserTradesByCurrencyGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetUserTradesByInstrumentAndTimeGet(ctx context.Context, instrumentName string, startTimestamp int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetUserTradesByInstrumentGet(ctx context.Context, instrumentName string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateGetUserTradesByOrderGet(ctx context.Context, orderId string, ...) (map[string]interface{}, *http.Response, error)
- func (a *TradingApiService) PrivateSellGet(ctx context.Context, instrumentName string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- type TransferItem
- type Types
- type UserTrade
- type WalletApiService
- func (a *WalletApiService) PrivateAddToAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateCancelTransferByIdGet(ctx context.Context, currency string, id int32, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateCancelWithdrawalGet(ctx context.Context, currency string, id float32) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateCreateDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateGetCurrentDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateGetDepositsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateGetTransfersGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateGetWithdrawalsGet(ctx context.Context, currency string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateRemoveFromAddressBookGet(ctx context.Context, currency string, type_ string, address string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateSubmitTransferToUserGet(ctx context.Context, currency string, amount float32, destination string, ...) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
- func (a *WalletApiService) PrivateWithdrawGet(ctx context.Context, currency string, address string, amount float32, ...) (map[string]interface{}, *http.Response, error)
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AccountManagementApi *AccountManagementApiService AuthenticationApi *AuthenticationApiService InternalApi *InternalApiService MarketDataApi *MarketDataApiService PrivateApi *PrivateApiService PublicApi *PublicApiService SupportingApi *SupportingApiService TradingApi *TradingApiService WalletApi *WalletApiService // contains filtered or unexported fields }
APIClient manages communication with the Deribit API API v2.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AccountManagementApiService ¶
type AccountManagementApiService service
func (*AccountManagementApiService) PrivateChangeSubaccountNameGet ¶
func (a *AccountManagementApiService) PrivateChangeSubaccountNameGet(ctx context.Context, sid int32, name string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Change the user name for a subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param name The new user name
@return map[string]interface{}
func (*AccountManagementApiService) PrivateCreateSubaccountGet ¶
func (a *AccountManagementApiService) PrivateCreateSubaccountGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Create a new subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*AccountManagementApiService) PrivateDisableTfaForSubaccountGet ¶
func (a *AccountManagementApiService) PrivateDisableTfaForSubaccountGet(ctx context.Context, sid int32) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Disable two factor authentication for a subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
@return map[string]interface{}
func (*AccountManagementApiService) PrivateGetAccountSummaryGet ¶
func (*AccountManagementApiService) PrivateGetEmailLanguageGet ¶
func (a *AccountManagementApiService) PrivateGetEmailLanguageGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Retrieves the language to be used for emails.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*AccountManagementApiService) PrivateGetNewAnnouncementsGet ¶
func (a *AccountManagementApiService) PrivateGetNewAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Retrieves announcements that have not been marked read by the user.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*AccountManagementApiService) PrivateGetPositionGet ¶
func (a *AccountManagementApiService) PrivateGetPositionGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Retrieve user position.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*AccountManagementApiService) PrivateGetPositionsGet ¶
func (*AccountManagementApiService) PrivateGetSubaccountsGet ¶
func (*AccountManagementApiService) PrivateSetAnnouncementAsReadGet ¶
func (a *AccountManagementApiService) PrivateSetAnnouncementAsReadGet(ctx context.Context, announcementId float32) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Marks an announcement as read, so it will not be shown in `get_new_announcements`.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param announcementId the ID of the announcement
@return map[string]interface{}
func (*AccountManagementApiService) PrivateSetEmailForSubaccountGet ¶
func (a *AccountManagementApiService) PrivateSetEmailForSubaccountGet(ctx context.Context, sid int32, email string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Assign an email address to a subaccount. User will receive an email with confirmation link.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param email The email address for the subaccount
@return map[string]interface{}
func (*AccountManagementApiService) PrivateSetEmailLanguageGet ¶
func (a *AccountManagementApiService) PrivateSetEmailLanguageGet(ctx context.Context, language string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Changes the language to be used for emails.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param language The abbreviated language name. Valid values include `\"en\"`, `\"ko\"`, `\"zh\"`
@return map[string]interface{}
func (*AccountManagementApiService) PrivateSetPasswordForSubaccountGet ¶
func (a *AccountManagementApiService) PrivateSetPasswordForSubaccountGet(ctx context.Context, sid int32, password string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Set the password for the subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param password The password for the subaccount
@return map[string]interface{}
func (*AccountManagementApiService) PrivateToggleNotificationsFromSubaccountGet ¶
func (a *AccountManagementApiService) PrivateToggleNotificationsFromSubaccountGet(ctx context.Context, sid int32, state bool) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Enable or disable sending of notifications for the subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param state enable (`true`) or disable (`false`) notifications
@return map[string]interface{}
func (*AccountManagementApiService) PrivateToggleSubaccountLoginGet ¶
func (a *AccountManagementApiService) PrivateToggleSubaccountLoginGet(ctx context.Context, sid int32, state string) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Enable or disable login for a subaccount. If login is disabled and a session for the subaccount exists, this session will be terminated.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param state enable or disable login.
@return map[string]interface{}
func (*AccountManagementApiService) PublicGetAnnouncementsGet ¶
func (a *AccountManagementApiService) PublicGetAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
AccountManagementApiService Retrieves announcements from the last 30 days.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
type AddressBookItem ¶
type AddressBookItem struct { // Currency, i.e `\"BTC\"`, `\"ETH\"` Currency string `json:"currency"` // Address in proper format for currency Address string `json:"address"` // Address book type Type string `json:"type,omitempty"` // The timestamp (seconds since the Unix epoch, with millisecond precision) CreationTimestamp int32 `json:"creation_timestamp"` }
type AuthenticationApiService ¶
type AuthenticationApiService service
func (*AuthenticationApiService) PublicAuthGet ¶
func (a *AuthenticationApiService) PublicAuthGet(ctx context.Context, grantType string, username string, password string, clientId string, clientSecret string, refreshToken string, timestamp string, signature string, localVarOptionals *PublicAuthGetOpts) (map[string]interface{}, *http.Response, error)
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BookSummary ¶
type BookSummary struct { // Name of the underlying future, or `'index_price'` (options only) UnderlyingIndex string `json:"underlying_index,omitempty"` // The total 24h traded volume (in base currency) Volume float32 `json:"volume"` // Volume in usd (futures only) VolumeUsd float32 `json:"volume_usd,omitempty"` // underlying price for implied volatility calculations (options only) UnderlyingPrice float32 `json:"underlying_price,omitempty"` // The current best bid price, `null` if there aren't any bids BidPrice float32 `json:"bid_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. OpenInterest float32 `json:"open_interest"` // Quote currency QuoteCurrency string `json:"quote_currency"` // Price of the 24h highest trade High float32 `json:"high"` // Estimated delivery price, in USD (futures only). For more details, see Documentation > General > Expiration Price EstimatedDeliveryPrice float32 `json:"estimated_delivery_price,omitempty"` // The price of the latest trade, `null` if there weren't any trades Last float32 `json:"last"` // The average of the best bid and ask, `null` if there aren't any asks or bids MidPrice float32 `json:"mid_price"` // Interest rate used in implied volatility calculations (options only) InterestRate float32 `json:"interest_rate,omitempty"` // Funding 8h (perpetual only) Funding8h float32 `json:"funding_8h,omitempty"` // The current instrument market price MarkPrice float32 `json:"mark_price"` // The current best ask price, `null` if there aren't any asks AskPrice float32 `json:"ask_price"` // Unique instrument identifier InstrumentName string `json:"instrument_name"` // Price of the 24h lowest trade, `null` if there weren't any trades Low float32 `json:"low"` // Base currency BaseCurrency string `json:"base_currency,omitempty"` // The timestamp (seconds since the Unix epoch, with millisecond precision) CreationTimestamp int32 `json:"creation_timestamp"` // Current funding (perpetual only) CurrentFunding float32 `json:"current_funding,omitempty"` }
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type Currency ¶
type Currency struct { // Minimum number of block chain confirmations before deposit is accepted. MinConfirmations int32 `json:"min_confirmations,omitempty"` // The minimum transaction fee paid for withdrawals MinWithdrawalFee float32 `json:"min_withdrawal_fee,omitempty"` // False if deposit address creation is disabled DisabledDepositAddressCreation bool `json:"disabled_deposit_address_creation,omitempty"` // The abbreviation of the currency. This abbreviation is used elsewhere in the API to identify the currency. Currency string `json:"currency"` // The full name for the currency. CurrencyLong string `json:"currency_long"` // The total transaction fee paid for withdrawals WithdrawalFee float32 `json:"withdrawal_fee"` // fee precision FeePrecision int32 `json:"fee_precision,omitempty"` WithdrawalPriorities []CurrencyWithdrawalPriorities `json:"withdrawal_priorities,omitempty"` // The type of the currency. CoinType string `json:"coin_type"` }
type CurrencyPortfolio ¶
type CurrencyPortfolio struct { MaintenanceMargin float32 `json:"maintenance_margin"` AvailableWithdrawalFunds float32 `json:"available_withdrawal_funds"` InitialMargin float32 `json:"initial_margin"` AvailableFunds float32 `json:"available_funds"` Currency string `json:"currency"` MarginBalance float32 `json:"margin_balance"` Equity float32 `json:"equity"` Balance float32 `json:"balance"` }
type Deposit ¶
type Deposit struct { // The timestamp (seconds since the Unix epoch, with millisecond precision) UpdatedTimestamp int32 `json:"updated_timestamp"` // Deposit state, allowed values : `pending`, `completed`, `rejected`, `replaced` State string `json:"state"` // The timestamp (seconds since the Unix epoch, with millisecond precision) ReceivedTimestamp int32 `json:"received_timestamp"` // Currency, i.e `\"BTC\"`, `\"ETH\"` Currency string `json:"currency"` // Address in proper format for currency Address string `json:"address"` // Amount of funds in given currency Amount float32 `json:"amount"` // Transaction id in proper format for currency, `null` if id is not available TransactionId *string `json:"transaction_id"` }
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type Instrument ¶
type Instrument struct { // The currency in which the instrument prices are quoted. QuoteCurrency string `json:"quote_currency"` // Instrument kind, `\"future\"` or `\"option\"` Kind string `json:"kind"` // specifies minimal price change and, as follows, the number of decimal places for instrument prices TickSize float32 `json:"tick_size"` // Contract size for instrument ContractSize int32 `json:"contract_size"` // Indicates if the instrument can currently be traded. IsActive bool `json:"is_active"` // The option type (only for options) OptionType string `json:"option_type,omitempty"` // 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. MinTradeAmount float32 `json:"min_trade_amount"` // Unique instrument identifier InstrumentName string `json:"instrument_name"` // The settlement period. SettlementPeriod string `json:"settlement_period"` // The strike value. (only for options) Strike float32 `json:"strike,omitempty"` // The underlying currency being traded. BaseCurrency string `json:"base_currency"` // The time when the instrument was first created (milliseconds) CreationTimestamp int32 `json:"creation_timestamp"` // The time when the instrument will expire (milliseconds) ExpirationTimestamp int32 `json:"expiration_timestamp"` }
type InternalApiService ¶
type InternalApiService service
func (*InternalApiService) PrivateAddToAddressBookGet ¶
func (*InternalApiService) PrivateDisableTfaWithRecoveryCodeGet ¶
func (a *InternalApiService) PrivateDisableTfaWithRecoveryCodeGet(ctx context.Context, password string, code string) (map[string]interface{}, *http.Response, error)
InternalApiService Disables TFA with one time recovery code
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param password The password for the subaccount
- @param code One time recovery code
@return map[string]interface{}
func (*InternalApiService) PrivateGetAddressBookGet ¶
func (a *InternalApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
InternalApiService Retrieves address book of given type
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param type_ Address book type
@return map[string]interface{}
func (*InternalApiService) PrivateRemoveFromAddressBookGet ¶
func (*InternalApiService) PrivateSubmitTransferToSubaccountGet ¶
func (a *InternalApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
InternalApiService Transfer funds to a subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param amount Amount of funds to be transferred
- @param destination Id of destination subaccount
@return map[string]interface{}
func (*InternalApiService) PrivateSubmitTransferToUserGet ¶
func (*InternalApiService) PrivateToggleDepositAddressCreationGet ¶
func (a *InternalApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
InternalApiService Enable or disable deposit address creation
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param state
@return map[string]interface{}
func (*InternalApiService) PublicGetFooterGet ¶
func (a *InternalApiService) PublicGetFooterGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
InternalApiService Get information to be displayed in the footer of the website.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*InternalApiService) PublicGetOptionMarkPricesGet ¶
func (a *InternalApiService) PublicGetOptionMarkPricesGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
InternalApiService Retrives market prices and its implied volatility of options instruments
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
type KeyNumberPair ¶
type MarketDataApiService ¶
type MarketDataApiService service
func (*MarketDataApiService) PublicGetBookSummaryByCurrencyGet ¶
func (*MarketDataApiService) PublicGetBookSummaryByInstrumentGet ¶
func (a *MarketDataApiService) PublicGetBookSummaryByInstrumentGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
MarketDataApiService Retrieves the summary information such as open interest, 24h volume, etc. for a specific instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*MarketDataApiService) PublicGetContractSizeGet ¶
func (a *MarketDataApiService) PublicGetContractSizeGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
MarketDataApiService Retrieves contract size of provided instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*MarketDataApiService) PublicGetCurrenciesGet ¶
func (a *MarketDataApiService) PublicGetCurrenciesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
MarketDataApiService Retrieves all cryptocurrencies supported by the API.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*MarketDataApiService) PublicGetFundingChartDataGet ¶
func (*MarketDataApiService) PublicGetHistoricalVolatilityGet ¶
func (a *MarketDataApiService) PublicGetHistoricalVolatilityGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
MarketDataApiService Provides information about historical volatility for given cryptocurrency.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*MarketDataApiService) PublicGetIndexGet ¶
func (a *MarketDataApiService) PublicGetIndexGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
MarketDataApiService Retrieves the current index price for the instruments, for the selected currency.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*MarketDataApiService) PublicGetInstrumentsGet ¶
func (*MarketDataApiService) PublicGetLastSettlementsByCurrencyGet ¶
func (*MarketDataApiService) PublicGetLastSettlementsByInstrumentGet ¶
func (*MarketDataApiService) PublicGetLastTradesByCurrencyAndTimeGet ¶
func (*MarketDataApiService) PublicGetLastTradesByCurrencyGet ¶
func (*MarketDataApiService) PublicGetLastTradesByInstrumentAndTimeGet ¶
func (*MarketDataApiService) PublicGetLastTradesByInstrumentGet ¶
func (*MarketDataApiService) PublicGetOrderBookGet ¶
func (*MarketDataApiService) PublicGetTradeVolumesGet ¶
func (a *MarketDataApiService) PublicGetTradeVolumesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
MarketDataApiService Retrieves aggregated 24h trade volumes for different instrument types and currencies.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*MarketDataApiService) PublicGetTradingviewChartDataGet ¶
func (a *MarketDataApiService) PublicGetTradingviewChartDataGet(ctx context.Context, instrumentName string, startTimestamp int32, endTimestamp int32) (map[string]interface{}, *http.Response, error)
MarketDataApiService Publicly available market data used to generate a TradingView candle chart.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
- @param startTimestamp The earliest timestamp to return result for
- @param endTimestamp The most recent timestamp to return result for
@return map[string]interface{}
func (*MarketDataApiService) PublicTickerGet ¶
func (a *MarketDataApiService) PublicTickerGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
MarketDataApiService Get ticker for an instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
type Order ¶
type Order struct { // direction, `buy` or `sell` Direction string `json:"direction"` // `true` for reduce-only orders only ReduceOnly bool `json:"reduce_only,omitempty"` // Whether the stop order has been triggered (Only for stop orders) Triggered bool `json:"triggered,omitempty"` // Unique order identifier OrderId string `json:"order_id"` // Price in base currency Price float32 `json:"price"` // Order time in force: `\"good_til_cancelled\"`, `\"fill_or_kill\"`, `\"immediate_or_cancel\"` TimeInForce string `json:"time_in_force"` // `true` if created with API Api bool `json:"api"` // order state, `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"` OrderState string `json:"order_state"` // Implied volatility in percent. (Only if `advanced=\"implv\"`) Implv float32 `json:"implv,omitempty"` // advanced type: `\"usd\"` or `\"implv\"` (Only for options; field is omitted if not applicable). Advanced string `json:"advanced,omitempty"` // `true` for post-only orders only PostOnly bool `json:"post_only"` // Option price in USD (Only if `advanced=\"usd\"`) Usd float32 `json:"usd,omitempty"` // stop price (Only for future stop orders) StopPrice float32 `json:"stop_price,omitempty"` // order type, `\"limit\"`, `\"market\"`, `\"stop_limit\"`, `\"stop_market\"` OrderType string `json:"order_type"` // The timestamp (seconds since the Unix epoch, with millisecond precision) LastUpdateTimestamp int32 `json:"last_update_timestamp"` // Original order type. Optional field OriginalOrderType string `json:"original_order_type,omitempty"` // Maximum amount within an order to be shown to other traders, 0 for invisible order. MaxShow float32 `json:"max_show"` // Profit and loss in base currency. ProfitLoss float32 `json:"profit_loss,omitempty"` // `true` if order was automatically created during liquidation IsLiquidation bool `json:"is_liquidation"` // 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. FilledAmount float32 `json:"filled_amount,omitempty"` // user defined label (up to 32 characters) Label string `json:"label"` // Commission paid so far (in base currency) Commission float32 `json:"commission,omitempty"` // 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. Amount float32 `json:"amount,omitempty"` // Trigger type (Only for stop orders). Allowed values: `\"index_price\"`, `\"mark_price\"`, `\"last_price\"`. Trigger string `json:"trigger,omitempty"` // Unique instrument identifier InstrumentName string `json:"instrument_name,omitempty"` // The timestamp (seconds since the Unix epoch, with millisecond precision) CreationTimestamp int32 `json:"creation_timestamp"` // Average fill price of the order AveragePrice float32 `json:"average_price,omitempty"` }
type Portfolio ¶
type Portfolio struct { Eth PortfolioEth `json:"eth"` Btc PortfolioEth `json:"btc"` }
type PortfolioEth ¶
type PortfolioEth struct { MaintenanceMargin float32 `json:"maintenance_margin"` AvailableWithdrawalFunds float32 `json:"available_withdrawal_funds"` InitialMargin float32 `json:"initial_margin"` AvailableFunds float32 `json:"available_funds"` Currency string `json:"currency"` MarginBalance float32 `json:"margin_balance"` Equity float32 `json:"equity"` Balance float32 `json:"balance"` }
type Position ¶
type Position struct { // direction, `buy` or `sell` Direction string `json:"direction"` // Only for options, average price in USD AveragePriceUsd float32 `json:"average_price_usd,omitempty"` // Only for futures, estimated liquidation price EstimatedLiquidationPrice float32 `json:"estimated_liquidation_price,omitempty"` // Floating profit or loss FloatingProfitLoss float32 `json:"floating_profit_loss"` // Only for options, floating profit or loss in USD FloatingProfitLossUsd float32 `json:"floating_profit_loss_usd,omitempty"` // Open orders margin OpenOrdersMargin float32 `json:"open_orders_margin"` // Profit or loss from position TotalProfitLoss float32 `json:"total_profit_loss"` // Realized profit or loss RealizedProfitLoss float32 `json:"realized_profit_loss,omitempty"` // Delta parameter Delta float32 `json:"delta"` // Initial margin InitialMargin float32 `json:"initial_margin"` // Position size for futures size in quote currency (e.g. USD), for options size is in base currency (e.g. BTC) Size float32 `json:"size"` // Maintenance margin MaintenanceMargin float32 `json:"maintenance_margin"` // Instrument kind, `\"future\"` or `\"option\"` Kind string `json:"kind"` // Current mark price for position's instrument MarkPrice float32 `json:"mark_price"` // Average price of trades that built this position AveragePrice float32 `json:"average_price"` // Last settlement price for position's instrument 0 if instrument wasn't settled yet SettlementPrice float32 `json:"settlement_price"` // Current index price IndexPrice float32 `json:"index_price"` // Unique instrument identifier InstrumentName string `json:"instrument_name"` // Only for futures, position size in base currency SizeCurrency float32 `json:"size_currency,omitempty"` }
type PrivateApiService ¶
type PrivateApiService service
func (*PrivateApiService) PrivateAddToAddressBookGet ¶
func (*PrivateApiService) PrivateBuyGet ¶
func (*PrivateApiService) PrivateCancelAllByCurrencyGet ¶
func (*PrivateApiService) PrivateCancelAllByInstrumentGet ¶
func (*PrivateApiService) PrivateCancelAllGet ¶
func (a *PrivateApiService) PrivateCancelAllGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PrivateApiService This method cancels all users orders and stop orders within all currencies and instrument kinds.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PrivateApiService) PrivateCancelGet ¶
func (a *PrivateApiService) PrivateCancelGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
PrivateApiService Cancel an order, specified by order id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param orderId The order id
@return map[string]interface{}
func (*PrivateApiService) PrivateCancelTransferByIdGet ¶
func (*PrivateApiService) PrivateCancelWithdrawalGet ¶
func (a *PrivateApiService) PrivateCancelWithdrawalGet(ctx context.Context, currency string, id float32) (map[string]interface{}, *http.Response, error)
PrivateApiService Cancels withdrawal request
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param id The withdrawal id
@return map[string]interface{}
func (*PrivateApiService) PrivateChangeSubaccountNameGet ¶
func (a *PrivateApiService) PrivateChangeSubaccountNameGet(ctx context.Context, sid int32, name string) (map[string]interface{}, *http.Response, error)
PrivateApiService Change the user name for a subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param name The new user name
@return map[string]interface{}
func (*PrivateApiService) PrivateClosePositionGet ¶
func (*PrivateApiService) PrivateCreateDepositAddressGet ¶
func (a *PrivateApiService) PrivateCreateDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
PrivateApiService Creates deposit address in currency
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*PrivateApiService) PrivateCreateSubaccountGet ¶
func (a *PrivateApiService) PrivateCreateSubaccountGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PrivateApiService Create a new subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PrivateApiService) PrivateDisableTfaForSubaccountGet ¶
func (a *PrivateApiService) PrivateDisableTfaForSubaccountGet(ctx context.Context, sid int32) (map[string]interface{}, *http.Response, error)
PrivateApiService Disable two factor authentication for a subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
@return map[string]interface{}
func (*PrivateApiService) PrivateDisableTfaWithRecoveryCodeGet ¶
func (a *PrivateApiService) PrivateDisableTfaWithRecoveryCodeGet(ctx context.Context, password string, code string) (map[string]interface{}, *http.Response, error)
PrivateApiService Disables TFA with one time recovery code
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param password The password for the subaccount
- @param code One time recovery code
@return map[string]interface{}
func (*PrivateApiService) PrivateEditGet ¶
func (*PrivateApiService) PrivateGetAccountSummaryGet ¶
func (a *PrivateApiService) PrivateGetAccountSummaryGet(ctx context.Context, currency string, localVarOptionals *PrivateGetAccountSummaryGetOpts) (map[string]interface{}, *http.Response, error)
func (*PrivateApiService) PrivateGetAddressBookGet ¶
func (a *PrivateApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieves address book of given type
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param type_ Address book type
@return map[string]interface{}
func (*PrivateApiService) PrivateGetCurrentDepositAddressGet ¶
func (a *PrivateApiService) PrivateGetCurrentDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieve deposit address for currency
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*PrivateApiService) PrivateGetDepositsGet ¶
func (*PrivateApiService) PrivateGetEmailLanguageGet ¶
func (a *PrivateApiService) PrivateGetEmailLanguageGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieves the language to be used for emails.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PrivateApiService) PrivateGetMarginsGet ¶
func (a *PrivateApiService) PrivateGetMarginsGet(ctx context.Context, instrumentName string, amount float32, price float32) (map[string]interface{}, *http.Response, error)
PrivateApiService Get margins for given instrument, amount and price.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
- @param amount Amount, integer for future, float for option. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
- @param price Price
@return map[string]interface{}
func (*PrivateApiService) PrivateGetNewAnnouncementsGet ¶
func (a *PrivateApiService) PrivateGetNewAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieves announcements that have not been marked read by the user.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PrivateApiService) PrivateGetOpenOrdersByCurrencyGet ¶
func (*PrivateApiService) PrivateGetOpenOrdersByInstrumentGet ¶
func (*PrivateApiService) PrivateGetOrderHistoryByCurrencyGet ¶
func (*PrivateApiService) PrivateGetOrderHistoryByInstrumentGet ¶
func (*PrivateApiService) PrivateGetOrderMarginByIdsGet ¶
func (a *PrivateApiService) PrivateGetOrderMarginByIdsGet(ctx context.Context, ids []string) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieves initial margins of given orders
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param ids Ids of orders
@return map[string]interface{}
func (*PrivateApiService) PrivateGetOrderStateGet ¶
func (a *PrivateApiService) PrivateGetOrderStateGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieve the current state of an order.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param orderId The order id
@return map[string]interface{}
func (*PrivateApiService) PrivateGetPositionGet ¶
func (a *PrivateApiService) PrivateGetPositionGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
PrivateApiService Retrieve user position.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*PrivateApiService) PrivateGetPositionsGet ¶
func (a *PrivateApiService) PrivateGetPositionsGet(ctx context.Context, currency string, localVarOptionals *PrivateGetPositionsGetOpts) (map[string]interface{}, *http.Response, error)
func (*PrivateApiService) PrivateGetSettlementHistoryByCurrencyGet ¶
func (*PrivateApiService) PrivateGetSettlementHistoryByInstrumentGet ¶
func (*PrivateApiService) PrivateGetSubaccountsGet ¶
func (a *PrivateApiService) PrivateGetSubaccountsGet(ctx context.Context, localVarOptionals *PrivateGetSubaccountsGetOpts) (map[string]interface{}, *http.Response, error)
func (*PrivateApiService) PrivateGetTransfersGet ¶
func (*PrivateApiService) PrivateGetUserTradesByCurrencyAndTimeGet ¶
func (*PrivateApiService) PrivateGetUserTradesByCurrencyGet ¶
func (*PrivateApiService) PrivateGetUserTradesByInstrumentAndTimeGet ¶
func (*PrivateApiService) PrivateGetUserTradesByInstrumentGet ¶
func (*PrivateApiService) PrivateGetUserTradesByOrderGet ¶
func (*PrivateApiService) PrivateGetWithdrawalsGet ¶
func (*PrivateApiService) PrivateRemoveFromAddressBookGet ¶
func (*PrivateApiService) PrivateSellGet ¶
func (*PrivateApiService) PrivateSetAnnouncementAsReadGet ¶
func (a *PrivateApiService) PrivateSetAnnouncementAsReadGet(ctx context.Context, announcementId float32) (map[string]interface{}, *http.Response, error)
PrivateApiService Marks an announcement as read, so it will not be shown in `get_new_announcements`.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param announcementId the ID of the announcement
@return map[string]interface{}
func (*PrivateApiService) PrivateSetEmailForSubaccountGet ¶
func (a *PrivateApiService) PrivateSetEmailForSubaccountGet(ctx context.Context, sid int32, email string) (map[string]interface{}, *http.Response, error)
PrivateApiService Assign an email address to a subaccount. User will receive an email with confirmation link.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param email The email address for the subaccount
@return map[string]interface{}
func (*PrivateApiService) PrivateSetEmailLanguageGet ¶
func (a *PrivateApiService) PrivateSetEmailLanguageGet(ctx context.Context, language string) (map[string]interface{}, *http.Response, error)
PrivateApiService Changes the language to be used for emails.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param language The abbreviated language name. Valid values include `\"en\"`, `\"ko\"`, `\"zh\"`
@return map[string]interface{}
func (*PrivateApiService) PrivateSetPasswordForSubaccountGet ¶
func (a *PrivateApiService) PrivateSetPasswordForSubaccountGet(ctx context.Context, sid int32, password string) (map[string]interface{}, *http.Response, error)
PrivateApiService Set the password for the subaccount
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param password The password for the subaccount
@return map[string]interface{}
func (*PrivateApiService) PrivateSubmitTransferToSubaccountGet ¶
func (a *PrivateApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
PrivateApiService Transfer funds to a subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param amount Amount of funds to be transferred
- @param destination Id of destination subaccount
@return map[string]interface{}
func (*PrivateApiService) PrivateSubmitTransferToUserGet ¶
func (*PrivateApiService) PrivateToggleDepositAddressCreationGet ¶
func (a *PrivateApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
PrivateApiService Enable or disable deposit address creation
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param state
@return map[string]interface{}
func (*PrivateApiService) PrivateToggleNotificationsFromSubaccountGet ¶
func (a *PrivateApiService) PrivateToggleNotificationsFromSubaccountGet(ctx context.Context, sid int32, state bool) (map[string]interface{}, *http.Response, error)
PrivateApiService Enable or disable sending of notifications for the subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param state enable (`true`) or disable (`false`) notifications
@return map[string]interface{}
func (*PrivateApiService) PrivateToggleSubaccountLoginGet ¶
func (a *PrivateApiService) PrivateToggleSubaccountLoginGet(ctx context.Context, sid int32, state string) (map[string]interface{}, *http.Response, error)
PrivateApiService Enable or disable login for a subaccount. If login is disabled and a session for the subaccount exists, this session will be terminated.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sid The user id for the subaccount
- @param state enable or disable login.
@return map[string]interface{}
type PrivateBuyGetOpts ¶
type PrivateEditGetOpts ¶
type PrivateSellGetOpts ¶
type PrivateWithdrawGetOpts ¶
type PublicApiService ¶
type PublicApiService service
func (*PublicApiService) PublicAuthGet ¶
func (*PublicApiService) PublicGetAnnouncementsGet ¶
func (a *PublicApiService) PublicGetAnnouncementsGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves announcements from the last 30 days.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PublicApiService) PublicGetBookSummaryByCurrencyGet ¶
func (a *PublicApiService) PublicGetBookSummaryByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PublicGetBookSummaryByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetBookSummaryByInstrumentGet ¶
func (a *PublicApiService) PublicGetBookSummaryByInstrumentGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves the summary information such as open interest, 24h volume, etc. for a specific instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*PublicApiService) PublicGetContractSizeGet ¶
func (a *PublicApiService) PublicGetContractSizeGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves contract size of provided instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*PublicApiService) PublicGetCurrenciesGet ¶
func (a *PublicApiService) PublicGetCurrenciesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves all cryptocurrencies supported by the API.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PublicApiService) PublicGetFundingChartDataGet ¶
func (a *PublicApiService) PublicGetFundingChartDataGet(ctx context.Context, instrumentName string, localVarOptionals *PublicGetFundingChartDataGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetHistoricalVolatilityGet ¶
func (a *PublicApiService) PublicGetHistoricalVolatilityGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
PublicApiService Provides information about historical volatility for given cryptocurrency.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*PublicApiService) PublicGetIndexGet ¶
func (a *PublicApiService) PublicGetIndexGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves the current index price for the instruments, for the selected currency.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*PublicApiService) PublicGetInstrumentsGet ¶
func (a *PublicApiService) PublicGetInstrumentsGet(ctx context.Context, currency string, localVarOptionals *PublicGetInstrumentsGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetLastSettlementsByCurrencyGet ¶
func (a *PublicApiService) PublicGetLastSettlementsByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PublicGetLastSettlementsByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetLastSettlementsByInstrumentGet ¶
func (a *PublicApiService) PublicGetLastSettlementsByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PublicGetLastSettlementsByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetLastTradesByCurrencyAndTimeGet ¶
func (*PublicApiService) PublicGetLastTradesByCurrencyGet ¶
func (a *PublicApiService) PublicGetLastTradesByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PublicGetLastTradesByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetLastTradesByInstrumentAndTimeGet ¶
func (*PublicApiService) PublicGetLastTradesByInstrumentGet ¶
func (a *PublicApiService) PublicGetLastTradesByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PublicGetLastTradesByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetOrderBookGet ¶
func (a *PublicApiService) PublicGetOrderBookGet(ctx context.Context, instrumentName string, localVarOptionals *PublicGetOrderBookGetOpts) (map[string]interface{}, *http.Response, error)
func (*PublicApiService) PublicGetTimeGet ¶
func (a *PublicApiService) PublicGetTimeGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PublicApiService) PublicGetTradeVolumesGet ¶
func (a *PublicApiService) PublicGetTradeVolumesGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
PublicApiService Retrieves aggregated 24h trade volumes for different instrument types and currencies.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*PublicApiService) PublicGetTradingviewChartDataGet ¶
func (a *PublicApiService) PublicGetTradingviewChartDataGet(ctx context.Context, instrumentName string, startTimestamp int32, endTimestamp int32) (map[string]interface{}, *http.Response, error)
PublicApiService Publicly available market data used to generate a TradingView candle chart.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
- @param startTimestamp The earliest timestamp to return result for
- @param endTimestamp The most recent timestamp to return result for
@return map[string]interface{}
func (*PublicApiService) PublicTestGet ¶
func (*PublicApiService) PublicTickerGet ¶
func (a *PublicApiService) PublicTickerGet(ctx context.Context, instrumentName string) (map[string]interface{}, *http.Response, error)
PublicApiService Get ticker for an instrument.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
@return map[string]interface{}
func (*PublicApiService) PublicValidateFieldGet ¶
func (a *PublicApiService) PublicValidateFieldGet(ctx context.Context, field string, value string, localVarOptionals *PublicValidateFieldGetOpts) (map[string]interface{}, *http.Response, error)
type PublicAuthGetOpts ¶
type PublicTestGetOpts ¶
type PublicTrade ¶
type PublicTrade struct { // Trade direction of the taker Direction string `json:"direction"` // Direction of the \"tick\" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick). TickDirection int32 `json:"tick_direction"` // The timestamp of the trade Timestamp int32 `json:"timestamp"` // The price of the trade Price float32 `json:"price"` // The sequence number of the trade within instrument TradeSeq int32 `json:"trade_seq"` // Unique (per currency) trade identifier TradeId string `json:"trade_id"` // Option implied volatility for the price (Option only) Iv float32 `json:"iv,omitempty"` // Index Price at the moment of trade IndexPrice float32 `json:"index_price"` // Trade amount. For perpetual and futures - in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH. Amount float32 `json:"amount"` // Unique instrument identifier InstrumentName string `json:"instrument_name"` }
type Settlement ¶
type Settlement struct { // total value of session profit and losses (in base currency) SessionProfitLoss float32 `json:"session_profit_loss"` // mark price for at the settlement time (in quote currency; settlement and delivery only) MarkPrice float32 `json:"mark_price,omitempty"` // funding (in base currency ; settlement for perpetual product only) Funding float32 `json:"funding"` // the amount of the socialized losses (in base currency; bankruptcy only) Socialized float32 `json:"socialized,omitempty"` // value of session bankrupcy (in base currency; bankruptcy only) SessionBankrupcy float32 `json:"session_bankrupcy,omitempty"` // The timestamp (seconds since the Unix epoch, with millisecond precision) Timestamp int32 `json:"timestamp"` // profit and loss (in base currency; settlement and delivery only) ProfitLoss float32 `json:"profit_loss,omitempty"` // funded amount (bankruptcy only) Funded float32 `json:"funded,omitempty"` // underlying index price at time of event (in quote currency; settlement and delivery only) IndexPrice float32 `json:"index_price"` // total amount of paid taxes/fees (in base currency; bankruptcy only) SessionTax float32 `json:"session_tax,omitempty"` // rate of paid texes/fees (in base currency; bankruptcy only) SessionTaxRate float32 `json:"session_tax_rate,omitempty"` // instrument name (settlement and delivery only) InstrumentName string `json:"instrument_name"` // position size (in quote currency; settlement and delivery only) Position float32 `json:"position"` // The type of settlement. `settlement`, `delivery` or `bankruptcy`. Type string `json:"type"` }
type SupportingApiService ¶
type SupportingApiService service
func (*SupportingApiService) PublicGetTimeGet ¶
func (a *SupportingApiService) PublicGetTimeGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
SupportingApiService Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*SupportingApiService) PublicTestGet ¶
func (a *SupportingApiService) PublicTestGet(ctx context.Context, localVarOptionals *PublicTestGetOpts) (map[string]interface{}, *http.Response, error)
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` CallsVolume float32 `json:"calls_volume"` // Total 24h trade volume for put options. This is expressed in the base currency, e.g. BTC for `btc_usd` PutsVolume float32 `json:"puts_volume"` // Currency pair: `\"btc_usd\"` or `\"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` FuturesVolume float32 `json:"futures_volume"` }
type TradingApiService ¶
type TradingApiService service
func (*TradingApiService) PrivateBuyGet ¶
func (a *TradingApiService) PrivateBuyGet(ctx context.Context, instrumentName string, amount float32, localVarOptionals *PrivateBuyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateCancelAllByCurrencyGet ¶
func (a *TradingApiService) PrivateCancelAllByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PrivateCancelAllByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateCancelAllByInstrumentGet ¶
func (a *TradingApiService) PrivateCancelAllByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PrivateCancelAllByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateCancelAllGet ¶
func (a *TradingApiService) PrivateCancelAllGet(ctx context.Context) (map[string]interface{}, *http.Response, error)
TradingApiService This method cancels all users orders and stop orders within all currencies and instrument kinds.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return map[string]interface{}
func (*TradingApiService) PrivateCancelGet ¶
func (a *TradingApiService) PrivateCancelGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
TradingApiService Cancel an order, specified by order id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param orderId The order id
@return map[string]interface{}
func (*TradingApiService) PrivateClosePositionGet ¶
func (a *TradingApiService) PrivateClosePositionGet(ctx context.Context, instrumentName string, type_ string, localVarOptionals *PrivateClosePositionGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateEditGet ¶
func (*TradingApiService) PrivateGetMarginsGet ¶
func (a *TradingApiService) PrivateGetMarginsGet(ctx context.Context, instrumentName string, amount float32, price float32) (map[string]interface{}, *http.Response, error)
TradingApiService Get margins for given instrument, amount and price.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param instrumentName Instrument name
- @param amount Amount, integer for future, float for option. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH.
- @param price Price
@return map[string]interface{}
func (*TradingApiService) PrivateGetOpenOrdersByCurrencyGet ¶
func (a *TradingApiService) PrivateGetOpenOrdersByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PrivateGetOpenOrdersByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetOpenOrdersByInstrumentGet ¶
func (a *TradingApiService) PrivateGetOpenOrdersByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PrivateGetOpenOrdersByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetOrderHistoryByCurrencyGet ¶
func (a *TradingApiService) PrivateGetOrderHistoryByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PrivateGetOrderHistoryByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetOrderHistoryByInstrumentGet ¶
func (a *TradingApiService) PrivateGetOrderHistoryByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PrivateGetOrderHistoryByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetOrderMarginByIdsGet ¶
func (a *TradingApiService) PrivateGetOrderMarginByIdsGet(ctx context.Context, ids []string) (map[string]interface{}, *http.Response, error)
TradingApiService Retrieves initial margins of given orders
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param ids Ids of orders
@return map[string]interface{}
func (*TradingApiService) PrivateGetOrderStateGet ¶
func (a *TradingApiService) PrivateGetOrderStateGet(ctx context.Context, orderId string) (map[string]interface{}, *http.Response, error)
TradingApiService Retrieve the current state of an order.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param orderId The order id
@return map[string]interface{}
func (*TradingApiService) PrivateGetSettlementHistoryByCurrencyGet ¶
func (a *TradingApiService) PrivateGetSettlementHistoryByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PrivateGetSettlementHistoryByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetSettlementHistoryByInstrumentGet ¶
func (a *TradingApiService) PrivateGetSettlementHistoryByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PrivateGetSettlementHistoryByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetUserTradesByCurrencyAndTimeGet ¶
func (*TradingApiService) PrivateGetUserTradesByCurrencyGet ¶
func (a *TradingApiService) PrivateGetUserTradesByCurrencyGet(ctx context.Context, currency string, localVarOptionals *PrivateGetUserTradesByCurrencyGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetUserTradesByInstrumentAndTimeGet ¶
func (*TradingApiService) PrivateGetUserTradesByInstrumentGet ¶
func (a *TradingApiService) PrivateGetUserTradesByInstrumentGet(ctx context.Context, instrumentName string, localVarOptionals *PrivateGetUserTradesByInstrumentGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateGetUserTradesByOrderGet ¶
func (a *TradingApiService) PrivateGetUserTradesByOrderGet(ctx context.Context, orderId string, localVarOptionals *PrivateGetUserTradesByOrderGetOpts) (map[string]interface{}, *http.Response, error)
func (*TradingApiService) PrivateSellGet ¶
func (a *TradingApiService) PrivateSellGet(ctx context.Context, instrumentName string, amount float32, localVarOptionals *PrivateSellGetOpts) (map[string]interface{}, *http.Response, error)
type TransferItem ¶
type TransferItem struct { // The timestamp (seconds since the Unix epoch, with millisecond precision) UpdatedTimestamp int32 `json:"updated_timestamp"` // Transfer direction Direction string `json:"direction,omitempty"` // Amount of funds in given currency Amount float32 `json:"amount"` // 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. OtherSide string `json:"other_side"` // Currency, i.e `\"BTC\"`, `\"ETH\"` Currency string `json:"currency"` // Transfer state, allowed values : `prepared`, `confirmed`, `cancelled`, `waiting_for_admin`, `rejection_reason` State string `json:"state"` // The timestamp (seconds since the Unix epoch, with millisecond precision) CreatedTimestamp int32 `json:"created_timestamp"` // Type of transfer: `user` - sent to user, `subaccount` - sent to subaccount Type string `json:"type"` // Id of transfer Id int32 `json:"id"` }
type UserTrade ¶
type UserTrade struct { // Trade direction of the taker Direction string `json:"direction"` // Currency, i.e `\"BTC\"`, `\"ETH\"` FeeCurrency string `json:"fee_currency"` // Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade OrderId string `json:"order_id"` // The timestamp of the trade Timestamp int32 `json:"timestamp"` // The price of the trade Price float32 `json:"price"` // Option implied volatility for the price (Option only) Iv float32 `json:"iv,omitempty"` // Unique (per currency) trade identifier TradeId string `json:"trade_id"` // User's fee in units of the specified `fee_currency` Fee float32 `json:"fee"` // Order type: `\"limit`, `\"market\"`, or `\"liquidation\"` OrderType string `json:"order_type,omitempty"` // The sequence number of the trade within instrument TradeSeq int32 `json:"trade_seq"` // `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 SelfTrade bool `json:"self_trade"` // order state, `\"open\"`, `\"filled\"`, `\"rejected\"`, `\"cancelled\"`, `\"untriggered\"` or `\"archive\"` (if order was archived) State string `json:"state"` // User defined label (presented only when previously set for order by user) Label string `json:"label,omitempty"` // Index Price at the moment of trade IndexPrice float32 `json:"index_price"` // Trade amount. For perpetual and futures - in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH. Amount float32 `json:"amount"` // Unique instrument identifier InstrumentName string `json:"instrument_name"` // Direction of the \"tick\" (`0` = Plus Tick, `1` = Zero-Plus Tick, `2` = Minus Tick, `3` = Zero-Minus Tick). TickDirection int32 `json:"tick_direction"` // 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) MatchingId string `json:"matching_id"` // Describes what was role of users order: `\"M\"` when it was maker order, `\"T\"` when it was taker order Liquidity string `json:"liquidity,omitempty"` }
type WalletApiService ¶
type WalletApiService service
func (*WalletApiService) PrivateAddToAddressBookGet ¶
func (*WalletApiService) PrivateCancelTransferByIdGet ¶
func (a *WalletApiService) PrivateCancelTransferByIdGet(ctx context.Context, currency string, id int32, localVarOptionals *PrivateCancelTransferByIdGetOpts) (map[string]interface{}, *http.Response, error)
func (*WalletApiService) PrivateCancelWithdrawalGet ¶
func (a *WalletApiService) PrivateCancelWithdrawalGet(ctx context.Context, currency string, id float32) (map[string]interface{}, *http.Response, error)
WalletApiService Cancels withdrawal request
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param id The withdrawal id
@return map[string]interface{}
func (*WalletApiService) PrivateCreateDepositAddressGet ¶
func (a *WalletApiService) PrivateCreateDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
WalletApiService Creates deposit address in currency
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*WalletApiService) PrivateGetAddressBookGet ¶
func (a *WalletApiService) PrivateGetAddressBookGet(ctx context.Context, currency string, type_ string) (map[string]interface{}, *http.Response, error)
WalletApiService Retrieves address book of given type
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param type_ Address book type
@return map[string]interface{}
func (*WalletApiService) PrivateGetCurrentDepositAddressGet ¶
func (a *WalletApiService) PrivateGetCurrentDepositAddressGet(ctx context.Context, currency string) (map[string]interface{}, *http.Response, error)
WalletApiService Retrieve deposit address for currency
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
@return map[string]interface{}
func (*WalletApiService) PrivateGetDepositsGet ¶
func (a *WalletApiService) PrivateGetDepositsGet(ctx context.Context, currency string, localVarOptionals *PrivateGetDepositsGetOpts) (map[string]interface{}, *http.Response, error)
func (*WalletApiService) PrivateGetTransfersGet ¶
func (a *WalletApiService) PrivateGetTransfersGet(ctx context.Context, currency string, localVarOptionals *PrivateGetTransfersGetOpts) (map[string]interface{}, *http.Response, error)
func (*WalletApiService) PrivateGetWithdrawalsGet ¶
func (a *WalletApiService) PrivateGetWithdrawalsGet(ctx context.Context, currency string, localVarOptionals *PrivateGetWithdrawalsGetOpts) (map[string]interface{}, *http.Response, error)
func (*WalletApiService) PrivateRemoveFromAddressBookGet ¶
func (*WalletApiService) PrivateSubmitTransferToSubaccountGet ¶
func (a *WalletApiService) PrivateSubmitTransferToSubaccountGet(ctx context.Context, currency string, amount float32, destination int32) (map[string]interface{}, *http.Response, error)
WalletApiService Transfer funds to a subaccount.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param amount Amount of funds to be transferred
- @param destination Id of destination subaccount
@return map[string]interface{}
func (*WalletApiService) PrivateSubmitTransferToUserGet ¶
func (*WalletApiService) PrivateToggleDepositAddressCreationGet ¶
func (a *WalletApiService) PrivateToggleDepositAddressCreationGet(ctx context.Context, currency string, state bool) (map[string]interface{}, *http.Response, error)
WalletApiService Enable or disable deposit address creation
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param currency The currency symbol
- @param state
@return map[string]interface{}
func (*WalletApiService) PrivateWithdrawGet ¶
type Withdrawal ¶
type Withdrawal struct { // The timestamp (seconds since the Unix epoch, with millisecond precision) UpdatedTimestamp int32 `json:"updated_timestamp"` // Fee in currency Fee float32 `json:"fee,omitempty"` // The timestamp (seconds since the Unix epoch, with millisecond precision) of withdrawal confirmation, `null` when not confirmed ConfirmedTimestamp *int32 `json:"confirmed_timestamp,omitempty"` // Amount of funds in given currency Amount float32 `json:"amount"` // Id of priority level Priority float32 `json:"priority,omitempty"` // Currency, i.e `\"BTC\"`, `\"ETH\"` Currency string `json:"currency"` // Withdrawal state, allowed values : `unconfirmed`, `confirmed`, `cancelled`, `completed`, `interrupted`, `rejected` State string `json:"state"` // Address in proper format for currency Address string `json:"address"` // The timestamp (seconds since the Unix epoch, with millisecond precision) CreatedTimestamp int32 `json:"created_timestamp,omitempty"` // Withdrawal id in Deribit system Id int32 `json:"id,omitempty"` // Transaction id in proper format for currency, `null` if id is not available TransactionId *string `json:"transaction_id"` }
Source Files ¶
- api_account_management.go
- api_authentication.go
- api_internal.go
- api_market_data.go
- api_private.go
- api_public.go
- api_supporting.go
- api_trading.go
- api_wallet.go
- client.go
- configuration.go
- model_address_book_item.go
- model_book_summary.go
- model_currency.go
- model_currency_portfolio.go
- model_currency_withdrawal_priorities.go
- model_deposit.go
- model_instrument.go
- model_key_number_pair.go
- model_order.go
- model_order_id_initial_margin_pair.go
- model_portfolio.go
- model_portfolio_eth.go
- model_position.go
- model_public_trade.go
- model_settlement.go
- model_trades_volumes.go
- model_transfer_item.go
- model_types.go
- model_user_trade.go
- model_withdrawal.go
- response.go